yolact_edge icon indicating copy to clipboard operation
yolact_edge copied to clipboard

convert from yolact_edge to onnx

Open yujin6056 opened this issue 3 years ago • 2 comments

I made the codes to convert from yolact_edge to onnx with reference to https://github.com/hpc203/yolact-opencv-dnn-cpp-python. Here is https://github.com/yujin6056/yolactedge-onnx-conversion.

Let me know if you have any questions.

yujin6056 avatar Feb 18 '22 05:02 yujin6056

Hi, I just ran your code try to convert the 'yolact_edge_54_800000.pth' file from official yolact_edge repo but I receive the following error: RuntimeError: Tried to trace <__torch__.yolact_edge.yolact.FPN_phase_1 object at 0x60b95f0> but it is not part of the active trace. Modules that are called during a trace must be registered as submodules of the thing being traced. Do you have any suggestion to solve? Thanks in advance

damianozappia avatar May 05 '22 15:05 damianozappia

Hi @damianozappia. In yolact.py, try to remove lines @script_method_wrapper in classes FPN, FPN_phase_1 and FPN_phase_2. It worked for me, though I cannot explain why and I do not know if it has an impact on the resulting ONNX file.

anthonygofin avatar Oct 19 '22 15:10 anthonygofin