yolact
yolact copied to clipboard
Yolact++ to onnx?
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.
you need change the
class FPN(ScriptModuleWrapper):
to
class FPN(nn.Module):
this doesn't work for me...did it actually work for u?
您的邮件已收到 谢谢
Any update on this? @zhoujinhai
Any update on this? @zhoujinhai
Yes, It worked for me!
how to do this?
Please follow this article for ONNX support of Yolact++ - https://medium.com/@abhiagwl4262/yolact-pyotorch-to-onnx-tensorrt-9e6a37f6b974