Python version of YOLOX object detection base on MegEngine.
python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html
python3 convert_weights.py -w yolox_s.pth.tar -o yolox_s_mge.pkl
This part is the same as torch's python demo, but no need to specify device.
python3 demo.py image -n yolox-s -c yolox_s_mge.pkl --path ../../../assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 640 --save_result
Note: result model is dumped with
optimize_for_inference
andenable_fuse_conv_bias_nonlinearity
.
python3 dump.py -n yolox-s -c yolox_s_mge.pkl --dump_path yolox_s.mge