MCPcopy Create free account

hub / github.com/roboflow/supervision / functions

Functions1,714 in github.com/roboflow/supervision

↓ 1 callersMethodfrom_timm
Creates a Classifications instance from a [timm](https://huggingface.co/docs/hub/timm) inference result. Args: t
src/supervision/classification/core.py:121
↓ 1 callersMethodfrom_xyxy
(cls, xyxy: tuple[float, float, float, float])
src/supervision/geometry/core.py:176
↓ 1 callersMethodfrom_yolov5
Creates a Detections instance from a [YOLOv5](https://github.com/ultralytics/yolov5) inference result. Args: yol
src/supervision/detection/core.py:222
↓ 1 callersFunctionfuzzy_match_index
Searches for the first string in `candidates` whose edit distance to `query` is less than or equal to `threshold`. Args: candida
src/supervision/detection/utils/vlms.py:65
↓ 1 callersMethodget_category_ids
Get category ids that satisfy given filter conditions. Args: cat_names: names of the categories to retrieve.
src/supervision/metrics/mean_average_precision.py:368
↓ 1 callersFunctionget_color_by_index
(color: Color | ColorPalette, idx: int)
src/supervision/annotators/utils.py:133
↓ 1 callersMethodget_smoothed_detections
(self)
src/supervision/detection/tools/smoother.py:166
↓ 1 callersMethodget_text_bounding_box
( text: str, font: int, text_scale: float, text_thickness: int, center
src/supervision/key_points/annotators.py:908
↓ 1 callersMethodget_track
Return the smoothed `Detections` for a single track. Averages `xyxy` over all valid (non-`None`) frames in the track window. `confide
src/supervision/detection/tools/smoother.py:133
↓ 1 callersFunctionindices_to_matches
( cost_matrix: npt.NDArray[np.float32], indices: npt.NDArray[np.int_], thresh: float )
src/supervision/tracker/byte_tracker/matching.py:15
↓ 1 callersMethodinitiate
Create track from unassociated measurement. Args: measurement: The initial measurement vector. Returns:
src/supervision/tracker/byte_tracker/kalman_filter.py:32
↓ 1 callersFunctioninitiate_annotators
( polygons: list[np.ndarray], resolution_wh: tuple[int, int] )
examples/count_people_in_zone/inference_example.py:34
↓ 1 callersFunctioninitiate_annotators
( polygons: list[np.ndarray], resolution_wh: tuple[int, int] )
examples/count_people_in_zone/ultralytics_example.py:32
↓ 1 callersFunctioniou_against_candidate
( order: npt.NDArray[np.int_], idx: int )
src/supervision/detection/utils/iou_and_nms.py:1192
↓ 1 callersFunctionis_compressed_rle
Return ``True`` if ``rle`` is a COCO compressed RLE (``str`` or ``bytes``). Use this to branch between the compressed-string pipeline (:func:
src/supervision/detection/utils/converters.py:471
↓ 1 callersMethodis_empty
Returns `True` if the `KeyPoints` object is considered empty. Returns: `True` if the object is empty, `False` otherwise.
src/supervision/key_points/core.py:1116
↓ 1 callersFunctionis_metadata_equal
Compares the metadata payloads of two Detections instances. Args: metadata_a, metadata_b: The metadata payloads of the instances.
src/supervision/detection/utils/internal.py:220
↓ 1 callersFunctionis_valid_hex
Checks if a given string is a valid hex color. Args: hex_color: A hex color string with an optional leading "#". Supports
src/supervision/annotators/utils.py:430
↓ 1 callersMethodlist
(cls)
examples/time_in_zone/rfdetr_stream_example.py:24
↓ 1 callersFunctionload_model
(checkpoint: ModelSize | str, device: str, resolution: int)
examples/time_in_zone/rfdetr_naive_stream_example.py:47
↓ 1 callersFunctionload_model
(checkpoint: ModelSize | str, device: str, resolution: int)
examples/time_in_zone/rfdetr_file_example.py:47
↓ 1 callersFunctionload_model
(checkpoint: ModelSize | str, device: str, resolution: int)
examples/time_in_zone/rfdetr_stream_example.py:44
↓ 1 callersFunctionload_pascal_voc_annotations
Loads PASCAL VOC XML annotations and returns the image name, a Detections instance, and a list of class names. Args: images_
src/supervision/dataset/formats/pascal_voc.py:181
↓ 1 callersMethodload_predictions
Load prediction result into an EvaluationDataset object. Args: predictions: prediction result. Returns:
src/supervision/metrics/mean_average_precision.py:459
↓ 1 callersFunctionload_zones_config
Load polygon zone configurations from a JSON file. This function reads a JSON file which contains polygon coordinates, and converts them
examples/count_people_in_zone/inference_example.py:15
↓ 1 callersFunctionload_zones_config
Load polygon zone configurations from a JSON file. This function reads a JSON file which contains polygon coordinates, and converts them
examples/count_people_in_zone/ultralytics_example.py:13
↓ 1 callersFunctionmain
()
examples/compact_mask/benchmark.py:1111
↓ 1 callersFunctionmake_detections
Return ``(xyxy, masks_dense, class_ids)`` with random polygon masks. *num_vertices* controls mask complexity: more vertices → jaggier boundary.
examples/compact_mask/benchmark.py:172
↓ 1 callersFunctionmake_scene
Random BGR image.
examples/compact_mask/benchmark.py:131
↓ 1 callersFunctionmock_coco_annotation
( annotation_id: int = 0, image_id: int = 0, category_id: int = 0, bbox: tuple[float, float, f
tests/dataset/formats/test_coco.py:25
↓ 1 callersFunctionmove_detections
Args: detections: Detections object to be moved. offset: An array of shape `(2,)` containing offset values in the for
src/supervision/detection/tools/inference_slicer.py:23
↓ 1 callersFunctionmove_oriented_boxes
Args: xyxyxyxy: An array of shape `(n, 4, 2)` containing the oriented bounding boxes coordinates in format `[[x1, y1], [x
src/supervision/detection/utils/boxes.py:195
↓ 1 callersMethodmulti_predict
Run Kalman filter prediction step (Vectorized version). Args: mean: The object state means at the previous time step.
src/supervision/tracker/byte_tracker/kalman_filter.py:123
↓ 1 callersFunctionobb_polygon_area
Compute the area of N oriented bounding boxes using the shoelace formula. Args: corners: OBB corner coordinates with shape `(N, 4, 2)`.
src/supervision/detection/utils/boxes.py:244
↓ 1 callersFunctionobserveDynamicCopyButtons
()
docs/javascripts/pycon_copy.js:78
↓ 1 callersMethodopen
Open the JSON file for writing.
src/supervision/detection/tools/json_sink.py:74
↓ 1 callersMethodparse_detection_data
Convert detections and optional custom data into per-detection rows. Builds one dictionary per detection containing bounding box coo
src/supervision/detection/tools/json_sink.py:148
↓ 1 callersMethodparse_detection_data
Convert detections and optional custom data into per-detection rows. Builds one dictionary per detection containing bounding box coo
src/supervision/detection/tools/csv_sink.py:145
↓ 1 callersMethodparse_field_names
( detections: Detections, custom_data: dict[str, Any] | None = None )
src/supervision/detection/tools/csv_sink.py:234
↓ 1 callersFunctionpng_string_to_segmentation_array
Convert a PNG byte string to a label mask array. Args: png_string: A byte string representing the PNG image. Returns: A
src/supervision/detection/tools/transformers.py:207
↓ 1 callersFunctionprint_summary
(results: list[ScenarioResult])
examples/compact_mask/benchmark.py:948
↓ 1 callersFunctionprocess_transformers_detection_result
Process the result of Transformers object detection functions such as `post_process` (v4) and `post_process_detection` (v5). Args:
src/supervision/detection/tools/transformers.py:14
↓ 1 callersFunctionprocess_transformers_v4_panoptic_segmentation_result
Process the result of the Transformers function `post_process_panoptic` (v4). Args: segmentation_result: Dictionary containing segme
src/supervision/detection/tools/transformers.py:148
↓ 1 callersFunctionprocess_transformers_v4_segmentation_result
Process the result of Transformers segmentation functions such as `post_process_panoptic`, `post_process_segmentation`, and `post_process_ins
src/supervision/detection/tools/transformers.py:43
↓ 1 callersFunctionprocess_transformers_v5_panoptic_segmentation_result
Process the result of the Transformers function `post_process_panoptic_segmentation` (v5). Args: segmentation_array: Segmentatio
src/supervision/detection/tools/transformers.py:182
↓ 1 callersFunctionprocess_transformers_v5_segmentation_result
Process the result of Transformers segmentation functions such as `post_process_semantic_segmentation`, `post_process_instance_segmentation`,
src/supervision/detection/tools/transformers.py:82
↓ 1 callersFunctionprocess_transformers_v5_semantic_or_instance_segmentation_result
Process the result of Transformers segmentation functions such as `post_process_semantic_segmentation` and `post_process_instance_segmentatio
src/supervision/detection/tools/transformers.py:112
↓ 1 callersMethodprocess_video
(self)
examples/traffic_analysis/inference_example.py:106
↓ 1 callersMethodprocess_video
(self)
examples/traffic_analysis/ultralytics_example.py:103
↓ 1 callersMethodproject
Project state distribution to measurement space. Args: mean: The state's mean vector. covariance: The state'
src/supervision/tracker/byte_tracker/kalman_filter.py:96
↓ 1 callersFunctionread_yaml_file
Read a yaml file and return a dict. Args: file_path: The file path as a string or Path object. Returns: A dict of conte
src/supervision/utils/file.py:186
↓ 1 callersFunctionrecover_truncated_qwen_2_5_vl_response
Attempt to recover and parse a truncated or malformed JSON snippet from Qwen-2.5-VL output. This utility extracts a JSON-like portion fr
src/supervision/detection/vlm.py:260
↓ 1 callersFunctionredraw
(image: np.ndarray, original_image: np.ndarray)
examples/time_in_zone/scripts/draw_zones.py:48
↓ 1 callersFunctionredraw_polygons
(image: np.ndarray)
examples/time_in_zone/scripts/draw_zones.py:101
↓ 1 callersFunctionremove_duplicate_tracks
( tracks_a: list[STrack], tracks_b: list[STrack] )
src/supervision/tracker/byte_tracker/core.py:383
↓ 1 callersFunctionrenderCard
(element, elementIndex)
docs/javascripts/cookbooks-card.js:31
↓ 1 callersMethodreset
Reset the metric to its initial state, clearing all stored data.
src/supervision/metrics/recall.py:88
↓ 1 callersMethodreset
Reset the metric to its initial state, clearing all stored data.
src/supervision/metrics/f1_score.py:85
↓ 1 callersMethodreset
Reset the metric to its initial state, clearing all stored data.
src/supervision/metrics/precision.py:88
↓ 1 callersMethodreset
Reset the counter to the initial start_id.
src/supervision/tracker/byte_tracker/utils.py:20
↓ 1 callersFunctionresolve_source
(source_path: str)
examples/time_in_zone/scripts/draw_zones.py:27
↓ 1 callersFunctionrun_command_in_thread
(command: list)
examples/time_in_zone/scripts/stream_from_file.py:80
↓ 1 callersFunctionrun_rtsp_server
(config_path: str)
examples/time_in_zone/scripts/stream_from_file.py:47
↓ 1 callersFunctionrun_scenario
( name: str, num_objects: int, image_height: int, image_width: int, fill_fraction: float =
examples/compact_mask/benchmark.py:626
↓ 1 callersFunctionsave_data_yaml
(data_yaml_path: str, classes: list[str])
src/supervision/dataset/formats/yolo.py:474
↓ 1 callersFunctionsave_json_file
Write a dict to a json file. Args: data: dict with unique keys and value as pair. file_path: The file path as a string or Pa
src/supervision/utils/file.py:171
↓ 1 callersFunctionsave_polygons_to_json
(polygons, target_path)
examples/time_in_zone/scripts/draw_zones.py:122
↓ 1 callersFunctionsave_results_csv
Write the summary table to *path* as a CSV file. Each row mirrors the Rich summary table: scenario metadata, memory ratios, encode/decode ove
examples/compact_mask/benchmark.py:1074
↓ 1 callersFunctionsave_text_file
Write a list of strings to a text file, each string on a new line. Args: lines: The list of strings to be written to the file.
src/supervision/utils/file.py:129
↓ 1 callersFunctionsave_yaml_file
Save a dict to a yaml file. Args: data: dict with unique keys and value as pair. file_path: The file path as a string or Pat
src/supervision/utils/file.py:201
↓ 1 callersFunctionsave_yolo_annotations
Save dataset annotations in YOLO format. Args: dataset: The dataset whose annotations are saved. annotations_directory_path: Path
src/supervision/dataset/formats/yolo.py:422
↓ 1 callersFunctionscale_boxes
Scale the dimensions of bounding boxes. Args: xyxy: An array of shape `(n, 4)` containing the bounding boxes coordinates
src/supervision/detection/utils/boxes.py:312
↓ 1 callersFunctionscale_image
Scale image by given factor. Scale factor > 1.0 zooms in, < 1.0 zooms out. Args: image: The image to scale. scale_factor: Fa
src/supervision/utils/image.py:95
↓ 1 callersMethodsoftmax
(self, dim: int)
tests/classification/test_core.py:15
↓ 1 callersFunctionstage_annotate
Time MaskAnnotator on both representations.
examples/compact_mask/benchmark.py:404
↓ 1 callersFunctionstage_area
Time .area on both representations.
examples/compact_mask/benchmark.py:383
↓ 1 callersFunctionstage_build
Synthesize polygon masks and build the CompactMask.
examples/compact_mask/benchmark.py:316
↓ 1 callersFunctionstage_centroids
Time centroid: np.tensordot on full stack (dense) vs per-crop (compact).
examples/compact_mask/benchmark.py:566
↓ 1 callersFunctionstage_correctness
Return (pixel_perfect, areas_match, roundtrip_ok).
examples/compact_mask/benchmark.py:415
↓ 1 callersFunctionstage_decode
Per-mask decode time: decode each mask individually and average over N. Building a list via compact_mask[i] decodes each crop separately, giving
examples/compact_mask/benchmark.py:371
↓ 1 callersFunctionstage_encode
Per-mask encode time: encode each mask individually and average over N. Calling from_dense one mask at a time (rather than batching all N) isolat
examples/compact_mask/benchmark.py:347
↓ 1 callersFunctionstage_filter
Time boolean filtering (keep every other detection).
examples/compact_mask/benchmark.py:393
↓ 1 callersFunctionstage_iou
Time pairwise self-IoU using dense (N,H,W) AND and compact crop filter. Correctness is checked on the first 10 masks only to keep it fast, re
examples/compact_mask/benchmark.py:432
↓ 1 callersFunctionstage_merge
Time Detections.merge on two half-splits. Dense: np.vstack; compact: RLE concat. Splits are pre-computed so the timed lambda measures only th
examples/compact_mask/benchmark.py:506
↓ 1 callersFunctionstage_nms
Time mask NMS. Dense resizes to 640 before IoU; compact uses exact crop IoU. Compact NMS is strictly more accurate than dense: it computes pixel-
examples/compact_mask/benchmark.py:462
↓ 1 callersFunctionstage_offset
Time mask offset: move_masks (N,H,W) copy vs O(N) offset update.
examples/compact_mask/benchmark.py:531
↓ 1 callersFunctionstage_resize
Time resize to half resolution; check pixel-level correctness. Dense path uses numpy fancy-indexing via ``_resize_dense_to_shape``. Compact p
examples/compact_mask/benchmark.py:583
↓ 1 callersFunctionstop_rtsp_server
()
examples/time_in_zone/scripts/stream_from_file.py:57
↓ 1 callersFunctionstream_video_to_url
(video_path: str, stream_url: str)
examples/time_in_zone/scripts/stream_from_file.py:72
↓ 1 callersFunctionstream_videos
(video_files: list)
examples/time_in_zone/scripts/stream_from_file.py:61
↓ 1 callersMethodtransform_points
(self, points: np.ndarray)
examples/speed_estimation/inference_example.py:31
↓ 1 callersMethodtransform_points
(self, points: np.ndarray)
examples/speed_estimation/ultralytics_example.py:30
↓ 1 callersMethodtransform_points
(self, points: np.ndarray)
examples/speed_estimation/yolo_nas_example.py:31
↓ 1 callersMethodupdate
Update a matched track. Args: new_track: The new track data. frame_id: The current frame ID.
src/supervision/tracker/byte_tracker/single_object_track.py:113
↓ 1 callersMethodupdate
( self, detections_all: sv.Detections, detections_in_zones: list[sv.Detections],
examples/traffic_analysis/ultralytics_example.py:34
↓ 1 callersMethodupdate_with_tensors
Updates the tracker with the provided tensors and returns the updated tracks. Args: tensors: The new tensors to update w
src/supervision/tracker/byte_tracker/core.py:173
↓ 1 callersMethodwrite_and_close
Write and close the JSON file.
src/supervision/detection/tools/json_sink.py:109
↓ 1 callersFunctionxcycwh_to_xyxy
Converts bounding box coordinates from `(center_x, center_y, width, height)` format to `(x_min, y_min, x_max, y_max)` format. Args:
src/supervision/detection/utils/converters.py:119
↓ 1 callersFunctionxyxy_to_mask
Converts a 2D `np.ndarray` of bounding boxes into a 3D `np.ndarray` of bool masks. Args: boxes: A 2D `np.ndarray` of shape `(N, 4)`
src/supervision/detection/utils/converters.py:248
↓ 1 callersFunctionxyxy_to_polygons
Convert an array of boxes to an array of polygons. Retains the input datatype. Args: box: An array of boxes (N, 4), where each b
src/supervision/detection/utils/converters.py:12
← previousnext →501–600 of 1,714, ranked by callers