github roboflow/supervision 0.29.0
supervision-0.29.0

6 hours ago

🚀 Added

  • Added sv.VertexEllipseAreaAnnotator, sv.VertexEllipseOutlineAnnotator, and sv.VertexEllipseHaloAnnotator for 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_suppression and sv.oriented_box_non_max_merge for performing NMS and NMM directly on oriented bounding boxes. (#2303)

  • Added OBB (Oriented Bounding Box) support to sv.ConfusionMatrix via MetricTarget.ORIENTED_BOUNDING_BOXES. (#2247)

  • Added preserve_audio parameter to sv.process_video. When enabled, the audio stream from the source video is muxed into the output using ffmpeg. (#2252)

  • Added is_obb parameter to sv.DetectionDataset.as_yolo for exporting oriented bounding box annotations in the YOLO OBB format (9-token lines with 4 corner coordinates). (#2302, #2289)

🌱 Changed

box_nms_demo box_nmm_demo obb_nms_demo obb_nmm_demo
  • sv.Detections.area is 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.InferenceSlicer now detects OBB outputs from callbacks and automatically falls back to sequential processing to avoid thread-safety issues when thread_workers > 1. (#2256)

  • Fixed sv.oriented_box_iou_batch to 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_video audio 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_vlm returning None for class_id on empty VLM parses. Now returns an empty int ndarray. (#2239)

  • Fixed sv.Detections.from_inference to preserve class_name as a string-dtype array when predictions are empty. Previously it returned an untyped empty array. (#2270)

  • Fixed sv.HeatMapAnnotator divide-by-zero crash when called with empty detections. (#2269)

  • Fixed COCO export emitting 0-indexed category_id values. 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_yolo losing OBB rotation when exporting oriented bounding boxes. (#2289)

  • Fixed YOLO dataset loading to sort class names by numeric keys when the data.yaml uses integer class IDs. (#2296)

  • Fixed letterbox utility to support grayscale images. (#2297)

  • Fixed file extension filters to normalize casing (e.g. .JPG now 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)

Don't miss a new supervision release

NewReleases is sending notifications on new releases.