This is the tensorrt inference code for yolov9 instance segmentation.
Download gelan-c-pan.pt.
git clone https://github.com/WongKinYiu/yolov9
pip install -r requirements.txt
python export.py --weights gelan-c-pan.pt --include onnx
1、Use trtexec tool convert onnx model to trt model. You can also try something else, please make sure to get the correct trt model.
/path/to/trtexec --onnx=gelan-c-pan.onnx --saveEngine=gelan-c-pan.engine --fp16
2、run python demo_trt.py, get image output.
python demo_trt.py --engine gelan-c-pan.engine --imgs imgs --out-dir outputs
This project is based on the following projects: