pull/1/head
Jirka 5 years ago
parent 3e6868d318
commit 7d8e2dd440

@ -12,6 +12,7 @@ jobs:
matrix: matrix:
os: [ubuntu-18.04, macOS-10.15] #, windows-2019 os: [ubuntu-18.04, macOS-10.15] #, windows-2019
python-version: [3.7, 3.8] python-version: [3.7, 3.8]
yolo5-model: ["yolov5s", "yolov5m", "yolov5l", "yolov5x"]
# Timeout: https://stackoverflow.com/a/59076067/4521646 # Timeout: https://stackoverflow.com/a/59076067/4521646
steps: steps:
@ -32,9 +33,9 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ steps.pip-cache.outputs.dir }} path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }} key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- ${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -50,26 +51,26 @@ jobs:
- name: Download data - name: Download data
run: | run: |
python -c "from utils.google_utils import * ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')" python -c "from utils.google_utils import * ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')"
- name: Download weights
run: |
bash weights/download_weights.sh bash weights/download_weights.sh
- name: Tests - name: Tests workflow
run: | run: |
for name in yolov5s yolov5m yolov5l yolov5x # models
do
di=cpu # inference devices di=cpu # inference devices
# train # train
python train.py --weights weights/$name.pt --cfg models/$name.yaml --epochs 1 --img 320 --device $di --batch-size 2 python train.py --weights weights/${{ matrix.yolo5-model }}.pt --cfg models/${{ matrix.yolo5-model }}.yaml --epochs 1 --img 320 --device $di --batch-size 2
# detect official # detect official
python detect.py --weights weights/$name.pt --device $di python detect.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di
# detect custom # detect custom
python detect.py --weights runs/exp0/weights/last.pt --device $di python detect.py --weights runs/exp0/weights/last.pt --device $di
# test official # test official
python test.py --weights weights/$name.pt --device $di --batch-size 2 python test.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di --batch-size 2
# test custom # test custom
python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2 python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 2
# inspect # inspect
python models/yolo.py --cfg models/$name.yaml python models/yolo.py --cfg models/${{ matrix.yolo5-model }}.yaml
# export # export
python models/export.py --weights weights/$name.pt --img 640 --batch 1 python models/export.py --weights weights/${{ matrix.yolo5-model }}.pt --img 640 --batch 1
done
shell: bash shell: bash

Loading…
Cancel
Save