MCPcopy Create free account

hub / github.com/roboflow/supervision / functions

Functions1,714 in github.com/roboflow/supervision

Functiontest_load_coco_annotations_force_masks_with_no_annotations
( tmp_path, coco_data_with_unannotated_image: dict[str, object] )
tests/dataset/formats/test_coco.py:1223
Functiontest_load_coco_annotations_infers_masks_from_segmentation_field
( tmp_path, coco_data_with_and_without_segmentation: dict[str, object] )
tests/dataset/formats/test_coco.py:1177
Functiontest_load_coco_annotations_rejects_absolute_file_name
Reject absolute file_name values that escape the images directory.
tests/dataset/formats/test_coco.py:1315
Functiontest_load_coco_annotations_rejects_file_name_outside_images_directory
Reject relative traversal file_name values that escape the images directory.
tests/dataset/formats/test_coco.py:1285
Functiontest_load_coco_annotations_rejects_file_name_resolving_to_directory
Reject file_name resolving to a subdirectory inside images/ (is_dir guard).
tests/dataset/formats/test_coco.py:1342
Functiontest_load_coco_annotations_rejects_file_name_resolving_to_images_directory
Reject file_name resolving to the images directory itself (equality guard).
tests/dataset/formats/test_coco.py:1254
Functiontest_load_yolo_annotations_mask_behaviour
Mask presence depends on annotation format and OBB/segmentation flag.
tests/dataset/formats/test_yolo.py:386
Methodtest_log_level_env_var
Logger respects the LOG_LEVEL environment variable.
tests/utils/test_logger.py:33
Methodtest_log_level_env_var_warning
Logger respects the LOG_LEVEL=WARNING environment variable.
tests/utils/test_logger.py:39
Methodtest_macro_averaging
Test MACRO averaging with specific example
tests/metrics/test_f1_score.py:312
Methodtest_macro_averaging
Test MACRO averaging with specific example
tests/metrics/test_recall.py:211
Functiontest_map_detections_class_id
( source_to_target_mapping: dict[int, int], detections: Detections, expected_result: Detections |
tests/dataset/test_utils.py:223
Functiontest_mar_at_k_limits_per_image_not_per_class
Test that `mAR @ K` limits detections per image, not per class. BUG SCENARIO (what was wrong): The previous implementation would limit d
tests/metrics/test_mean_average_recall.py:406
Functiontest_mask
Create a simple rectangular mask fixture
tests/annotators/test_core.py:50
Methodtest_mask_annotator
(self)
tests/detection/test_compact_mask_integration.py:234
Methodtest_mask_at_image_boundary
(self)
tests/detection/test_compact_mask.py:443
Functiontest_mask_non_max_merge
( predictions: np.ndarray, masks: np.ndarray, iou_threshold: float, expected_result: list[list
tests/detection/utils/test_iou_and_nms.py:654
Functiontest_mask_non_max_suppression
( predictions: np.ndarray, masks: np.ndarray, iou_threshold: float, expected_result: np.ndarra
tests/detection/utils/test_iou_and_nms.py:474
Functiontest_mask_rle_compressed_round_trip
()
tests/detection/utils/test_converters.py:593
Functiontest_mask_rle_counts_round_trip
_rle_counts_to_mask(_mask_to_rle_counts(m)) == m for non-empty masks.
tests/detection/utils/test_converters.py:877
Methodtest_mask_takes_precedence_over_oriented_box
When both `mask` and `ORIENTED_BOX_COORDINATES` are present, area is computed from the mask.
tests/detection/test_core.py:1811
Functiontest_mask_to_rle
( mask: npt.NDArray[np.bool_], compressed: bool, expected_rle: list[int] | str | None, excepti
tests/detection/utils/test_converters.py:469
Functiontest_mask_to_rle_counts
_mask_to_rle_counts produces correct COCO F-order run lengths.
tests/detection/utils/test_converters.py:789
Methodtest_mask_to_xyxy_known_values
Known boxes for empty, single-pixel, and full masks.
tests/detection/utils/test_converters.py:375
Methodtest_mask_to_xyxy_matches_reference
Vectorized output is bit-identical to the per-mask scalar loop.
tests/detection/utils/test_converters.py:386
Methodtest_matches_dense_random
compact_mask_iou_batch must be numerically identical to dense IoU.
tests/detection/test_compact_mask_iou.py:94
Methodtest_matches_dense_with_tight_bboxes
Using tight bounding boxes (mask_to_xyxy) must still be accurate.
tests/detection/test_compact_mask_iou.py:110
Methodtest_matches_naive_reference_on_random_masks
Random masks give the same matrix as the explicit (N, M, H, W) reference.
tests/detection/utils/test_iou_and_nms.py:1625
Methodtest_matmul_emits_no_runtime_warnings
mask_iou_batch on bool input must not emit any RuntimeWarning.
tests/detection/utils/test_iou_and_nms.py:1698
Methodtest_max_axis_caps_large_eigenvalue
Large covariance with max_axis still produces a bounded ellipse.
tests/key_points/test_annotators.py:267
Functiontest_mean_average_precision_accepts_obb_metric_target
Smoke test: MeanAveragePrecision accepts metric_target=ORIENTED_BOUNDING_BOXES. NOTE: MeanAveragePrecision uses the COCO evaluator path (box_iou_
tests/metrics/test_oriented_bounding_box_metrics.py:50
Functiontest_media_assets_dict_keys
Test that MEDIA_ASSETS has all VideoAssets and ImageAssets as keys.
tests/assets/test_list.py:50
Functiontest_media_assets_dict_values
Test that MEDIA_ASSETS values are tuples of (url, md5_hash).
tests/assets/test_list.py:58
Functiontest_merge
( detections_list: list[Detections], expected_result: Detections | None, exception: Exception, )
tests/detection/test_core.py:579
Methodtest_merge
(self)
tests/detection/test_compact_mask.py:347
Methodtest_merge
Produces correct merged OBB corners.
tests/detection/test_core.py:1125
Methodtest_merge
Merges detection group correctly.
tests/detection/test_core.py:1445
Functiontest_merge_class_maps
( class_lists: list[list[str]], expected_result: list[str], exception: Exception )
tests/dataset/test_utils.py:118
Functiontest_merge_data
( data_list: list[dict[str, Any]], expected_result: dict[str, Any] | None, exception: Exception, )
tests/detection/utils/test_internal.py:675
Methodtest_merge_empty_list_raises
(self)
tests/detection/test_compact_mask.py:375
Functiontest_merge_inner_detection_object_pair
( detection_1: Detections, detection_2: Detections, expected_result: Detections | None, except
tests/detection/test_core.py:880
Functiontest_merge_metadata
(metadata_list, expected_result, exception)
tests/detection/utils/test_internal.py:1032
Methodtest_merge_mismatched_image_shape_raises
(self)
tests/detection/test_compact_mask.py:379
Methodtest_merge_with_empty
(self)
tests/detection/test_compact_mask.py:361
Methodtest_micro_averaging
Test MICRO averaging with specific example
tests/metrics/test_f1_score.py:325
Methodtest_mismatched_list_lengths
Test that mismatched prediction/target list lengths raise error
tests/metrics/test_f1_score.py:291
Methodtest_mismatched_list_lengths
Test that mismatched prediction/target list lengths raise error
tests/metrics/test_recall.py:190
Methodtest_mismatched_list_lengths
Test that mismatched prediction/target list lengths raise error
tests/metrics/test_precision.py:259
Methodtest_mismatched_spatial_shape_raises
Equal pixel counts but different (H, W) must raise, not silently mismatch.
tests/detection/utils/test_iou_and_nms.py:1660
Methodtest_mixed_2x2
Mixed mask splits correctly per column.
tests/detection/test_compact_mask.py:1003
Methodtest_mixed_classes_with_missing_detections
Test mixed scenario with some classes having no detections
tests/metrics/test_mean_average_precision.py:291
Methodtest_mixed_compact_and_dense
One CompactMask + one dense array must still work correctly.
tests/detection/test_compact_mask_iou.py:230
Methodtest_mixed_compact_and_dense
Merging a CompactMask with a dense ndarray falls back to dense.
tests/detection/test_compact_mask_integration.py:177
Functiontest_move_boxes
( xyxy: np.ndarray, offset: np.ndarray, expected_result: np.ndarray, exception: Exception, )
tests/detection/utils/test_boxes.py:96
Functiontest_move_masks
( masks: np.ndarray, offset: np.ndarray, resolution_wh: tuple[int, int], expected_result: np.n
tests/detection/utils/test_masks.py:268
Methodtest_multi_mask_each_scales_independently
N=4 masks at different positions all scale correctly after resize.
tests/detection/test_compact_mask.py:1164
Methodtest_multi_segment_masks_merged
Multi-segment masks merge correctly for both force_masks values.
tests/dataset/formats/test_coco.py:1464
Methodtest_multi_segment_masks_uneven_length_no_value_error
Uneven-length segments load without ValueError (issue #1209 regression).
tests/dataset/formats/test_coco.py:1504
Methodtest_multiple_classes
Test F1 score calculation for multiple classes
tests/metrics/test_f1_score.py:237
Methodtest_multiple_classes
Test recall calculation for multiple classes
tests/metrics/test_recall.py:128
Methodtest_multiple_classes
Test precision calculation for multiple classes
tests/metrics/test_precision.py:208
Methodtest_multiple_perfect_detections
Test that multiple perfect detections get 1.0 mAP
tests/metrics/test_mean_average_precision.py:19
Methodtest_multiple_predictions_one_target
Test recall when multiple predictions compete for one target
tests/metrics/test_recall.py:166
Functiontest_mux_audio_file_unchanged_on_failure
_mux_audio leaves the output file unchanged when muxing cannot complete.
tests/utils/test_video.py:273
Functiontest_mux_audio_replaces_file_on_success
_mux_audio calls os.replace with video_path as destination on success.
tests/utils/test_video.py:290
Methodtest_n_by_n_pairwise
N x N pairwise IoU: diagonal must be 1.0 for non-zero-area masks.
tests/detection/test_compact_mask_iou.py:190
Methodtest_nmm_compact_matches_dense
Merge groups must match between CompactMask and dense inputs.
tests/detection/test_compact_mask_iou.py:333
Methodtest_nmm_full_merge
Identical masks: all predictions should merge into one group.
tests/detection/test_compact_mask_iou.py:369
Methodtest_nmm_no_merge
Non-overlapping masks: every mask should be its own group.
tests/detection/test_compact_mask_iou.py:353
Methodtest_nms_compact_full_suppression
Identical masks: only the highest-confidence one should survive.
tests/detection/test_compact_mask_iou.py:310
Methodtest_nms_compact_matches_dense
NMS keep-set is identical for CompactMask and the equivalent dense array.
tests/detection/test_compact_mask_iou.py:252
Methodtest_nms_compact_matches_dense_borderline
Borderline IoU pair (≈ threshold) must agree — catches the resize bug. With resize-to-640, sub-pixel rounding on a pair whose true IoU is ver
tests/detection/test_compact_mask_iou.py:273
Methodtest_nms_compact_no_suppression
Non-overlapping masks: all should be kept.
tests/detection/test_compact_mask_iou.py:295
Methodtest_nms_with_overlapping_tiles_uses_rle_iou
With overlapping tiles, NMS must suppress duplicates using RLE IoU.
tests/detection/test_inference_slicer_compact.py:116
Methodtest_no_mask_callback_unaffected
compact_masks=True must not crash when callback returns no masks.
tests/detection/test_inference_slicer_compact.py:142
Methodtest_no_overlap
Test F1 score with predictions that don't overlap with targets
tests/metrics/test_f1_score.py:87
Methodtest_no_overlap
Test recall with predictions that don't overlap with targets
tests/metrics/test_recall.py:84
Methodtest_no_overlap
Test precision with predictions that don't overlap with targets
tests/metrics/test_precision.py:85
Methodtest_no_overlap_gives_zero
Non-overlapping masks should always produce IoU = 0.
tests/detection/test_compact_mask_iou.py:65
Methodtest_no_propagation
Logger does not propagate to the root logger.
tests/utils/test_logger.py:70
Methodtest_non_square_scale
Non-square resize: 4x6 to 2x3 with independent axis scaling.
tests/detection/test_compact_mask.py:1303
Functiontest_obb_callbacks_run_sequentially_even_with_multiple_workers
Test that OBB callbacks are serialized even when thread_workers > 1.
tests/detection/tools/test_inference_slicer.py:390
Methodtest_obb_nmm_empty_detections
Empty OBB detections return empty result.
tests/detection/test_core.py:1766
Methodtest_obb_nmm_matches_aabb_for_axis_aligned
Axis-aligned OBB NMM produces same envelope as AABB NMM.
tests/detection/test_core.py:1710
Methodtest_obb_nmm_merge
OBB NMM produces correct geometry and confidence.
tests/detection/test_core.py:1655
Functiontest_object_to_pascal_voc
( xyxy: np.ndarray, name: str, polygon: np.ndarray | None, expected_result, exception: Exc
tests/dataset/formats/test_pascal_voc.py:64
Functiontest_object_to_pascal_voc_does_not_mutate_inputs
Serializing an object must not write the 1-index offset back into the inputs.
tests/dataset/formats/test_pascal_voc.py:76
Functiontest_object_to_pascal_voc_does_not_mutate_view_input
Mutation guard holds when xyxy is a NumPy row-view (the actual bug scenario).
tests/dataset/formats/test_pascal_voc.py:89
Functiontest_object_to_yolo
( xyxy: np.ndarray, class_id: int, image_shape: tuple[int, int, int], polygon: np.ndarray | No
tests/dataset/formats/test_yolo.py:336
Methodtest_offset_into_larger_canvas
Offset into a larger destination image must preserve pixels.
tests/detection/test_compact_mask.py:954
Functiontest_oriented_box_iou_batch_is_invariant_to_non_square_scaling
IoU is invariant under per-axis (anisotropic) scaling. An affine map multiplies every area — intersection and union alike — by the same deter
tests/detection/utils/test_iou_and_nms.py:1170
Methodtest_out_of_bounds_anchor_excluded
Anchors with negative coordinates are excluded, not wrapped or clamped.
tests/detection/test_polygonzone.py:142
Methodtest_overlap_metric_determines_suppression
Small box inside large: IOU keeps both; IOS suppresses small.
tests/detection/utils/test_iou_and_nms.py:1511
Methodtest_paint_masks_by_area_is_noop_without_masks
_paint_masks_by_area is a no-op when detections carry no mask.
tests/annotators/test_core.py:382
Methodtest_parallel_matches_sequential
Thread-pool path produces the same result as the sequential path.
tests/detection/test_compact_mask.py:1567
Methodtest_parallel_resize_correctness
resize() with N=10 masks exercises ThreadPoolExecutor; output is correct.
tests/detection/test_compact_mask.py:1547
Methodtest_parity_seed
(self, seed: int)
tests/detection/test_compact_mask_iou.py:433
Methodtest_parity_seed
(self, seed: int)
tests/detection/test_compact_mask.py:805
Methodtest_parity_seed
(self, seed: int)
tests/detection/test_compact_mask.py:848
Methodtest_parity_seed
(self, seed: int)
tests/detection/test_compact_mask.py:877
← previousnext →1,401–1,500 of 1,714, ranked by callers