Skip to content

Deprecated

These features are phased out due to better alternatives or potential issues in future versions. Deprecated functionalities are typically supported for multiple subsequent releases, providing time for users to transition to updated methods.

  • sv.box_non_max_suppression, sv.mask_non_max_suppression, sv.oriented_box_non_max_suppression, sv.box_soft_non_max_suppression, sv.mask_soft_non_max_suppression, sv.oriented_box_soft_non_max_suppression and sv.box_weighted_box_fusion are deprecated in supervision-0.33.0 and will be removed in supervision-0.36.0. Use sv.Detections.with_nms, with_soft_nms or with_fusion. For five-column predictions, omit class_id and pass class_agnostic=True. Pass the original overlap_metric explicitly. Use overlap_on="mask" for mask suppression or overlap_on="box" for box or oriented-box suppression. Fusion supports axis-aligned boxes, oriented boxes and masks. Use overlap_on="mask" (the default for detections with masks) to fuse by mask overlap, or overlap_on="box" to fuse axis-aligned detections by their boxes and unite their masks. Detections carrying both masks and oriented boxes are unsupported by fusion. To retain the surviving row indices, set detections.data["index"] = np.arange(len(detections)) before with_nms and read data["index"] afterwards. To retrieve all decayed Soft-NMS scores, pass score_threshold=None and read the returned confidence. sv.box_non_max_merge, sv.mask_non_max_merge and sv.oriented_box_non_max_merge stay: they are the public way to get merge groups.
  • Importing from supervision.detection.utils.iou_and_nms is deprecated in supervision-0.33.0 and will be removed in supervision-0.36.0. Import the IoU functions and overlap enums from supervision.detection.utils.iou, and the suppression, merge and fusion functions from supervision.detection.utils.nms. Names exported from the top-level supervision package are not affected.
  • Passing overlap_metric or mask_dimension positionally to sv.mask_non_max_merge is deprecated in supervision-0.30.0 and will be removed in supervision-0.33.0. Pass both by keyword instead.
  • Passing a list[sv.Color] as color or text_color to sv.VertexLabelAnnotator is deprecated in supervision-0.32.0 and will be removed in supervision-0.35.0. Pass a single sv.Color, or a sv.ColorPalette together with color_lookup=sv.ColorLookup.KEYPOINT.
  • resolve_color, resolve_color_idx, and get_color_by_index in supervision.annotators.utils are deprecated in supervision-0.32.0 and will be removed in supervision-0.35.0. resolve_color is also still importable from supervision.annotators.core; that copy is deprecated in supervision-0.32.0 too and will be removed in supervision-0.35.0. Pass a sv.ColorPalette with color_lookup to the annotators instead.
  • load_coco_annotations imported from supervision.dataset.core and get_detection_size_category imported from supervision.metrics.mean_average_recall are deprecated in supervision-0.32.0 and will be removed in supervision-0.35.0. Import them from supervision.dataset.formats.coco and supervision.metrics.utils.object_size.
  • Omitting mask_rasterizer in sv.DetectionDataset.from_coco for files with polygon segmentation is deprecated in supervision-0.32.0. The default changes from "supervision" to "pycocotools" no earlier than supervision-0.35.0. Pass mask_rasterizer explicitly.

Removed

0.32.0

  • KeyPoints.confidence and the confidence argument of KeyPoints() were removed as of supervision-0.32.0. Use KeyPoints.keypoint_confidence instead.
  • The public validate_* helper functions (in supervision.validators, supervision.detection.vlm, supervision.detection.core, supervision.annotators.utils, supervision.metrics.detection, and PercentageBarAnnotator.validate_custom_values) were removed as of supervision-0.32.0. Supervision internals use private _validate_* helpers.
  • merge_inner_detection_object_pair, merge_inner_detections_objects, and merge_inner_detections_objects_without_iou in supervision.detection.core were removed as of supervision-0.32.0.

