Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,63 @@
|
|
1 |
---
|
2 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: gpl-3.0
|
3 |
+
tags:
|
4 |
+
- object-detection
|
5 |
+
- computer-vision
|
6 |
+
- yolov9
|
7 |
+
- pypi
|
8 |
+
datasets:
|
9 |
+
- detection-datasets/coco
|
10 |
---
|
11 |
+
|
12 |
+
### Model Description
|
13 |
+
[YOLOv9: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2402.13616)
|
14 |
+
|
15 |
+
[YOLOv9-Pip: Packaged version of the Yolov9 repository](https://github.com/kadirnar/yolov9-pip)
|
16 |
+
|
17 |
+
[Paper Repo: Implementation of paper - YOLOv9](https://github.com/WongKinYiu/yolov9)
|
18 |
+
|
19 |
+
### Installation
|
20 |
+
```
|
21 |
+
pip install yolov9pip
|
22 |
+
```
|
23 |
+
|
24 |
+
### Yolov7 Inference
|
25 |
+
```python
|
26 |
+
import yolov9
|
27 |
+
|
28 |
+
# load pretrained or custom model
|
29 |
+
model = yolov7.load('kadirnar/yolov7-v0.1', hf_model=True)
|
30 |
+
|
31 |
+
# set model parameters
|
32 |
+
model.conf = 0.25 # NMS confidence threshold
|
33 |
+
model.iou = 0.45 # NMS IoU threshold
|
34 |
+
model.classes = None # (optional list) filter by class
|
35 |
+
|
36 |
+
# set image
|
37 |
+
imgs = 'inference/images'
|
38 |
+
|
39 |
+
# perform inference
|
40 |
+
results = model(imgs)
|
41 |
+
|
42 |
+
# inference with larger input size and test time augmentation
|
43 |
+
results = model(img, size=640, augment=True)
|
44 |
+
|
45 |
+
# parse results
|
46 |
+
predictions = results.pred[0]
|
47 |
+
boxes = predictions[:, :4] # x1, y1, x2, y2
|
48 |
+
scores = predictions[:, 4]
|
49 |
+
categories = predictions[:, 5]
|
50 |
+
|
51 |
+
# show detection bounding boxes on image
|
52 |
+
results.show()
|
53 |
+
```
|
54 |
+
|
55 |
+
### BibTeX Entry and Citation Info
|
56 |
+
```
|
57 |
+
@article{wang2024yolov9,
|
58 |
+
title={{YOLOv9}: Learning What You Want to Learn Using Programmable Gradient Information},
|
59 |
+
author={Wang, Chien-Yao and Liao, Hong-Yuan Mark},
|
60 |
+
booktitle={arXiv preprint arXiv:2402.13616},
|
61 |
+
year={2024}
|
62 |
+
}
|
63 |
+
```
|