* fix(detection): make Detections.area OBB-aware When detections carry ORIENTED_BOX_COORDINATES (the four xyxyxyxy corners), the area property returned the area of the derived axis-aligned bounding box instead of the rotated body. The AABB overestimates by up to ~2x for a 45-degree rotation, which silently miscomputes downstream values — most visibly the area-sorted z-ordering inside MaskAnnotator / HaloAnnotator, and any user code that filters detections by area. * docs(detection): use string literal in Detections.area doctest * test(detection): single-line docstring on test_uses_oriented_box_corners_when_present * fix(detection): validate (N,4,2) shape of OBB data field in Detections.area * perf(detection): replace np.roll pair with cross-diagonal shoelace in Detections.area * perf(detection): cast x/y slices to float64 instead of full corners array * refactor(detection): extract obb_polygon_area to detection/utils/boxes.py * test(detection): add test_raises_on_malformed_obb_coordinates_shape * test(detection): assert per-branch dtype contract for Detections.area * docs(detection): document OBB dispatch contract and dtype in Detections.area docstring --------- 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: claude[bot] <209825114+claude[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| annotators | ||
| assets | ||
| classification | ||
| dataset | ||
| detection | ||
| draw | ||
| geometry | ||
| key_points | ||
| metrics | ||
| tracker | ||
| utils | ||
| __init__.py | ||
| conftest.py | ||
| helpers.py | ||
| test_validate_deprecations.py | ||