BoxInstSeg icon indicating copy to clipboard operation
BoxInstSeg copied to clipboard

how to convert boxInst to onnx

Open StephenZhao1 opened this issue 11 months ago • 1 comments

when I try to conver boxInst to onnx, I met the error like this: File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/jit/_trace.py", line 1160, in _get_trace_graph outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/jit/_trace.py", line 127, in forward graph, out = torch._C._create_graph_by_tracing( File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/jit/_trace.py", line 118, in wrapper outs.append(self.inner(*trace_inputs)) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1039, in _slow_forward result = self.forward(*input, **kwargs) File "/opt/conda/envs/py39/lib/python3.9/site-packages/mmcv/runner/fp16_utils.py", line 110, in new_func return old_func(*args, **kwargs) File "/home/zhaoqihui/Repo/BoxInstSeg/mmdet/models/detectors/base.py", line 169, in forward return self.onnx_export(img[0], img_metas[0]) File "/home/zhaoqihui/Repo/BoxInstSeg/mmdet/models/detectors/single_stage.py", line 153, in onnx_export outs = self.bbox_head(x) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1039, in _slow_forward result = self.forward(*input, **kwargs) TypeError: forward() missing 1 required positional argument: 'top_module'

StephenZhao1 avatar Jan 15 '25 06:01 StephenZhao1

looking forward to your reply,thx a lot.

StephenZhao1 avatar Jan 15 '25 06:01 StephenZhao1