Spaces:
Running
Running
📝 [update] Doc, fix the MEM leak
Browse files
README.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
| 3 |
> [!CAUTION]
|
| 4 |
> We wanted to inform you that the training code for this project is still in progress, and there are two known issues:
|
| 5 |
>
|
| 6 |
-
> - CPU memory leak during training
|
| 7 |
> - Slower convergence speed
|
| 8 |
>
|
| 9 |
> We strongly recommend refraining from training the model until version 1.0 is released.
|
|
@@ -57,110 +56,3 @@ pip install -r requirements.txt
|
|
| 57 |
|
| 58 |
<table>
|
| 59 |
<tr><td>
|
| 60 |
-
|
| 61 |
-
## Task
|
| 62 |
-
|
| 63 |
-
These are simple examples. For more customization details, please refer to [Notebooks](examples) and lower-level modifications **[HOWTO](docs/HOWTO.md)**.
|
| 64 |
-
|
| 65 |
-
## Training
|
| 66 |
-
|
| 67 |
-
To train YOLO on your machine/dataset:
|
| 68 |
-
|
| 69 |
-
1. Modify the configuration file `yolo/config/dataset/**.yaml` to point to your dataset.
|
| 70 |
-
2. Run the training script:
|
| 71 |
-
|
| 72 |
-
```shell
|
| 73 |
-
python yolo/lazy.py task=train dataset=** use_wandb=True
|
| 74 |
-
python yolo/lazy.py task=train task.data.batch_size=8 model=v9-c weight=False # or more args
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
### Transfer Learning
|
| 78 |
-
|
| 79 |
-
To perform transfer learning with YOLOv9:
|
| 80 |
-
|
| 81 |
-
```shell
|
| 82 |
-
python yolo/lazy.py task=train task.data.batch_size=8 model=v9-c dataset={dataset_config} device={cpu, mps, cuda}
|
| 83 |
-
```
|
| 84 |
-
|
| 85 |
-
### Inference
|
| 86 |
-
|
| 87 |
-
To use a model for object detection, use:
|
| 88 |
-
|
| 89 |
-
```shell
|
| 90 |
-
python yolo/lazy.py # if cloned from GitHub
|
| 91 |
-
python yolo/lazy.py task=inference \ # default is inference
|
| 92 |
-
name=AnyNameYouWant \ # AnyNameYouWant
|
| 93 |
-
device=cpu \ # hardware cuda, cpu, mps
|
| 94 |
-
model=v9-s \ # model version: v9-c, m, s
|
| 95 |
-
task.nms.min_confidence=0.1 \ # nms config
|
| 96 |
-
task.fast_inference=onnx \ # onnx, trt, deploy
|
| 97 |
-
task.data.source=data/toy/images/train \ # file, dir, webcam
|
| 98 |
-
+quite=True \ # Quite Output
|
| 99 |
-
yolo task.data.source={Any Source} # if pip installed
|
| 100 |
-
yolo task=inference task.data.source={Any}
|
| 101 |
-
```
|
| 102 |
-
|
| 103 |
-
### Validation
|
| 104 |
-
|
| 105 |
-
To validate model performance, or generate a json file in COCO format:
|
| 106 |
-
|
| 107 |
-
```shell
|
| 108 |
-
python yolo/lazy.py task=validation
|
| 109 |
-
python yolo/lazy.py task=validation dataset=toy
|
| 110 |
-
```
|
| 111 |
-
|
| 112 |
-
## Contributing
|
| 113 |
-
|
| 114 |
-
Contributions to the YOLO project are welcome! See [CONTRIBUTING](docs/CONTRIBUTING.md) for guidelines on how to contribute.
|
| 115 |
-
|
| 116 |
-
### TODO Diagrams
|
| 117 |
-
|
| 118 |
-
```mermaid
|
| 119 |
-
flowchart TB
|
| 120 |
-
subgraph Features
|
| 121 |
-
Taskv7-->Segmentation["#35 Segmentation"]
|
| 122 |
-
Taskv7-->Classification["#34 Classification"]
|
| 123 |
-
Taskv9-->Segmentation
|
| 124 |
-
Taskv9-->Classification
|
| 125 |
-
Trainv7
|
| 126 |
-
end
|
| 127 |
-
subgraph Model
|
| 128 |
-
MODELv7-->v7-X
|
| 129 |
-
MODELv7-->v7-E6
|
| 130 |
-
MODELv7-->v7-E6E
|
| 131 |
-
MODELv9-->v9-T
|
| 132 |
-
MODELv9-->v9-S
|
| 133 |
-
MODELv9-->v9-E
|
| 134 |
-
end
|
| 135 |
-
subgraph Bugs
|
| 136 |
-
Fix-->Fix1["#12 mAP > 1"]
|
| 137 |
-
Fix-->Fix2["v9 Gradient Bump"]
|
| 138 |
-
Reply-->Reply1["#39"]
|
| 139 |
-
Reply-->Reply2["#36"]
|
| 140 |
-
end
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
-
## Star History
|
| 144 |
-
|
| 145 |
-
[](https://star-history.com/#WongKinYiu/YOLO&Date)
|
| 146 |
-
|
| 147 |
-
## Citations
|
| 148 |
-
|
| 149 |
-
```
|
| 150 |
-
@misc{wang2022yolov7,
|
| 151 |
-
title={YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors},
|
| 152 |
-
author={Chien-Yao Wang and Alexey Bochkovskiy and Hong-Yuan Mark Liao},
|
| 153 |
-
year={2022},
|
| 154 |
-
eprint={2207.02696},
|
| 155 |
-
archivePrefix={arXiv},
|
| 156 |
-
primaryClass={id='cs.CV' full_name='Computer Vision and Pattern Recognition' is_active=True alt_name=None in_archive='cs' is_general=False description='Covers image processing, computer vision, pattern recognition, and scene understanding. Roughly includes material in ACM Subject Classes I.2.10, I.4, and I.5.'}
|
| 157 |
-
}
|
| 158 |
-
@misc{wang2024yolov9,
|
| 159 |
-
title={YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information},
|
| 160 |
-
author={Chien-Yao Wang and I-Hau Yeh and Hong-Yuan Mark Liao},
|
| 161 |
-
year={2024},
|
| 162 |
-
eprint={2402.13616},
|
| 163 |
-
archivePrefix={arXiv},
|
| 164 |
-
primaryClass={cs.CV}
|
| 165 |
-
}
|
| 166 |
-
```
|
|
|
|
| 3 |
> [!CAUTION]
|
| 4 |
> We wanted to inform you that the training code for this project is still in progress, and there are two known issues:
|
| 5 |
>
|
|
|
|
| 6 |
> - Slower convergence speed
|
| 7 |
>
|
| 8 |
> We strongly recommend refraining from training the model until version 1.0 is released.
|
|
|
|
| 56 |
|
| 57 |
<table>
|
| 58 |
<tr><td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|