Skip to content

Commit 3070e13

Browse files
authored
main code
update readme
1 parent 31e2a90 commit 3070e13

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Implementation of paper - [YOLOv7: Trainable bag-of-freebies sets new state-of-t
44

55
<div align="center">
66
<a href="./">
7-
<img src="./figure/performance.png" width="59%"/>
7+
<img src="./figure/performance.png" width="79%"/>
88
</a>
99
</div>
1010

@@ -105,6 +105,20 @@ python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.p
105105
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train_aux.py --workers 8 --device 0,1,2,3,4,5,6,7 --sync-bn --batch-size 128 --data data/coco.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml
106106
```
107107

108+
## Transfer learning
109+
110+
[`yolov7_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7_training.pt) [`yolov7x_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x_training.pt) [`yolov7-w6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6_training.pt) [`yolov7-e6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6_training.pt) [`yolov7-d6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6_training.pt) [`yolov7-e6e_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e_training.pt)
111+
112+
Single GPU finetuning for custom dataset
113+
114+
``` bash
115+
# finetune p5 models
116+
python train.py --workers 8 --device 0 --batch-size 32 --data data/custom.yaml --img 640 640 --cfg cfg/training/yolov7-custom.yaml --weights 'yolov7_training.pt' --name yolov7-custom --hyp data/hyp.scratch.custom.yaml
117+
118+
# finetune p6 models
119+
python train_aux.py --workers 8 --device 0 --batch-size 16 --data data/custom.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6-custom.yaml --weights 'yolov7-w6_training.pt' --name yolov7-w6-custom --hyp data/hyp.scratch.custom.yaml
120+
```
121+
108122
## Re-parameterization
109123

110124
See [reparameterization.ipynb](tools/reparameterization.ipynb)
@@ -117,7 +131,7 @@ python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inferen
117131

118132
<div align="center">
119133
<a href="./">
120-
<img src="./figure/horses_prediction.jpg" width="49%"/>
134+
<img src="./figure/horses_prediction.jpg" width="59%"/>
121135
</a>
122136
</div>
123137

0 commit comments

Comments
 (0)