object-detection computer-vision yolov9 pypi dataset:detection-datasets/coco arxiv:2402.13616 license:gpl-3.0 region:us
---
license: gpl-3.0
tags:
  - object-detection
  - computer-vision
  - yolov9
  - pypi
datasets:
  - detection-datasets/coco
---

### Model Description
[YOLOv9: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2402.13616)

[YOLOv9-Pip: Packaged version of the Yolov9 repository](https://github.com/kadirnar/yolov9-pip)

[Paper Repo: Implementation of paper - YOLOv9](https://github.com/WongKinYiu/yolov9)

### Installation
```
pip install yolov9pip
```

### Yolov7 Inference
```python
import yolov9

# load pretrained or custom model
model = yolov7.load('kadirnar/yolov9-gelan-c')

# set model parameters
model.conf = 0.25  # NMS confidence threshold
model.iou = 0.45  # NMS IoU threshold
model.classes = None  # (optional list) filter by class

# set image
imgs = 'inference/images'

# perform inference
results = model(imgs)

# inference with larger input size and test time augmentation
results = model(img, size=640, augment=True)

# parse results
predictions = results.pred[0]
boxes = predictions[:, :4] # x1, y1, x2, y2
scores = predictions[:, 4]
categories = predictions[:, 5]

# show detection bounding boxes on image
results.show()
```

### BibTeX Entry and Citation Info
 ```
@article{wang2024yolov9,
  title={{YOLOv9}: Learning What You Want to Learn Using Programmable Gradient Information},
  author={Wang, Chien-Yao  and Liao, Hong-Yuan Mark},
  booktitle={arXiv preprint arXiv:2402.13616},
  year={2024}
}
```
