MCPcopy Create free account

hub / github.com/roboflow/supervision / functions

Functions1,714 in github.com/roboflow/supervision

Methodtest_staircase_obb_merge_within_union
Diagonal staircase OBBs: merged AABB equals axis-aligned union.
tests/detection/test_core.py:1743
Methodtest_stationary_tracker_does_not_crash_spline_fit
When the same tracker stays at an identical anchor point for several frames the trace buffer accumulates duplicate points. `scipy.spl
tests/annotators/test_core.py:947
Methodtest_stderr_handler_present
Logger has a StreamHandler pointing to stderr for warnings.
tests/utils/test_logger.py:60
Methodtest_stdout_handler_present
Logger has a StreamHandler pointing to stdout.
tests/utils/test_logger.py:50
Methodtest_straddling_detection_assigned_to_one_zone
Detection straddling two adjacent zones is counted in exactly one zone. The old implementation clipped each detection box to the zone's bound
tests/detection/test_polygonzone.py:110
Methodtest_sum_axis_1_2_equals_area
(self)
tests/detection/test_compact_mask.py:472
Methodtest_sum_axis_matches_area
cm.sum(axis=(1,2)) must equal cm.area (the fast path).
tests/detection/test_compact_mask.py:864
Methodtest_supports_overlap_metric
`overlap_metric=IOS` divides by the smaller area, so a small box fully contained in a larger one scores exactly 1.0, while IoU is the area rat
tests/detection/utils/test_iou_and_nms.py:1225
Methodtest_suppression_is_class_aware
Same class: lower-score OBB suppressed. Different class: both kept.
tests/detection/utils/test_iou_and_nms.py:1411
Methodtest_tall_and_wide_crops
Single-row and single-col crops scale correctly with cv2 parity.
tests/detection/test_compact_mask.py:1419
Functiontest_three_class_single_image_scenario
Test with 3 classes on single image - explicit N x K bug reproduction. THE BUG: mAR @ K was limiting detections per class per image, not
tests/metrics/test_mean_average_recall.py:461
Methodtest_threshold_extremes
At threshold extremes, positive-overlap non-identical OBBs suppress at 0.0 and are both kept at 1.0.
tests/detection/utils/test_iou_and_nms.py:1477
Methodtest_tight_bbox_parity
Tight bounding boxes (mask_to_xyxy) must still produce identical IoU.
tests/detection/test_compact_mask_iou.py:475
Functiontest_top_k
( class_id: np.ndarray, confidence: np.ndarray | None, k: int, expected_result: tuple[np.ndarr
tests/classification/test_core.py:68
Functiontest_train_test_split
( data: list[T], train_ratio: float, random_state: int, shuffle: bool, expected_result: tu
tests/dataset/test_utils.py:74
Methodtest_two_handlers_configured
Logger has exactly two handlers: one for stdout, one for stderr.
tests/utils/test_logger.py:45
Methodtest_union_accumulation_compact
CompactMask path: collect_union=True returns array matching dense.
tests/annotators/test_core.py:407
Methodtest_union_accumulation_dense
Dense path: collect_union=True returns array covering all painted pixels.
tests/annotators/test_core.py:389
Methodtest_unique_vertices_calculation
Test unique vertices calculation from skeleton edges.
tests/key_points/test_skeletons.py:41
Methodtest_uses_obb_iou_when_oriented_box_coordinates_present
X-pattern OBBs: both survive under either method because OBB IoU < 0.5.
tests/detection/test_core.py:1031
Methodtest_uses_oriented_box_corners_when_present
Area equals the rotated body's area regardless of rotation, not the AABB.
tests/detection/test_core.py:1792
Methodtest_validate_input_tensors_obb
( self, predictions, targets, metric_target, exception )
tests/metrics/test_detection.py:1243
Functiontest_validate_public_shims_warn
(call: Callable[[], object], version: str)
tests/test_validate_deprecations.py:97
Functiontest_vector_cross_product
Verify that Vector.cross_product correctly calculates the scalar value. Scenario: Computing the cross product between a vector and a point.
tests/geometry/test_core.py:29
Functiontest_vector_magnitude
Verify that Vector.magnitude correctly calculates Euclidean distance. Scenario: Calculating the magnitude (length) of a vector. Expected
tests/geometry/test_core.py:64
Functiontest_video_assets_list
Test that VideoAssets.list() returns all video filenames.
tests/assets/test_list.py:10
Functiontest_video_assets_values
Test that VideoAssets enum members have correct attributes.
tests/assets/test_list.py:36
Functiontest_video_info
Verify that VideoInfo correctly retrieves metadata from a video file. Scenario: Retrieving metadata from a video file using `VideoInfo`.
tests/utils/test_video.py:148
Functiontest_video_info_float_fps
Verify that VideoInfo preserves non-integer FPS values as floats. Scenario: Retrieving metadata from a video while OpenCV reports 23.976 fps
tests/utils/test_video.py:165
Methodtest_visible_defaults_to_none
(self)
tests/key_points/test_core.py:517
Methodtest_visible_false_skips_edge
Edges with an endpoint marked not visible are not drawn.
tests/key_points/test_annotators.py:145
Methodtest_visible_false_skips_keypoint
Not-visible keypoints produce no ellipses.
tests/key_points/test_annotators.py:242
Methodtest_visible_false_skips_keypoint
(self, scene)
tests/key_points/test_annotators.py:324
Methodtest_visible_false_skips_keypoint
(self, scene)
tests/key_points/test_annotators.py:376
Methodtest_visible_false_skips_vertex
Vertices marked not visible are not drawn.
tests/key_points/test_annotators.py:62
Methodtest_visible_none_draws_all
When visible is None all vertices are drawn.
tests/key_points/test_annotators.py:82
Methodtest_visible_none_stays_none_on_filter
(self)
tests/key_points/test_core.py:589
Methodtest_visible_preserved_on_2d_bool_mask
(self)
tests/key_points/test_core.py:572
Methodtest_visible_preserved_on_anchor_slice
(self)
tests/key_points/test_core.py:561
Methodtest_visible_preserved_on_int_index
(self)
tests/key_points/test_core.py:550
Methodtest_visible_preserved_on_skeleton_filter
(self)
tests/key_points/test_core.py:535
Methodtest_visible_set_from_confidence_threshold
(self)
tests/key_points/test_core.py:525
Methodtest_visible_true_draws_edge
Edges with both endpoints visible are drawn.
tests/key_points/test_annotators.py:155
Methodtest_visible_true_draws_vertex
Vertices marked visible are drawn.
tests/key_points/test_annotators.py:72
Functiontest_vlm_parsers_degrade_on_malformed_json
Valid JSON of the wrong shape should yield empty results, not raise.
tests/detection/test_vlm.py:1337
Methodtest_weighted_averaging
Test WEIGHTED averaging with specific example
tests/metrics/test_f1_score.py:338
Methodtest_with_image_enum
Test download_assets with ImageAssets enum.
tests/assets/test_downloader.py:166
Functiontest_with_mask
( lines: list[str], expected_result: bool | None, exception: Exception )
tests/dataset/formats/test_yolo.py:66
Functiontest_with_nms
NMS filters overlapping keypoint skeletons.
tests/key_points/test_core.py:1396
Functiontest_with_nms_raises
NMS raises when required fields are missing.
tests/key_points/test_core.py:1437
Methodtest_with_offset
(self)
tests/detection/test_compact_mask.py:478
Methodtest_with_offset_clips_full_outside_like_move_masks
Masks shifted fully outside should remain valid and decode to all-False.
tests/detection/test_compact_mask.py:508
Methodtest_with_offset_clips_partial_overlap_like_move_masks
with_offset must clip partial out-of-frame translations like move_masks.
tests/detection/test_compact_mask.py:490
Methodtest_with_video_enum
Test download_assets with VideoAssets enum.
tests/assets/test_downloader.py:133
Methodtest_within_budget_and_valid
The result stays a valid polygon and respects the point budget. The exception is the 3-point floor: keeping a valid polygon (at least 3
tests/detection/utils/test_polygons.py:118
Functiontest_wrap_text
( text: object, max_line_length: int | None, expected_result: list[str], exception: Exception,
tests/annotators/test_utils.py:173
Functiontest_xcycwh_to_xyxy
(xcycwh: np.ndarray, expected_result: np.ndarray)
tests/detection/utils/test_converters.py:143
Functiontest_xywh_to_xyxy
(xywh: np.ndarray, expected_result: np.ndarray)
tests/detection/utils/test_converters.py:46
Methodtest_xyxy_beyond_image_clipped
xyxy values beyond the image boundary should be clipped silently.
tests/detection/test_compact_mask.py:451
Functiontest_xyxy_to_mask
(boxes: np.ndarray, resolution_wh, expected: np.ndarray)
tests/detection/utils/test_converters.py:312
Functiontest_xyxy_to_xcycarh
(xyxy: np.ndarray, expected_result: np.ndarray)
tests/detection/utils/test_converters.py:120
Functiontest_xyxy_to_xywh
(xyxy: np.ndarray, expected_result: np.ndarray)
tests/detection/utils/test_converters.py:69
Functiontest_xyxyxyxy_to_xyxy
Converts OBB corners to axis-aligned bounding boxes.
tests/detection/utils/test_boxes.py:269
Functiontest_yolo_annotations_to_detections
( lines: list[str], resolution_wh: tuple[int, int], with_masks: bool, expected_result: Detecti
tests/dataset/formats/test_yolo.py:198
Functiontest_yolo_polygon_mask_precision_no_coord_drift_loads_mask
YOLO load with force_masks=True should produce a non-empty mask.
tests/dataset/formats/test_yolo.py:471
Functiontest_yolo_polygon_mask_precision_no_coord_drift_round_trip_iou
YOLO load/save round-trip should keep segmentation mask geometry stable.
tests/dataset/formats/test_yolo.py:491
Methodtest_zero_area_mask_clipped_to_1x1
An invalid bounding box should not crash from_dense.
tests/detection/test_compact_mask.py:435
Methodtest_zero_extent_extreme_downscale
Extreme downscale that collapses a 1px bbox returns valid 1x1 crop.
tests/detection/test_compact_mask.py:1187
Methodtest_zero_percentage_keeps_polygon
A percentage of 0 removes no points.
tests/detection/utils/test_polygons.py:137
Functionthree_class_single_image_detections
Scenario: 1 image with 3 classes - explicit bug reproduction. Demonstrates the N x K vs K issue: with 3 classes, the bug would allow 3 d
tests/metrics/test_mean_average_recall.py:326
Functionthree_images
()
tests/utils/conftest.py:38
Functionthree_images_tile
()
tests/utils/conftest.py:78
Methodtick
Processes the current frame, updating time durations for each tracker. Args: detections: The detections for the current frame, in
examples/time_in_zone/utils/timers.py:68
Functiontint_image
Tint image with solid color overlay at specified opacity. Args: image: The image to tint. color: Overlay tint color. Default
src/supervision/utils/image.py:356
Methodtlbr
Convert bounding box to format `(min x, min y, max x, max y)`, i.e., `(top left, bottom right)`.
src/supervision/tracker/byte_tracker/single_object_track.py:152
Methodtlwh
Get current position in bounding box format `(top left x, top left y, width, height)`.
src/supervision/tracker/byte_tracker/single_object_track.py:140
Methodtlwh_to_tlbr
(tlwh: npt.NDArray[np.float32])
src/supervision/tracker/byte_tracker/single_object_track.py:180
Methodto_pandas
Convert the result to a pandas DataFrame. Returns: The result as a DataFrame.
src/supervision/metrics/mean_average_recall.py:154
Methodto_pandas
Convert the result to a pandas DataFrame. Returns: The result as a DataFrame.
src/supervision/metrics/mean_average_precision.py:145
Methodto_pandas
Convert the result to a pandas DataFrame. Returns: The result as a DataFrame.
src/supervision/metrics/recall.py:597
Methodto_pandas
Convert the result to a pandas DataFrame. Returns: The result as a DataFrame.
src/supervision/metrics/f1_score.py:630
Methodto_pandas
Convert the result to a pandas DataFrame. Returns: The result as a DataFrame.
src/supervision/metrics/precision.py:643
Methodto_xyah
(self)
src/supervision/tracker/byte_tracker/single_object_track.py:170
Methodtop_left
(self)
src/supervision/geometry/core.py:181
Functiontwo_class_two_image_detections
Scenario: 2 images with 2 classes with varying confidence levels. Tests that `mAR @ K` limits per image (not per class) by creating a case w
tests/metrics/test_mean_average_recall.py:286
Functiontwo_images
()
tests/utils/conftest.py:33
Functiontwo_images_tile
()
tests/utils/conftest.py:83
Methodupdate_ideal_conf_matrix
(conf_matrix: np.ndarray, class_ids: np.ndarray)
tests/metrics/test_detection.py:158
Functionvalidate_class_id
(class_id: Any, n: int)
src/supervision/validators/__init__.py:102
Functionvalidate_confidence
(confidence: Any, n: int)
src/supervision/validators/__init__.py:125
Methodvalidate_custom_values
( custom_values: npt.NDArray[np.float64] | list[float] | None, detections: Detections, )
src/supervision/annotators/core.py:2783
Functionvalidate_data
(data: dict[str, Any], n: int)
src/supervision/validators/__init__.py:212
Functionvalidate_detections_fields
( xyxy: Any, mask: Any, class_id: Any, confidence: Any, tracker_id: Any, data: dict[st
src/supervision/validators/__init__.py:281
Functionvalidate_fields_both_defined_or_none
( detections_1: Detections, detections_2: Detections )
src/supervision/detection/core.py:2931
Functionvalidate_input_tensors
( predictions: list[npt.NDArray[np.float32]], targets: list[npt.NDArray[np.float32]], )
src/supervision/metrics/detection.py:192
Functionvalidate_key_point_confidence
(confidence: Any, n: int, m: int)
src/supervision/validators/__init__.py:156
Functionvalidate_key_points_fields
( xy: Any, class_id: Any, confidence: Any, data: dict[str, Any] )
src/supervision/validators/__init__.py:317
Functionvalidate_keypoint_confidence
(confidence: Any, n: int, m: int)
src/supervision/validators/__init__.py:165
Functionvalidate_keypoints_fields
( xy: Any, class_id: Any, confidence: Any, data: dict[str, Any] )
src/supervision/validators/__init__.py:328
Functionvalidate_labels
(labels: list[str] | None, detections: Detections)
src/supervision/annotators/utils.py:231
← previousnext →1,601–1,700 of 1,714, ranked by callers