Skip to content

Commit d1b31bc

Browse files
author
yixu.cui
committed
update .gitignore, run_yolov7.txt, data/mot20.yaml
1 parent 3fa1b1f commit d1b31bc

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
# cyx
44
Pipfile
5-
.vscode/*
5+
.vscode/*.json
66
debug/*
7+
# [cui] weights_yolo/* need to download from https://github.com/WongKinYiu/yolov7/releases -> Assets
78
weights_yolo/*
89
*.zip
910

@@ -14,3 +15,4 @@ datasets/*/*.cache
1415
# [cui] intermediate products of tracking
1516
tracker/results/*
1617
tracker/trackeval/metrics/__pycache__/*.pyc
18+
videos/*

data/mot20.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
train: ./datasets/mot20/train.txt # has two trainsets: train & train_overlap
2-
val: ./datasets/mot20/val.txt # [cui] MOT20-02
3-
test: ./datasets/mot20/test.txt
1+
# train: ./datasets/mot20/train.txt # has two trainsets: train & train_overlap
2+
# val: ./datasets/mot20/val.txt # [cui] MOT20-02
3+
# test: ./datasets/mot20/test.txt
4+
train: ./datasets/mot20_sg/train.txt # has two trainsets: train & train_overlap
5+
val: ./datasets/mot20_sg/val.txt # [cui] MOT20-02
6+
test: ./datasets/mot20_sg/test.txt
47

58
nc: 1
69

run_yolov7.txt

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ python tracker/track.py --dataset mot17 --data_format yolo --tracker deepsort --
6565

6666

6767
# [cui]
68+
# product datasets
69+
python tools/convert_MOT20_to_yolo.py --split train --generate_imgs
70+
71+
6872
train:
6973
# visdrone
7074
# COCO pretrained *.pt
@@ -73,7 +77,7 @@ python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset vis
7377
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset visdrone --workers 64 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/visdrone_all.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0220-visdrone-4gpu-64w-64b-15epochs-sync-bn --epochs 15 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0220-visdrone-64w-64b-15epochs-sync-bn.log
7478

7579
# --resume subsequent training from runs/train/yolov7-w6-custom-0220-visdrone-4gpu-64w-64b-15epochs-sync-bn/weights/best.pt
76-
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset visdrone --workers 64 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/visdrone_all.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights ''runs/train/yolov7-w6-custom-0220-visdrone-4gpu-64w-64b-15epochs-sync-bn/weights/best.pt'' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0222-visdrone-64w-64b-50epochs-sync-bn-resume --epochs 25 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0222-visdrone-64w-64b-25epochs-sync-bn-resume.log
80+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset visdrone --workers 64 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/visdrone_all.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights 'runs/train/yolov7-w6-custom-0220-visdrone-4gpu-64w-64b-15epochs-sync-bn/weights/best.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0222-visdrone-64w-64b-50epochs-sync-bn-resume --epochs 25 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0222-visdrone-64w-64b-25epochs-sync-bn-resume.log
7781

7882

7983
# COCO pretrained *.pt
@@ -83,6 +87,10 @@ python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot
8387
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot17 --workers 64 --device 4,5,6,7 --batch-size 64 --data data/mot17.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-coco-0219-MOT17-val_dpm-4gpu-64w-64b-30epochs --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0219-MOT17-val_dpm-4gpu-64w-64b-30epochs.log
8488
# MOT17-val_sdp
8589
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot17 --workers 64 --device 4,5,6,7 --batch-size 64 --data data/mot17.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0219-MOT17-val_sdp-4gpu-64w-64b-30epochs --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0219-MOT17-val_sdp-4gpu-64w-64b-30epochs.log
90+
# ./weights_yolo/yolov7-w6_training.pt
91+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot17 --workers 64 --device 4,5,6,7 --batch-size 32 --data data/mot17.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs --epochs 20 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs.log
92+
# ./weights_yolo/yolov7-w6_training.pt --resume runs/**/xxx.pt e.g. runs/train/yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs/weights/last.pt
93+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot17 --workers 64 --device 4,5,6,7 --batch-size 32 --data data/mot17.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs --epochs 20 --resume runs/train/yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs/weights/last.pt 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs.log
8694

8795
# traning *.pt
8896
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot17 --workers 64 --device 4,5,6,7 --batch-size 64 --data data/mot17.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0219-MOT17-val_sdp-4gpu-64w-64b-30epochs --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0219-MOT17-val_sdp-4gpu-64w-64b-30epochs.log
@@ -97,9 +105,16 @@ python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot
97105

