Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.44k stars 2.21k forks source link

Get Segmentation fault when set opset=9 #375

Closed quanh1990 closed 3 years ago

quanh1990 commented 3 years ago

Is the lowest version of onnx opset 10 ?

python3 tools/export_onnx.py \ --output-name weights/yolox_s.onnx \ -f exps/example/yolox_voc/yolox_voc_s.py \ -n yolox-s \ -c YOLOX_outputs/yolox_voc_s/best_ckpt.pth.tar \ -o 9

Then I got Segmentation fault (core dumped)

Thanks

GOATmessi8 commented 3 years ago

Fine... If you really wanna use opset 9, you have to check out which operations this version doesn't support. I suppose the issue may come from the nearest upsample and the focus slice operator. So you may change to bilinear upsample (very little performance influence) and replace the focus with a normal conv 3x3 and fine-tune the model.

quanh1990 commented 3 years ago

Fine... If you really wanna use opset 9, you have to check out which operations this version doesn't support. I suppose the issue may come from the nearest upsample and the focus slice operator. So you may change to bilinear upsample (very little performance influence) and replace the focus with a normal conv 3x3 and fine-tune the model.

Thanks a lot! I'll try.

zhanggan123456 commented 3 years ago

Have you succeeded in visualization

quanh1990 commented 3 years ago

Have you succeeded in visualization

Very successful, what is your problem?

quanh1990 commented 3 years ago

Have you succeeded in visualization

没啥问题兄弟,你遇到啥问题?

zhanggan123456 commented 3 years ago

你可视化成功了吗

没啥问题兄弟,你遇到啥问题?

可以pull一下你的执行语句吗?参数配置

quanh1990 commented 3 years ago

你可视化成功了吗

没啥问题兄弟,你遇到啥问题?

可以pull一下你的执行语句吗?参数配置

哪个环节?训练/eval还是推理?

zhanggan123456 commented 3 years ago

你可视化成功了吗

没啥问题兄弟,你遇到啥问题?

可以pull一下你的执行语句吗?参数配置

哪个环节?训练/eval还是推理?

网络结构可视化

zhanggan123456 commented 3 years ago

你可视化成功了吗

没啥问题兄弟,你遇到啥问题?

可以pull一下你的执行语句吗?参数配置

哪个环节?训练/eval还是推理?

网络结构可视化

就是将pth权重文件转化为onnx格式文件的语句

xiafan-su commented 3 years ago

Hello, 请问你转onnx用opset=9成功了嘛,请问具体是怎么做的呢,有分支可以参考一下嘛?

xiafan-su commented 3 years ago

0001-Fix-onnx-export-opset-9-segmentation-fault-issue.patch.zip

尝试了个patch但是需要重新训练,感兴趣的可以试一下