0.31.0

  • sv.ByteTrack was removed as of supervision-0.31.0. Use ByteTrackTracker from the external trackers package (pip install trackers) instead; its update method is update(), not update_with_detections().
  • The supervision.keypoint module was removed as of supervision-0.31.0. Import from supervision.key_points instead.
  • create_tiles in supervision.utils.image was removed as of supervision-0.31.0.
  • overlay_image in supervision.utils.image was removed as of supervision-0.31.0.
  • ensure_cv2_image_for_annotation, ensure_pil_image_for_annotation, and ensure_cv2_image_for_processing in supervision.utils.conversion were removed as of supervision-0.31.0.
  • The keypoint validation utilities validate_keypoint_confidence and validate_keypoints_fields in supervision.validators were removed as of supervision-0.31.0.
  • The normalized_xyxy argument of sv.denormalize_boxes was removed as of supervision-0.31.0. Use xyxy instead.
  • The supervision.dataset.utils import path for sv.rle_to_mask and sv.mask_to_rle was removed as of supervision-0.31.0. Import from supervision.detection.utils.converters (or top-level sv.rle_to_mask/sv.mask_to_rle) instead.
  • sv.LMM was removed as of supervision-0.31.0. Use sv.VLM instead.
  • sv.Detections.from_lmm was removed as of supervision-0.31.0. Use sv.Detections.from_vlm instead.
  • The legacy MeanAveragePrecision class in supervision.metrics.detection was removed as of supervision-0.31.0. Use supervision.metrics.mean_average_precision.MeanAveragePrecision (sv.metrics.MeanAveragePrecision) instead, which matches pycocotools.

0.27.0

  • overlap_ratio_wh parameter in sv.InferenceSlicer has been removed. Use the pixel-based overlap_wh parameter instead.
  • overlap_filter_strategy parameter in sv.InferenceSlicer has been removed. Use overlap_strategy instead.

0.26.0

  • The sv.DetectionDataset.images property has been removed in supervision-0.26.0. Please loop over images with for path, image, annotation in dataset:, as that does not require loading all images into memory. Also, constructing sv.DetectionDataset with parameter images as Dict[str, np.ndarray] is deprecated and has been removed in supervision-0.26.0. Please pass a list of paths List[str] instead.
  • The name sv.BoundingBoxAnnotator is deprecated and has been removed in supervision-0.26.0. It has been renamed to sv.BoxAnnotator.

0.24.0

  • The frame_resolution_wh parameter in sv.PolygonZone has been removed.
  • Supervision installation methods "headless" and "desktop" were removed, as they are no longer needed. pip install supervision[headless] will install the base library and harmlessly warn of non-existent extras.

0.23.0

  • The track_buffer, track_thresh, and match_thresh parameters in ByteTrack are deprecated and were removed as of supervision-0.23.0. Use lost_track_buffer, track_activation_threshold, and minimum_matching_threshold instead.
  • The triggering_position parameter in sv.PolygonZone was removed as of supervision-0.23.0. Use triggering_anchors instead.

0.22.0

  • sv.Detections.from_roboflow is removed as of supervision-0.22.0. Use Detections.from_inference instead.
  • The method sv.Color.white() was removed as of supervision-0.22.0. Use the constant sv.Color.WHITE instead.
  • The method sv.Color.black() was removed as of supervision-0.22.0. Use the constant sv.Color.BLACK instead.
  • The method sv.Color.red() was removed as of supervision-0.22.0. Use the constant sv.Color.RED instead.
  • The method sv.Color.green() was removed as of supervision-0.22.0. Use the constant sv.Color.GREEN instead.
  • The method sv.Color.blue() was removed as of supervision-0.22.0. Use the constant sv.Color.BLUE instead.
  • The method sv.ColorPalette.default() was removed as of supervision-0.22.0. Use the constant ColorPalette.DEFAULT instead.
  • sv.BoxAnnotator was removed as of supervision-0.22.0, however sv.BoundingBoxAnnotator was immediately renamed to sv.BoxAnnotator. Use BoxAnnotator and LabelAnnotator instead of the old sv.BoxAnnotator.
  • The method sv.FPSMonitor.__call__ was removed as of supervision-0.22.0. Use the attribute sv.FPSMonitor.fps instead.

Comments