Repository Analysis

roboflow/supervision

We write your reusable computer vision tools. 💜

25.4 Moderate AI signal View on GitHub
25.4
Adjusted Score
25.4
Raw Score
100%
Time Factor
2026-05-29
Last Push
39,736
Stars
Python
Language
73,060
Lines of Code
298
Files
991
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 207MEDIUM 57LOW 727

Pattern Findings

991 matches across 14 categories. Click a row to expand file-level details.

Docstring Block Structure134 hits · 670 pts
SeverityFileLineSnippet
HIGHtests/helpers.py27 Create a Detections object from list-based inputs. This is a helper function primarily used for testing purpos
HIGHtests/helpers.py85 Create a KeyPoints object from list-based inputs. This is a helper function primarily used for testing purpose
HIGHtests/helpers.py142 Generate random bounding boxes within given image dimensions and size constraints. Creates `count` bounding bo
HIGHtests/helpers.py359 Create a synthetic YOLO-format dataset on disk. Generates dummy images with YOLO-format annotations, `data.yam
HIGHtests/geometry/test_utils.py9 Generate a semicircle with a given number of points. Parameters: n (int): amount of points in polyg
HIGHsrc/supervision/metrics/detection.py108 Calculate confusion matrix based on predicted and ground-truth detections. Args: targets:
HIGHsrc/supervision/metrics/detection.py175 Calculate confusion matrix based on predicted and ground-truth detections. Args: predictio
HIGHsrc/supervision/metrics/detection.py583 Calculate mean average precision based on predicted and ground-truth detections. Args: tar
HIGHsrc/supervision/metrics/detection.py683 Calculate Mean Average Precision based on predicted and ground-truth detections at different thresh
HIGHsrc/supervision/key_points/core.py343 Create a `sv.KeyPoints` object from RF-DETR `sv.Detections` output. RF-DETR attaches keypoint coordina
HIGHsrc/supervision/key_points/core.py448 Create a `sv.KeyPoints` object from the [Roboflow](https://roboflow.com/) API inference result or the [
HIGHsrc/supervision/key_points/core.py534 Creates a `sv.KeyPoints` instance from a [MediaPipe](https://github.com/google-ai-edge/mediapipe)
HIGHsrc/supervision/key_points/core.py658 Creates a `sv.KeyPoints` instance from a [YOLOv8](https://github.com/ultralytics/ultralytics) pose infe
HIGHsrc/supervision/key_points/core.py697 Create a `sv.KeyPoints` instance from a [YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLON
HIGHsrc/supervision/key_points/core.py755 Create a `sv.KeyPoints` object from the [Detectron2](https://github.com/facebookresearch/detectron2) in
HIGHsrc/supervision/key_points/core.py806 Create a `sv.KeyPoints` object from the [Transformers](https://github.com/huggingface/transformers) inf
HIGHsrc/supervision/key_points/core.py890Filter keypoints using a 2D boolean mask of shape `(n, m)`. This method selects the **same set of keypoints fro
HIGHsrc/supervision/key_points/core.py1110 Convert a KeyPoints object to a Detections object. This approximates the bounding box of the detected o
HIGHsrc/supervision/key_points/annotators.py257 Annotates the given scene with covariance ellipses around keypoints. Args: scene: The imag
HIGHsrc/supervision/dataset/core.py163 Splits the dataset into two parts (training and testing) using the provided split_ratio. A
HIGHsrc/supervision/dataset/core.py232 Merge a list of `DetectionDataset` objects into a single `DetectionDataset` object. This m
HIGHsrc/supervision/dataset/core.py394 Creates a Dataset instance from PASCAL VOC formatted data. Args: images_directory_path: Pa
HIGHsrc/supervision/dataset/core.py450 Creates a Dataset instance from YOLO formatted data. Args: images_directory_path: The path
HIGHsrc/supervision/dataset/core.py563 Creates a Dataset instance from COCO formatted data. Args: images_directory_path: The path
HIGHsrc/supervision/dataset/core.py809 Splits the dataset into two parts (training and testing) using the provided split_ratio. A
HIGHsrc/supervision/dataset/core.py902 Load data from a multiclass folder structure into a ClassificationDataset. Args: root_dire
HIGHsrc/supervision/dataset/formats/coco.py48Convert a list of class names to COCO ``categories`` entries. Category ids are emitted 1-indexed to comply with the
HIGHsrc/supervision/dataset/formats/coco.py212Convert `Detections` to COCO ``annotations`` entries. The internal 0-indexed ``Detections.class_id`` is serialized
HIGHsrc/supervision/dataset/formats/coco.py356 Load COCO annotations and convert them to `Detections`. If `force_masks` is `False`, masks are still loaded fo
HIGHsrc/supervision/annotators/core.py219 Annotates the given scene with bounding boxes based on the provided detections. Args: scen
HIGHsrc/supervision/annotators/core.py397 Annotates the given scene with masks based on the provided detections. Args: scene: The im
HIGHsrc/supervision/annotators/core.py508 Annotates the given scene with polygons based on the provided detections. Args: scene: The
HIGHsrc/supervision/annotators/core.py599 Annotates the given scene with box masks based on the provided detections. Args: scene: Th
HIGHsrc/supervision/annotators/core.py699 Annotates the given scene with halos based on the provided detections. Args: scene: The im
HIGHsrc/supervision/annotators/core.py803 Annotates the given scene with ellipses based on the provided detections. Args: scene: The
HIGHsrc/supervision/annotators/core.py899 Annotates the given scene with box corners based on the provided detections. Args: scene:
HIGHsrc/supervision/annotators/core.py992 Annotates the given scene with circles based on the provided detections. Args: scene: The
HIGHsrc/supervision/annotators/core.py1095 Annotates the given scene with dots based on the provided detections. Args: scene: The ima
HIGHsrc/supervision/annotators/core.py1226 Annotates the given scene with labels based on the provided detections. Args: scene: The i
HIGHsrc/supervision/annotators/core.py1543 Annotates the given scene with labels based on the provided detections, with support for Unicode charac
HIGHsrc/supervision/annotators/core.py1886 Annotates the given scene by blurring regions based on the provided detections. Args: scen
HIGHsrc/supervision/annotators/core.py2337 Annotates the given scene with triangles based on the provided detections. Args: scene: Th
HIGHsrc/supervision/annotators/core.py2453 Annotates the given scene with bounding boxes with rounded edges based on the provided detections.
HIGHsrc/supervision/annotators/core.py2598 Annotates the given scene with percentage bars based on the provided detections. The percentage bars vi
HIGHsrc/supervision/annotators/core.py2784 Annotates the provided scene with scaled and cropped parts of the image based on the provided detection
HIGHsrc/supervision/annotators/core.py2934 Applies a colored overlay to the scene outside of the detected regions. Args: scene: The i
HIGHsrc/supervision/annotators/utils.py260 Shifts `label` bounding boxes into the frame so that they are fully contained within the given resolution, prio
HIGHsrc/supervision/annotators/utils.py375 Converts a hex color string (e.g. "#FF00FF" or "#FF00FF80") to an RGBA tuple. Args: hex_color: A hex c
HIGHsrc/supervision/annotators/utils.py403 Converts an RGBA tuple (0-255 each) to a hex color string. Args: rgba: RGBA values in range 0-255.
HIGHsrc/supervision/annotators/utils.py435 Computes a blur kernel size proportional to the shorter side of a bounding box. Args: x1: Left edge of
HIGHsrc/supervision/annotators/utils.py458 Computes a pixelation size proportional to the shorter side of a bounding box. Args: x1: Left edge of
HIGHsrc/supervision/utils/internal.py61 A decorator to mark a function's parameter as deprecated and issue a warning when used. Args: old_
HIGHsrc/supervision/utils/file.py25 List files in a directory with specified extensions or all files if no extensions are provided. Args:
HIGHsrc/supervision/utils/file.py75 Read a text file and return a list of strings without newline characters. Optionally skip empty lines. Arg
HIGHsrc/supervision/utils/file.py125 Read a json file and return a dict. Args: file_path: The file path as a string or Path object. Re
HIGHsrc/supervision/utils/notebook.py57 Plots images in a grid using matplotlib. Args: images: A list of images as ImageType is a
HIGHsrc/supervision/utils/video.py238 Get a generator that yields the frames of the video. Args: source_path: The path of the video file.
HIGHsrc/supervision/utils/image.py38 Crop image based on bounding box coordinates. Args: image: The image to crop. xyxy:
HIGHsrc/supervision/utils/image.py96 Scale image by given factor. Scale factor > 1.0 zooms in, < 1.0 zooms out. Args: image: The image to s
HIGHsrc/supervision/utils/image.py151 Resize image to specified resolution. Can optionally maintain aspect ratio. Args: image: The image to
74 more matches not shown…
Hyper-Verbose Identifiers439 hits · 416 pts
SeverityFileLineSnippet
LOWtests/helpers.py462def create_predictions_with_class_iou_tests(
LOWtests/classification/test_core.py84def test_from_clip_empty_output_dtypes() -> None:
LOWtests/classification/test_core.py92def test_from_timm_empty_output_dtypes() -> None:
LOWtests/metrics/test_mean_average_recall.py147def complex_scenario_predictions():
LOWtests/metrics/test_mean_average_recall.py286def two_class_two_image_detections():
LOWtests/metrics/test_mean_average_recall.py326def three_class_single_image_detections():
LOWtests/metrics/test_mean_average_recall.py362def test_single_perfect_detection():
LOWtests/metrics/test_mean_average_recall.py378def test_complex_integration_scenario(
LOWtests/metrics/test_mean_average_recall.py406def test_mar_at_k_limits_per_image_not_per_class(two_class_two_image_detections):
LOWtests/metrics/test_mean_average_recall.py461def test_three_class_single_image_scenario(three_class_single_image_detections):
LOWtests/metrics/test_mean_average_recall.py508def test_dataset_split_integration(yolo_dataset_two_classes):
LOWtests/metrics/test_f1_score.py12 def predictions_multiple_classes(self):
LOWtests/metrics/test_f1_score.py39 def test_initialization_default(self):
LOWtests/metrics/test_f1_score.py47 def test_initialization_custom(self):
LOWtests/metrics/test_f1_score.py127 def test_single_class_mixed_results(
LOWtests/metrics/test_f1_score.py142 def test_precision_recall_imbalance(
LOWtests/metrics/test_f1_score.py175 def test_different_iou_thresholds(self, predictions_iou_064, targets_iou_064):
LOWtests/metrics/test_f1_score.py211 def test_mismatched_list_lengths(self, detections_50_50, targets_50_50):
LOWtests/metrics/conftest.py67def predictions_multiple_classes():
LOWtests/metrics/conftest.py114def predictions_confidence_ranking():
LOWtests/metrics/test_mean_average_precision.py8 def test_single_perfect_detection(self, detections_50_50, targets_50_50):
LOWtests/metrics/test_mean_average_precision.py17 def test_multiple_perfect_detections(self):
LOWtests/metrics/test_mean_average_precision.py36 def test_batch_updates_perfect_detections(self, detections_50_50, targets_50_50):
LOWtests/metrics/test_mean_average_precision.py256 def test_mixed_classes_with_missing_detections(
LOWtests/metrics/test_mean_average_precision.py286 def test_empty_predictions_and_targets(self):
LOWtests/metrics/test_precision.py11 def predictions_multiple_classes(self):
LOWtests/metrics/test_precision.py39 def test_initialization_default(self):
LOWtests/metrics/test_precision.py47 def test_initialization_custom(self):
LOWtests/metrics/test_precision.py147 def test_different_iou_thresholds(self, predictions_iou_064, targets_iou_064):
LOWtests/metrics/test_precision.py179 def test_mismatched_list_lengths(self, detections_50_50, targets_50_50):
LOWtests/metrics/test_detection.py198 def test_detections_to_tensor(
LOWtests/metrics/test_detection.py380 def test_evaluate_detection_batch(
LOWtests/metrics/test_detection.py452 def test_compute_average_precision(
LOWtests/metrics/test_detection.py951 def test_confusion_matrix_on_yolo_dataset(self, yolo_dataset_structure):
LOWtests/metrics/test_recall.py12 def predictions_multiple_classes(self):
LOWtests/metrics/test_recall.py39 def test_initialization_default(self):
LOWtests/metrics/test_recall.py47 def test_initialization_custom(self):
LOWtests/metrics/test_recall.py116 def test_single_class_missed_detections(
LOWtests/metrics/test_recall.py147 def test_different_iou_thresholds(self, predictions_iou_064, targets_iou_064):
LOWtests/metrics/test_recall.py166 def test_multiple_predictions_one_target(
LOWtests/metrics/test_recall.py190 def test_mismatched_list_lengths(self, detections_50_50, targets_50_50):
LOWtests/metrics/test_mean_average_precision_area.py45 def test_area_calculation_and_size_specific_map(
LOWtests/metrics/test_mean_average_precision_area.py99 def test_area_preserved_from_data(self):
LOWtests/key_points/test_skeletons.py9 def test_skeleton_enum_values(self):
LOWtests/key_points/test_skeletons.py17 def test_skeletons_by_vertex_count(self):
LOWtests/key_points/test_skeletons.py27 def test_skeletons_by_edge_count(self):
LOWtests/key_points/test_skeletons.py41 def test_unique_vertices_calculation(self):
LOWtests/key_points/test_skeletons.py47 def test_skeletons_by_vertex_count_mapping_behaviour(self):
LOWtests/key_points/test_from_rfdetr.py7def test_keypoints_from_rfdetr_detections() -> None:
LOWtests/key_points/test_from_rfdetr.py32def test_keypoints_from_rfdetr_missing_keypoints_raises_clear_error() -> None:
LOWtests/key_points/test_from_rfdetr.py43def test_keypoints_from_rfdetr_malformed_shape_raises_clear_error() -> None:
LOWtests/key_points/test_from_rfdetr.py55def test_keypoint_annotator_uses_vertex_and_edge_rendering() -> None:
LOWtests/key_points/test_core.py57def test_key_points_from_rfdetr_loads_keypoints_and_covariance(
LOWtests/key_points/test_core.py81def test_key_points_from_rfdetr_without_precision_omits_covariance(
LOWtests/key_points/test_core.py92def test_key_points_from_rfdetr_missing_keypoints_raises(
LOWtests/key_points/test_core.py101def test_key_points_from_rfdetr_precision_requires_source_shape(
LOWtests/key_points/test_core.py110def test_key_points_from_rfdetr_empty_keypoints_returns_empty(
LOWtests/key_points/test_core.py532def test_key_points_as_detections(
LOWtests/key_points/test_core.py543def test_key_points_as_detections_empty():
LOWtests/key_points/test_core.py550def test_key_points_as_detections_with_data():
379 more matches not shown…
Cross-File Repetition68 hits · 340 pts
SeverityFileLineSnippet
HIGHtests/metrics/test_f1_score.py0test that mismatched prediction/target list lengths raise error
HIGHtests/metrics/test_precision.py0test that mismatched prediction/target list lengths raise error
HIGHtests/metrics/test_recall.py0test that mismatched prediction/target list lengths raise error
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no detections
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no masks
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no masks
HIGHtests/annotators/test_core.py0test that annotate method returns unmodified image when no masks
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"}, {"box_2d": [50, 100, 150, 200], "label": "dog"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"}, {"box_2d": [50, 100, 150, 200], "label": "dog"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"}, {"box_2d": [50, 100, 150, 200], "label": "dog"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat"} ] ```
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat", "confidence": 0.8}, {"box_2d": [50, 100, 150, 200], "label": "d
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat", "confidence": 0.8}, {"box_2d": [50, 100, 150, 200], "label": "d
HIGHtests/detection/test_vlm.py0```json [ {"box_2d": [10, 20, 110, 120], "label": "cat", "confidence": 0.8}, {"box_2d": [50, 100, 150, 200], "label": "d
HIGHexamples/time_in_zone/utils/general.py0load polygon zone configurations from a json file. this function reads a json file which contains polygon coordinates, a
HIGHexamples/count_people_in_zone/ultralytics_example.py0load polygon zone configurations from a json file. this function reads a json file which contains polygon coordinates, a
HIGHexamples/count_people_in_zone/inference_example.py0load polygon zone configurations from a json file. this function reads a json file which contains polygon coordinates, a
HIGHsrc/supervision/metrics/recall.py0reset the metric to its initial state, clearing all stored data.
HIGHsrc/supervision/metrics/mean_average_recall.py0reset the metric to its initial state, clearing all stored data.
HIGHsrc/supervision/metrics/f1_score.py0reset the metric to its initial state, clearing all stored data.
HIGHsrc/supervision/metrics/precision.py0reset the metric to its initial state, clearing all stored data.
HIGHsrc/supervision/metrics/mean_average_precision.py0reset the metric to its initial state, clearing all stored data.
HIGHsrc/supervision/metrics/recall.py0add new predictions and targets to the metric, but do not compute the result. args: predictions: the predicted detection
HIGHsrc/supervision/metrics/mean_average_recall.py0add new predictions and targets to the metric, but do not compute the result. args: predictions: the predicted detection
HIGHsrc/supervision/metrics/f1_score.py0add new predictions and targets to the metric, but do not compute the result. args: predictions: the predicted detection
HIGHsrc/supervision/metrics/precision.py0add new predictions and targets to the metric, but do not compute the result. args: predictions: the predicted detection
HIGHsrc/supervision/metrics/recall.py0compute the confusion matrix for each class and iou threshold. assumes the matches and prediction_class_ids are sorted b
HIGHsrc/supervision/metrics/f1_score.py0compute the confusion matrix for each class and iou threshold. assumes the matches and prediction_class_ids are sorted b
HIGHsrc/supervision/metrics/precision.py0compute the confusion matrix for each class and iou threshold. assumes the matches and prediction_class_ids are sorted b
HIGHsrc/supervision/metrics/recall.py0return boxes, masks or oriented bounding boxes from detections.
HIGHsrc/supervision/metrics/mean_average_recall.py0return boxes, masks or oriented bounding boxes from detections.
HIGHsrc/supervision/metrics/f1_score.py0return boxes, masks or oriented bounding boxes from detections.
HIGHsrc/supervision/metrics/precision.py0return boxes, masks or oriented bounding boxes from detections.
HIGHsrc/supervision/metrics/recall.py0return a copy of detections with contents filtered by object size.
HIGHsrc/supervision/metrics/mean_average_recall.py0return a copy of detections with contents filtered by object size.
HIGHsrc/supervision/metrics/f1_score.py0return a copy of detections with contents filtered by object size.
HIGHsrc/supervision/metrics/precision.py0return a copy of detections with contents filtered by object size.
HIGHsrc/supervision/metrics/recall.py0filter predictions and targets by object size category.
8 more matches not shown…
Unused Imports237 hits · 183 pts
SeverityFileLineSnippet
LOWtests/helpers.py9
LOWtests/classification/test_core.py1
LOWtests/metrics/test_detection.py1
LOWtests/metrics/test_mean_average_precision_area.py1
LOWtests/dataset/test_utils.py1
LOWtests/dataset/formats/test_pascal_voc.py1
LOWtests/annotators/test_utils.py1
LOWtests/utils/test_file.py1
LOWtests/utils/test_logger.py1
LOWtests/draw/test_color.py1
LOWtests/detection/test_from_adapters.py1
LOWtests/detection/test_compact_mask_integration.py3
LOWtests/detection/test_compact_mask_iou.py11
LOWtests/detection/test_core.py1
LOWtests/detection/test_inference_slicer_compact.py9
LOWtests/detection/test_line_counter.py1
LOWtests/detection/test_from_sam.py1
LOWtests/detection/test_compact_mask.py3
LOWtests/detection/test_vlm.py1
LOWtests/detection/test_json.py1
LOWtests/detection/test_csv.py1
LOWtests/detection/tools/test_inference_slicer.py1
LOWtests/detection/utils/test_converters.py1
LOWtests/detection/utils/test_masks.py1
LOWtests/detection/utils/test_internal.py1
LOWtests/detection/utils/test_polygons.py1
LOWtests/detection/utils/test_iou_and_nms.py1
LOWtests/detection/utils/test_boxes.py1
LOWexamples/traffic_analysis/ultralytics_example.py1
LOWexamples/traffic_analysis/inference_example.py1
LOWexamples/time_in_zone/rfdetr_file_example.py1
LOWexamples/time_in_zone/rfdetr_stream_example.py1
LOWexamples/time_in_zone/rfdetr_naive_stream_example.py1
LOWexamples/time_in_zone/ultralytics_stream_example.py1
LOWexamples/time_in_zone/scripts/draw_zones.py1
LOWexamples/time_in_zone/scripts/download_from_youtube.py1
LOWexamples/compact_mask/benchmark.py15
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
LOWsrc/supervision/__init__.py9
177 more matches not shown…
Decorative Section Separators48 hits · 140 pts
SeverityFileLineSnippet
MEDIUMtests/detection/test_compact_mask_iou.py25# ---------------------------------------------------------------------------
MEDIUMtests/detection/test_compact_mask_iou.py27# ---------------------------------------------------------------------------
MEDIUMtests/detection/test_compact_mask_iou.py385# ---------------------------------------------------------------------------
MEDIUMtests/detection/test_compact_mask_iou.py387# ---------------------------------------------------------------------------
MEDIUMtests/detection/test_compact_mask.py748# ---------------------------------------------------------------------------
MEDIUMtests/detection/test_compact_mask.py750# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py526# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py528# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py549# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py551# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py615# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py617# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py667# ---------------------------------------------------------------------------
MEDIUMtests/detection/utils/test_converters.py669# ---------------------------------------------------------------------------
MEDIUMdocs/theme/main.html24{# ── GEO: JSON-LD structured data ──────────────────────────── #}
MEDIUMdocs/theme/main.html367{# ── How-to FAQ schema ─────────────────────────────────────── #}
MEDIUMdocs/theme/main.html410{# ── GEO: Open Graph + Twitter Card meta tags ──────────────── #}
MEDIUMexamples/compact_mask/benchmark.py221# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py223# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py1106# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py1108# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py1112 # ── parameter matrix ──────────────────────────────────────────────────────
MEDIUMexamples/compact_mask/benchmark.py67# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py69# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py126# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py128# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py311# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py313# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py621# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py623# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py646 # ── memory ──────────────────────────────────────────────────────────────
MEDIUMexamples/compact_mask/benchmark.py684 # ── skip flags ──────────────────────────────────────────────────────────
MEDIUMexamples/compact_mask/benchmark.py865# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py867# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py1055# ══════════════════════════════════════════════════════════════════════════════
MEDIUMexamples/compact_mask/benchmark.py1057# ══════════════════════════════════════════════════════════════════════════════
MEDIUMsrc/supervision/detection/compact_mask.py471 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py473 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py551 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py553 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py616 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py618 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py919 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py921 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py1063 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py1065 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py1188 # ------------------------------------------------------------------
MEDIUMsrc/supervision/detection/compact_mask.py1190 # ------------------------------------------------------------------
Deep Nesting41 hits · 38 pts
SeverityFileLineSnippet
LOWtests/annotators/test_docs.py38
LOWexamples/time_in_zone/scripts/draw_zones.py128
LOWexamples/speed_estimation/ultralytics_example.py39
LOWexamples/speed_estimation/yolo_nas_example.py40
LOWexamples/speed_estimation/inference_example.py40
LOWsrc/supervision/metrics/detection.py451
LOWsrc/supervision/metrics/recall.py155
LOWsrc/supervision/metrics/mean_average_recall.py381
LOWsrc/supervision/metrics/f1_score.py152
LOWsrc/supervision/metrics/precision.py155
LOWsrc/supervision/metrics/mean_average_precision.py459
LOWsrc/supervision/metrics/mean_average_precision.py700
LOWsrc/supervision/metrics/mean_average_precision.py825
LOWsrc/supervision/metrics/mean_average_precision.py1337
LOWsrc/supervision/metrics/mean_average_precision.py1399
LOWsrc/supervision/key_points/core.py531
LOWsrc/supervision/key_points/core.py962
LOWsrc/supervision/key_points/annotators.py256
LOWsrc/supervision/dataset/formats/coco.py204
LOWsrc/supervision/dataset/formats/yolo.py93
LOWsrc/supervision/annotators/core.py1984
LOWsrc/supervision/annotators/core.py2689
LOWsrc/supervision/annotators/core.py2859
LOWsrc/supervision/annotators/utils.py39
LOWsrc/supervision/annotators/utils.py79
LOWsrc/supervision/utils/video.py283
LOWsrc/supervision/validators/__init__.py127
LOWsrc/supervision/assets/downloader.py41
LOWsrc/supervision/detection/line_zone.py769
LOWsrc/supervision/detection/compact_mask.py49
LOWsrc/supervision/detection/compact_mask.py193
LOWsrc/supervision/detection/core.py714
LOWsrc/supervision/detection/core.py2213
LOWsrc/supervision/detection/vlm.py662
LOWsrc/supervision/detection/tools/inference_slicer.py178
LOWsrc/supervision/detection/tools/inference_slicer.py275
LOWsrc/supervision/detection/utils/internal.py54
LOWsrc/supervision/detection/utils/internal.py241
LOWsrc/supervision/detection/utils/internal.py302
LOWsrc/supervision/detection/utils/internal.py356
LOWsrc/supervision/detection/utils/masks.py291
Self-Referential Comments6 hits · 21 pts
SeverityFileLineSnippet
MEDIUMtests/dataset/formats/test_yolo.py326 # Create a small RGB image
MEDIUMtests/dataset/formats/test_yolo.py334 # Create a minimal data.yaml
MEDIUMsrc/supervision/metrics/mean_average_precision.py469 # Create an empty EvaluationDataset object for the predictions
MEDIUMsrc/supervision/metrics/mean_average_precision.py1470 # Create a coco object with the targets
MEDIUMsrc/supervision/metrics/mean_average_precision.py1474 # Create a coco evaluator with the predictions
MEDIUMsrc/supervision/metrics/mean_average_precision.py1508 # Create the final MeanAveragePrecisionResult object
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippet
HIGHdocs/how_to/benchmark_a_model.md58rf = Roboflow(api_key="<YOUR_API_KEY>")
HIGHdocs/how_to/benchmark_a_model.md58rf = Roboflow(api_key="<YOUR_API_KEY>")
HIGHdocs/how_to/benchmark_a_model.md72rf = Roboflow(api_key="<YOUR_API_KEY>")
HIGHdocs/how_to/benchmark_a_model.md72rf = Roboflow(api_key="<YOUR_API_KEY>")
Redundant / Tautological Comments6 hits · 8 pts
SeverityFileLineSnippet
LOWexamples/traffic_analysis/setup.sh6# Check if 'data' directory does not exist and then create it
LOWexamples/count_people_in_zone/setup.sh6# Check if 'data' directory does not exist and then create it
LOWsrc/supervision/metrics/detection.py800 # Check if we are running on NumPy 2.0+ or older
LOWsrc/supervision/metrics/mean_average_precision.py488 # Check if the predictions contain any unsupported keys
LOWsrc/supervision/metrics/mean_average_precision.py961 # Set recall to either the final recall value or 0 (when there
LOWsrc/supervision/detection/compact_mask.py101 # Check if last run has same parity (True/False) as current chunk.
Cross-Language Confusion1 hit · 8 pts
SeverityFileLineSnippet
HIGHtests/detection/test_compact_mask_iou.py195 # Ensure no all-false mask (diagonal would be undefined).
Dead Code2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMsrc/supervision/metrics/recall.py429
MEDIUMsrc/supervision/metrics/precision.py431
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMpyproject.toml142# Enable linting rules for code style, imports, and best practices.
Excessive Try-Catch Wrapping3 hits · 3 pts
SeverityFileLineSnippet
LOWsrc/supervision/utils/video.py198 except Exception as exc:
LOWsrc/supervision/utils/video.py417 except Exception as exc:
LOWsrc/supervision/detection/vlm.py289 except Exception:
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippet
LOWsrc/supervision/utils/internal.py141 def my_method(cls):