Instance and panoptic segmentation using yolov9 in onnxruntime.
Download gelan-c-pan.pt
Prepare an onnx model:
git clone https://github.com/WongKinYiu/yolov9
pip install -r requirements.txt
python export.py --weights gelan-c-pan.pt --include onnx
Perform inference:
git clone https://github.com/spacewalk01/yolov9-onnx-segmentation.git
cd yolov9-onnx-segmentation/onnxruntime
python main.py --model <onnx model> --input <image or folder or video>
Example:
# infer an image
python main.py --model gelan-c-pan.onnx --input test.jpg
# infer a folder(images)
python main.py --model gelan-c-pan.onnx --input folder
# infer a video
python main.py --model gelan-c-pan.onnx --input test.mp4 # the video path
This project is based on the following projects: