Browse Source

Merge pull request #438 from ultralytics/glenn-jocher-patch-1

Update ci-testing.yml
5.0
Glenn Jocher GitHub 4 years ago
parent
commit
52e4730026
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 20 deletions
  1. +12
    -20
      .github/workflows/ci-testing.yml

+ 12
- 20
.github/workflows/ci-testing.yml View File

@@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest] #, macOS-10.15, windows-2019
python-version: [3.7, 3.8]
python-version: [3.8]
yolo5-model: ["yolov5s", "yolov5m", "yolov5l", "yolov5x"]

# Timeout: https://stackoverflow.com/a/59076067/4521646
@@ -54,28 +54,20 @@ jobs:
python -c "from utils.google_utils import * ; gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f', 'coco128.zip')"
mv ./coco128 ../

- name: Download weights
run: |
bash weights/download_weights.sh

- name: Tests workflow
run: |
# to run *.py. files in subdirectories
export PYTHONPATH="$PWD"
# define device
di=cpu # inference devices
export PYTHONPATH="$PWD" # to run *.py. files in subdirectories
di=cpu # inference devices # define device
# train
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
python train.py --img 256 --batch 8 --weights weights/${{ matrix.yolo5-model }}.pt --cfg models/${{ matrix.yolo5-model }}.yaml --epochs 1 --device $di
# detect
python detect.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di
# detect custom
python detect.py --weights runs/exp0/weights/last.pt --device $di
# test official
python test.py --weights weights/${{ matrix.yolo5-model }}.pt --device $di --batch-size 1
# test custom
python test.py --weights runs/exp0/weights/last.pt --device $di --batch-size 1
# inspect
python models/yolo.py --cfg models/${{ matrix.yolo5-model }}.yaml
# export
python models/export.py --weights weights/${{ matrix.yolo5-model }}.pt --img 640 --batch 1
# test
python test.py --img 256 --batch 8 --weights weights/${{ matrix.yolo5-model }}.pt --device $di
python test.py --img 256 --batch 8 --weights runs/exp0/weights/last.pt --device $di
python models/yolo.py --cfg models/${{ matrix.yolo5-model }}.yaml # inspect
python models/export.py --img 256 --batch 1 --weights weights/${{ matrix.yolo5-model }}.pt # export
shell: bash

Loading…
Cancel
Save