π [Update] README, with more run code example
Browse files- README.md +17 -7
- docs/HOWTO.md +24 -0
README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
# YOLO: Official Implementation of YOLOv9, YOLOv7
|
2 |
|
3 |

|
4 |
-

|
5 |
[](https://huggingface.co/spaces/henry000/YOLO)
|
6 |
-
|
|
|
7 |
> This project is currently a Work In Progress and may undergo significant changes. It is not recommended for use in production environments until further notice. Please check back regularly for updates.
|
8 |
>
|
9 |
> Use of this code is at your own risk and discretion. It is advisable to consult with the project owner before deploying or integrating into any critical systems.
|
10 |
|
11 |
-
Welcome to the official implementation of YOLOv7 and YOLOv9. This repository will contains the complete codebase, pre-trained models, and detailed instructions for training and deploying YOLOv9.
|
12 |
|
13 |
## TL;DR
|
14 |
- This is the official YOLO model implementation with an MIT License.
|
@@ -65,7 +65,8 @@ To train YOLO on your dataset:
|
|
65 |
1. Modify the configuration file `data/config.yaml` to point to your dataset.
|
66 |
2. Run the training script:
|
67 |
```shell
|
68 |
-
python yolo/lazy.py
|
|
|
69 |
```
|
70 |
|
71 |
### Transfer Learning
|
@@ -77,15 +78,24 @@ python yolo/lazy.py task=train task.data.batch_size=8 model=v9-c dataset={datase
|
|
77 |
### Inference
|
78 |
To evaluate the model performance, use:
|
79 |
```shell
|
80 |
-
python yolo/lazy.py task=inference weight=weights/v9-c.pt model=v9-c task.fast_inference=deploy # use deploy weight
|
81 |
python yolo/lazy.py task=inference # if cloned from GitHub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
yolo task=inference task.data.source={Any} # if pip installed
|
83 |
```
|
84 |
|
85 |
-
### Validation
|
86 |
To validate the model performance, use:
|
87 |
```shell
|
88 |
-
|
|
|
|
|
89 |
```
|
90 |
|
91 |
## Contributing
|
|
|
1 |
# YOLO: Official Implementation of YOLOv9, YOLOv7
|
2 |
|
3 |

|
|
|
4 |
[](https://huggingface.co/spaces/henry000/YOLO)
|
5 |
+
<!--  -->
|
6 |
+
<!-- > [!IMPORTANT]
|
7 |
> This project is currently a Work In Progress and may undergo significant changes. It is not recommended for use in production environments until further notice. Please check back regularly for updates.
|
8 |
>
|
9 |
> Use of this code is at your own risk and discretion. It is advisable to consult with the project owner before deploying or integrating into any critical systems.
|
10 |
|
11 |
+
Welcome to the official implementation of YOLOv7 and YOLOv9. This repository will contains the complete codebase, pre-trained models, and detailed instructions for training and deploying YOLOv9. -->
|
12 |
|
13 |
## TL;DR
|
14 |
- This is the official YOLO model implementation with an MIT License.
|
|
|
65 |
1. Modify the configuration file `data/config.yaml` to point to your dataset.
|
66 |
2. Run the training script:
|
67 |
```shell
|
68 |
+
python yolo/lazy.py dataset=dev use_wandb=True
|
69 |
+
python yolo/lazy.py task.data.batch_size=8 model=v9-c # or more args
|
70 |
```
|
71 |
|
72 |
### Transfer Learning
|
|
|
78 |
### Inference
|
79 |
To evaluate the model performance, use:
|
80 |
```shell
|
|
|
81 |
python yolo/lazy.py task=inference # if cloned from GitHub
|
82 |
+
python yolo/lazy.py task=inference \
|
83 |
+
name=AnyNameYouWant \ # AnyNameYouWant
|
84 |
+
device=cpu \ # hardware cuda, cpu, mps
|
85 |
+
model=v9-s \ # model version: v9-c, m, s
|
86 |
+
task.nms.min_confidence=0.1 \ # nms config
|
87 |
+
task.fast_inference=onnx \ # onnx, trt, deploy
|
88 |
+
task.data.source=data/toy/images/train \ # path to file, dir, webcam
|
89 |
+
+quite=True \ # Quite Output
|
90 |
yolo task=inference task.data.source={Any} # if pip installed
|
91 |
```
|
92 |
|
93 |
+
### Validation
|
94 |
To validate the model performance, use:
|
95 |
```shell
|
96 |
+
python yolo/lazy.py task=validation
|
97 |
+
# or
|
98 |
+
python yolo/lazy.py task=validation dataset=toy
|
99 |
```
|
100 |
|
101 |
## Contributing
|
docs/HOWTO.md
CHANGED
@@ -2,6 +2,30 @@
|
|
2 |
|
3 |
To facilitate easy customization of the YOLO model, we've structured the codebase to allow for changes through configuration files and minimal code adjustments. This guide will walk you through the steps to customize various components of the model including the architecture, blocks, data loaders, and loss functions.
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
## Custom Model Architecture
|
6 |
|
7 |
You can change the model architecture simply by modifying the YAML configuration file. Here's how:
|
|
|
2 |
|
3 |
To facilitate easy customization of the YOLO model, we've structured the codebase to allow for changes through configuration files and minimal code adjustments. This guide will walk you through the steps to customize various components of the model including the architecture, blocks, data loaders, and loss functions.
|
4 |
|
5 |
+
## Examples
|
6 |
+
|
7 |
+
```shell
|
8 |
+
# Train
|
9 |
+
python yolo/lazy.py dataset=dev use_wandb=True
|
10 |
+
|
11 |
+
# Validate
|
12 |
+
python yolo/lazy.py task=validation
|
13 |
+
python yolo/lazy.py task=validation model=v9-s
|
14 |
+
python yolo/lazy.py task=validation dataset=toy
|
15 |
+
python yolo/lazy.py task=validation dataset=toy name=validation
|
16 |
+
|
17 |
+
# Inference
|
18 |
+
python yolo/lazy.py task=inference
|
19 |
+
python yolo/lazy.py task=inference device=cpu
|
20 |
+
python yolo/lazy.py task=inference +quite=True
|
21 |
+
python yolo/lazy.py task=inference name=AnyNameYouWant
|
22 |
+
python yolo/lazy.py task=inference image_size=\[480,640]
|
23 |
+
python yolo/lazy.py task=inference task.nms.min_confidence=0.1
|
24 |
+
python yolo/lazy.py task=inference task.fast_inference=deploy
|
25 |
+
python yolo/lazy.py task=inference task.fast_inference=onnx device=cpu
|
26 |
+
python yolo/lazy.py task=inference task.data.source=data/toy/images/train
|
27 |
+
```
|
28 |
+
|
29 |
## Custom Model Architecture
|
30 |
|
31 |
You can change the model architecture simply by modifying the YAML configuration file. Here's how:
|