From 6bc5a4da7b438bbaa591eac5701c619f40e1509a Mon Sep 17 00:00:00 2001 From: "Kin-Yiu, Wong" <102582011@cc.ncu.edu.tw> Date: Wed, 13 Jul 2022 12:54:06 +0800 Subject: [PATCH] main code update readme --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cd425e58..ffb6463e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ Implementation of paper - [YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2207.02696) - +
+ + + +
## Web Demo @@ -27,7 +31,7 @@ MS COCO Docker environment (recommended)
Expand -``` +``` bash # create the docker container, you can change the share memory size if you have more. nvidia-docker run --name yolov7 -it -v your_coco_path/:/coco/ -v your_code_path/:/yolov7 --shm-size=64g nvcr.io/nvidia/pytorch:21.08-py3 @@ -48,7 +52,7 @@ cd /yolov7 [`yolov7.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt) [`yolov7x.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.pt) [`yolov7-w6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6.pt) [`yolov7-e6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt) [`yolov7-d6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6.pt) [`yolov7-e6e.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e.pt) -``` +``` bash python test.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.65 --device 0 --weights yolov7.pt --name yolov7_640_val ``` @@ -88,7 +92,7 @@ Single GPU training python train.py --workers 8 --device 0 --batch-size 32 --data data/coco.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights '' --name yolov7 --hyp data/hyp.scratch.p5.yaml # train p6 models -python train_aux.py --workers 8 --device 0 --batch-size 32 --data data/coco.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml +python train_aux.py --workers 8 --device 0 --batch-size 16 --data data/coco.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml ``` Multiple GPU training @@ -107,7 +111,15 @@ See [reparameterization.ipynb](tools/reparameterization.ipynb) ## Inference -`python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg` +``` bash +python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg +``` + +
+ + + +
## Citation