|
|
2 年之前 | |
|---|---|---|
| .. | ||
| README.md | 2 年之前 | |
| onnx_inference.py | 2 年之前 | |
First, you should move to by:
cd <RT-ODLab>
cd tools/
Then, you can:
Convert a standard YOLO model by:
python3 export_onnx.py -m yolov1 --weight ../weight/coco/yolov1/yolov1_coco.pth -nc 80 --img_size 640
Notes:
To customize an input shape for onnx model, modify the following code in tools/export_onnx.py:
dummy_input = torch.randn(args.batch_size, 3, args.img_size, args.img_size)
Step1.
cd <YOLOX_HOME>/deployment/ONNXRuntime
Step2.
python3 onnx_inference.py --model ../../weights/onnx/11/yolov1.onnx -i ../test_image.jpg -s 0.3 --img_size 640
Notes: