-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot deploy model to other inference engine (e.g. ONNX, OpenVINO) #38
Comments
Unfortunately, we did not test the deployment process for ONNX. I can transfer the code to the latest MMDetection if I have time later. |
@zhanggang001 , Thanks for your reply!
OK, I'll wait for your implement. I'll try to challenge converting by myself, too. Additional info:It seems that RefineMask is able to work on MMDetection v2.28.2 with little bit fix below.
I'll ask about this problem at open-mmlab/mmdeploy community, because I think it's not the problem of RefineMask but would be related to MMdeploy or pytorch 1.13.x. My workaround fix info with MMdetection 2.28.2
|
Hello, have you successfully exported onnx? |
Unfortunately, No. |
Hello, I followed your advice and modified the refinemask code to adapt to mmdetection2.28.2. The model can be trained but not tested. Have you ever encountered this situation(listed below)? How to solve it? Thank you! |
Hi @hnyang00 , |
Thank you for your reply. I have solved the above problem, which is caused by the different format of "results" returned by the previous version of mmdet. However, after I modified it, the values in the val stage were all 0, and I am still solving new problems. |
Hello,
I'm interested in the RefineMask method and I'd like to use it to cut out the detected image from pictures.
I could train with this repository, but unfortunately, I cannot deploy the trained model to other inference engine. I'm afraid that it is because this official implementation is based on too old MMDetection code (v2.3.0).
I tried with
tools/pytorch2onnx.py
but the result is failed.I also tried with MMdeploy v0.14.0 but the result is failed too.
At last, I tried to implement RefineMask into MMDetection v2.28.2 (latest version of 2.x) and tried with MMdeploy v0.14.0. I think I could implement correctly, and it works on MMDetection v2.28.2, but converting the model is failed.
All of them can inference on the MMDetection, but it is failed when converting model with MMDeploy, at
torch.jit.trace
andtorch.jit.script
.I tried with Python 3.7, PyTorch 1.13.1 and CUDA 11.7.
Are there any solution to convert RefineMask pretrained
.pth
model to.onnx
model or other formats?Or, if anyone knows, could you tell me the implementation to other train/inference platforms?
The text was updated successfully, but these errors were encountered: