supervision/tests/detection
Agis Kounelis 27ba0aa92f
fix(detection): do not crash `from_inference` on partial `tracker_id` (#2353)
process_roboflow_result appended tracker_id only for predictions that carried
one, while xyxy/confidence/class_id were appended for every prediction. A
result where some predictions are tracked and others are not produced a
tracker_id array shorter than the boxes, so Detections.from_inference raised
"tracker_id must be a 1D np.ndarray with shape (N,)".

Collect tracker_id for every prediction (None when absent) and build the array
only when all detections carry one, otherwise leave it None. Fully-tracked and
untracked results are unchanged.

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-06-26 16:58:52 +02:00
..
tools test(detection): refactor GeoTIFF slicer tests with fixtures and parametrize 2026-06-25 14:24:54 +02:00
utils fix(detection): do not crash `from_inference` on partial `tracker_id` (#2353) 2026-06-26 16:58:52 +02:00
__init__.py
test_compact_mask.py feat(compact_mask): add `resize()` method and benchmark stage (#2227) 2026-04-22 15:34:12 +02:00
test_compact_mask_integration.py feat: add CompactMask for memory-efficient crop-RLE mask storage (#2159) 2026-04-13 11:10:12 +02:00
test_compact_mask_iou.py feat: add CompactMask for memory-efficient crop-RLE mask storage (#2159) 2026-04-13 11:10:12 +02:00
test_core.py fix(detection): do not crash `from_inference` on partial `tracker_id` (#2353) 2026-06-26 16:58:52 +02:00
test_csv.py fix(sinks): slice list and tuple custom_data values per row (#2216) 2026-04-18 00:24:36 +02:00
test_from_adapters.py
test_from_sam.py Add support for SAM3 PVS output (#2152) 2026-02-19 17:09:31 +01:00
test_inference_slicer_compact.py feat: add CompactMask for memory-efficient crop-RLE mask storage (#2159) 2026-04-13 11:10:12 +02:00
test_json.py fix(json_sink): serialize NumPy scalars in `custom_data` (#2334) 2026-06-17 22:27:03 +02:00
test_line_counter.py refactor docstrings in `scr/supervision/detection` (#2162) 2026-03-10 18:40:05 +01:00
test_polygon_zone_annotator.py
test_polygonzone.py fix: prevent single object from appearing in multiple polygon zones (#1991) 2026-03-10 21:19:09 +01:00
test_vlm.py fix(vlm): handle malformed Gemini/Qwen model output without crashing (#2342) 2026-06-18 15:31:31 +02:00