Commit Graph

322 Commits

Author SHA1 Message Date
Daniiiil1 6b143e4e41
test(metrics): verify live sklearn parity (#2470)
* add sklearn parity goldens
* compute sklearn parity live
* separate empty input semantics
2026-08-05 19:24:44 +02:00
jirka a95d85ce07 rolling towards `0.31.0.dev` 2026-08-04 19:43:57 +02:00
Jirka Borovec 813c4295bf
releasing `0.30.0` (#2462) 2026-08-04 16:22:04 +02:00
Jirka Borovec 794971ba0f
feat(cv2): remove OpenCV dependency (#2443)
* feat(cv2): remove OpenCV dependency
* ci(tests): cover ambient cv2 wheels
* fix(cv2): restore fallback CI
* ci(tests): simplify pytest job name formatting
* ci(tests): refactor cv2 backend check for readability and set Python shell explicitly
* test(cv2): stabilize OpenCV parity checks
* ci(tests): fix Python 3.13 matrix typo in CI workflow
* scope OpenCV-absence check to declared deps/extras
* normalize whitespace in release-doc phrase assertions
* fix(ci): strip manifest line before comment check
* emit `UserWarning` when OpenCV is missing to alert users of fallback behavior

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-31 22:19:33 +02:00
dependabot[bot] ceddf331c6
⬆️ Update pydeprecate requirement from <0.11,>=0.9 to >=0.9,<0.12 (#2457)
Updates the requirements on [pydeprecate](https://github.com/Borda/pyDeprecate) to permit the latest version.
- [Release notes](https://github.com/Borda/pyDeprecate/releases)
- [Changelog](https://github.com/Borda/pyDeprecate/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Borda/pyDeprecate/compare/v0.9.0...v0.11.0)

---
updated-dependencies:
- dependency-name: pydeprecate
  dependency-version: 0.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:20:12 +02:00
dependabot[bot] f1f8213c01
⬆️ Update opencv-python requirement from <5,>=4.5.5.64 to >=4.5.5.64,<6 (#2444)
Updates the requirements on [opencv-python](https://github.com/opencv/opencv-python) to permit the latest version.
- [Release notes](https://github.com/opencv/opencv-python/releases)
- [Commits](https://github.com/opencv/opencv-python/commits)

---
updated-dependencies:
- dependency-name: opencv-python
  dependency-version: 5.0.0.93
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 10:58:09 +02:00
Jirka Borovec 68e63f9e39
refactor(cv2): replace Hershey text with Pillow (#2440)
Text fallback now renders through Pillow with the DejaVu Sans face
resolved via matplotlib font_manager, replacing the Hershey stroke-font
reader; getTextSize metrics derive from the same font and differ from
OpenCV within the documented visual-divergence tier.

Remove the packaged Hershey glyph data (hershey_fonts.json, provenance,
license) and its _cv2/data package-data entry.

Delete unused fallbacks: _geometry _fill_poly and _point_in_polygon
(live fillPoly is the Pillow one in _drawing) and _common _unavailable.

Replace test_hershey with Pillow-oriented test_text, drop test_common,
and point test_contours/test_geometry at _drawing._fill_poly. Document
the fallback text-backend change in the changelog.

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-17 10:22:32 +02:00
Jirka Borovec 1efa5b8eaa
feat(cv2): complete fallback integration (#2439)
* feat(cv2): complete fallback integration
* fallback-fixes: reject invalid addWeighted dtype; O(N) approxPolyDP anchor seeding
* tests: copyMakeBorder sequence parity; drop non-empty facade-import assert; fix Windows path separator in boundary check
* fix(cv2): copyMakeBorder scalar value only fills channel 0 on multichannel images

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-17 07:50:45 +02:00
Jirka Borovec 20b7c085b7
feat(video): require PyAV during cv2 transition (#2438)
- Add the PyAV-backed file-video and audio fallback to the compatibility layer.
- Declare PyAV alongside OpenCV until the final dependency-removal integration.
- _VideoWriter now rejects is_color=False (NotImplementedError) instead of
  silently dropping it, since the PyAV fallback only encodes 3-channel frames.
- _mux_audio cleanup (container closes, temp-file removal) is now best-effort
  so a failing close/remove in finally can no longer mask the primary result
  or the original exception.
- The subprocess used to validate the cv2-free fallback had no timeout;
  a hang (import deadlock, codec probe stall) could block the whole CI
  run. Added a 60s timeout so a hang fails fast with a clear traceback
  instead of an opaque suite-wide stall.
- process_video(preserve_audio=True) docstring still described the old
  ffmpeg-based muxing; audio remuxing was reimplemented with PyAV and no
  longer requires an external ffmpeg executable.
- get_video_frames_generator's documented webcam fallback
  (`_cv2.VideoCapture(0)`) silently fails under the PyAV backend: the
  BackendUnavailableError raised for integer sources was swallowed with no
  logging, so isOpened() just returns False with zero diagnostic signal.
  Doc note now states the limitation explicitly and the capture logs a
  warning instead of failing silently.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-16 20:13:15 +02:00
Jirka Borovec c3496134bc
feat(cv2): add Hershey text fallback (#2435)
* feat(cv2): add Hershey text fallback
* fix(cv2): sync Hershey provenance hash

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-16 17:10:49 +02:00
Jirka Borovec 16814acff3
feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320)
- Added `sv.ImageWindow`, a Tkinter/Pillow-based desktop image viewer with BGR, grayscale, and BGRA support, keyboard polling, left-click callbacks, context-manager usage, window-state checks, and clean close handling
- Added responsive image resizing with optional aspect-ratio preservation and correctly mapped mouse coordinates after scaling or letterboxing
- Updated compatible runnable examples to use `sv.ImageWindow`, while retaining OpenCV display APIs for worker-thread streaming examples that are incompatible with Tkinter
- Improved `sv.cv2_to_pillow` to support grayscale and BGRA images
- Updated webcam guidance to clarify capture ownership and explicit `VideoCapture` cleanup
- Fixed image-window event handling to prevent stale keypresses, ghost windows, close-time races, and blocked waits after the window closes

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-15 15:06:55 +02:00
Jirka Borovec 75023c5f2f
fix: remaining review findings in dataset, docs, and tests (#2416)
- Added `sv.mask_to_roi` as an explicit migration path for exclusive mask bounds
- Fixed COCO, CreateML, and Pascal VOC export validation to reject ambiguous or colliding dataset paths before writing
- Fixed in-memory `DetectionDataset` split and merge behavior
- Fixed `supervision` imports to avoid loading ByteTrack until it is used
- Fixed detection conversion helpers to support coordinate-convention migration while preserving legacy inclusive defaults
- Fixed Azure tag mapping, anchor rounding, and line-zone smoothing to avoid incorrect or ghost detections
- Fixed video processing shutdown handling for timeout and full-queue cases
- Improved downloader, validator, documentation, and regression coverage for the shipped dataset, detection, annotator, image, and video behavior

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-08 23:00:32 +02:00
Jirka Borovec 6a69197177
fix(dataset): harden dataset IO edge cases (#2410)
- Avoid mutating caller-owned Detections during dataset construction and reject invalid class ids with clear ValueErrors.
- Make COCO loading/export tolerant of missing optional metadata, add from_coco(use_iscrowd), and export mask pixel area when needed.
- Let folder-structure and YOLO loading skip common clutter and accept PIL-readable image modes with regression coverage.
- Preserve from_coco positional show_progress compatibility while keeping use_iscrowd keyword-only.
- Filter class-folder loading to image files and export missing COCO mask area from decoded masks.
- Add regression coverage, changelog updates, and types-tqdm for mypy.

---------

Co-authored-by: Codex <codex@openai.com>
2026-07-07 16:29:43 +02:00
dependabot[bot] ced30b48f7
⬆️ Update pydeprecate requirement from <0.10,>=0.9 to >=0.9,<0.11 (#2404)
Updates the requirements on [pydeprecate](https://github.com/Borda/pyDeprecate) to permit the latest version.
- [Release notes](https://github.com/Borda/pyDeprecate/releases)
- [Changelog](https://github.com/Borda/pyDeprecate/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Borda/pyDeprecate/compare/v0.9.0...v0.10.1)

---
updated-dependencies:
- dependency-name: pydeprecate
  dependency-version: 0.10.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 10:34:57 +02:00
Abhijith Neil Abraham f196e15f26
fix: replace deprecated 2-D np.cross with explicit determinant (#2386)
- Add filterwarnings = ["error::DeprecationWarning"] to pyproject.toml so
  future np.cross 2-D reintroductions fail CI immediately (closes #2384)
- Add test_get_polygon_center_no_deprecation_warning: asserts no
  DeprecationWarning from get_polygon_center (Copilot inline comment)
- Add test_cross_product_no_deprecation_warning: asserts no DeprecationWarning
  from cross_product (Copilot inline comment)
- Add test_cross_product_sign (4 parametrised cases): above / below / on-line /
  offset-start — directly tests the inline determinant correctness
- Improve cross_product docstring: blank line after summary, adds Examples
  section with correct output, notes NumPy 2.0 rationale

---------

Co-authored-by: jirka <6035284+Borda@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-07-02 19:01:39 +02:00
pre-commit-ci[bot] 15f56dea30
chore(pre_commit): ⬆ pre_commit autoupdate (#2375)
* chore(pre_commit): ⬆ pre_commit autoupdate

updates:
- [github.com/JoC0de/pre-commit-prettier: v3.8.4 → v3.9.3](https://github.com/JoC0de/pre-commit-prettier/compare/v3.8.4...v3.9.3)
- [github.com/tox-dev/pyproject-fmt: v2.25.0 → v2.25.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.0...v2.25.1)
- [github.com/astral-sh/ruff-pre-commit: v0.15.18 → v0.15.20](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.18...v0.15.20)

* fix(pre_commit): 🎨 auto format pre-commit hooks
* fix(pyproject): restore valid mypy TOML overrides
* chore: update pyproject.toml to exclude examples and tests in mypy configuration

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jirka <6035284+Borda@users.noreply.github.com>
2026-06-30 23:02:13 +02:00
pre-commit-ci[bot] ad2c75021f
chore(pre_commit): ⬆ pre_commit autoupdate (#2248)
* chore(pre_commit): ⬆ pre_commit autoupdate

updates:
- [github.com/JoC0de/pre-commit-prettier: v3.8.3 → v3.8.4](https://github.com/JoC0de/pre-commit-prettier/compare/v3.8.3...v3.8.4)
- [github.com/tox-dev/pyproject-fmt: v2.21.1 → v2.25.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.21.1...v2.25.0)
- [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.15.18](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.15.18)
- [github.com/pre-commit/mirrors-mypy: v1.20.2 → v2.1.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.20.2...v2.1.0)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
2026-06-29 14:52:18 +02:00
Jirka Borovec 0a95bae8a8
chore: bump minimum Python to 3.10 (#2260)
- Drop Python 3.9 from CI test matrix
- requires-python = ">=3.10" in pyproject.toml
- ruff target-version py39 → py310
- mypy python_version 3.9 → 3.10
- Remove Python 3.9 classifier

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-29 14:45:30 +02:00
dependabot[bot] 5a90113b15
⬆️ Update mkdocstrings-python requirement from <2,>=1.10.9 to >=1.10.9,<3 (#2366)
* ⬆️ Update mkdocstrings-python requirement

Updates the requirements on [mkdocstrings-python](https://github.com/mkdocstrings/python) to permit the latest version.
- [Release notes](https://github.com/mkdocstrings/python/releases)
- [Changelog](https://github.com/mkdocstrings/python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/python/compare/1.10.9...2.0.5)

---
updated-dependencies:
- dependency-name: mkdocstrings-python
  dependency-version: 2.0.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(pre_commit): 🎨 auto format pre-commit hooks

* Update docs dependency stack for mkdocstrings 2

Move mkdocstrings-python handler options to their 2.x-compatible location, scope the docs dependency group to Python 3.10+, and keep the general pytest matrix from installing docs dependencies.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
2026-06-29 11:20:32 +02:00
dependabot[bot] 58aacd3f74
⬆️ Update pytest requirement from <9,>=7.2.2 to >=7.2.2,<10 (#2363)
Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.2...9.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.1.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
2026-06-29 10:52:52 +02:00
dependabot[bot] b5f0752f41
⬆️ Update build requirement from <1.5,>=0.10 to >=0.10,<1.6 (#2365)
* ⬆️ Update build requirement from <1.5,>=0.10 to >=0.10,<1.6

Updates the requirements on [build](https://github.com/pypa/build) to permit the latest version.
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/0.10.0...1.5.0)

---
updated-dependencies:
- dependency-name: build
  dependency-version: 1.5.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-29 10:48:06 +02:00
dependabot[bot] 939097bdce
⬆️ Update mkdocstrings requirement from <0.31,>=0.25.2 to >=0.25.2,<1.1 (#2364)
* ⬆️ Update mkdocstrings requirement

Updates the requirements on [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings) to permit the latest version.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.2...1.0.4)

---
updated-dependencies:
- dependency-name: mkdocstrings
  dependency-version: 1.0.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-29 10:43:02 +02:00
Madhav-C a179d9120f
feat(detection): support windowed GeoTIFF reads in InferenceSlicer (#2281)
InferenceSlicer can now accept an open rasterio-style dataset and read each tile via a windowed read instead of loading the whole image into memory, enabling tiled inference on multi-GB aerial/drone GeoTIFFs. Detection is duck-typed so rasterio stays an optional dependency (supervision[geotiff]) and the library imports no rasterio symbols. Adds CRS projected validation and tests. Closes #2027.

- Add threading.Lock around raster.read() in _run_callback to prevent
  data race when thread_workers > 1 shares a DatasetReader (GDAL releases
  GIL inside GDALRasterIO — reads are genuinely concurrent C code)
- Return TypeGuard[WindowedRasterDataset] from _is_windowed_raster;
  TYPE_CHECKING guard imports typing_extensions for Python 3.9 compat
- Add @runtime_checkable to WindowedRasterDataset Protocol; crs typed
  as object|None; guard .is_projected via getattr(..., True)
- Extract _get_resolution_wh and _apply_overlap_filter helpers from
  __call__ to bring cyclomatic complexity under PLR0912 limit (16 → ~4)
- Widen callback type to Callable[[NDArray[Any]], Detections] to accept
  any dtype (uint16 raster tiles are not NDArray[uint8])
- Add Raises section to __call__ docstring for geographic CRS ValueError
- Add one-line summary to move_detections docstring
- Export WindowedRasterDataset from sv.__init__
- Move changelog entry from 0.29.1 (released) to UnReleased
- Add comment explaining rasterio>=1.3 lower bound in pyproject.toml
- Restructure tests: class grouping, parametrize CRS cases, add
  docstrings; add compact_masks, thread_workers>1, single-band,
  single-tile test cases


---------

Co-authored-by: madhavcodez <madhavcodez@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-25 14:07:42 +02:00
jirka 3e610a0558 Bump version to `0.30.0.dev` 2026-06-23 22:14:07 +02:00
Jirka Borovec 49ecac0376 Releasing supervision `0.29.1` (#2350) 2026-06-23 21:53:06 +02:00
SkalskiP 1e551ec9c0 releasing `0.29.0` 2026-06-15 23:36:28 +02:00
SkalskiP 1fa735d0d9 releasing `0.29.0rc1` 2026-06-15 23:24:53 +02:00
Piotr Skalski 62a24d7960
Unify deprecation policy: enforce 3 minor release minimum window (#2324)
* Unify deprecation policy: 3 minor releases minimum

* Add 0.29.0 changelog entry

* Bump version to 0.29.0
2026-06-15 23:04:55 +02:00
jirka ef8ba557a1 releasing `0.29.0.rc0` 2026-06-11 18:37:56 +02:00
Jirka Borovec 3410d92daa
refactor: privatize validation helpers (#2294)
* refactor: privatize validation helpers
* fix: correct error message in _validate_keypoint_confidence

- Fix f"({n, m})" -> f"({n}, {m})" (set literal -> proper shape string)
- Fix error message "1D" -> "2D" to match actual array dimensionality

* fix: correct error message in _validate_xy

- Fix f"({n, m},)" -> f"({n}, {m}, 2) or ({n}, {m}, 3)"
- Fix error message "2D" -> "3D" to match actual array dimensionality

* bump pydeprecate version to >=0.9,<0.10 and fix type ignore tag for decorator
* chore: extend deprecation removal timeline to 0.32.0 across validators

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-06-06 13:15:54 -06:00
dependabot[bot] fb2dec9775
⬆️ Update pydeprecate requirement from <0.8,>=0.7 to >=0.7,<0.9 (#2268)
Updates the requirements on [pydeprecate](https://github.com/Borda/pyDeprecate) to permit the latest version.
- [Release notes](https://github.com/Borda/pyDeprecate/releases)
- [Changelog](https://github.com/Borda/pyDeprecate/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Borda/pyDeprecate/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: pydeprecate
  dependency-version: 0.8.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 11:30:37 +02:00
Jirka Borovec f1176270eb
Bump version to `0.29.0.dev` 2026-05-22 19:12:20 +02:00
Jirka Borovec e7376d558e
ci(tests): disable matplotlib GUI and exclude non-test dirs from collection (#2262) 2026-05-20 23:40:21 +02:00
Jirka Borovec 87b1b86f39
releasing `0.28.0` (#2220)
* docs: add 0.28.0 changelog entries and release demo notebook
* feat: add script for converting Python scripts to Jupyter notebooks
* chore: reorganize imports in release-demo notebook and update lint config
* docs: fix broken link in changelog entry for ConfusionMatrix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-04-30 17:11:50 +02:00
dependabot[bot] 2e0e8d9132
⬆️ Update wheel requirement from <0.47,>=0.40 to >=0.40,<0.48 (#2234)
Updates the requirements on [wheel](https://github.com/pypa/wheel) to permit the latest version.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.40.0...0.47.0)

---
updated-dependencies:
- dependency-name: wheel
  dependency-version: 0.47.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-27 09:28:09 +02:00
jirka 60f8d28535 releasing `0.28.0.rc2` 2026-04-22 18:21:43 +02:00
jirka 9590b72f44 releasing `0.28.0.rc1` 2026-04-17 11:40:31 +02:00
Jirka Borovec 77dd68ee27
refactor: deprecate `ByteTrack` class in favor of `ByteTrackTracker` (#2215)
- Mark `ByteTrack` as deprecated using `@deprecated_class`.
- Add deprecation details and alternatives in the class docstring.
- Update version annotations for deprecation (`deprecated_in="0.28.0"`, `remove_in="0.30.0"`).
2026-04-16 21:18:07 +02:00
jirka ed7606f886 fix: resolve typing regressions in image utilities 2026-04-15 20:59:46 +02:00
jirka 3997182ee7 Add deprecation warnings for annotation utilities and update dependencies
(cherry picked from commit 219161f1f9)
2026-04-15 20:59:46 +02:00
pre-commit-ci[bot] d6a24d0dd9
chore(pre_commit): ⬆ pre_commit autoupdate (#2180)
* chore(pre_commit): ⬆ pre_commit autoupdate

updates:
- [github.com/tox-dev/pyproject-fmt: v2.18.1 → v2.20.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.18.1...v2.20.0)
- [github.com/astral-sh/ruff-pre-commit: v0.15.6 → v0.15.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.6...v0.15.7)

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-24 21:07:32 +01:00
pre-commit-ci[bot] fdaadacbe3
chore(pre_commit): ⬆ pre_commit autoupdate (#2177)
* chore(pre_commit): ⬆ pre_commit autoupdate

updates:
- [github.com/tox-dev/pyproject-fmt: v2.16.2 → v2.18.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.16.2...v2.18.1)
- [github.com/astral-sh/ruff-pre-commit: v0.15.5 → v0.15.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.5...v0.15.6)

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-19 17:21:44 +01:00
Omkar Kabde 7912e7e5bb
Fix typing - last mypy ignored modules (#2172)
* fix mypy errors
* remove modules from pyproject
* Apply suggestions from code review

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-13 10:06:59 +01:00
Omkar Kabde e4cedb6861
refactor docstrings in `src/supervision/detection/tools` (#2164)
* refactor docstrings in `src/supervision/detection/tools`
* Refine type annotations and docstrings in `transformers.py` to include `TensorLike` protocol and enhance segmentation handling
* Enhance type safety in `transformers.py` by introducing `_is_tensor_like` with `TypeGuard` and refining segmentation result handling
* Refine `CSVSink` type annotations by introducing `WriterProtocol` for improved type safety
* Remove `_is_tensor_like`, `TensorLike` protocol, and `TypeGuard` usage from `transformers.py`, streamline segmentation handling, and fix typos in `CSVSink` and `JSONSink` docstrings

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-10 18:51:27 +01:00
Omkar Kabde 664bf3cf79
refactor docstrings in `scr/supervision/detection` (#2162)
* refactor docstrings in `scr/supervision/detection`
* Enhance docstrings across multiple modules: clarify attributes/args, improve formatting, and update logic for handling sentinel values in metrics calculation.
* Ensure consistent handling of `class_id` as integer across YOLO and Pascal VOC formats, fix NoneType handling in line zone logic, and add test coverage for multiclass annotator with None `class_id`.
* Enforce `class_id` as integer in YOLO export, update line zone class count docstrings, and add test for non-integer `class_id`.
* Apply suggestions from code review

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-10 18:40:05 +01:00
Omkar Kabde a673640aad
refactor docstrings in `draw`, `classification`, and `key_points` (#2161)
* refactor docstrings in draw, classification, and key_points
* Refactor type annotations, logging, and empty output handling across key modules
* Refactor type annotations in `core.py` to include conditional `TYPE_CHECKING` for `torch` imports
* Apply suggestions from code review

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-10 18:07:39 +01:00
Jirka Borovec 2dd1bc5df6
typing(dataset): resolve type annotations and sanitize docstrings (#2146)
* resolve type annotations and sanitize docstrings
* improve error messages in `_extract_class_names` for better debugging clarity
2026-02-10 22:23:32 +09:00
Daniel 83dfc87ef5
Refactor/typing tracker (#2131)
* refactor(tracker): improve typing and docstrings
* refactor(tracker): improve typing for track objects
* refactor(tracker): improve typing in matching and filters
* Apply suggestions from review
* Refactor: enhance type annotations, assertions, and docstrings across `byte_tracker` for clarity and type safety.
* Refactor: replace "Parameters" with "Args" in docstrings for consistency with style guide

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-10 21:57:12 +09:00
Kader Miyanyedi 54328e37a0
fix(typing): update type hints for utility functions in detection module (#2140) 2026-02-10 21:27:23 +09:00
pre-commit-ci[bot] 6d35301672
chore(pre_commit): ⬆ pre_commit autoupdate (#2143)
* chore(pre_commit): ⬆ pre_commit autoupdate

updates:
- [github.com/tox-dev/pyproject-fmt: v2.12.1 → v2.14.2](https://github.com/tox-dev/pyproject-fmt/compare/v2.12.1...v2.14.2)
- [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.24.1...v0.25)
- [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.14...v0.15.0)

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-10 21:24:35 +09:00