parallel
Browse files- .github/workflows/ci-testing.yml +22 -21
.github/workflows/ci-testing.yml
CHANGED
@@ -12,6 +12,7 @@ jobs:
|
|
12 |
matrix:
|
13 |
os: [ubuntu-18.04, macOS-10.15] #, windows-2019
|
14 |
python-version: [3.7, 3.8]
|
|
|
15 |
|
16 |
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
17 |
steps:
|
@@ -32,9 +33,9 @@ jobs:
|
|
32 |
uses: actions/cache@v1
|
33 |
with:
|
34 |
path: ${{ steps.pip-cache.outputs.dir }}
|
35 |
-
key: ${{ runner.os }}-${{ matrix.python-version }}
|
36 |
restore-keys: |
|
37 |
-
${{ runner.os }}-${{ matrix.python-version }}
|
38 |
|
39 |
- name: Install dependencies
|
40 |
run: |
|
@@ -50,26 +51,26 @@ jobs:
|
|
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 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
# export
|
73 |
-
python models/export.py --weights weights/$name.pt --img 640 --batch 1
|
74 |
-
done
|
75 |
shell: bash
|
|
|
12 |
matrix:
|
13 |
os: [ubuntu-18.04, macOS-10.15] #, windows-2019
|
14 |
python-version: [3.7, 3.8]
|
15 |
+
yolo5-model: ["yolov5s", "yolov5m", "yolov5l", "yolov5x"]
|
16 |
|
17 |
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
18 |
steps:
|
|
|
33 |
uses: actions/cache@v1
|
34 |
with:
|
35 |
path: ${{ steps.pip-cache.outputs.dir }}
|
36 |
+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
|
37 |
restore-keys: |
|
38 |
+
${{ runner.os }}-${{ matrix.python-version }}-pip-
|
39 |
|
40 |
- name: Install dependencies
|
41 |
run: |
|
|
|
51 |
- name: Download data
|
52 |
run: |
|
53 |
python -c "from utils.google_utils import * ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')"
|
54 |
+
|
55 |
+
- name: Download weights
|
56 |
+
run: |
|
57 |
bash weights/download_weights.sh
|
58 |
|
59 |
+
- name: Tests workflow
|
60 |
run: |
|
61 |
+
di=cpu # inference devices
|
62 |
+
# train
|
63 |
+
python train.py --weights weights/${{ matrix.yolo5-model }}.pt --cfg models/${{ matrix.yolo5-model }}.yaml --epochs 1 --img 320 --device $di --batch-size 2
|
64 |
+
# detect official
|
65 |
+
python detect.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di
|
66 |
+
# detect custom
|
67 |
+
python detect.py --weights runs/exp0/weights/last.pt --device $di
|
68 |
+
# test official
|
69 |
+
python test.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di --batch-size 2
|
70 |
+
# test custom
|
71 |
+
python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
|
72 |
+
# inspect
|
73 |
+
python models/yolo.py --cfg models/${{ matrix.yolo5-model }}.yaml
|
74 |
+
# export
|
75 |
+
python models/export.py --weights weights/${{ matrix.yolo5-model }}.pt --img 640 --batch 1
|
|
|
|
|
|
|
76 |
shell: bash
|