MCPcopy Create free account

hub / github.com/roboflow/supervision / functions

Functions1,714 in github.com/roboflow/supervision

↓ 1 callersFunction_group_overlapping_oriented_boxes
Greedy non-maximum merging on oriented boxes. Mirrors :func:`_group_overlapping_boxes` but uses :func:`oriented_box_iou_batch`.
src/supervision/detection/utils/iou_and_nms.py:1333
↓ 1 callersFunction_is_int_like
(key: Any)
src/supervision/dataset/formats/yolo.py:100
↓ 1 callersFunction_jaccard
Calculate the Jaccard index (intersection over union) between two bounding boxes. If a gt object is marked as "iscrowd", a dt is allowed to m
src/supervision/detection/utils/iou_and_nms.py:264
↓ 1 callersMethod_json_default
Return a JSON-serializable equivalent of a NumPy scalar or array. Called as the ``default`` hook by :func:`json.dump`. Converts :clas
src/supervision/detection/tools/json_sink.py:85
↓ 1 callersMethod_load_font
( font_size: int, font_path: str | None )
src/supervision/annotators/core.py:1765
↓ 1 callersMethod_load_icon
(self, icon_path: str)
src/supervision/annotators/core.py:1884
↓ 1 callersMethod_make_label_image
Create the small text box displaying line zone count. E.g. "out: 7". Args: text: The text to display. text_s
src/supervision/detection/line_zone.py:641
↓ 1 callersFunction_make_polygon_mask
Random polygon mask. *num_vertices* is a direct complexity proxy: more vertices → more independent radius samples → jaggier boundary → more R
examples/compact_mask/benchmark.py:138
↓ 1 callersFunction_mask_to_xyxy_reference
Per-mask `np.where` loop used as a ground-truth oracle.
tests/detection/utils/test_converters.py:319
↓ 1 callersMethod_match_detection_batch
( predictions_classes: npt.NDArray[np.int32], target_classes: npt.NDArray[np.int32], i
src/supervision/metrics/mean_average_recall.py:508
↓ 1 callersMethod_match_detection_batch
Match predictions with target labels based on IoU levels. Args: predictions: Batch prediction. Describes a single image
src/supervision/metrics/detection.py:1022
↓ 1 callersMethod_match_detection_batch
( predictions_classes: npt.NDArray[np.int32], target_classes: npt.NDArray[np.int32], i
src/supervision/metrics/recall.py:276
↓ 1 callersMethod_match_detection_batch
( predictions_classes: npt.NDArray[np.int32], target_classes: npt.NDArray[np.int32], i
src/supervision/metrics/f1_score.py:315
↓ 1 callersMethod_match_detection_batch
( predictions_classes: npt.NDArray[np.int32], target_classes: npt.NDArray[np.int32], i
src/supervision/metrics/precision.py:320
↓ 1 callersFunction_merge_tiles_elements
( tiles_elements: list[list[npt.NDArray[np.uint8]]], grid_size: tuple[int, int], single_tile_size:
src/supervision/utils/image.py:879
↓ 1 callersFunction_naive_mask_iou
Reference IoU that materialises the (N, M, H, W) overlap explicitly.
tests/detection/utils/test_iou_and_nms.py:1586
↓ 1 callersFunction_negotiate_grid_size
(images: list[npt.NDArray[np.uint8]])
src/supervision/utils/image.py:756
↓ 1 callersFunction_negotiate_tiles_format
(images: list[ImageType])
src/supervision/utils/image.py:706
↓ 1 callersMethod_normalize_overlap_wh
( overlap_wh: int | tuple[int, int], )
src/supervision/detection/tools/inference_slicer.py:363
↓ 1 callersFunction_normalize_row_index
Normalise *i* to a 1-D row index for 1-D per-object fields. Handles: - Python int or np.integer scalar -> np.array([int(i)]) - boolean n
src/supervision/key_points/core.py:51
↓ 1 callersMethod_normalize_slice_wh
( slice_wh: int | tuple[int, int], )
src/supervision/detection/tools/inference_slicer.py:338
↓ 1 callersFunction_overlapping_envelope_pairs
Return index pairs ``(i, j)`` whose axis-aligned envelopes overlap. Uses a fused boolean evaluation to halve peak transient memory compared to
src/supervision/detection/utils/iou_and_nms.py:394
↓ 1 callersFunction_parse_box
(values: list[str])
src/supervision/dataset/formats/yolo.py:28
↓ 1 callersFunction_parse_polygon
(values: list[str])
src/supervision/dataset/formats/yolo.py:47
↓ 1 callersFunction_prepare_default_titles_anchors
( images: list[npt.NDArray[np.uint8]], titles_anchors: list[Point | None], default_title_placement
src/supervision/utils/image.py:860
↓ 1 callersMethod_prepare_predictions
Transform predictions into a list of predictions that can be used by the COCO evaluator.
src/supervision/metrics/mean_average_precision.py:1399
↓ 1 callersMethod_prepare_targets_and_predictions
Prepare targets and predictions for evaluation.
src/supervision/metrics/mean_average_precision.py:625
↓ 1 callersFunction_rle_scale_col
Scale one column's run list to a new height using a precomputed row map. Each output row is mapped to a source row via ``row_map``, which imp
src/supervision/detection/compact_mask.py:128
↓ 1 callersFunction_single_image_coco_data
(annotation: dict)
tests/dataset/formats/test_coco.py:1955
↓ 1 callersFunction_time_compact_annotate
Time MaskAnnotator on the compact detections (dense-skip path).
examples/compact_mask/benchmark.py:859
↓ 1 callersFunction_time_compact_area
Time .area on the compact detections (used when dense timing is skipped).
examples/compact_mask/benchmark.py:848
↓ 1 callersFunction_time_compact_filter
Time boolean-index filtering on the compact detections (dense-skip path).
examples/compact_mask/benchmark.py:853
↓ 1 callersFunction_timed
()
examples/compact_mask/benchmark.py:301
↓ 1 callersMethod_update_class_id_to_name
Update the attribute keeping track of which class IDs correspond to which class names. Assumes that class_names are only pro
src/supervision/detection/line_zone.py:307
↓ 1 callersMethod_use_mask
(detections_1: Detections, detections_2: Detections)
src/supervision/annotators/core.py:3172
↓ 1 callersMethod_use_obb
(detections_1: Detections, detections_2: Detections)
src/supervision/annotators/core.py:3161
↓ 1 callersFunction_validate_and_setup_video
( source_path: str, start: int, end: int | None, iterative_seek: bool = False )
src/supervision/utils/video.py:207
↓ 1 callersFunction_validate_class_ids
Ensure that class_id is a 1d np.ndarray with (n, ) shape.
src/supervision/classification/core.py:13
↓ 1 callersFunction_validate_color_hex
(color_hex: str)
src/supervision/draw/color.py:57
↓ 1 callersFunction_validate_confidence
Ensure that confidence is a 1d np.ndarray with (n, ) shape.
src/supervision/classification/core.py:22
↓ 1 callersFunction_validate_fields_both_defined_or_none
Verify that for each optional field in the Detections, both instances either have the field set to None or both have it set to non-None value
src/supervision/detection/core.py:2902
↓ 1 callersFunction_validate_keypoint_confidence
Validate per-keypoint confidence: 2D ``np.ndarray`` with shape ``(n, m)``.
src/supervision/validators/__init__.py:129
↓ 1 callersFunction_validate_keypoints_fields
( xy: Any, class_id: Any, confidence: Any, detection_confidence: Any = None, visible: Any
src/supervision/validators/__init__.py:292
↓ 1 callersFunction_validate_mask
(mask: Any, n: int)
src/supervision/validators/__init__.py:37
↓ 1 callersMethod_validate_overlap
( slice_wh: tuple[int, int], overlap_wh: tuple[int, int], )
src/supervision/detection/tools/inference_slicer.py:453
↓ 1 callersFunction_validate_tracker_id
(tracker_id: Any, n: int)
src/supervision/validators/__init__.py:169
↓ 1 callersFunction_validate_visible
Validate per-keypoint visibility mask. Expects a 2D bool ``np.ndarray`` with shape ``(n, m)``.
src/supervision/validators/__init__.py:236
↓ 1 callersFunction_validate_vlm_parameters
Validates the parameters and result type for a given Vision-Language Model (VLM). Args: vlm: The VLM enum or string specifying the m
src/supervision/detection/vlm.py:163
↓ 1 callersFunction_validate_xy
(xy: Any, n: int, m: int)
src/supervision/validators/__init__.py:216
↓ 1 callersFunction_validate_xyxy
Validate that xyxy is a 2D np.ndarray with shape (N, 4). ```pycon >>> _validate_xyxy(np.array([[0, 0, 1, 1], [1, 1, 2, 2]])) ```
src/supervision/validators/__init__.py:10
↓ 1 callersFunction_with_poly_mask
(obj: Element)
src/supervision/dataset/formats/pascal_voc.py:335
↓ 1 callersFunction_with_seg_mask
(annotation: dict[str, Any])
src/supervision/dataset/formats/coco.py:503
↓ 1 callersMethodactivate
Start a new tracklet
src/supervision/tracker/byte_tracker/single_object_track.py:82
↓ 1 callersFunctionadjust_resolution
(checkpoint: ModelSize | str, resolution: int)
examples/time_in_zone/rfdetr_naive_stream_example.py:66
↓ 1 callersFunctionadjust_resolution
(checkpoint: ModelSize | str, resolution: int)
examples/time_in_zone/rfdetr_file_example.py:66
↓ 1 callersFunctionadjust_resolution
(checkpoint: ModelSize | str, resolution: int)
examples/time_in_zone/rfdetr_stream_example.py:59
↓ 1 callersMethodannotate
Draws a table with the number of objects of each class that crossed each line. Args: frame: The image on which the table
src/supervision/detection/line_zone.py:769
↓ 1 callersMethodannotate_frame
( self, frame: np.ndarray, detections: sv.Detections )
examples/traffic_analysis/inference_example.py:124
↓ 1 callersMethodannotate_frame
( self, frame: np.ndarray, detections: sv.Detections )
examples/traffic_analysis/ultralytics_example.py:121
↓ 1 callersMethodappend
Append detection data to the JSON file. Args: detections: The detection data. custom_data: Custom data to in
src/supervision/detection/tools/json_sink.py:200
↓ 1 callersFunctionare_xml_elements_equal
(elem1, elem2)
tests/dataset/formats/test_pascal_voc.py:18
↓ 1 callersMethodas_bgra
Returns the color as a BGRA tuple. Returns: BGRA tuple. Example: ```pycon >>> import su
src/supervision/draw/color.py:338
↓ 1 callersMethodas_hex
Converts the Color instance to a hex string. Returns: The hexadecimal color string. Returns `#RRGGBBAA` if alpha is not
src/supervision/draw/color.py:264
↓ 1 callersMethodas_rgba
Returns the color as an RGBA tuple. Returns: RGBA tuple. Example: ```pycon >>> import s
src/supervision/draw/color.py:321
↓ 1 callersMethodas_xy_float_tuple
Returns the point as a tuple of floats. Returns: The point as (x, y) floats.
src/supervision/geometry/core.py:62
↓ 1 callersMethodas_xyxy_int_tuple
(self)
src/supervision/geometry/core.py:196
↓ 1 callersFunctionassert_json_equal
(file_name, expected_rows)
tests/detection/test_json.py:445
↓ 1 callersFunctionbox_iou
Compute overlap metric between two bounding boxes. Supports standard IOU (intersection-over-union) and IOS (intersection-over-smaller-ar
src/supervision/detection/utils/iou_and_nms.py:90
↓ 1 callersFunctionbox_iou_batch_with_jaccard
Calculate the intersection over union (IoU) between detection bounding boxes (dt) and ground-truth bounding boxes (gt). Reference: https:
src/supervision/detection/utils/iou_and_nms.py:304
↓ 1 callersFunctionbox_non_max_merge
Apply greedy version of non-maximum merging per category to avoid detecting too many overlapping bounding boxes for a given object. Args
src/supervision/detection/utils/iou_and_nms.py:1206
↓ 1 callersMethodcalculate_border_coordinates
( anchor_xy: tuple[int, int], border_wh: tuple[int, int], position: Position )
src/supervision/annotators/core.py:2722
↓ 1 callersMethodcalculate_crop_coordinates
( anchor: tuple[int, int], crop_wh: tuple[int, int], position: Position )
src/supervision/annotators/core.py:2904
↓ 1 callersFunctioncalculate_dynamic_kernel_size
Computes a blur kernel size proportional to the shorter side of a bounding box. Args: x1: Left edge of the bounding box. y1:
src/supervision/annotators/utils.py:444
↓ 1 callersFunctioncalculate_dynamic_pixel_size
Computes a pixelation size proportional to the shorter side of a bounding box. Args: x1: Left edge of the bounding box. y1:
src/supervision/annotators/utils.py:467
↓ 1 callersFunctioncalculate_optimal_text_scale
Calculate optimal font scale based on image resolution. Adjusts font scale proportionally to the smallest dimension of the given image resolu
src/supervision/draw/utils.py:371
↓ 1 callersFunctionclose_and_finalize_polygon
(image: np.ndarray, original_image: np.ndarray)
examples/time_in_zone/scripts/draw_zones.py:86
↓ 1 callersFunctioncompact_memory_bytes_actual
Actual compact footprint: peak bytes during CompactMask.from_dense().
examples/compact_mask/benchmark.py:265
↓ 1 callersFunctioncompact_memory_bytes_theoretical
Theoretical compact footprint: sum of all internal numpy buffer sizes.
examples/compact_mask/benchmark.py:231
↓ 1 callersFunctioncreate_predictions_with_class_iou_tests
Create predictions that test IoU+class matching behavior. For each ground truth detection, creates predictions with different patterns:
tests/helpers.py:471
↓ 1 callersFunctioncreate_server_config_file
(directory: str)
examples/time_in_zone/scripts/stream_from_file.py:40
↓ 1 callersMethodcross_product
Calculate the 2D cross product (also known as the vector product or outer product) of the vector and a point, treated as vectors in 2
src/supervision/geometry/core.py:123
↓ 1 callersFunctiondense_memory_bytes
Theoretical dense footprint: raw numpy buffer size.
examples/compact_mask/benchmark.py:226
↓ 1 callersFunctiondense_memory_bytes_actual
Actual dense footprint: peak bytes during (N, H, W) bool array alloc.
examples/compact_mask/benchmark.py:256
↓ 1 callersFunctiondownload_video
()
examples/heatmap_and_track/script.py:10
↓ 1 callersFunctiondraw_filled_polygon
Draw a filled polygon on a scene. Args: scene: The scene to draw the polygon on. polygon: The polygon to be drawn, given as a lis
src/supervision/draw/utils.py:189
↓ 1 callersFunctiondraw_filled_rectangle
Draws a filled rectangle on an image. Args: scene: The scene on which the rectangle will be drawn rect: The rectangle to be
src/supervision/draw/utils.py:72
↓ 1 callersFunctiondraw_rectangle
Draws a rectangle on an image. Args: scene: The scene on which the rectangle will be drawn rect: The rectangle to be drawn
src/supervision/draw/utils.py:44
↓ 1 callersMethoddraw_rounded_rectangle
( scene: npt.NDArray[np.uint8], xyxy: tuple[int, int, int, int], color: tuple[int, int
src/supervision/annotators/core.py:1470
↓ 1 callersMethoddtype
Return ``np.dtype(bool)`` — always. Returns: ``np.dtype(bool)``. Examples: ```pycon >>> from sup
src/supervision/detection/compact_mask.py:723
↓ 1 callersMethodevaluate
Start the per image evaluation on all images and keeep results in self.eval_imgs (a list of dictionaries).
src/supervision/metrics/mean_average_precision.py:1192
↓ 1 callersFunctionfilter_segments_by_distance
Keep the largest connected component and any other components within a distance threshold. Distance can be absolute in pixels or relativ
src/supervision/detection/utils/masks.py:291
↓ 1 callersFunctionfind_duplicates
Find all duplicate elements in the input sequence. Args: sequence: The input sequence. Returns: A list of duplicate ele
src/supervision/utils/iterables.py:76
↓ 1 callersFunctionfind_video_files_in_directory
(directory: str, limit: int)
examples/time_in_zone/scripts/stream_from_file.py:32
↓ 1 callersMethodfrom_bgra_tuple
Create a Color instance from a BGRA tuple. Args: color_tuple: A tuple representing the color in BGRA format, where each
src/supervision/draw/color.py:235
↓ 1 callersMethodfrom_clip
Creates a Classifications instance from a [clip](https://github.com/openai/clip) inference result. Args: clip_re
src/supervision/classification/core.py:53
↓ 1 callersFunctionfrom_deepseek_vl_2
Parse bounding boxes from deepseek-vl2-formatted text, scale them to the specified resolution, and optionally filter by classes. The Dee
src/supervision/detection/vlm.py:424
↓ 1 callersMethodfrom_mediapipe
Creates a `sv.KeyPoints` instance from a [MediaPipe](https://github.com/google-ai-edge/mediapipe) pose landmark detection inf
src/supervision/key_points/core.py:472
↓ 1 callersFunctionfrom_qwen_3_vl
Parse and scale bounding boxes from Qwen-3-VL style JSON output. Args: result: String containing the Qwen-3-VL JSON output.
src/supervision/detection/vlm.py:397
↓ 1 callersMethodfrom_rgba_tuple
Create a Color instance from an RGBA tuple. Args: color_tuple: A tuple representing the color in RGBA format, where each
src/supervision/draw/color.py:205
↓ 1 callersMethodfrom_sam
Creates a Detections instance from [Segment Anything Model](https://github.com/facebookresearch/segment-anything) inference r
src/supervision/detection/core.py:676
← previousnext →401–500 of 1,714, ranked by callers