export to onnx model failed.
export command:
PYTHONPATH=./ python deploy/export_onnx.py /home/shiby/PycharmProjects/YOLO-World/configs/pretrain/yolo_world_v2_l_clip_large_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py /home/shiby/Downloads/yolo_world_v2_l_clip_large_o365v1_goldg_pretrain-8ff2e744.pth --custom-text /home/shiby/PycharmProjects/YOLO-World/prompt.json --opset 11
output logs: Export ONNX with bbox decoder and NMS ... Loads checkpoint by local backend from path: /home/shiby/Downloads/yolo_world_v2_l_clip_large_o365v1_goldg_pretrain-8ff2e744.pth INFO:lvis.lvis:Loading annotations. INFO:lvis.lvis:Creating index. INFO:lvis.lvis:Index created. <bound method DistancePointBBoxCoder.decode of <mmyolo.models.task_modules.coders.distance_point_bbox_coder.DistancePointBBoxCoder object at 0x72af6b0fd670>> <bound method DistancePointBBoxCoder.decode of <mmyolo.models.task_modules.coders.distance_point_bbox_coder.DistancePointBBoxCoder object at 0x72af6b0fd670>> ONNX export success, save into ./work_dirs/yolo_world_v2_l_clip_large_o365v1_goldg_pretrain-8ff2e744.onnx
prompt.json file content: [["Sculpture"],["Church"],["Mountain"],["River"],["Lake"],["Bridge"],["Castle"],["Beach"],["Park"],["Modern_building"],["Monuments"],["Historical_building"],["Museum"],["Square"],["Ancient_building"],["Fountain"]]
But the finally i get this onnx model struction:
I don't know where I went wrong, hope you can help me. Thinks a lot.
0.0 i have same error with default config. add --without-nms can export a true onnx with network but onnx-demo result is wrong. still debugging....
0.0 i have same error with default config. add --without-nms can export a true onnx with network but onnx-demo result is wrong. still debugging.... 是的 导出不带有后处理的onnx是可以成功的,我使用onnx_demo运行成功了,代码中的后处理有点问题,需要自己修改一下
这应该是一个bug
改完了才看到QAQ
改完了才看到QAQ
你测试导出batch推理了吗?
Encountered the same problem. The onnx model looks like an empty model, with only 340 bytes. Any updates on this issue?
Pytorch: 2.0.1 + cu117 torchvision: 0.15.2 mmcv: 2.0.1 mmcv-lite: 2.0.0rc4 mmdet: 3.0.0 mmyolo: 0.6.0
command: PYTHONPATH=./ python deploy/export_onnx.py --config configs/pretrain/yolo_world_v2_l_clip_large_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py --checkpoint weights/yolo_world_v2_l_clip_large_o365v1_goldg_pretrain-8ff2e744.pth --custom-text deploy/custom_prompt/prompt_text.json --opset 12
Any help is appreciated!
0.0 i have same error with default config. add --without-nms can export a true onnx with network but onnx-demo result is wrong. still debugging.... 是的 导出不带有后处理的onnx是可以成功的,我使用onnx_demo运行成功了,代码中的后处理有点问题,需要自己修改一下
这应该是一个bug
你好啊,我按你们的方法加上了--without-nms成功导出onnx。然后我在onnx-demo中输出的图像,是可以检测到物体,但框的位置好画的不对,是后处理的原因吗?你说这里代码有bug,怎么解决?谢谢解答!
我成功导出了正常的onnx,但在对同一个图片的推理上,onnx和pth的指标并不总是一致,有时onnx略高,有时pth略高,该怎么解决呢?
0.0 i have same error with default config. add --without-nms can export a true onnx with network but onnx-demo result is wrong. still debugging.... 是的 导出不带有后处理的onnx是可以成功的,我使用onnx_demo运行成功了,代码中的后处理有点问题,需要自己修改一下
这应该是一个bug
不这样修改,推理的结果是错误的,就是一个bug
这应该是一个bug