Jirka commited on
Commit
f0d1e09
1 Parent(s): 3bf77ca
.github/workflows/ci-testing.yml CHANGED
@@ -47,28 +47,29 @@ jobs:
47
  pip list
48
  shell: bash
49
 
50
- #- name: Download data
51
- # run: |
52
- # python3 -c "from utils.google_utils import *; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')" && mv ./coco128 ../
 
53
 
54
  - name: Tests
55
  run: |
56
- for x in yolov5s yolov5m yolov5l yolov5x # models
57
  do
58
  di=cpu # inference devices
59
  # train
60
- python train.py --weights $x.pt --cfg $x.yaml --epochs 3 --img 320 --device $di --batch-size 2
61
  # detect official
62
- python detect.py --weights $x.pt --device $di --batch-size 2
63
  # detect custom
64
  python detect.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
65
  # test official
66
- python test.py --weights $x.pt --device $di --batch-size 2
67
  # test custom
68
  python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
69
  # inspect
70
- python models/yolo.py --cfg $x.yaml
71
  # export
72
- python models/export.py --weights $x.pt --img 640 --batch 1
73
  done
74
  shell: bash
 
47
  pip list
48
  shell: bash
49
 
50
+ - name: Download data
51
+ run: |
52
+ python -c "from utils.google_utils import * ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')"
53
+ bash weights/download_weights.sh
54
 
55
  - name: Tests
56
  run: |
57
+ for name in yolov5s yolov5m yolov5l yolov5x # models
58
  do
59
  di=cpu # inference devices
60
  # train
61
+ python train.py --weights weights/$name.pt --cfg models/$name.yaml --epochs 1 --img 320 --device $di --batch-size 2
62
  # detect official
63
+ python detect.py --weights weights/$name.pt --device $di --batch-size 2
64
  # detect custom
65
  python detect.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
66
  # test official
67
+ python test.py --weights weights/$name.pt --device $di --batch-size 2
68
  # test custom
69
  python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
70
  # inspect
71
+ python models/yolo.py --cfg models/$name.yaml
72
  # export
73
+ python models/export.py --weights weights/$name.pt --img 640 --batch 1
74
  done
75
  shell: bash
data/coco128.yaml CHANGED
@@ -8,8 +8,8 @@
8
 
9
 
10
  # train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
11
- train: ../coco128/images/train2017/ # 128 images
12
- val: ../coco128/images/train2017/ # 128 images
13
 
14
  # number of classes
15
  nc: 80
 
8
 
9
 
10
  # train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
11
+ train: coco128/images/train2017/ # 128 images
12
+ val: coco128/images/train2017/ # 128 images
13
 
14
  # number of classes
15
  nc: 80
weights/download_weights.sh CHANGED
@@ -1,8 +1,10 @@
1
  #!/bin/bash
2
  # Download common models
3
 
4
- python3 -c "from utils.google_utils import *;
 
5
  attempt_download('weights/yolov5s.pt');
6
  attempt_download('weights/yolov5m.pt');
7
  attempt_download('weights/yolov5l.pt');
8
- attempt_download('weights/yolov5x.pt')"
 
 
1
  #!/bin/bash
2
  # Download common models
3
 
4
+ python -c "
5
+ from utils.google_utils import *;
6
  attempt_download('weights/yolov5s.pt');
7
  attempt_download('weights/yolov5m.pt');
8
  attempt_download('weights/yolov5l.pt');
9
+ attempt_download('weights/yolov5x.pt')
10
+ "