SakshiRathi77 commited on
Commit
b1c75a6
·
verified ·
1 Parent(s): 5d35d9a

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -329
README.md DELETED
@@ -1,329 +0,0 @@
1
- # YOLOv9
2
-
3
- Implementation of paper - [YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information](https://arxiv.org/abs/2402.13616)
4
-
5
- [![arxiv.org](http://img.shields.io/badge/cs.CV-arXiv%3A2402.13616-B31B1B.svg)](https://arxiv.org/abs/2402.13616)
6
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/kadirnar/Yolov9)
7
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/merve/yolov9)
8
- [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov9-object-detection-on-custom-dataset.ipynb)
9
- [![OpenCV](https://img.shields.io/badge/OpenCV-BlogPost-black?logo=opencv&labelColor=blue&color=black)](https://learnopencv.com/yolov9-advancing-the-yolo-legacy/)
10
-
11
- <div align="center">
12
- <a href="./">
13
- <img src="./figure/performance.png" width="79%"/>
14
- </a>
15
- </div>
16
-
17
-
18
- ## Performance
19
-
20
- MS COCO
21
-
22
- | Model | Test Size | AP<sup>val</sup> | AP<sub>50</sub><sup>val</sup> | AP<sub>75</sub><sup>val</sup> | Param. | FLOPs |
23
- | :-- | :-: | :-: | :-: | :-: | :-: | :-: |
24
- | [**YOLOv9-T**]() | 640 | **38.3%** | **53.1%** | **41.3%** | **2.0M** | **7.7G** |
25
- | [**YOLOv9-S**]() | 640 | **46.8%** | **63.4%** | **50.7%** | **7.1M** | **26.4G** |
26
- | [**YOLOv9-M**]() | 640 | **51.4%** | **68.1%** | **56.1%** | **20.0M** | **76.3G** |
27
- | [**YOLOv9-C**](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-c-converted.pt) | 640 | **53.0%** | **70.2%** | **57.8%** | **25.3M** | **102.1G** |
28
- | [**YOLOv9-E**](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-e-converted.pt) | 640 | **55.6%** | **72.8%** | **60.6%** | **57.3M** | **189.0G** |
29
- <!-- | [**YOLOv9 (ReLU)**]() | 640 | **51.9%** | **69.1%** | **56.5%** | **25.3M** | **102.1G** | -->
30
-
31
- <!-- tiny, small, and medium models will be released after the paper be accepted and published. -->
32
-
33
- ## Useful Links
34
-
35
- <details><summary> <b>Expand</b> </summary>
36
-
37
- Custom training: https://github.com/WongKinYiu/yolov9/issues/30#issuecomment-1960955297
38
-
39
- ONNX export: https://github.com/WongKinYiu/yolov9/issues/2#issuecomment-1960519506 https://github.com/WongKinYiu/yolov9/issues/40#issue-2150697688 https://github.com/WongKinYiu/yolov9/issues/130#issue-2162045461
40
-
41
- ONNX export for segmentation: https://github.com/WongKinYiu/yolov9/issues/260#issue-2191162150
42
-
43
- TensorRT inference: https://github.com/WongKinYiu/yolov9/issues/143#issuecomment-1975049660 https://github.com/WongKinYiu/yolov9/issues/34#issue-2150393690 https://github.com/WongKinYiu/yolov9/issues/79#issue-2153547004 https://github.com/WongKinYiu/yolov9/issues/143#issue-2164002309
44
-
45
- QAT TensorRT: https://github.com/WongKinYiu/yolov9/issues/327#issue-2229284136 https://github.com/WongKinYiu/yolov9/issues/253#issue-2189520073
46
-
47
- TFLite: https://github.com/WongKinYiu/yolov9/issues/374#issuecomment-2065751706
48
-
49
- OpenVINO: https://github.com/WongKinYiu/yolov9/issues/164#issue-2168540003
50
-
51
- C# ONNX inference: https://github.com/WongKinYiu/yolov9/issues/95#issue-2155974619
52
-
53
- C# OpenVINO inference: https://github.com/WongKinYiu/yolov9/issues/95#issuecomment-1968131244
54
-
55
- OpenCV: https://github.com/WongKinYiu/yolov9/issues/113#issuecomment-1971327672
56
-
57
- Hugging Face demo: https://github.com/WongKinYiu/yolov9/issues/45#issuecomment-1961496943
58
-
59
- CoLab demo: https://github.com/WongKinYiu/yolov9/pull/18
60
-
61
- ONNXSlim export: https://github.com/WongKinYiu/yolov9/pull/37
62
-
63
- YOLOv9 ROS: https://github.com/WongKinYiu/yolov9/issues/144#issue-2164210644
64
-
65
- YOLOv9 ROS TensorRT: https://github.com/WongKinYiu/yolov9/issues/145#issue-2164218595
66
-
67
- YOLOv9 Julia: https://github.com/WongKinYiu/yolov9/issues/141#issuecomment-1973710107
68
-
69
- YOLOv9 MLX: https://github.com/WongKinYiu/yolov9/issues/258#issue-2190586540
70
-
71
- YOLOv9 StrongSORT with OSNet: https://github.com/WongKinYiu/yolov9/issues/299#issue-2212093340
72
-
73
- YOLOv9 ByteTrack: https://github.com/WongKinYiu/yolov9/issues/78#issue-2153512879
74
-
75
- YOLOv9 DeepSORT: https://github.com/WongKinYiu/yolov9/issues/98#issue-2156172319
76
-
77
- YOLOv9 counting: https://github.com/WongKinYiu/yolov9/issues/84#issue-2153904804
78
-
79
- YOLOv9 face detection: https://github.com/WongKinYiu/yolov9/issues/121#issue-2160218766
80
-
81
- YOLOv9 segmentation onnxruntime: https://github.com/WongKinYiu/yolov9/issues/151#issue-2165667350
82
-
83
- Comet logging: https://github.com/WongKinYiu/yolov9/pull/110
84
-
85
- MLflow logging: https://github.com/WongKinYiu/yolov9/pull/87
86
-
87
- AnyLabeling tool: https://github.com/WongKinYiu/yolov9/issues/48#issue-2152139662
88
-
89
- AX650N deploy: https://github.com/WongKinYiu/yolov9/issues/96#issue-2156115760
90
-
91
- Conda environment: https://github.com/WongKinYiu/yolov9/pull/93
92
-
93
- AutoDL docker environment: https://github.com/WongKinYiu/yolov9/issues/112#issue-2158203480
94
-
95
- </details>
96
-
97
-
98
- ## Installation
99
-
100
- Docker environment (recommended)
101
- <details><summary> <b>Expand</b> </summary>
102
-
103
- ``` shell
104
- # create the docker container, you can change the share memory size if you have more.
105
- nvidia-docker run --name yolov9 -it -v your_coco_path/:/coco/ -v your_code_path/:/yolov9 --shm-size=64g nvcr.io/nvidia/pytorch:21.11-py3
106
-
107
- # apt install required packages
108
- apt update
109
- apt install -y zip htop screen libgl1-mesa-glx
110
-
111
- # pip install required packages
112
- pip install seaborn thop
113
-
114
- # go to code folder
115
- cd /yolov9
116
- ```
117
-
118
- </details>
119
-
120
-
121
- ## Evaluation
122
-
123
- [`yolov9-c-converted.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-c-converted.pt) [`yolov9-e-converted.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-e-converted.pt) [`yolov9-c.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-c.pt) [`yolov9-e.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-e.pt) [`gelan-c.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c.pt) [`gelan-e.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-e.pt)
124
-
125
- ``` shell
126
- # evaluate converted yolov9 models
127
- python val.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './yolov9-c-converted.pt' --save-json --name yolov9_c_c_640_val
128
-
129
- # evaluate yolov9 models
130
- # python val_dual.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './yolov9-c.pt' --save-json --name yolov9_c_640_val
131
-
132
- # evaluate gelan models
133
- # python val.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './gelan-c.pt' --save-json --name gelan_c_640_val
134
- ```
135
-
136
- You will get the results:
137
-
138
- ```
139
- Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.530
140
- Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.702
141
- Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.578
142
- Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.362
143
- Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.585
144
- Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693
145
- Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.392
146
- Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.652
147
- Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.702
148
- Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.541
149
- Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.760
150
- Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.844
151
- ```
152
-
153
-
154
- ## Training
155
-
156
- Data preparation
157
-
158
- ``` shell
159
- bash scripts/get_coco.sh
160
- ```
161
-
162
- * Download MS COCO dataset images ([train](http://images.cocodataset.org/zips/train2017.zip), [val](http://images.cocodataset.org/zips/val2017.zip), [test](http://images.cocodataset.org/zips/test2017.zip)) and [labels](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/coco2017labels-segments.zip). If you have previously used a different version of YOLO, we strongly recommend that you delete `train2017.cache` and `val2017.cache` files, and redownload [labels](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/coco2017labels-segments.zip)
163
-
164
- Single GPU training
165
-
166
- ``` shell
167
- # train yolov9 models
168
- python train_dual.py --workers 8 --device 0 --batch 16 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
169
-
170
- # train gelan models
171
- # python train.py --workers 8 --device 0 --batch 32 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
172
- ```
173
-
174
- Multiple GPU training
175
-
176
- ``` shell
177
- # train yolov9 models
178
- python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train_dual.py --workers 8 --device 0,1,2,3,4,5,6,7 --sync-bn --batch 128 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
179
-
180
- # train gelan models
181
- # python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 8 --device 0,1,2,3 --sync-bn --batch 128 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
182
- ```
183
-
184
-
185
- ## Re-parameterization
186
-
187
- See [reparameterization.ipynb](https://github.com/WongKinYiu/yolov9/blob/main/tools/reparameterization.ipynb).
188
-
189
-
190
- ## Inference
191
-
192
- <div align="center">
193
- <a href="./">
194
- <img src="./figure/horses_prediction.jpg" width="49%"/>
195
- </a>
196
- </div>
197
-
198
- ``` shell
199
- # inference converted yolov9 models
200
- python detect.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './yolov9-c-converted.pt' --name yolov9_c_c_640_detect
201
-
202
- # inference yolov9 models
203
- # python detect_dual.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './yolov9-c.pt' --name yolov9_c_640_detect
204
-
205
- # inference gelan models
206
- # python detect.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './gelan-c.pt' --name gelan_c_c_640_detect
207
- ```
208
-
209
-
210
- ## Citation
211
-
212
- ```
213
- @article{wang2024yolov9,
214
- title={{YOLOv9}: Learning What You Want to Learn Using Programmable Gradient Information},
215
- author={Wang, Chien-Yao and Liao, Hong-Yuan Mark},
216
- booktitle={arXiv preprint arXiv:2402.13616},
217
- year={2024}
218
- }
219
- ```
220
-
221
- ```
222
- @article{chang2023yolor,
223
- title={{YOLOR}-Based Multi-Task Learning},
224
- author={Chang, Hung-Shuo and Wang, Chien-Yao and Wang, Richard Robert and Chou, Gene and Liao, Hong-Yuan Mark},
225
- journal={arXiv preprint arXiv:2309.16921},
226
- year={2023}
227
- }
228
- ```
229
-
230
-
231
- ## Teaser
232
-
233
- Parts of code of [YOLOR-Based Multi-Task Learning](https://arxiv.org/abs/2309.16921) are released in the repository.
234
-
235
- <div align="center">
236
- <a href="./">
237
- <img src="./figure/multitask.png" width="99%"/>
238
- </a>
239
- </div>
240
-
241
- #### Object Detection
242
-
243
- [`gelan-c-det.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-det.pt)
244
-
245
- `object detection`
246
-
247
- ``` shell
248
- # coco/labels/{split}/*.txt
249
- # bbox or polygon (1 instance 1 line)
250
- python train.py --workers 8 --device 0 --batch 32 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c-det --hyp hyp.scratch-high.yaml --min-items 0 --epochs 300 --close-mosaic 10
251
- ```
252
-
253
- | Model | Test Size | Param. | FLOPs | AP<sup>box</sup> |
254
- | :-- | :-: | :-: | :-: | :-: |
255
- | [**GELAN-C-DET**](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-det.pt) | 640 | 25.3M | 102.1G |**52.3%** |
256
- | [**YOLOv9-C-DET**]() | 640 | 25.3M | 102.1G | **53.0%** |
257
-
258
- #### Instance Segmentation
259
-
260
- [`gelan-c-seg.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-seg.pt)
261
-
262
- `object detection` `instance segmentation`
263
-
264
- ``` shell
265
- # coco/labels/{split}/*.txt
266
- # polygon (1 instance 1 line)
267
- python segment/train.py --workers 8 --device 0 --batch 32 --data coco.yaml --img 640 --cfg models/segment/gelan-c-seg.yaml --weights '' --name gelan-c-seg --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
268
- ```
269
-
270
- | Model | Test Size | Param. | FLOPs | AP<sup>box</sup> | AP<sup>mask</sup> |
271
- | :-- | :-: | :-: | :-: | :-: | :-: |
272
- | [**GELAN-C-SEG**](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-seg.pt) | 640 | 27.4M | 144.6G | **52.3%** | **42.4%** |
273
- | [**YOLOv9-C-SEG**]() | 640 | 27.4M | 145.5G | **53.3%** | **43.5%** |
274
-
275
- #### Panoptic Segmentation
276
-
277
- [`gelan-c-pan.pt`](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-pan.pt)
278
-
279
- `object detection` `instance segmentation` `semantic segmentation` `stuff segmentation` `panoptic segmentation`
280
-
281
- ``` shell
282
- # coco/labels/{split}/*.txt
283
- # polygon (1 instance 1 line)
284
- # coco/stuff/{split}/*.txt
285
- # polygon (1 semantic 1 line)
286
- python panoptic/train.py --workers 8 --device 0 --batch 32 --data coco.yaml --img 640 --cfg models/panoptic/gelan-c-pan.yaml --weights '' --name gelan-c-pan --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
287
- ```
288
-
289
- | Model | Test Size | Param. | FLOPs | AP<sup>box</sup> | AP<sup>mask</sup> | mIoU<sub>164k/10k</sub><sup>semantic</sup> | mIoU<sup>stuff</sup> | PQ<sup>panoptic</sup> |
290
- | :-- | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
291
- | [**GELAN-C-PAN**](https://github.com/WongKinYiu/yolov9/releases/download/v0.1/gelan-c-pan.pt) | 640 | 27.6M | 146.7G | **52.6%** | **42.5%** | **39.0%/48.3%** | **52.7%** | **39.4%** |
292
- | [**YOLOv9-C-PAN**]() | 640 | 28.8M | 187.0G | **52.7%** | **43.0%** | **39.8%/-** | **52.2%** | **40.5%** |
293
-
294
- #### Image Captioning (not yet released)
295
-
296
- <!--[`gelan-c-cap.pt`]()-->
297
-
298
- `object detection` `instance segmentation` `semantic segmentation` `stuff segmentation` `panoptic segmentation` `image captioning`
299
-
300
- ``` shell
301
- # coco/labels/{split}/*.txt
302
- # polygon (1 instance 1 line)
303
- # coco/stuff/{split}/*.txt
304
- # polygon (1 semantic 1 line)
305
- # coco/annotations/*.json
306
- # json (1 split 1 file)
307
- python caption/train.py --workers 8 --device 0 --batch 32 --data coco.yaml --img 640 --cfg models/caption/gelan-c-cap.yaml --weights '' --name gelan-c-cap --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
308
- ```
309
-
310
- | Model | Test Size | Param. | FLOPs | AP<sup>box</sup> | AP<sup>mask</sup> | mIoU<sub>164k/10k</sub><sup>semantic</sup> | mIoU<sup>stuff</sup> | PQ<sup>panoptic</sup> | BLEU@4<sup>caption</sup> | CIDEr<sup>caption</sup> |
311
- | :-- | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
312
- | [**GELAN-C-CAP**]() | 640 | 47.5M | - | **51.9%** | **42.6%** | **42.5%/-** | **56.5%** | **41.7%** | **38.8** | **122.3** |
313
- | [**YOLOv9-C-CAP**]() | 640 | 47.5M | - | **52.1%** | **42.6%** | **43.0%/-** | **56.4%** | **42.1%** | **39.1** | **122.0** |
314
- <!--| [**YOLOR-MT**]() | 640 | 79.3M | - | **51.0%** | **41.7%** | **-/49.6%** | **55.9%** | **40.5%** | **35.7** | **112.7** |-->
315
-
316
-
317
- ## Acknowledgements
318
-
319
- <details><summary> <b>Expand</b> </summary>
320
-
321
- * [https://github.com/AlexeyAB/darknet](https://github.com/AlexeyAB/darknet)
322
- * [https://github.com/WongKinYiu/yolor](https://github.com/WongKinYiu/yolor)
323
- * [https://github.com/WongKinYiu/yolov7](https://github.com/WongKinYiu/yolov7)
324
- * [https://github.com/VDIGPKU/DynamicDet](https://github.com/VDIGPKU/DynamicDet)
325
- * [https://github.com/DingXiaoH/RepVGG](https://github.com/DingXiaoH/RepVGG)
326
- * [https://github.com/ultralytics/yolov5](https://github.com/ultralytics/yolov5)
327
- * [https://github.com/meituan/YOLOv6](https://github.com/meituan/YOLOv6)
328
-
329
- </details>