Repository: mikel-brostrom/yolo_tracking (branch: centroid-asso-support)
Commit date: 2024-01-12T20:08:44Z

Workflow file: .github/workflows/ci.yml (CI CPU testing)
# 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:
  COVERAGE_FAIL_UNDER: '29'
  PACKAGE_DIR: boxmot
  PIP_INDEX_URL: http://localhost:8629/2024-01-12
  UV_INDEX_URL: http://localhost:8629/2024-01-12

jobs:
  build:
    runs-on: ${{ matrix.os }}
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    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@v5  # 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
          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.16.31/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


Failed build logs:
step_name: build (ubuntu-latest, 3.8)/6_Pytest tests.txt
log: ##[group]Run # needed in TFLite export
[36;1m[0m
[36;1m# needed in TFLite export[0m
[36;1mwget https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz[0m
[36;1mtar -zxvf flatc.tar.gz[0m
[36;1msudo chmod +x flatc[0m
[36;1msudo mv flatc /usr/bin/[0m
[36;1m[0m
[36;1mpytest --cov=$PACKAGE_DIR --cov-report=html -v tests[0m
[36;1mcoverage report --fail-under=$COVERAGE_FAIL_UNDER[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PACKAGE_DIR: boxmot
  COVERAGE_FAIL_UNDER: 29
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
##[endgroup]
--2024-01-12 20:11:25--  https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201125Z&X-Amz-Expires=300&X-Amz-Signature=3bfcceeafbe583d085cec55f86a8526c6e9f64b963ff80c4ac3797875e856d28&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-12 20:11:25--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201125Z&X-Amz-Expires=300&X-Amz-Signature=3bfcceeafbe583d085cec55f86a8526c6e9f64b963ff80c4ac3797875e856d28&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1382707 (1.3M) [application/octet-stream]
Saving to: ‘flatc.tar.gz’

     0K .......... .......... .......... .......... ..........  3% 28.1M 0s
    50K .......... .......... .......... .......... ..........  7% 36.5M 0s
   100K .......... .......... .......... .......... .......... 11%  143M 0s
   150K .......... .......... .......... .......... .......... 14% 42.2M 0s
   200K .......... .......... .......... .......... .......... 18%  131M 0s
   250K .......... .......... .......... .......... .......... 22%  167M 0s
   300K .......... .......... .......... .......... .......... 25%  200M 0s
   350K .......... .......... .......... .......... .......... 29% 74.0M 0s
   400K .......... .......... .......... .......... .......... 33%  187M 0s
   450K .......... .......... .......... .......... .......... 37%  172M 0s
   500K .......... .......... .......... .......... .......... 40%  132M 0s
   550K .......... .......... .......... .......... .......... 44%  233M 0s
   600K .......... .......... .......... .......... .......... 48%  155M 0s
   650K .......... .......... .......... .......... .......... 51%  208M 0s
   700K .......... .......... .......... .......... .......... 55%  136M 0s
   750K .......... .......... .......... .......... .......... 59%  223M 0s
   800K .......... .......... .......... .......... .......... 62%  136M 0s
   850K .......... .......... .......... .......... .......... 66%  140M 0s
   900K .......... .......... .......... .......... .......... 70%  238M 0s
   950K .......... .......... .......... .......... .......... 74%  241M 0s
  1000K .......... .......... .......... .......... .......... 77%  242M 0s
  1050K .......... .......... .......... .......... .......... 81%  215M 0s
  1100K .......... .......... .......... .......... .......... 85%  238M 0s
  1150K .......... .......... .......... .......... .......... 88%  240M 0s
  1200K .......... .......... .......... .......... .......... 92%  236M 0s
  1250K .......... .......... .......... .......... .......... 96%  198M 0s
  1300K .......... .......... .......... .......... .......... 99%  251M 0s
  1350K                                                       100%  572G=0.01s

2024-01-12 20:11:25 (120 MB/s) - ‘flatc.tar.gz’ saved [1382707/1382707]

flatc
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0 -- /opt/hostedtoolcache/Python/3.8.18/x64/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/yolo_tracking/yolo_tracking
plugins: hydra-core-1.3.2, cov-4.1.0
collecting ... collected 14 items

tests/test_exports.py::test_export_torchscript PASSED                    [  7%]
tests/test_exports.py::test_export_onnx PASSED                           [ 14%]
tests/test_exports.py::test_export_openvino PASSED                       [ 21%]
tests/test_python.py::test_strongsort_instantiation PASSED               [ 28%]
tests/test_python.py::test_botsort_instantiation PASSED                  [ 35%]
tests/test_python.py::test_deepocsort_instantiation PASSED               [ 42%]
tests/test_python.py::test_ocsort_instantiation PASSED                   [ 50%]
tests/test_python.py::test_bytetrack_instantiation PASSED                [ 57%]
tests/test_python.py::test_deepocsort_output FAILED                      [ 64%]
tests/test_python.py::test_ocsort_output PASSED                          [ 71%]
tests/test_python.py::test_botsort_output PASSED                         [ 78%]
tests/test_python.py::test_bytetrack_output PASSED                       [ 85%]
tests/test_python.py::test_strongsort_output PASSED                      [ 92%]
tests/test_python.py::test_gsi PASSED                                    [100%]

=================================== FAILURES ===================================
____________________________ test_deepocsort_output ____________________________

    def test_deepocsort_output():
        tracker_conf = get_tracker_config('deepocsort')
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        rgb = np.random.randint(255, size=(640, 640, 3), dtype=np.uint8)
        det = np.array([[144, 212, 578, 480, 0.82, 0],
                        [425, 281, 576, 472, 0.56, 65]])
        output = tracker.update(det, rgb)
        # Works since frame count is less than min hits (1 <= 2)
        assert output.shape == (2, 8)  # two inputs should give two outputs
        output = np.flip(np.delete(output, [4, 7], axis=1), axis=0)
        assert_allclose(det, output, atol=1, rtol=7e-3, verbose=True)
    
        # Instantiate new tracker and ensure minimum number of hits works
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        tracker.min_hits = 2
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(det, rgb)
        assert output.size == 0
>       output = tracker.update(det, rgb)

tests/test_python.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
boxmot/trackers/deepocsort/deep_ocsort.py:434: in update
    matched, unmatched_dets, unmatched_trks = associate(
boxmot/utils/association.py:146: in associate
    iou_matrix = run_asso_func(asso_func, detections, trackers, w, h)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = <function giou_batch at 0x7f1dba152ca0>
args = (array([[1.44e+02, 2.12e+02, 5.78e+02, 4.80e+02, 8.20e-01],
       [4.25e+02, 2.81e+02, 5.76e+02, 4.72e+02, 5.60e-01]]), array([[144., 212., 578., 480.,   0.],
       [425., 281., 576., 472.,   0.]]), 640, 640)

    def run_asso_func(func, *args):
        """
        Wrapper function that checks the inputs to the association functions
        and then call either one of the iou association functions or centroid.
    
        Parameters:
        func: The batch function to call (either *iou*_batch or centroid_batch).
        *args: Variable length argument list, containing either bounding boxes and optionally size parameters.
        """
        if func not in [iou_batch, giou_batch, diou_batch, ciou_batch, centroid_batch]:
            raise ValueError("Invalid function specified. Must be either '(g,d,c, )iou_batch' or 'centroid_batch'.")
    
        if func is (iou_batch or giou_batch or diou_batch or ciou_batch):
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[0:2]):
                raise ValueError("Invalid arguments for iou_batch. Expected two bounding boxes.")
            return func(*args)
        elif func is centroid_batch:
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[:2]) or not all(isinstance(arg, (int)) for arg in args[2:]):
                raise ValueError("Invalid arguments for centroid_batch. Expected two bounding boxes and two size parameters.")
            return func(*args)
        else:
>           raise ValueError("No such association method")
E           ValueError: No such association method

boxmot/utils/iou.py:212: ValueError
----------------------------- Captured stderr call -----------------------------
Downloading...
From: https://drive.google.com/uc?id=12uD5FeVqLg9-AFDju2L7SQxjmPb4zpBN
To: /home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt

  0%|          | 0.00/22.4M [00:00<?, ?B/s]
  9%|▉         | 2.10M/22.4M [00:00<00:01, 19.5MB/s]
 40%|███▉      | 8.91M/22.4M [00:00<00:00, 43.6MB/s]
 82%|████████▏ | 18.4M/22.4M [00:00<00:00, 65.1MB/s]
100%|██████████| 22.4M/22.4M [00:00<00:00, 64.2MB/s]
[32m2024-01-12 20:11:55.585[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
[32m2024-01-12 20:11:55.738[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
=============================== warnings summary ===============================
boxmot/utils/checks.py:5
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/utils/checks.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_exports.py::test_export_onnx
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/appearance/backbones/osnet.py:389: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
    if return_featuremaps:

tests/test_exports.py::test_export_openvino
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/defusedxml/__init__.py:30: DeprecationWarning: defusedxml.cElementTree is deprecated, import from defusedxml.ElementTree instead.
    from . import cElementTree

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.8.18-final-0 -----------
Coverage HTML written to dir htmlcov

=========================== short test summary info ============================
FAILED tests/test_python.py::test_deepocsort_output - ValueError: No such association method
================== 1 failed, 13 passed, 9 warnings in 31.85s ===================
##[error]Process completed with exit code 1.

step_name: build (ubuntu-latest, 3.9)/6_Pytest tests.txt
log: ##[group]Run # needed in TFLite export
[36;1m[0m
[36;1m# needed in TFLite export[0m
[36;1mwget https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz[0m
[36;1mtar -zxvf flatc.tar.gz[0m
[36;1msudo chmod +x flatc[0m
[36;1msudo mv flatc /usr/bin/[0m
[36;1m[0m
[36;1mpytest --cov=$PACKAGE_DIR --cov-report=html -v tests[0m
[36;1mcoverage report --fail-under=$COVERAGE_FAIL_UNDER[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PACKAGE_DIR: boxmot
  COVERAGE_FAIL_UNDER: 29
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
--2024-01-12 20:11:58--  https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz
Resolving github.com (github.com)... 192.30.255.113
Connecting to github.com (github.com)|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201159Z&X-Amz-Expires=300&X-Amz-Signature=709497883dd2c2a9471410daf12c63e704acb6b779fb216aa16d512cc5577229&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-12 20:11:59--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201159Z&X-Amz-Expires=300&X-Amz-Signature=709497883dd2c2a9471410daf12c63e704acb6b779fb216aa16d512cc5577229&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1382707 (1.3M) [application/octet-stream]
Saving to: ‘flatc.tar.gz’

     0K .......... .......... .......... .......... ..........  3% 10.7M 0s
    50K .......... .......... .......... .......... ..........  7% 44.1M 0s
   100K .......... .......... .......... .......... .......... 11% 89.2M 0s
   150K .......... .......... .......... .......... .......... 14% 62.8M 0s
   200K .......... .......... .......... .......... .......... 18%  108M 0s
   250K .......... .......... .......... .......... .......... 22%  163M 0s
   300K .......... .......... .......... .......... .......... 25%  186M 0s
   350K .......... .......... .......... .......... .......... 29%  202M 0s
   400K .......... .......... .......... .......... .......... 33%  108M 0s
   450K .......... .......... .......... .......... .......... 37%  199M 0s
   500K .......... .......... .......... .......... .......... 40%  190M 0s
   550K .......... .......... .......... .......... .......... 44%  198M 0s
   600K .......... .......... .......... .......... .......... 48%  171M 0s
   650K .......... .......... .......... .......... .......... 51%  212M 0s
   700K .......... .......... .......... .......... .......... 55%  170M 0s
   750K .......... .......... .......... .......... .......... 59%  185M 0s
   800K .......... .......... .......... .......... .......... 62%  199M 0s
   850K .......... .......... .......... .......... .......... 66%  259M 0s
   900K .......... .......... .......... .......... .......... 70%  191M 0s
   950K .......... .......... .......... .......... .......... 74%  205M 0s
  1000K .......... .......... .......... .......... .......... 77%  193M 0s
  1050K .......... .......... .......... .......... .......... 81%  267M 0s
  1100K .......... .......... .......... .......... .......... 85%  271M 0s
  1150K .......... .......... .......... .......... .......... 88%  239M 0s
  1200K .......... .......... .......... .......... .......... 92%  268M 0s
  1250K .......... .......... .......... .......... .......... 96%  260M 0s
  1300K .......... .......... .......... .......... .......... 99%  269M 0s
  1350K                                                       100%  572G=0.01s

2024-01-12 20:11:59 (103 MB/s) - ‘flatc.tar.gz’ saved [1382707/1382707]

flatc
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-7.4.4, pluggy-1.3.0 -- /opt/hostedtoolcache/Python/3.9.18/x64/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/yolo_tracking/yolo_tracking
plugins: hydra-core-1.3.2, cov-4.1.0
collecting ... collected 14 items

tests/test_exports.py::test_export_torchscript PASSED                    [  7%]
tests/test_exports.py::test_export_onnx PASSED                           [ 14%]
tests/test_exports.py::test_export_openvino PASSED                       [ 21%]
tests/test_python.py::test_strongsort_instantiation PASSED               [ 28%]
tests/test_python.py::test_botsort_instantiation PASSED                  [ 35%]
tests/test_python.py::test_deepocsort_instantiation PASSED               [ 42%]
tests/test_python.py::test_ocsort_instantiation PASSED                   [ 50%]
tests/test_python.py::test_bytetrack_instantiation PASSED                [ 57%]
tests/test_python.py::test_deepocsort_output FAILED                      [ 64%]
tests/test_python.py::test_ocsort_output PASSED                          [ 71%]
tests/test_python.py::test_botsort_output PASSED                         [ 78%]
tests/test_python.py::test_bytetrack_output PASSED                       [ 85%]
tests/test_python.py::test_strongsort_output PASSED                      [ 92%]
tests/test_python.py::test_gsi PASSED                                    [100%]

=================================== FAILURES ===================================
____________________________ test_deepocsort_output ____________________________

    def test_deepocsort_output():
        tracker_conf = get_tracker_config('deepocsort')
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        rgb = np.random.randint(255, size=(640, 640, 3), dtype=np.uint8)
        det = np.array([[144, 212, 578, 480, 0.82, 0],
                        [425, 281, 576, 472, 0.56, 65]])
        output = tracker.update(det, rgb)
        # Works since frame count is less than min hits (1 <= 2)
        assert output.shape == (2, 8)  # two inputs should give two outputs
        output = np.flip(np.delete(output, [4, 7], axis=1), axis=0)
        assert_allclose(det, output, atol=1, rtol=7e-3, verbose=True)
    
        # Instantiate new tracker and ensure minimum number of hits works
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        tracker.min_hits = 2
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(det, rgb)
        assert output.size == 0
>       output = tracker.update(det, rgb)

tests/test_python.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
boxmot/trackers/deepocsort/deep_ocsort.py:434: in update
    matched, unmatched_dets, unmatched_trks = associate(
boxmot/utils/association.py:146: in associate
    iou_matrix = run_asso_func(asso_func, detections, trackers, w, h)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = <function giou_batch at 0x7ff526351e50>
args = (array([[1.44e+02, 2.12e+02, 5.78e+02, 4.80e+02, 8.20e-01],
       [4.25e+02, 2.81e+02, 5.76e+02, 4.72e+02, 5.60e-01]]), array([[144., 212., 578., 480.,   0.],
       [425., 281., 576., 472.,   0.]]), 640, 640)

    def run_asso_func(func, *args):
        """
        Wrapper function that checks the inputs to the association functions
        and then call either one of the iou association functions or centroid.
    
        Parameters:
        func: The batch function to call (either *iou*_batch or centroid_batch).
        *args: Variable length argument list, containing either bounding boxes and optionally size parameters.
        """
        if func not in [iou_batch, giou_batch, diou_batch, ciou_batch, centroid_batch]:
            raise ValueError("Invalid function specified. Must be either '(g,d,c, )iou_batch' or 'centroid_batch'.")
    
        if func is (iou_batch or giou_batch or diou_batch or ciou_batch):
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[0:2]):
                raise ValueError("Invalid arguments for iou_batch. Expected two bounding boxes.")
            return func(*args)
        elif func is centroid_batch:
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[:2]) or not all(isinstance(arg, (int)) for arg in args[2:]):
                raise ValueError("Invalid arguments for centroid_batch. Expected two bounding boxes and two size parameters.")
            return func(*args)
        else:
>           raise ValueError("No such association method")
E           ValueError: No such association method

boxmot/utils/iou.py:212: ValueError
----------------------------- Captured stderr call -----------------------------
Downloading...
From: https://drive.google.com/uc?id=12uD5FeVqLg9-AFDju2L7SQxjmPb4zpBN
To: /home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt

  0%|          | 0.00/22.4M [00:00<?, ?B/s]
  5%|▍         | 1.05M/22.4M [00:00<00:02, 9.56MB/s]
 21%|██        | 4.72M/22.4M [00:00<00:00, 21.4MB/s]
 54%|█████▎    | 12.1M/22.4M [00:00<00:00, 32.0MB/s]
 77%|███████▋  | 17.3M/22.4M [00:00<00:00, 32.2MB/s]
100%|██████████| 22.4M/22.4M [00:00<00:00, 37.0MB/s]
[32m2024-01-12 20:12:31.441[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
[32m2024-01-12 20:12:31.599[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
=============================== warnings summary ===============================
boxmot/utils/checks.py:5
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/utils/checks.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_exports.py::test_export_onnx
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/appearance/backbones/osnet.py:389: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
    if return_featuremaps:

tests/test_exports.py::test_export_openvino
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/defusedxml/__init__.py:30: DeprecationWarning: defusedxml.cElementTree is deprecated, import from defusedxml.ElementTree instead.
    from . import cElementTree

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.9.18-final-0 -----------
Coverage HTML written to dir htmlcov

=========================== short test summary info ============================
FAILED tests/test_python.py::test_deepocsort_output - ValueError: No such association method
================== 1 failed, 13 passed, 8 warnings in 33.86s ===================
##[error]Process completed with exit code 1.

step_name: build (ubuntu-latest, 3.10)/6_Pytest tests.txt
log: ##[group]Run # needed in TFLite export
[36;1m[0m
[36;1m# needed in TFLite export[0m
[36;1mwget https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz[0m
[36;1mtar -zxvf flatc.tar.gz[0m
[36;1msudo chmod +x flatc[0m
[36;1msudo mv flatc /usr/bin/[0m
[36;1m[0m
[36;1mpytest --cov=$PACKAGE_DIR --cov-report=html -v tests[0m
[36;1mcoverage report --fail-under=$COVERAGE_FAIL_UNDER[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PACKAGE_DIR: boxmot
  COVERAGE_FAIL_UNDER: 29
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
##[endgroup]
--2024-01-12 20:12:02--  https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201203Z&X-Amz-Expires=300&X-Amz-Signature=f339441879645b502b6bf0bbc8e04deb0dcdf54ed1dcd223e8a7e04adef107ad&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-12 20:12:03--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/541831874/29499355-44ab-4fb6-86c8-582f4bad68a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240112T201203Z&X-Amz-Expires=300&X-Amz-Signature=f339441879645b502b6bf0bbc8e04deb0dcdf54ed1dcd223e8a7e04adef107ad&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=541831874&response-content-disposition=attachment%3B%20filename%3Dflatc.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1382707 (1.3M) [application/octet-stream]
Saving to: ‘flatc.tar.gz’

     0K .......... .......... .......... .......... ..........  3% 5.77M 0s
    50K .......... .......... .......... .......... ..........  7% 6.18M 0s
   100K .......... .......... .......... .......... .......... 11% 30.6M 0s
   150K .......... .......... .......... .......... .......... 14% 39.6M 0s
   200K .......... .......... .......... .......... .......... 18% 9.54M 0s
   250K .......... .......... .......... .......... .......... 22% 49.5M 0s
   300K .......... .......... .......... .......... .......... 25% 65.1M 0s
   350K .......... .......... .......... .......... .......... 29% 45.1M 0s
   400K .......... .......... .......... .......... .......... 33% 47.7M 0s
   450K .......... .......... .......... .......... .......... 37% 86.6M 0s
   500K .......... .......... .......... .......... .......... 40% 13.9M 0s
   550K .......... .......... .......... .......... .......... 44% 44.2M 0s
   600K .......... .......... .......... .......... .......... 48% 74.1M 0s
   650K .......... .......... .......... .......... .......... 51%  127M 0s
   700K .......... .......... .......... .......... .......... 55% 88.8M 0s
   750K .......... .......... .......... .......... .......... 59%  126M 0s
   800K .......... .......... .......... .......... .......... 62%  178M 0s
   850K .......... .......... .......... .......... .......... 66% 77.3M 0s
   900K .......... .......... .......... .......... .......... 70%  209M 0s
   950K .......... .......... .......... .......... .......... 74%  180M 0s
  1000K .......... .......... .......... .......... .......... 77%  159M 0s
  1050K .......... .......... .......... .......... .......... 81% 14.6M 0s
  1100K .......... .......... .......... .......... .......... 85% 52.9M 0s
  1150K .......... .......... .......... .......... .......... 88%  186M 0s
  1200K .......... .......... .......... .......... .......... 92%  127M 0s
  1250K .......... .......... .......... .......... .......... 96%  210M 0s
  1300K .......... .......... .......... .......... .......... 99%  216M 0s
  1350K                                                       100% 8.87M=0.04s

2024-01-12 20:12:03 (31.1 MB/s) - ‘flatc.tar.gz’ saved [1382707/1382707]

flatc
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.4, pluggy-1.3.0 -- /opt/hostedtoolcache/Python/3.10.13/x64/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/yolo_tracking/yolo_tracking
plugins: hydra-core-1.3.2, cov-4.1.0
collecting ... collected 14 items

tests/test_exports.py::test_export_torchscript PASSED                    [  7%]
tests/test_exports.py::test_export_onnx PASSED                           [ 14%]
tests/test_exports.py::test_export_openvino PASSED                       [ 21%]
tests/test_python.py::test_strongsort_instantiation PASSED               [ 28%]
tests/test_python.py::test_botsort_instantiation PASSED                  [ 35%]
tests/test_python.py::test_deepocsort_instantiation PASSED               [ 42%]
tests/test_python.py::test_ocsort_instantiation PASSED                   [ 50%]
tests/test_python.py::test_bytetrack_instantiation PASSED                [ 57%]
tests/test_python.py::test_deepocsort_output FAILED                      [ 64%]
tests/test_python.py::test_ocsort_output PASSED                          [ 71%]
tests/test_python.py::test_botsort_output PASSED                         [ 78%]
tests/test_python.py::test_bytetrack_output PASSED                       [ 85%]
tests/test_python.py::test_strongsort_output PASSED                      [ 92%]
tests/test_python.py::test_gsi PASSED                                    [100%]

=================================== FAILURES ===================================
____________________________ test_deepocsort_output ____________________________

    def test_deepocsort_output():
        tracker_conf = get_tracker_config('deepocsort')
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        rgb = np.random.randint(255, size=(640, 640, 3), dtype=np.uint8)
        det = np.array([[144, 212, 578, 480, 0.82, 0],
                        [425, 281, 576, 472, 0.56, 65]])
        output = tracker.update(det, rgb)
        # Works since frame count is less than min hits (1 <= 2)
        assert output.shape == (2, 8)  # two inputs should give two outputs
        output = np.flip(np.delete(output, [4, 7], axis=1), axis=0)
        assert_allclose(det, output, atol=1, rtol=7e-3, verbose=True)
    
        # Instantiate new tracker and ensure minimum number of hits works
        tracker = create_tracker(
            tracker_type='deepocsort',
            tracker_config=tracker_conf,
            reid_weights=WEIGHTS / 'mobilenetv2_x1_4_dukemtmcreid.pt',
            device='cpu',
            half=False,
            per_class=False
        )
        tracker.min_hits = 2
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(np.empty((0, 6)), rgb)
        assert output.size == 0
        output = tracker.update(det, rgb)
        assert output.size == 0
>       output = tracker.update(det, rgb)

tests/test_python.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
boxmot/trackers/deepocsort/deep_ocsort.py:434: in update
    matched, unmatched_dets, unmatched_trks = associate(
boxmot/utils/association.py:146: in associate
    iou_matrix = run_asso_func(asso_func, detections, trackers, w, h)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = <function giou_batch at 0x7f20a69f0700>
args = (array([[1.44e+02, 2.12e+02, 5.78e+02, 4.80e+02, 8.20e-01],
       [4.25e+02, 2.81e+02, 5.76e+02, 4.72e+02, 5.60e-01]]), array([[144., 212., 578., 480.,   0.],
       [425., 281., 576., 472.,   0.]]), 640, 640)

    def run_asso_func(func, *args):
        """
        Wrapper function that checks the inputs to the association functions
        and then call either one of the iou association functions or centroid.
    
        Parameters:
        func: The batch function to call (either *iou*_batch or centroid_batch).
        *args: Variable length argument list, containing either bounding boxes and optionally size parameters.
        """
        if func not in [iou_batch, giou_batch, diou_batch, ciou_batch, centroid_batch]:
            raise ValueError("Invalid function specified. Must be either '(g,d,c, )iou_batch' or 'centroid_batch'.")
    
        if func is (iou_batch or giou_batch or diou_batch or ciou_batch):
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[0:2]):
                raise ValueError("Invalid arguments for iou_batch. Expected two bounding boxes.")
            return func(*args)
        elif func is centroid_batch:
            if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[:2]) or not all(isinstance(arg, (int)) for arg in args[2:]):
                raise ValueError("Invalid arguments for centroid_batch. Expected two bounding boxes and two size parameters.")
            return func(*args)
        else:
>           raise ValueError("No such association method")
E           ValueError: No such association method

boxmot/utils/iou.py:212: ValueError
----------------------------- Captured stderr call -----------------------------
Downloading...
From: https://drive.google.com/uc?id=12uD5FeVqLg9-AFDju2L7SQxjmPb4zpBN
To: /home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt

  0%|          | 0.00/22.4M [00:00<?, ?B/s]
  2%|▏         | 524k/22.4M [00:00<00:05, 3.80MB/s]
 35%|███▌      | 7.86M/22.4M [00:00<00:00, 38.7MB/s]
 75%|███████▍  | 16.8M/22.4M [00:00<00:00, 58.3MB/s]
100%|██████████| 22.4M/22.4M [00:00<00:00, 54.7MB/s]
[32m2024-01-12 20:12:35.371[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
[32m2024-01-12 20:12:35.534[0m | [32m[1mSUCCESS [0m | [36mboxmot.appearance.reid_model_factory[0m:[36mload_pretrained_weights[0m:[36m207[0m - [32m[1mSuccessfully loaded pretrained weights from "/home/runner/work/yolo_tracking/yolo_tracking/examples/weights/mobilenetv2_x1_4_dukemtmcreid.pt"[0m
=============================== warnings summary ===============================
boxmot/utils/checks.py:5
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/utils/checks.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868
../../../../../opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868
  /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_exports.py::test_export_onnx
  /home/runner/work/yolo_tracking/yolo_tracking/boxmot/appearance/backbones/osnet.py:389: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
    if return_featuremaps:

tests/test_exports.py::test_export_openvino
  /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/defusedxml/__init__.py:30: DeprecationWarning: defusedxml.cElementTree is deprecated, import from defusedxml.ElementTree instead.
    from . import cElementTree

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.10.13-final-0 ----------
Coverage HTML written to dir htmlcov

=========================== short test summary info ============================
FAILED tests/test_python.py::test_deepocsort_output - ValueError: No such association method
================== 1 failed, 13 passed, 8 warnings in 33.78s ===================
##[error]Process completed with exit code 1.


Changed files:
boxmot/utils/iou.py

Fix diff:
diff --git a/boxmot/utils/iou.py b/boxmot/utils/iou.py
index d8bfc7e..144f40f 100644
--- a/boxmot/utils/iou.py
+++ b/boxmot/utils/iou.py
@@ -200,10 +200,10 @@ def run_asso_func(func, *args):
     if func not in [iou_batch, giou_batch, diou_batch, ciou_batch, centroid_batch]:
         raise ValueError("Invalid function specified. Must be either '(g,d,c, )iou_batch' or 'centroid_batch'.")
 
-    if func is (iou_batch or giou_batch or diou_batch or ciou_batch):
+    if func in (iou_batch, giou_batch, diou_batch, ciou_batch):
         if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[0:2]):
             raise ValueError("Invalid arguments for iou_batch. Expected two bounding boxes.")
-        return func(*args)
+        return func(*args[0:2])
     elif func is centroid_batch:
         if len(args) != 4 or not all(isinstance(arg, (list, np.ndarray)) for arg in args[:2]) or not all(isinstance(arg, (int)) for arg in args[2:]):
             raise ValueError("Invalid arguments for centroid_batch. Expected two bounding boxes and two size parameters.")