Original kfs #694
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name of the workflow, what it is doing (optional) | |
name: CI CPU testing | |
# events that trigger the workflow (required) | |
on: | |
push: | |
branches: [master, CIdebug] | |
pull_request: | |
# pull request where master is target | |
branches: [master] | |
env: | |
# Directory of PyPi package to be tested | |
PACKAGE_DIR: boxmot | |
# Minimum acceptable test coverage | |
# Increase as you add more tests to increase coverage | |
COVERAGE_FAIL_UNDER: 29 | |
# the workflow that gets triggerd | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] # skip windows-latest for | |
python-version: ['3.8', '3.9', '3.10'] | |
#model: ['yolov8n', 'yolo_nas_s', yolox_n] # yolo models to test | |
#tracking-methods: ['deepocsort', 'ocsort', 'botsort', 'strongsort', 'bytetrack'] # tracking methods to test | |
# Timeout: https://stackoverflow.com/a/59076067/4521646 | |
timeout-minutes: 50 | |
steps: | |
- uses: actions/checkout@v4 # Check out the repository | |
- uses: actions/setup-python@v4 # Prepare environment with python 3.9 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' # caching pip dependencies | |
- name: Install requirements | |
shell: bash # for Windows compatibility | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -e . pytest pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu | |
python --version | |
pip --version | |
pip list | |
- name: Tests all tracking options | |
shell: bash # for Windows compatibility | |
env: | |
IMG: ./assets/MOT17-mini/train/MOT17-05-FRCNN/img1/000001.jpg | |
run: | | |
# deepocsort fro all supported yolo models | |
python examples/track.py --tracking-method deepocsort --source $IMG --imgsz 320 --reid-model examples/weights/clip_market1501.pt | |
python examples/track.py --yolo-model yolo_nas_s --tracking-method deepocsort --source $IMG --imgsz 320 | |
python examples/track.py --yolo-model yolox_n --tracking-method deepocsort --source $IMG --imgsz 320 | |
# hybridsort | |
python examples/track.py --tracking-method hybridsort --source $IMG --imgsz 320 | |
# botsort | |
python examples/track.py --tracking-method botsort --source $IMG --imgsz 320 | |
# strongsort | |
python examples/track.py --tracking-method strongsort --source $IMG --imgsz 320 | |
# ocsort | |
python examples/track.py --tracking-method ocsort --source $IMG --imgsz 320 | |
# bytetrack | |
python examples/track.py --tracking-method bytetrack --source $IMG --imgsz 320 | |
- name: Pytest tests # after tracking options as this does not download models | |
shell: bash # for Windows compatibility | |
run: | | |
# needed in TFLite export | |
wget https://github.com/PINTO0309/onnx2tf/releases/download/1.7.3/flatc.tar.gz | |
tar -zxvf flatc.tar.gz | |
sudo chmod +x flatc | |
sudo mv flatc /usr/bin/ | |
pytest --cov=$PACKAGE_DIR --cov-report=html -v tests | |
coverage report --fail-under=$COVERAGE_FAIL_UNDER | |
- name: Tests exported reid models | |
env: | |
IMG: ./assets/MOT17-mini/train/MOT17-05-FRCNN/img1/000001.jpg | |
shell: bash # for Windows compatibility | |
run: | | |
# test exported reid model | |
python examples/track.py --reid-model examples/weights/osnet_x0_25_msmt17.torchscript --source $IMG --imgsz 320 | |
python examples/track.py --reid-model examples/weights/osnet_x0_25_msmt17.onnx --source $IMG --imgsz 320 | |
python examples/track.py --reid-model examples/weights/osnet_x0_25_msmt17_saved_model/osnet_x0_25_msmt17_float16.tflite --source $IMG --imgsz 320 | |
python examples/track.py --reid-model examples/weights/osnet_x0_25_msmt17_openvino_model --source $IMG --imgsz 320 | |
- name: Test tracking with seg models | |
env: | |
IMG: ./assets/MOT17-mini/train/MOT17-05-FRCNN/img1/000001.jpg | |
shell: bash # for Windows compatibility | |
run: | | |
# tracking with SEG models | |
python examples/track.py --tracking-method deepocsort --yolo-model yolov8n-seg.pt --source $IMG | |
- name: Test tracking with pose models | |
env: | |
IMG: ./assets/MOT17-mini/train/MOT17-05-FRCNN/img1/000001.jpg | |
shell: bash # for Windows compatibility | |
run: | | |
# tracking with POSE models | |
python3 examples/track.py --yolo-model weights/yolov8n.pt --source $IMG --imgsz 320 | |
- name: Test validation on MOT17 subset | |
shell: bash # for Windows compatibility | |
run: | | |
# validation on a few MOT17 imges | |
python examples/val.py --tracking-method deepocsort --yolo-model yolov8n.pt --benchmark MOT17-mini --imgsz 320 --conf 0.2 | |
- name: Test evolution on MOT17 subset | |
shell: bash # for Windows compatibility | |
run: | | |
# evolve a for a single set of parameters | |
python examples/evolve.py --objectives HOTA,MOTA,IDF1 --benchmark MOT17-mini --n-trials 1 --imgsz 320 --conf 0.2 |