π Added
-
Added
sv.VertexEllipseAreaAnnotator,sv.VertexEllipseOutlineAnnotator, andsv.VertexEllipseHaloAnnotatorfor visualizing keypoint uncertainty as covariance ellipses. (#2277, #2286)import cv2 import supervision as sv from rfdetr import RFDETRKeypointPreview image = cv2.imread("<SOURCE_IMAGE_PATH>") model = RFDETRKeypointPreview() key_points = model.predict(image) annotator = sv.VertexEllipseAreaAnnotator( sigma=[1.0, 2.0, 3.0], color=[sv.Color.GREEN, sv.Color.YELLOW, sv.Color.RED], opacity=0.4, ) annotated = annotator.annotate(image.copy(), key_points)
rf-detr-ellipse-promo-2.mp4
import cv2 import supervision as sv from rfdetr import RFDETRKeypointPreview image = cv2.imread("<SOURCE_IMAGE_PATH>") model = RFDETRKeypointPreview() key_points = model.predict(image) annotator = sv.VertexEllipseOutlineAnnotator( sigma=[1.0, 2.0, 3.0], color=[sv.Color.GREEN, sv.Color.YELLOW, sv.Color.RED], thickness=2, ) annotated = annotator.annotate(image.copy(), key_points)
rf-detr-ellipse-promo-3.mp4
import cv2 import supervision as sv from rfdetr import RFDETRKeypointPreview image = cv2.imread("<SOURCE_IMAGE_PATH>") model = RFDETRKeypointPreview() key_points = model.predict(image) annotator = sv.VertexEllipseHaloAnnotator( sigma=[1.0, 2.0, 3.0], color=[sv.Color.GREEN, sv.Color.YELLOW, sv.Color.RED], opacity=0.6, ) annotated = annotator.annotate(image.copy(), key_points)
rf-detr-ellipse-promo-1.mp4
-
Added
sv.oriented_box_non_max_suppressionandsv.oriented_box_non_max_mergefor performing NMS and NMM directly on oriented bounding boxes. (#2303) -
Added OBB (Oriented Bounding Box) support to
sv.ConfusionMatrixviaMetricTarget.ORIENTED_BOUNDING_BOXES. (#2247) -
Added
preserve_audioparameter tosv.process_video. When enabled, the audio stream from the source video is muxed into the output using ffmpeg. (#2252) -
Added
is_obbparameter tosv.DetectionDataset.as_yolofor exporting oriented bounding box annotations in the YOLO OBB format (9-token lines with 4 corner coordinates). (#2302, #2289)
π± Changed
-
sv.EdgeAnnotatorandsv.VertexAnnotatornow respect thevisiblemask. Invisible keypoints and their edges are skipped during rendering. (#2286) -
sv.EdgeAnnotatorandsv.VertexLabelAnnotatornow support per-class skeleton definitions, enabling correct rendering when multiple skeleton topologies (e.g. person + animal) coexist in one frame. (#2286) -
sv.Detections.with_nmsandsv.Detections.with_nmmare now OBB-aware. Whendata[ORIENTED_BOX_COORDINATES]is present, oriented-box IoU is used automatically instead of axis-aligned box IoU. (#2303)
-
sv.Detections.areais now OBB-aware. When oriented box coordinates are present, the property returns the polygon area of the rotated bounding box (via the shoelace formula) instead of the axis-aligned box area. (#2306) -
sv.InferenceSlicernow detects OBB outputs from callbacks and automatically falls back to sequential processing to avoid thread-safety issues whenthread_workers > 1. (#2256) -
Fixed
sv.oriented_box_iou_batchto correctly handle non-square canvases. Previously, rasterization assumed square dimensions, leading to incorrect IoU values for tall or wide images. (#2282)
π§ Fixed
-
Fixed
sv.process_videoaudio stream handling. The audio muxing path now correctly creates temp files on the same filesystem, decodes ffmpeg errors, and avoids muxing incomplete output. (#2252) -
Fixed
sv.Detections.from_vlmreturningNoneforclass_idon empty VLM parses. Now returns an empty int ndarray. (#2239) -
Fixed
sv.Detections.from_inferenceto preserveclass_nameas a string-dtype array when predictions are empty. Previously it returned an untyped empty array. (#2270) -
Fixed
sv.HeatMapAnnotatordivide-by-zero crash when called with empty detections. (#2269) -
Fixed COCO export emitting 0-indexed
category_idvalues. Now correctly emits 1-indexed IDs as per the COCO specification. (#2276) -
Fixed COCO annotation and image IDs not being chainable across dataset splits. IDs are now sequential across train/val/test. (#2267)
-
Fixed
sv.DetectionDataset.as_yololosing OBB rotation when exporting oriented bounding boxes. (#2289) -
Fixed YOLO dataset loading to sort class names by numeric keys when the
data.yamluses integer class IDs. (#2296) -
Fixed letterbox utility to support grayscale images. (#2297)
-
Fixed file extension filters to normalize casing (e.g.
.JPGnow matches.jpg). (#2298)
β οΈ Deprecated
| Deprecated | Removal | Replacement |
|---|---|---|
KeyPoints.confidence |
0.32.0 |
KeyPoints.keypoint_confidence |
merge_inner_detection_object_pair |
0.32.0 |
None (internal use only) |
merge_inner_detections_objects |
0.32.0 |
None (internal use only) |
merge_inner_detections_objects_without_iou |
0.32.0 |
None (internal use only) |
validate_detections_fields |
0.32.0 |
None (internal use only) |
validate_vlm_parameters |
0.32.0 |
None (internal use only) |
validate_fields_both_defined_or_none |
0.32.0 |
None (internal use only) |
validate_xyxy |
0.32.0 |
None (internal use only) |
validate_mask |
0.32.0 |
None (internal use only) |
validate_class_id |
0.32.0 |
None (internal use only) |
validate_confidence |
0.32.0 |
None (internal use only) |
validate_tracker_id |
0.32.0 |
None (internal use only) |
validate_data |
0.32.0 |
None (internal use only) |
validate_xy |
0.32.0 |
None (internal use only) |
validate_key_point_confidence |
0.32.0 |
None (internal use only) |
validate_key_points_fields |
0.32.0 |
None (internal use only) |
validate_resolution |
0.32.0 |
None (internal use only) |
validate_custom_values |
0.32.0 |
None (internal use only) |
validate_input_tensors |
0.32.0 |
None (internal use only) |
validate_labels |
0.32.0 |
None (internal use only) |
π Contributors
@SkalskiP (Piotr Skalski), @Borda (Jirka Borovec), @kounelisagis (Agis Kounelis), @RitwijParmar (Ritwij Aryan Parmar), @Khanz9664 (Shahid Ul Islam), @satishkc7 (SATISH K C), @Ace3Z (Mahbod Tajdini), @madhav-c, @RubenHaisma (Ruben Haisma), @adhavan18 (Tamil Adhavan), @Bortlesboat (Andrew Barnes), @Lourdhu02, @tarunbommawar27, @YousefZahran1 (Youssef Ibrahim), @JFrench-Enterprise, @Patel-Prem (Premkumar Patel)