supervision/tests/dataset/formats
Jirka Borovec f2efc328f7
fix(dataset): 3D empty mask for VOC background (#2469)
- `detections_from_xml_obj` now builds `np.empty((0, H, W))` for a background image under `force_masks=True` instead of letting `np.array([])` collapse to shape `(0,)`, which failed `Detections` mask validation
- document the forced `class_id` `dtype=int` with an inline comment and state the integer-dtype guarantee in the `detections_from_xml_obj` docstring Returns section
- add background-image coverage: force_masks empty 3D mask, all-background dataset, background-first ordering, and save-then-load round-trip
- add changelog entry for the `force_masks=True` background-image mask fix

---

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
2026-08-03 18:30:24 +02:00
..
__init__.py refactor: reorganize project structure and update module imports (#2112) 2026-02-03 15:24:47 +01:00
test_coco.py fix: read COCO export image sizes from headers instead of decoding pixels (#2442) 2026-07-17 18:30:24 +02:00
test_createml.py fix: remaining review findings in dataset, docs, and tests (#2416) 2026-07-08 23:00:32 +02:00
test_labelme.py fix: close out remaining review findings (#2418) 2026-07-09 17:53:52 +02:00
test_pascal_voc.py fix(dataset): 3D empty mask for VOC background (#2469) 2026-08-03 18:30:24 +02:00
test_yolo.py fix(dataset): harden dataset IO edge cases (#2410) 2026-07-07 16:29:43 +02:00