/yolov9-onnx-segmentation

Instance and panoptic segmentation using yolov9 in onnx

Primary LanguagePython

YOLOv9 ONNX Segmentation

python mit

Instance and panoptic segmentation using yolov9 in onnxruntime.

🚀 Quick Start

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

👏 Acknowledgement

This project is based on the following projects:

  • YOLOv9 - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information.
  • ONNX-YOLOv8-Instance-Segmentation - Python scripts performing Instance Segmentation using the YOLOv8 model in ONNX.