yolact icon indicating copy to clipboard operation
yolact copied to clipboard

Yolact++ to onnx?

Open MiaoRain opened this issue 3 years ago • 7 comments

Has anyone successfully converted a Yolact++ model to onnx? preds = net(batch) dummy_input = Variable(torch.randn(1, 3, 550, 550)) torch.onnx.export(net, dummy_input, "yolact_0421_20000.onnx", verbose=True)

but got the errors, any suggestions would be appreciated. RuntimeError: Tried to trace <__torch__.yolact.FPN object at 0x9c26df60> 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.

MiaoRain avatar Apr 25 '21 07:04 MiaoRain

you need change the

class FPN(ScriptModuleWrapper):

to

class FPN(nn.Module):

zhoujinhai avatar May 09 '22 07:05 zhoujinhai

this doesn't work for me...did it actually work for u?

avickars avatar Jun 09 '22 23:06 avickars

您的邮件已收到 谢谢

zhoujinhai avatar Jun 09 '22 23:06 zhoujinhai

Any update on this? @zhoujinhai

avickars avatar Jun 17 '22 23:06 avickars

Any update on this? @zhoujinhai

Yes, It worked for me!

zhoujinhai avatar Jul 01 '22 06:07 zhoujinhai

how to do this?

sarmientoj24 avatar Jul 13 '22 12:07 sarmientoj24

Please follow this article for ONNX support of Yolact++ - https://medium.com/@abhiagwl4262/yolact-pyotorch-to-onnx-tensorrt-9e6a37f6b974

abhiagwl4262 avatar Jul 20 '22 08:07 abhiagwl4262