98106

99107
# MOT20-train --sync-bn
100-
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 64 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0222-MOT20-train-4gpu-64w-64b-30epochs-sync-bn --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0222-MOT20-train-4gpu-64w-64b-30epochs-sync-bn.log
108+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 32 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0222-MOT20-train-4gpu-32w-64b-30epochs-sync-bn --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0222-MOT20-train-4gpu-32w-64b-30epochs-sync-bn.log
109+
# MOT20-train --sync-bn --batch-size 16
110+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 32 --device 4,5,6,7 --sync-bn --batch-size 16 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0308-MOT20-train-4gpu-32w-16b-30epochs-sync-bn --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0308-MOT20-train-4gpu-32w-16b-30epochs-sync-bn.log
101111
# MOT20-train_overlap --sync-bn
102-
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 64 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0220-MOT20-train_overlap-4gpu-64w-64b-30epochs-sync-bn --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0220-MOT20-train_overlap-4gpu-64w-64b-30epochs-sync-bn.log
112+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 32 --device 4,5,6,7 --sync-bn --batch-size 64 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0220-MOT20-train_overlap-4gpu-32w-64b-30epochs-sync-bn --epochs 30 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0220-MOT20-train_overlap-4gpu-32w-64b-30epochs-sync-bn.log
113+
# MOT20-train_overlap --sync-bn --batch-size 16
114+
python -m torch.distributed.launch --nproc_per_node 4 train_aux.py --dataset mot20 --workers 32 --device 4,5,6,7 --sync-bn --batch-size 16 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0309-MOT20-train_overlap-4gpu-32w-16b-15epochs-sync-bn --epochs 15 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0309-MOT20-train_overlap-4gpu-32w-16b-15epochs-sync-bn.log
115+
python train_aux.py --dataset mot20 --workers 8 --device 4 --batch-size 16 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6_training.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0309-MOT20-train-1gpu-8w-16b-15epochs --epochs 15 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0309-MOT20-train-1gpu-8w-16b-15epochs.log
116+
# MOT20-train_overlap --sync-bn --batch-size 32
117+
python -m torch.distributed.launch --nproc_per_node 2 train_aux.py --dataset mot20 --workers 32 --device 4,5 --batch-size 32 --data data/mot20.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights './weights_yolo/yolov7-w6.pt' --hyp data/hyp.scratch.custom.yaml --name yolov7-w6-custom-0310-MOT20-train-2gpu-32w-32b-15epochs-sync-bn --epochs 15 --sync-bn 2>&1 | tee ./debug/log/info_yolov7-w6-custom-0310-MOT20-train-2gpu-32w-32b-15epochs-sync-bn.log
103118

104119

105120
# test
@@ -109,3 +124,7 @@ python test.py --dataset mot20 --device 4,5,6,7 --batch-size 64 --data data/mot2
109124
python -m torch.distributed.launch --nproc_per_node 4 test.py --dataset mot20 --device 4,5,6,7 --batch-size 64 --data data/mot20.yaml --img-size 1280 --weights ./runs/train/yolov7-w6-custom-0221-MOT20-train-4gpu-64w-64b-30epochs-sync-bn/weights/last.pt --project runs/val --name yolov7-w6-custom-0221-MOT20-train-4gpu-64w-64b-30epochs-sync-bn-last --conf-thres 0.001 --iou-thres 0.65 --task val --save-hybrid
110125

111126
python -m torch.distributed.launch --nproc_per_node 4 test.py --dataset mot20 --device 4,5,6,7 --batch-size 64 --data data/mot20.yaml --img-size 1280 --weights ./runs/train/yolov7-w6-custom-0221-MOT20-train-4gpu-64w-64b-30epochs-sync-bn/weights/last.pt --project runs/val --name yolov7-w6-custom-0221-MOT20-train-4gpu-64w-64b-30epochs-sync-bn-last-conf0.1 --conf-thres 0.1 --iou-thres 0.65 --task val --save-hybrid
127+
128+
# track
129+
python tracker/track_demo.py --tracker deepsort --obj videos/MOT17-07-SDP-raw.mp4 --model_path runs/train/yolov7-w6-custom-0309-MOT17-val_sdp-4gpu-64w-32b-20epochs/weights/best.pt
130+

0 commit comments

Comments
 (0)