35 Commits
Author SHA1 Message Date
23a2227ae7 fix(docs): resolve review deprecation follow-ups (#2415)
- Extend active deprecation removals to 0.31.0 and align deprecated API docs, changelog, and warnings.
- Add missing reference docs for VLM, conversion helpers, geometry, metrics extras, and tracker deprecation notices.
- Raise when ImageSink cannot write an image and cover the failure path with a regression test.
- Correct conversion and deprecated docs to match exported names and restore KeyPoints.confidence.
- Add regression coverage for SUPERVISION_DEPRECATION_WARNING precedence and document ImageSink.save_image() failure behavior.

* test: add validation and behavior tests for Color, Position, and polygon approximation adjustments

---------

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 14:30:32 +02:00
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
SkalskiP 5b42be9b4a make sure only recently updated pages have new status 2025-07-15 20:10:35 +02:00
LinasKo 7b3d88602b 'New' tags for docs of 0.25.0 2024-11-12 13:08:08 +02:00
LinasKo 68d668a1f2 Update "New" tags in documentation 2024-10-04 22:22:10 +03:00
LinasKo eebd57a731 Add per-class counting to LineZone, create LineZoneAnnotatorMulticlass 2024-09-29 12:47:07 +03:00
LinasKo 9f730b9fb5 Add "new" tags 2024-08-27 17:18:44 +03:00
LinasKo 084926ded3 Deprecations, changelog, notebook cleanup, 'new' markers 2024-07-11 03:21:41 +03:00
SkalskiP 0200fd307b mark InferenceSlicer with new status 2024-06-05 18:00:54 +02:00
LinasKo 13b46dda67 Update "New" tags in docs, fix typo in one heading 2024-06-05 17:44:25 +02:00
Onuralp SEZER f55ef90716 Merge pull request #819 from AdonaiVera/allowing_serialise_detections_json
New function [JSONSink] - Allowing to serialise Detections to a JSON file
2024-03-01 03:23:46 +03:00
Adonai Vera 4509608a5d Apply documentation, unit test with mutliple scenarios, and improvement 2024-03-01 03:14:35 +03:00
pre-commit-ci[bot] 1b07974e93 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-02-12 12:51:07 +00:00
SkalskiP ba81a09b2c LineZone, LineZoneAnnotator documentation improvements 2024-02-12 13:43:58 +01:00
Piotr Skalski 87a4927d03 Merge pull request #818 from AdonaiVera/allowing_serialise_detections_csv
New function [CSVSink] - allowing to serialise Detections to a CSV file
2024-02-02 18:11:10 +01:00
pre-commit-ci[bot] aba5c0a07b fix(pre_commit): 🎨 auto format pre-commit hooks 2024-02-01 22:56:02 +00:00
Adonai Vera 788bc317fa Improvements in thread #818: documentation, handle unit test, improvements pattern directory 2024-02-01 17:53:15 -05:00
Adonai Vera 12568336ba Applied feedback from SkalskiP in PR #818 2024-01-31 11:39:05 -05:00
Onuralp SEZER 443edc9760 docs(fix): 🐞📝 removal of table of content duplicates Detection Smoother
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-01-31 15:18:19 +03:00
Onuralp SEZER beec044421 docs(fix): 🐞📝 removal of table of content duplicates PolygonZone,PolygonZoneAnnotator
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-01-31 15:17:53 +03:00
Onuralp SEZER 1aab21c333 docs(fix): 🐞📝 removal of table of content duplicates LineZone
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-01-31 15:15:06 +03:00
Onuralp SEZER 05aed165dc docs(fix): 🐞📝 removal of table of content duplicates InferenceSlicer
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-01-31 15:14:11 +03:00
SkalskiP 79560945f5 ready for merge 2024-01-24 15:07:32 +01:00
James 09d771c139 Merge branch 'develop' into prediction-smoothing 2024-01-23 12:59:28 +00:00
James Gallagher c299a929c5 respond to feedback 2024-01-23 12:57:31 +00:00
SkalskiP 99d1b6d130 ready for review 2024-01-17 12:11:31 +01:00
Brad Dwyer 1d4d7dd4ea Move into tools directory 2023-12-28 11:42:55 -06:00
pre-commit-ci[bot] 62c45548a6 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-10-18 12:44:20 +00:00
SkalskiP 00e209744f Add documentation and improvements to "LineZone" functionality
Descriptions for various attributes and functionalities have been added into LineZone class to aid developers in understanding their behaviour. Also, the trigger function was modified to return two separate boolean arrays - 'crossed_in' and 'crossed_out' to denote objects crossing the line in specific directions. Moreover, Line Zone documentation is added to the side navigation in mkdocs.yml.
2023-10-18 14:42:59 +02:00
SkalskiP bddd32dbb5 refactor(inference_slicer): Update class and method docstrings 2023-08-30 15:56:15 +02:00
SkalskiP 6d7de56c25 slicer refactor 2023-08-30 15:08:07 +02:00
Piotr Skalski 85de9b255b Merge pull request #282 from hardikdava/slicer
Slicer for small object detection
2023-08-30 14:48:46 +02:00
Hardik Dava 0ed404602f recommit everything 2023-08-11 19:31:33 +02:00
Onuralp SEZER 57e17c34a0 feat: 🚀 pre-commit and initial formatted files
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2023-07-25 13:02:26 +03:00
SkalskiP c1ccff474f Documentation for PolygonZone and PolygonZoneAnnotator 2023-04-10 23:15:35 +02:00