fix(cli): propagate the real source frame rate into the tracker (#569) #583
This file contains hidden or 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: Integration Tests | |
| on: | |
| push: | |
| branches: ['release/*', 'develop'] | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| - '.github/workflows/ci-integrations.yml' | |
| jobs: | |
| integration-tests: | |
| name: Integration Validation | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout the repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: 🐍 Install uv and set Python version | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: "3.12" | |
| activate-environment: true | |
| - name: 🚀 Install Packages | |
| run: uv sync --frozen --group dev | |
| - name: 🧪 Run Integration Tests | |
| run: uv run pytest -m integration -v --tb=short | |
| mask-pipeline: | |
| name: Mask Extra Smoke | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout the repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: 🐍 Install uv and set Python version | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: "3.12" | |
| activate-environment: true | |
| - name: 🚀 Install Packages with the mask extra | |
| run: uv sync --frozen --group dev --extra mask | |
| - name: 💾 Cache SAM + Cutie checkpoints | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: models | |
| key: mask-checkpoints-${{ hashFiles('src/trackers/core/masks/sam.py', 'src/trackers/core/masks/cutie.py') }} | |
| restore-keys: | | |
| mask-checkpoints- | |
| - name: 🎭 Smoke-test the SAM + Cutie mask pipeline | |
| run: | | |
| uv run python - <<'PY' | |
| import numpy as np | |
| import supervision as sv | |
| from trackers import McByteMaskConfig, McByteTracker | |
| tracker = McByteTracker( | |
| enable_cmc=True, | |
| enable_mask_manager=True, | |
| mask_config=McByteMaskConfig(device="cpu"), | |
| ) | |
| frame = np.zeros((360, 640, 3), dtype=np.uint8) | |
| detections = sv.Detections( | |
| xyxy=np.array([[100, 80, 200, 300]], dtype=np.float32), | |
| confidence=np.array([0.9], dtype=np.float32), | |
| ) | |
| for _ in range(2): | |
| tracker.update(detections=detections, frame=frame) | |
| print("mask pipeline OK") | |
| PY |