Commit Graph
443 Commits
Author SHA1 Message Date
Danielandpre-commit-ci[bot] dcce0e4807 test(detection): add adapter tests and ignore local data directory (#2116)
* test(detection): add adapter tests and ignore local data directory
* fix(pre_commit): 🎨 auto format pre-commit hooks
* chore: retrigger ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-02 07:56:04 +01:00
3b09a6356a fix: process_video silent hang on callback error (#2022)
* Handle process_video worker exceptions
* test: add unit tests for process_video exception handling and fix docstring typo
* fix(pre_commit): 🎨 auto format pre-commit hooks
* Handle `Full` exception in video writer queue and add test for small buffer scenario
* Apply suggestions from code review

---------

Co-authored-by: Your Name <realh4m@users.noreply.github.com>
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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-30 10:46:19 +01:00
5ced8c4ea0 Add unit tests for key_points - skeleton & annotators (#2099)
* Refactor key point annotator tests to use reusable fixtures for test clarity and maintainability
* Apply suggestions from code review
* fix(pre_commit): 🎨 auto format pre-commit hooks
* Move `assert_image_mostly_same` helper to a shared module and update imports in tests
* Update test/key_points/test_skeletons.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 18:22:19 +01:00
Jirka Borovecandpre-commit-ci[bot] beaa0be014 Add comprehensive unittests for KeyPoints functionality (#2109)
* Add comprehensive unittests for KeyPoints functionality
* fix(pre_commit): 🎨 auto format pre-commit hooks
* Refactor and expand KeyPoints tests for improved coverage

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-29 16:50:11 +01:00
44614dea94 test: add regression test for numpy color lookup (#2110)
* test: add regression test for numpy color lookup
* fix(pre_commit): 🎨 auto format pre-commit hooks
* test: fix numpy color lookup docstring length
* Update test/annotators/test_core.py

---------

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-01-28 16:01:26 +01:00
Jirka Borovec ac379e467a Add unittests for supervision.annotators.core module (#2093)
* Add unit tests for `supervision.annotators.core` module
* Update test/annotators/test_core.py
2026-01-27 07:19:16 +01:00
7507d3a68c Add unittests for assets and downloader functionality (#2095)
* Apply suggestions from code review
* Use BASE_VIDEO_URL constant in test instead of hard-coded URL (#2097)
* Replace hard-coded URL with BASE_VIDEO_URL constant in test
* Fix non-deterministic test_invalid_asset by patching Path.exists (#2096)
* Fix test_invalid_asset to be deterministic by patching Path.exists

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Borda <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-01-27 07:18:06 +01:00
Jirka Borovec 06bd638f15 Refactor test utilities: clarify module purpose and improve function's names (#2094)
* fix wrong types in test_csv and test_json
2026-01-27 07:13:18 +01:00
b85b41d5f1 fix(yolo): round polygon coords before int cast to improve mask accuracy (#2080)
* fix(yolo): round polygon coords before int cast to improve mask accuracy

* fix: E501 Line too long

* Update uv.lock

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Piotr Skalski <piotr.skalski92@gmail.com>
2026-01-23 11:41:21 +01:00
09de0f4f06 feat(ruff): add pytest linting rule (#2053)
* feat(ruff): add pytest linting rule
* --unsafe-fixes
* fix(pre_commit): 🎨 auto format pre-commit hooks


---------

Co-authored-by: jiri BOROVEC <jirka@Jiris-MacBook-Pro-J4N257Y6Q2.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-01-13 19:34:22 +01:00
fabbff2b60 Remove security noqa comments by fixing underlying issues (#2064)
* Fix security issues and remove noqa comments
- Replace MD5 hash_new with md5() and add usedforsecurity=False flag
- Add documentation explaining MD5 is for file integrity, not security
- Add timeout parameter to requests.get call
- Add explicit shell=False and check=False to subprocess.run
- Remove all security-related noqa comments
- Add per-file ignores for S311 in tests and S603 in examples

---------

Co-authored-by: jirka <jirka.borovec@seznam.cz>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Borda <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-12 15:25:41 +01:00
Jirka Borovec 132cc056f6 chore(pre_commit): remove exclusion for trailing-whitespace hook (#2049) 2026-01-12 09:30:54 +01:00
Jirka Borovec d570366fb4 chore(pre_commit): convert bandit into Ruff's S rule & add TODOs for security improvements (#2039) 2026-01-12 08:08:19 +01:00
SkalskiP bbc37b4b6a fix failing tests 2025-11-16 13:34:51 +01:00
SkalskiP a99015ac2d more Qwen2.5-VL tests 2025-11-15 22:51:22 +01:00
pre-commit-ci[bot] e68c908077 fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-15 20:29:38 +00:00
SkalskiP 2edcbdc487 initial commit with from_qwen_3_vl added, from_qwen_2_5_vl improved 2025-11-15 21:27:55 +01:00
pre-commit-ci[bot] e82b5b9d74 fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-14 16:58:25 +00:00
SkalskiP c8f5c741fd reimplement crop_image to skip type casting when Pillow Image given
`get_image_resolution_wh` added
2025-11-14 17:55:07 +01:00
SkalskiP 8d464aa1b5 improve InferenceSlicer implementation lowering the count of generated boxes 2025-11-14 16:42:10 +01:00
SkalskiP ce28ab7fc7 fix uti tests for InferenceSlicer._generate_offset 2025-11-14 15:49:22 +01:00
Piotr Skalski 1d73468dc5 Merge pull request #2012 from jackiehimel/fix/bugs-1959-2000
fix: correct numpy indexing in denormalize_boxes and add ultralytics validation
2025-11-14 13:25:26 +01:00
SkalskiP dfd2a60855 update denormalize_boxes docstring and examples; update from_google_gemini_2_0, from_google_gemini_2_5 and from_moondream to use latest version of denormalize_boxes 2025-11-14 13:12:39 +01:00
SkalskiP f563c5a634 update denormalize_boxes docstring and examples 2025-11-14 12:53:58 +01:00
SkalskiP 35272b40d3 remove ultralytics tests 2025-11-14 12:38:55 +01:00
Piotr Skalski d109fba9d8 Merge pull request #2001 from AnonymDevOSS/feat/speed-up-box-iou-batch
feat: speed up box iou batch using 2d in-place ops instead of 3d
2025-11-14 12:26:25 +01:00
SkalskiP 42d92ba913 making ruff happy 2025-11-14 12:00:45 +01:00
pre-commit-ci[bot] 1e2dc8f88b fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-14 10:58:01 +00:00
SkalskiP f716b7fa3b improve docstrings, examples, variable naming conventions and unit tests 2025-11-14 11:57:31 +01:00
pre-commit-ci[bot] 61cca76acc fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-13 02:10:25 +00:00
jackiehimel 9ad850af46 fix: correct numpy indexing in denormalize_boxes and add ultralytics validation
- Fix denormalize_boxes numpy indexing bug that caused IndexError with 3+ boxes
- Add validation for missing boxes attribute in from_ultralytics
- Add comprehensive test coverage (11 new tests)

Fixes #1959
Fixes #2000
2025-11-12 20:58:25 -05:00
AnonymDevOSS bb87ab0a6e fixed autoformat errors 2025-11-06 23:00:33 +01:00
AnonymDevOSS ceefe0bab2 feat/ speed up box iou - replaced original function; added tests 2025-11-06 22:52:25 +01:00
SkalskiP 65f6e418a1 making flake8 happy 2025-11-05 20:34:22 +01:00
pre-commit-ci[bot] 1fef946a19 fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-05 19:29:22 +00:00
SkalskiP 4c3d51f186 making flake8 happy 2025-11-05 20:28:55 +01:00
pre-commit-ci[bot] 9340cb962b fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-05 19:23:02 +00:00
SkalskiP 6578b4ea52 initial version of filter_segments_by_distance 2025-11-05 20:18:10 +01:00
pre-commit-ci[bot] 3e7e4caf3f fix(pre_commit): 🎨 auto format pre-commit hooks 2025-11-05 12:03:55 +00:00
SkalskiP 32dca290ef xyxy_to_mask implementation + tests 2025-11-05 13:00:11 +01:00
AnonymDevOSS 35ff87b08d feat: speed up box iou batch using 2d in-place ops instead of 3d
without creating intermediary (N, M, 2) arrays.
2025-10-28 13:51:28 +01:00
SkalskiP cbb58a8c6f tint_image and grayscale_image functions added 2025-08-07 10:01:50 +02:00
SkalskiP 4b7b347aea drop create tiles from public API 2025-08-07 07:45:55 +02:00
pre-commit-ci[bot] 46e5965680 fix(pre_commit): 🎨 auto format pre-commit hooks 2025-08-06 10:17:35 +00:00
SkalskiP aab3160cd7 make ruff happy 2025-08-06 12:17:04 +02:00
pre-commit-ci[bot] 13ab215fdf fix(pre_commit): 🎨 auto format pre-commit hooks 2025-08-06 10:05:47 +00:00
SkalskiP a08cda30fb ready for review 2025-08-06 12:02:51 +02:00
pre-commit-ci[bot] f4561f9ba7 fix(pre_commit): 🎨 auto format pre-commit hooks 2025-07-28 06:29:08 +00:00
SkalskiP beaf89cb22 initial version of advanced key points filtering and slicing + some naming refactor 2025-07-28 08:24:43 +02:00
SkalskiP 036a956473 fix for #1911 2025-07-26 17:46:04 +02:00