Repository Analysis

ultralytics/ultralytics

Ultralytics YOLO26, YOLO11, YOLOv8 — object detection, instance segmentation, semantic segmentation, image classification, pose estimation, object tracking

16.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ultralytics/ultralytics, a Python project with 61,043 GitHub stars. SynthScan v2.0 examined 197,483 lines of code across 999 source files, recording 1587 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 16.2 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

16.2
Adjusted Score
16.2
Raw Score
100%
Time Factor
2026-08-28
Last Push
61.0K
Stars
Python
Language
197.5K
Lines of Code
999
Files
1.6K
Pattern Hits
2026-08-29
Scan Date
0.39
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 393MEDIUM 45LOW 1148

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1587 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Docstring Block Structure325 hits · 1602 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md64Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argument. arg2 STRING
HIGHCONTRIBUTING.md85Example function demonstrating Google-style docstrings. Args: arg1: The first argument. arg2: The sSTRING
HIGHdocs/en/help/contributing.md73Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumenSTRING
HIGHdocs/en/help/contributing.md95Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumenSTRING
HIGHdocs/en/help/contributing.md117Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumenSTRING
HIGHdocs/en/help/contributing.md158Example function demonstrating Google-style docstrings. Args: arg1: The first argument. STRING
HIGHultralytics/nn/tasks.py1548Context manager for temporarily adding or modifying modules in Python's module cache (`sys.modules`). This functionSTRING
HIGHultralytics/nn/tasks.py1760Attempt to load a PyTorch model with the torch.load() function. If a ModuleNotFoundError is raised, it catches the eSTRING
HIGHultralytics/nn/text_model.py87Convert input texts to CLIP tokens. Args: texts (str | list[str]): Input text or list of texts to tSTRING
HIGHultralytics/nn/text_model.py108Encode tokenized texts into normalized feature vectors. This method processes tokenized text inputs through theSTRING
HIGHultralytics/nn/text_model.py133Encode images into normalized feature vectors. This method processes image inputs through the CLIP model to genSTRING
HIGHultralytics/nn/text_model.py218Convert input texts to MobileCLIP tokens. Args: texts (list[str]): List of text strings to tokenizeSTRING
HIGHultralytics/nn/text_model.py234Encode tokenized texts into normalized feature vectors. Args: texts (torch.Tensor): Tokenized text STRING
HIGHultralytics/nn/text_model.py295Convert input texts to MobileCLIP tokens. Args: texts (list[str]): List of text strings to tokenizeSTRING
HIGHultralytics/nn/text_model.py316Encode tokenized texts into normalized feature vectors. Args: texts (torch.Tensor): Tokenized text STRING
HIGHultralytics/nn/text_model.py337Build a text encoding model based on the specified variant. Args: variant (str): Model variant in format "bSTRING
HIGHultralytics/nn/autobackend.py41Check class names and convert to dict format if needed. Args: names (list | dict): Class names as list or dSTRING
HIGHultralytics/nn/autobackend.py241Delegate attribute access to the backend. This allows AutoBackend to transparently expose backend attributes STRING
HIGHultralytics/nn/autobackend.py336Take a path to a model file and return the model format string. Args: p (str): Path to the model fiSTRING
HIGHultralytics/nn/modules/utils.py16Create a list of cloned modules from the given module. Args: module (nn.Module): The module to be cloned. STRING
HIGHultralytics/nn/modules/utils.py36Initialize conv/fc bias value according to a given probability value. This function calculates the bias initializatSTRING
HIGHultralytics/nn/modules/utils.py78Calculate the inverse sigmoid function for a tensor. This function applies the inverse of the sigmoid function to aSTRING
HIGHultralytics/nn/modules/block.py1445C2PSA module with attention mechanism for enhanced feature extraction and processing. This module implements a convSTRING
HIGHultralytics/solutions/object_blurrer.py50Apply a blurring effect to detected objects in the input image. This method extracts tracking information, applSTRING
HIGHultralytics/solutions/security_alarm.py116Monitor the frame, process object detections, and trigger alerts if thresholds are met. This method processes tSTRING
HIGHultralytics/solutions/distance_calculation.py71Process a video frame and calculate the distance between two selected bounding boxes. This method extracts tracSTRING
HIGHultralytics/solutions/trackzone.py50Process the input frame to track objects within a defined region. This method initializes the annotator, createSTRING
HIGHultralytics/solutions/object_counter.py153Process input data (frames or object tracks) and update object counts. This method initializes the counting regSTRING
HIGHultralytics/solutions/instance_segmentation.py52Perform instance segmentation on the input image and annotate the results. Args: im0 (np.ndarray): STRING
HIGHultralytics/solutions/similarity_search.py137Return top-k semantically similar images to the given query. Args: query (str): Natural language teSTRING
HIGHultralytics/solutions/queue_management.py48Process queue management for a single frame of video. Args: im0 (np.ndarray): Input image for proceSTRING
HIGHultralytics/solutions/parking_management.py222Process the input image for parking lot management and visualization. This function analyzes the input image, eSTRING
HIGHultralytics/solutions/ai_gym.py56Monitor workouts using Ultralytics YOLO Pose Model. This function processes an input image to track and analyzeSTRING
HIGHultralytics/solutions/vision_eye.py39Perform object detection, vision mapping, and annotation on the input image. Args: im0 (np.ndarray)STRING
HIGHultralytics/solutions/object_cropper.py51Crop detected objects from the input image and save them as separate images. Args: im0 (np.ndarray)STRING
HIGHultralytics/solutions/solutions.py212Return the axis-aligned box [x1, y1, x2, y2] enclosing a box extracted by `extract_tracks`. Boxes from OBB modeSTRING
HIGHultralytics/solutions/solutions.py240Display the results of the processing, which could involve showing frames, printing counts, or saving results. STRING
HIGHultralytics/solutions/solutions.py498Draw specific keypoints for gym steps counting. Args: keypoints (list[list[float]]): Keypoints dataSTRING
HIGHultralytics/solutions/analytics.py96Process image data and run object tracking to update analytics charts. Args: im0 (np.ndarray): InpuSTRING
HIGHultralytics/solutions/analytics.py141Update the graph with new data for single or multiple classes. Args: frame_number (int): The currenSTRING
HIGHultralytics/solutions/speed_estimation.py71Process an input frame to estimate object speeds based on tracking data. Args: im0 (np.ndarray): InSTRING
HIGHultralytics/optim/muon.py10Compute the zeroth power / orthogonalization of matrix G using Newton-Schulz iteration. This function implements a STRING
HIGHultralytics/optim/muon.py58Compute Muon optimizer updates with momentum and orthogonalization. This function applies momentum to the gradientsSTRING
HIGHultralytics/optim/muon.py117Hybrid optimizer combining Muon and SGD updates for neural network training. This optimizer implements a combinatioSTRING
HIGHultralytics/optim/muon.py198Perform a single optimization step. Applies either hybrid Muon+SGD updates or pure SGD updates depending on theSTRING
HIGHultralytics/optim/muon.py255Muon optimizer for usage in non-distributed settings. This optimizer implements the Muon algorithm, which combines STRING
HIGHultralytics/optim/muon.py298Perform a single optimization step. Applies Muon updates to all parameters, incorporating momentum and orthogonSTRING
HIGHultralytics/utils/instance.py37A class for handling bounding boxes in multiple formats. The class supports various bounding box formats like 'xyxySTRING
HIGHultralytics/utils/instance.py142Concatenate a list of Bboxes objects into a single Bboxes object. Args: boxes_list (list[Bboxes]): STRING
HIGHultralytics/utils/instance.py164Retrieve a specific bounding box or a set of bounding boxes using indexing. Args: index (int | slicSTRING
HIGHultralytics/utils/instance.py467Concatenate a list of Instances objects into a single Instances object. Args: instances_list (list[STRING
HIGHultralytics/utils/metrics.py239Calculate probabilistic IoU between oriented bounding boxes. Args: obb1 (torch.Tensor): Ground truth OBBs, STRING
HIGHultralytics/utils/metrics.py618Generate a summarized representation of the confusion matrix as a list of dictionaries, with optional normalizatSTRING
HIGHultralytics/utils/metrics.py1233Generate a summarized representation of per-class detection metrics as a list of dictionaries. Includes shared sSTRING
HIGHultralytics/utils/metrics.py1390Generate a summarized representation of per-class segmentation metrics as a list of dictionaries. Includes both STRING
HIGHultralytics/utils/metrics.py1541Generate a summarized representation of per-class pose metrics as a list of dictionaries. Includes both box and STRING
HIGHultralytics/utils/metrics.py1630Generate a single-row summary of classification metrics (Top-1 and Top-5 accuracy). Args: normalizeSTRING
HIGHultralytics/utils/files.py58Context manager to handle paths with spaces in their names. If a path contains spaces, it replaces them with undersSTRING
HIGHultralytics/utils/files.py107Increment a file or directory path, i.e., runs/exp --> runs/exp{sep}2, runs/exp{sep}3, ... etc. If the path exists STRING
HIGHultralytics/utils/git.py11Represent a local Git repository and expose branch, commit, and remote metadata. This class discovers the repositorSTRING
265 more matches not shown…
Unused Imports441 hits · 407 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py6CODE
LOWdocs/build_docs.py4CODE
LOWdocs/build_reference.py11CODE
LOWexamples/YOLO-Axelera-Python/yolo11-seg.py19CODE
LOWexamples/YOLO-Axelera-Python/yolo26-pose-tracker.py30CODE
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py3CODE
LOWexamples/YOLOv8-OpenCV-ONNX-Python/main.py3CODE
LOWexamples/YOLOv8-ONNXRuntime/main.py3CODE
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py3CODE
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py3CODE
LOWexamples/RTDETR-ONNXRuntime-Python/main.py3CODE
LOWexamples/YOLOv8-Segmentation-ONNXRuntime-Python/main.py3CODE
LOW.github/scripts/create-export-env.py4CODE
LOWultralytics/__init__.py14CODE
LOWultralytics/__init__.py15CODE
LOWultralytics/__init__.py16CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py35CODE
LOWultralytics/__init__.py36CODE
LOWultralytics/__init__.py36CODE
LOWultralytics/__init__.py36CODE
LOWultralytics/__init__.py36CODE
LOWultralytics/nn/tasks.py3CODE
LOWultralytics/nn/text_model.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/__init__.py3CODE
LOWultralytics/nn/distill_model.py3CODE
LOWultralytics/nn/autobackend.py3CODE
LOWultralytics/nn/autobackend.py319CODE
LOWultralytics/nn/backends/deepx.py3CODE
LOWultralytics/nn/backends/qnn.py3CODE
LOWultralytics/nn/backends/triton.py3CODE
LOWultralytics/nn/backends/coreai.py3CODE
LOWultralytics/nn/backends/paddle.py3CODE
LOWultralytics/nn/backends/onnx.py3CODE
LOWultralytics/nn/backends/onnx.py188CODE
LOWultralytics/nn/backends/openvino.py3CODE
LOWultralytics/nn/backends/__init__.py9CODE
LOWultralytics/nn/backends/__init__.py10CODE
LOWultralytics/nn/backends/__init__.py11CODE
LOWultralytics/nn/backends/__init__.py12CODE
LOWultralytics/nn/backends/__init__.py13CODE
LOWultralytics/nn/backends/__init__.py14CODE
LOWultralytics/nn/backends/__init__.py15CODE
LOWultralytics/nn/backends/__init__.py16CODE
LOWultralytics/nn/backends/__init__.py17CODE
381 more matches not shown…
Magic Placeholder Names68 hits · 368 pts
SeverityFileLineSnippetContext
HIGHdocs/en/platform/quickstart.md321 api_key = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/quickstart.md339 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/quickstart.md408export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md134 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md147 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md191 api_key = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md209 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/index.md227 headers: { Authorization: "Bearer YOUR_API_KEY" },CODE
HIGHdocs/en/platform/index.md395 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md408 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/index.md423 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/deploy/inference.md159Authorization: Bearer YOUR_API_KEYCODE
HIGHdocs/en/platform/deploy/inference.md200 headers = {"Authorization": "Bearer YOUR_API_KEY"}CODE
HIGHdocs/en/platform/deploy/inference.md213 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/deploy/inference.md233 headers: { Authorization: "Bearer YOUR_API_KEY" },CODE
HIGHdocs/en/platform/deploy/inference.md513 headers = {"Authorization": "Bearer YOUR_API_KEY"}CODE
HIGHdocs/en/platform/deploy/endpoints.md332Authorization: Bearer YOUR_API_KEYCODE
HIGHdocs/en/platform/deploy/endpoints.md369 headers = {"Authorization": "Bearer YOUR_API_KEY"}CODE
HIGHdocs/en/platform/deploy/endpoints.md396 headers: { Authorization: "Bearer YOUR_API_KEY" },CODE
HIGHdocs/en/platform/deploy/endpoints.md410 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/deploy/monitoring.md175owners, the deployment's bound API key is inserted, ready to copy and run. Non-owners see a `YOUR_API_KEY`CODE
HIGHdocs/en/platform/deploy/monitoring.md187 headers = {"Authorization": "Bearer YOUR_API_KEY"}CODE
HIGHdocs/en/platform/deploy/monitoring.md214 headers: { Authorization: "Bearer YOUR_API_KEY" },CODE
HIGHdocs/en/platform/deploy/monitoring.md228 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/integrations/azure-blob-storage.md94 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/integrations/amazon-s3.md114 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/integrations/google-cloud-storage.md96 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/train/cloud-training.md263export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/train/index.md131 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/api/index.md21 curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md34 client = Platform(api_key="YOUR_API_KEY")CODE
HIGHdocs/en/platform/api/index.md102Authorization: Bearer YOUR_API_KEYCODE
HIGHdocs/en/platform/api/index.md116 curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md125 client = Platform(api_key="YOUR_API_KEY") # or set ULTRALYTICS_API_KEYCODE
HIGHdocs/en/platform/api/index.md134 headers: { Authorization: "Bearer YOUR_API_KEY" },CODE
HIGHdocs/en/platform/api/index.md305 curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md925 headers = {"Authorization": "Bearer YOUR_API_KEY"}CODE
HIGHdocs/en/platform/api/index.md1168 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md1405 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md1527 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md1625 -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md2425 yolo login YOUR_API_KEYCODE
HIGHdocs/en/platform/api/index.md2431 export ULTRALYTICS_API_KEY=YOUR_API_KEYCODE
HIGHdocs/en/platform/api/index.md2439 settings.update({"api_key": "YOUR_API_KEY"})CODE
HIGHdocs/en/platform/api/index.md2557curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/api/index.md2570curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/account/api-keys.md77 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/account/api-keys.md83 $env:ULTRALYTICS_API_KEY = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/account/api-keys.md91yolo login YOUR_API_KEYCODE
HIGHdocs/en/platform/account/api-keys.md101curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/account/api-keys.md110client = Platform(api_key="YOUR_API_KEY")CODE
HIGHdocs/en/platform/account/api-keys.md126export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/account/trash.md171 curl -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/account/trash.md185 curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/account/trash.md198 curl -X DELETE -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/account/trash.md211 curl -X DELETE -H "Authorization: Bearer YOUR_API_KEY" \CODE
HIGHdocs/en/platform/data/index.md181 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/platform/data/index.md190 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"CODE
HIGHdocs/en/platform/data/datasets.md754 export ULTRALYTICS_API_KEY="YOUR_API_KEY"CODE
HIGHdocs/en/datasets/explorer/index.md102yolo settings openai_api_key="YOUR_API_KEY"CODE
8 more matches not shown…
Hyper-Verbose Identifiers179 hits · 157 pts
SeverityFileLineSnippetContext
LOWtests/test_solutions.py218def test_object_counter_polygon_direction(region, step, expected):CODE
LOWtests/test_solutions.py233def test_object_counter_polygon_reversal_at_entry():CODE
LOWtests/test_solutions.py248def test_object_counter_polygon_reentry_after_inside_spawn():CODE
LOWtests/test_solutions.py261def test_left_click_selection():CODE
LOWtests/test_solutions.py269def test_left_click_selection_obb():CODE
LOWtests/test_solutions.py308def test_object_blurrer_obb_outside_frame():CODE
LOWtests/test_solutions.py339def test_analytics_graph_not_supported():CODE
LOWtests/test_solutions.py357def test_config_update_method_with_invalid_argument():CODE
LOWtests/test_solutions.py375def test_streamlit_handle_video_upload_creates_file(tmp_path):CODE
LOWtests/test_solutions.py408def test_similarity_search_app_init():CODE
LOWtests/test_solutions.py417def test_similarity_search_complete(tmp_path):CODE
LOWtests/test_solutions.py431def test_distance_calculation_process_method():CODE
LOWtests/test_solutions.py456def test_display_output_method():CODE
LOWtests/test_ndjson_converter.py75def test_convert_depth_ndjson_downloads_image_target_pairs(tmp_path, depth_server):CODE
LOWtests/test_ndjson_converter.py96def test_convert_depth_ndjson_preserves_scale(tmp_path, depth_server):CODE
LOWtests/test_ndjson_converter.py107def test_convert_depth_ndjson_reuses_existing_conversion(tmp_path, depth_server, monkeypatch):CODE
LOWtests/test_ndjson_converter.py127def test_convert_depth_ndjson_removes_incomplete_pair(tmp_path, depth_server):CODE
LOWtests/test_ndjson_converter.py142def test_convert_depth_ndjson_rejects_missing_url(tmp_path):CODE
LOWtests/test_ndjson_converter.py161def test_convert_ndjson_preserves_non_depth_auto_split(tmp_path, depth_server):CODE
LOWtests/test_engine.py227def test_load_checkpoint_state_dict_rejected(ckpt, tmp_path):CODE
LOWtests/test_engine.py276def test_checkpoint_nonfinite_ema_resync():CODE
LOWtests/test_engine.py295def test_checkpoint_nonfinite_ema_and_model_sanitized():CODE
LOWtests/test_engine.py320def test_train_reuses_loaded_checkpoint_model(monkeypatch, kwargs, uses_weights):CODE
LOWtests/test_engine.py362def test_train_multi_custom_trainer_metrics_and_failure_keys(monkeypatch, tmp_path):CODE
LOWtests/test_engine.py395def test_setup_model_respects_pretrained_arg_for_pt_models(monkeypatch, pretrained, uses_weights):CODE
LOWtests/conftest.py55def pytest_collection_modifyitems(config, items):CODE
LOWtests/test_exports.py99def test_quantize_canonicalization():CODE
LOWtests/test_exports.py128def test_quantize_deprecation():CODE
LOWtests/test_exports.py138def test_benchmark_forwards_legacy_precision(monkeypatch):CODE
LOWtests/test_exports.py172def test_export_rknn_batch_expansion(monkeypatch, tmp_path):CODE
LOWtests/test_exports.py249def test_export_openvino_matrix(task, dynamic, quantize, batch, nms, end2end):CODE
LOWtests/test_exports.py296def test_export_onnx_semantic_dnn():CODE
LOWtests/test_exports.py316def test_export_torchscript_matrix(task, dynamic, batch, nms, end2end, tmp_path):CODE
LOWtests/test_exports.py345def test_export_coreml_matrix(task, dynamic, quantize, nms, batch, end2end):CODE
LOWtests/test_exports.py414def test_export_coreml_rtdetr():CODE
LOWtests/test_exports.py465def test_export_mnn_rejects_unsupported_nms(model, kwargs, error):CODE
LOWtests/test_exports.py570def test_export_litert_matrix(task, quantize):CODE
LOWtests/test_exports.py593def test_export_executorch_matrix(task):CODE
LOWtests/test_exports.py634def test_export_env_has_smoke(env):CODE
LOWtests/test_exports.py639def test_every_format_env_is_registered():CODE
LOWtests/test_python.py98def test_dataloader_empty_dataset_uses_dataloader_validation():CODE
LOWtests/test_python.py104def test_build_yolo_dataset_hyp_isolated():CODE
LOWtests/test_python.py112def test_cfg_rejects_fuzzed_values():CODE
LOWtests/test_python.py48def test_dataloader_caps_workers_to_batches():CODE
LOWtests/test_python.py63def test_dataloader_cap_preserves_distributed_drop_last(monkeypatch):CODE
LOWtests/test_python.py82def test_dataloader_seed_varies_sampling_order():CODE
LOWtests/test_python.py200def test_restricted_load_threaded():CODE
LOWtests/test_python.py236def test_model_load_remaps_cls_head_by_names():CODE
LOWtests/test_python.py291def test_predict_csv_multi_row(tmp_path):CODE
LOWtests/test_python.py303def test_predict_csv_single_row(tmp_path):CODE
LOWtests/test_python.py338def test_predict_classes_with_max_det(model_name):CODE
LOWtests/test_python.py393def test_predict_ndarray_channels():CODE
LOWtests/test_python.py409def test_predict_all_image_formats():CODE
LOWtests/test_python.py446def test_track_second_association_indices():CODE
LOWtests/test_python.py462def test_track_split_detections_degenerate_boxes():CODE
LOWtests/test_python.py486def test_track_second_association_low_conf_keeps_id(tracker_type):CODE
LOWtests/test_python.py505def test_tracktrack_new_lifecycle():CODE
LOWtests/test_python.py538def test_track_reid_auto_user_detections(tracker_type):CODE
LOWtests/test_python.py554def test_deepocsort_ocr_proximity_gate(fuse_score):CODE
LOWtests/test_python.py700def test_normalize_platform_uri():CODE
119 more matches not shown…
Excessive Try-Catch Wrapping144 hits · 151 pts
SeverityFileLineSnippetContext
LOWtests/test_exports.py215 except Exception as error: # pragma: no cover - assertion handled belowCODE
LOWdocs/build_reference.py196 except Exception:CODE
LOWdocs/build_reference.py701 except Exception:CODE
LOWdocs/en/datasets/detect/roboflow-100.md89 except Exception as e:CODE
MEDIUMdocs/en/usage/simple-utilities.md492 print("Error: Could not open video.")CODE
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md123 except Exception as e:CODE
MEDIUMdocs/en/guides/vertex-ai-deployment-with-docker.md124 print(f"Error initializing YOLO model: {e}")CODE
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md203 except Exception as e:CODE
MEDIUMdocs/en/guides/vertex-ai-deployment-with-docker.md205 print(f"Error in YOLO detection: {e}")CODE
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md351 except Exception as e:CODE
LOW.github/workflows/merge-main-into-prs.yml76 except Exception as update_error:CODE
LOW.github/workflows/merge-main-into-prs.yml82 except Exception as e:CODE
LOWultralytics/nn/tasks.py1678 except Exception as e:CODE
LOWultralytics/nn/tasks.py1712 except Exception: # noqa: S112 # optional/oddball submodule — skipCODE
LOWultralytics/nn/autobackend.py88 except Exception:CODE
LOWultralytics/nn/backends/tensorrt.py60 except Exception:CODE
LOWultralytics/nn/backends/coreml.py42 except Exception:CODE
LOWultralytics/nn/backends/base.py191 except Exception: # a third-party, truncated or metadata-less artifactCODE
LOWultralytics/solutions/security_alarm.py112 except Exception as e:CODE
LOWultralytics/solutions/similarity_search.py122 except Exception as e:CODE
LOWultralytics/utils/autobatch.py134 except Exception as e:CODE
LOWultralytics/utils/events.py32 except Exception:CODE
LOWultralytics/utils/events.py152 except Exception:CODE
LOWultralytics/utils/events.py181 except Exception:CODE
LOWultralytics/utils/checks.py141 except Exception as error:CODE
LOWultralytics/utils/checks.py226 except Exception as e:CODE
LOWultralytics/utils/checks.py419 except Exception:CODE
LOWultralytics/utils/checks.py440 except Exception:CODE
LOWultralytics/utils/checks.py509 except Exception:CODE
LOWultralytics/utils/checks.py639 except Exception as e:CODE
LOWultralytics/utils/checks.py874 except Exception as e:CODE
LOWultralytics/utils/checks.py1076 except Exception:CODE
LOWultralytics/utils/checks.py1175 except Exception: # broad clause to capture all Intel GPU exception typesCODE
LOWultralytics/utils/plotting.py324 except Exception:CODE
LOWultralytics/utils/plotting.py1006 except Exception:CODE
LOWultralytics/utils/plotting.py1091 except Exception as e:CODE
LOWultralytics/utils/cpu.py76 except Exception:CODE
LOWultralytics/utils/cpu.py82 except Exception:CODE
LOWultralytics/utils/__init__.py660 except Exception as e:CODE
LOWultralytics/utils/__init__.py665 except Exception:CODE
LOWultralytics/utils/__init__.py805 except Exception:CODE
LOWultralytics/utils/__init__.py834 except Exception:CODE
LOWultralytics/utils/__init__.py1150 except Exception as e:CODE
LOWultralytics/utils/__init__.py1310 except Exception as e:CODE
LOWultralytics/utils/__init__.py1319 except Exception as e:CODE
LOWultralytics/utils/__init__.py240 except Exception:STRING
LOWultralytics/utils/logger.py103 except Exception:CODE
LOWultralytics/utils/logger.py125 except Exception:CODE
LOWultralytics/utils/logger.py208 except Exception:CODE
LOWultralytics/utils/logger.py227 except Exception as e:CODE
LOWultralytics/utils/logger.py472 except Exception as e:CODE
LOWultralytics/utils/logger.py613 except Exception:CODE
LOWultralytics/utils/tqdm.py303 except Exception: # streams without a usable fileno (io.StringIO, wrapped stdout)CODE
LOWultralytics/utils/tqdm.py314 except Exception:CODE
LOWultralytics/utils/tqdm.py363 except Exception:CODE
LOWultralytics/utils/tqdm.py390 except Exception:CODE
LOWultralytics/utils/tqdm.py404 except Exception:CODE
LOWultralytics/utils/tqdm.py414 except Exception:CODE
LOWultralytics/utils/downloads.py74 except Exception:CODE
LOWultralytics/utils/downloads.py401 except Exception as e:CODE
84 more matches not shown…
Deep Nesting137 hits · 128 pts
SeverityFileLineSnippetContext
LOWtests/test_solutions.py180CODE
LOWdocs/build_docs.py44CODE
LOWdocs/build_reference.py697CODE
LOWexamples/YOLO-Axelera-Python/yolo11-seg.py59CODE
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py86CODE
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py71CODE
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py115CODE
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py314CODE
LOW.github/scripts/fuzz.py413CODE
LOW.github/scripts/fuzz.py442CODE
LOW.github/scripts/fuzz.py735CODE
LOW.github/scripts/fuzz.py922CODE
LOW.github/scripts/fuzz.py754CODE
LOWultralytics/nn/tasks.py1759CODE
LOWultralytics/nn/tasks.py1951CODE
LOWultralytics/nn/tasks.py2200CODE
LOWultralytics/nn/tasks.py236CODE
LOWultralytics/nn/tasks.py858CODE
LOWultralytics/nn/tasks.py1146CODE
LOWultralytics/nn/autobackend.py335CODE
LOWultralytics/nn/backends/onnx.py57CODE
LOWultralytics/nn/backends/tensorflow.py92CODE
LOWultralytics/nn/backends/rknn.py54CODE
LOWultralytics/nn/backends/tensorrt.py24CODE
LOWultralytics/nn/backends/litert.py47CODE
LOWultralytics/nn/backends/base.py153CODE
LOWultralytics/nn/modules/conv.py448CODE
LOWultralytics/solutions/distance_calculation.py44CODE
LOWultralytics/solutions/distance_calculation.py70CODE
LOWultralytics/solutions/object_counter.py54CODE
LOWultralytics/solutions/ai_gym.py55CODE
LOWultralytics/solutions/streamlit_inference.py126CODE
LOWultralytics/solutions/analytics.py138CODE
LOWultralytics/solutions/speed_estimation.py70CODE
LOWultralytics/optim/muon.py197CODE
LOWultralytics/utils/instance.py375CODE
LOWultralytics/utils/metrics.py105CODE
LOWultralytics/utils/metrics.py539CODE
LOWultralytics/utils/files.py57CODE
LOWultralytics/utils/autobatch.py53CODE
LOWultralytics/utils/events.py95CODE
LOWultralytics/utils/checks.py77CODE
LOWultralytics/utils/checks.py243CODE
LOWultralytics/utils/checks.py312CODE
LOWultralytics/utils/checks.py531CODE
LOWultralytics/utils/checks.py723CODE
LOWultralytics/utils/checks.py765CODE
LOWultralytics/utils/checks.py1140CODE
LOWultralytics/utils/plotting.py829CODE
LOWultralytics/utils/plotting.py1047CODE
LOWultralytics/utils/plotting.py287CODE
LOWultralytics/utils/plotting.py555CODE
LOWultralytics/utils/cpu.py51CODE
LOWultralytics/utils/__init__.py446CODE
LOWultralytics/utils/__init__.py945CODE
LOWultralytics/utils/logger.py289CODE
LOWultralytics/utils/downloads.py296CODE
LOWultralytics/utils/downloads.py496CODE
LOWultralytics/utils/ops.py666CODE
LOWultralytics/utils/loss.py501CODE
77 more matches not shown…
Structural Annotation Overuse77 hits · 106 pts
SeverityFileLineSnippetContext
LOWdocs/en/platform/train/cloud-training.md34### Step 1: Select Base ModelCOMMENT
LOWdocs/en/platform/train/cloud-training.md50### Step 2: Select DatasetCOMMENT
LOWdocs/en/platform/train/cloud-training.md70### Step 3: Configure ParametersCOMMENT
LOWdocs/en/platform/train/cloud-training.md88### Step 4: Advanced Settings (Optional)COMMENT
LOWdocs/en/platform/train/cloud-training.md129### Step 5: Select GPU (Cloud Tab)COMMENT
LOWdocs/en/platform/train/cloud-training.md160### Step 6: Start TrainingCOMMENT
LOWdocs/en/integrations/neural-magic.md72### Step 1: InstallationCOMMENT
LOWdocs/en/integrations/neural-magic.md85### Step 2: Exporting YOLO26 to ONNX FormatCOMMENT
LOWdocs/en/integrations/neural-magic.md100### Step 3: Deploying and Running InferencesCOMMENT
LOWdocs/en/integrations/neural-magic.md122### Step 4: Benchmarking PerformanceCOMMENT
LOWdocs/en/integrations/neural-magic.md135### Step 5: Additional FeaturesCOMMENT
LOWdocs/en/integrations/jupyterlab.md54### Step 1: Install JupyterLabCOMMENT
LOWdocs/en/integrations/jupyterlab.md67### Step 2: Download the YOLO26 Tutorial NotebookCOMMENT
LOWdocs/en/integrations/jupyterlab.md71### Step 3: Launch JupyterLabCOMMENT
LOWdocs/en/integrations/jupyterlab.md87### Step 4: Start ExperimentingCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md48### Step 1: Set Up Your EnvironmentCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md56### Step 2: Install and Import Relevant LibrariesCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md87### Step 3: Load the DataCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md142### Step 4: Preprocess the DataCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md239### Step 5: Train the YOLO26 modelCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md262### Step 6: Test the ModelCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md295### Step 7: Evaluate the ModelCOMMENT
LOWdocs/en/integrations/ibm-watsonx.md313### Step 8: Calculating [Intersection Over Union](https://www.ultralytics.com/glossary/intersection-over-union-iou)COMMENT
LOWdocs/en/integrations/amazon-sagemaker.md30### Step 1: Setup Your AWS EnvironmentCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md44### Step 2: Clone the YOLO26 SageMaker RepositoryCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md60### Step 3: Set Up the CDK EnvironmentCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md88### Step 4: Create the AWS CloudFormation StackCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md108### Step 5: Deploy the YOLO ModelCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md142### Step 6: Testing Your DeploymentCOMMENT
LOWdocs/en/integrations/amazon-sagemaker.md156### Step 7: Monitoring and ManagementCOMMENT
LOW…olov5/environments/docker-image-quickstart-tutorial.md73## Step 1: Pull the YOLOv5 Docker ImageCOMMENT
LOW…olov5/environments/docker-image-quickstart-tutorial.md87## Step 2: Run the Docker ContainerCOMMENT
LOW…olov5/environments/docker-image-quickstart-tutorial.md125## Step 3: Use YOLOv5 🚀 within the Docker ContainerCOMMENT
LOW…olov5/environments/google-cloud-quickstart-tutorial.md16## Step 1: Create and Configure Your Deep Learning VMCOMMENT
LOW…olov5/environments/google-cloud-quickstart-tutorial.md31## Step 2: Prepare the VM for YOLOv5COMMENT
LOW…olov5/environments/google-cloud-quickstart-tutorial.md46## Step 3: Train and Deploy Your YOLOv5 ModelsCOMMENT
LOWdocs/en/yolov5/environments/aws-quickstart-tutorial.md14## Step 1: AWS Console Sign-InCOMMENT
LOWdocs/en/yolov5/environments/aws-quickstart-tutorial.md20## Step 2: Launch Your InstanceCOMMENT
LOWdocs/en/yolov5/environments/aws-quickstart-tutorial.md52## Step 3: Connect to Your InstanceCOMMENT
LOWdocs/en/yolov5/environments/aws-quickstart-tutorial.md58## Step 4: Running Ultralytics YOLOv5COMMENT
LOWdocs/en/guides/nvidia-dali.md337### Step 1: Create the DALI PipelineCOMMENT
LOWdocs/en/guides/nvidia-dali.md384### Step 2: Export YOLO to TensorRTCOMMENT
LOWdocs/en/guides/nvidia-dali.md396### Step 3: Configure TritonCOMMENT
LOWdocs/en/guides/nvidia-dali.md496### Step 4: Send Inference RequestsCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md43## Step 1: Defining Your Project's GoalsCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md84## Step 2: Data Collection and Data AnnotationCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md102## Step 3: Data Augmentation and Splitting Your DatasetCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md124## Step 4: Model TrainingCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md139## Step 5: Model Evaluation and Fine-TuningCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md149## Step 6: Model TestingCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md157## Step 7: Model DeploymentCOMMENT
LOWdocs/en/guides/steps-of-a-cv-project.md168## Step 8: Monitoring, Maintenance, and DocumentationCOMMENT
LOWexamples/YOLO-Interactive-Tracking-UI/README.md54### Step 1: Download, Convert, or Specify ModelCOMMENT
LOWexamples/YOLO-Interactive-Tracking-UI/README.md64### Step 2: Configure the ScriptCOMMENT
LOWexamples/YOLO-Interactive-Tracking-UI/README.md98### Step 3: Run the Object TrackingCOMMENT
LOWultralytics/models/sam/predict.py1708 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWultralytics/models/sam/predict.py1717 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWultralytics/models/sam/predict.py2830 # Step 1: run backbone and detector in a distributed manner -- this is done via Sam3ImageOnVideoMultiGPU,COMMENT
LOWultralytics/models/sam/predict.py2839 # Step 2: each GPU propagates its local SAM2 states to get the SAM2 prediction masks.COMMENT
LOWultralytics/models/sam/predict.py2873 # Step 4: based on `tracker_update_plan`, each GPU executes the update w.r.t. its local SAM2 inference statesCOMMENT
17 more matches not shown…
Self-Referential Comments30 hits · 74 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_cli.py165 # Create a FastSAM modelCOMMENT
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py107 # Create the label text with class name and scoreCOMMENT
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py260 # Create an argument parser to handle command-line argumentsCOMMENT
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py271 # Create an instance of the YOLOv8 class with the specified argumentsCOMMENT
MEDIUMexamples/RTDETR-ONNXRuntime-Python/main.py139 # Create the label text with class name and scoreCOMMENT
MEDIUMexamples/RTDETR-ONNXRuntime-Python/main.py292 # Create the detector instance with specified parametersCOMMENT
MEDIUMultralytics/solutions/heatmap.py65 # Create a meshgrid with region of interest (ROI) for vectorized distance calculationsCOMMENT
MEDIUMultralytics/solutions/heatmap.py71 # Create a mask of points within the radiusCOMMENT
MEDIUMultralytics/solutions/security_alarm.py94 # Create the emailCOMMENT
MEDIUMultralytics/solutions/trackzone.py69 if self.mask is None: # Create a mask for the regionCODE
MEDIUMultralytics/solutions/streamlit_inference.py206 self.sidebar() # Create the sidebarCODE
MEDIUMultralytics/solutions/streamlit_inference.py259 # Create an instance of the Inference class and run inferenceCOMMENT
MEDIUMultralytics/solutions/analytics.py223 # Create the legend using labels from the barsCOMMENT
MEDIUMultralytics/utils/files.py79 # Create a temporary directory and construct the new pathCOMMENT
MEDIUMultralytics/utils/loss.py747 # Create a tensor to hold batched keypointsCOMMENT
MEDIUMultralytics/utils/patches.py145 >>> img = np.zeros((100, 100, 3), dtype=np.uint8) # Create a black imageSTRING
MEDIUMultralytics/utils/patches.py170 >>> img = np.zeros((300, 300, 3), dtype=np.uint8) # Create a black imageSTRING
MEDIUMultralytics/utils/tuner.py457 # Define the trainable function with allocated resourcesCOMMENT
MEDIUMultralytics/utils/tuner.py460 # Define the scheduler for hyperparameter searchCOMMENT
MEDIUMultralytics/utils/tuner.py479 # Create the Ray Tune hyperparameter search tunerCOMMENT
MEDIUMultralytics/models/sam/amg.py211 >>> mask[40:60, 40:60] = True # Create a squareSTRING
MEDIUMultralytics/models/sam/amg.py212 >>> mask[45:55, 45:55] = False # Create a holeSTRING
MEDIUMultralytics/models/sam/predict.py1920 # Initialize the object index set and mappingsCOMMENT
MEDIUMultralytics/models/sam/build_sam3.py239 # Create the SAM3SemanticModel modelCOMMENT
MEDIUMultralytics/models/sam/sam3/vitdet.py314 """This module implements Vision Transformer (ViT) backbone in :paper:`vitdet`. "Exploring Plain Vision TransformerSTRING
MEDIUMultralytics/models/utils/ops.py156 # This function is for future RT-DETR Segment modelsCOMMENT
MEDIUMultralytics/models/utils/loss.py155 # This function is for future RT-DETR Segment modelsCOMMENT
MEDIUMultralytics/models/utils/loss.py176 # This function is for future RT-DETR Segment modelsCOMMENT
MEDIUMultralytics/data/converter.py426 # Create a binary mask for the current class and find contoursSTRING
MEDIUMultralytics/data/utils.py418 rect = plt.Rectangle((x, y), w, h, linewidth=2, edgecolor=color, facecolor="none") # Create a rectangleCODE
Redundant / Tautological Comments42 hits · 55 pts
SeverityFileLineSnippetContext
LOWdocs/build_reference.py442 # Check if text contains Markdown structures that need line preservation. The table check is line-anchored:COMMENT
LOWdocs/build_reference.py1194 # Check if the document paths are the same (ignoring structure or formatting differences)COMMENT
LOWexamples/YOLOv8-SAHI-Inference-Video/yolov8_sahi.py110 # Display results if requestedCOMMENT
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py176 # Check if detection inside regionCOMMENT
LOWexamples/YOLOv8-ONNXRuntime/main.py277 # Display the output image in a windowCOMMENT
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py17save_video = False # Set True to save output videoCODE
LOWexamples/RTDETR-ONNXRuntime-Python/main.py25 # Check if the local path already existsCOMMENT
LOW.github/workflows/merge-main-into-prs.yml64 # Check if PR is behind the default branchCOMMENT
LOW.github/workflows/conda-check-prs.yml68 # Print results to action logCOMMENT
LOWultralytics/nn/autobackend.py202 # Check if format supports FP16COMMENT
LOWultralytics/nn/backends/onnx.py110 # Check if dynamic shapesCOMMENT
LOWultralytics/solutions/heatmap.py47 if self.region is not None: # Check if user provided the region coordinatesCODE
LOWultralytics/solutions/heatmap.py121 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/object_blurrer.py88 self.display_output(plot_im) # Display the output using the base class functionCODE
LOWultralytics/solutions/security_alarm.py148 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/distance_calculation.py122 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/trackzone.py85 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/object_counter.py196 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/similarity_search.py102 # Check if the embeddings and corresponding image paths already existCOMMENT
LOWultralytics/solutions/queue_management.py90 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/parking_management.py53 try: # Check if tkinter is installedCODE
LOWultralytics/solutions/parking_management.py273 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/solutions/ai_gym.py107 self.display_output(plot_im) # Display output image, if environment support displayCODE
LOWultralytics/solutions/streamlit_inference.py256 # Check if a model name is provided as a command-line argumentCOMMENT
LOWultralytics/solutions/analytics.py225 bar.set_label(label) # Assign label to each barCODE
LOWultralytics/solutions/speed_estimation.py120 self.display_output(plot_im) # Display output with base class functionCODE
LOWultralytics/utils/metrics.py427 if gt_cls.shape[0] == 0: # Check if labels is emptyCODE
LOWultralytics/utils/checks.py504 # Check if package is installed (look for "ii" status)COMMENT
LOWultralytics/utils/__init__.py653 # Read file contentCOMMENT
LOWultralytics/utils/__init__.py1426 if not self.file.exists() or not self: # Check if file doesn't exist or is emptyCODE
LOWultralytics/utils/downloads.py196 # Check if destination directory already exists and contains filesCOMMENT
LOWultralytics/utils/downloads.py389 # Check if download is complete (only if we have expected_size)COMMENT
LOWultralytics/utils/benchmarks.py239 # Print resultsCOMMENT
LOWultralytics/utils/callbacks/wb.py174 # Check if we actually have plots to saveCOMMENT
LOWultralytics/utils/export/imx.py294 # Check if the model has the expected number of layersCOMMENT
LOWultralytics/utils/export/engine.py447 # Write fileCOMMENT
LOWultralytics/models/sam/amg.py169 # Check if boxes has a channel dimensionCOMMENT
LOWultralytics/models/sam/amg.py179 # Check if points has a channel dimensionCOMMENT
LOWultralytics/models/yolo/detect/val.py292 # Print results per classCOMMENT
LOWultralytics/data/dataset.py237 # Check if the dataset is all boxes or all segmentsCOMMENT
LOWultralytics/engine/predictor.py322 # Check if save_dir/ label file existsCOMMENT
LOWultralytics/engine/model.py122 # Check if Triton Server modelCOMMENT
AI Structural Patterns44 hits · 42 pts
SeverityFileLineSnippetContext
LOWexamples/YOLOv8-SAHI-Inference-Video/yolov8_sahi.py56CODE
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py86CODE
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py314CODE
LOWultralytics/nn/modules/head.py1259CODE
LOWultralytics/nn/modules/head.py1406CODE
LOWultralytics/nn/modules/head.py1492CODE
LOWultralytics/nn/modules/conv.py372CODE
LOWultralytics/nn/modules/block.py1826CODE
LOWultralytics/utils/plotting.py829CODE
LOWultralytics/utils/nms.py13CODE
LOWultralytics/utils/tqdm.py84CODE
LOWultralytics/utils/downloads.py296CODE
LOWultralytics/utils/benchmarks.py63CODE
LOWultralytics/utils/export/engine.py205CODE
LOWultralytics/models/sam/build.py228CODE
LOWultralytics/models/sam/predict.py331CODE
LOWultralytics/models/sam/predict.py2510CODE
LOWultralytics/models/sam/modules/decoders.py210CODE
LOWultralytics/models/sam/modules/memory_attention.py54CODE
LOWultralytics/models/sam/modules/encoders.py47CODE
LOWultralytics/models/sam/modules/encoders.py643CODE
LOWultralytics/models/sam/modules/blocks.py454CODE
LOWultralytics/models/sam/modules/blocks.py871CODE
LOWultralytics/models/sam/modules/tiny_encoder.py678CODE
LOWultralytics/models/sam/modules/tiny_encoder.py786CODE
LOWultralytics/models/sam/modules/sam.py163CODE
LOWultralytics/models/sam/modules/sam.py1028CODE
LOWultralytics/models/sam/sam3/decoder.py73CODE
LOWultralytics/models/sam/sam3/decoder.py183CODE
LOWultralytics/models/sam/sam3/decoder.py377CODE
LOWultralytics/models/sam/sam3/text_encoder_ve.py146CODE
LOWultralytics/models/sam/sam3/text_encoder_ve.py236CODE
LOWultralytics/models/sam/sam3/vitdet.py43CODE
LOWultralytics/models/sam/sam3/vitdet.py218CODE
LOWultralytics/models/sam/sam3/vitdet.py318CODE
LOWultralytics/models/sam/sam3/sam3_image.py35CODE
LOWultralytics/models/utils/loss.py37CODE
LOWultralytics/data/annotator.py10CODE
LOWultralytics/data/augment.py2906CODE
LOWultralytics/data/augment.py1658CODE
LOWultralytics/data/augment.py2295CODE
LOWultralytics/data/base.py90CODE
LOWultralytics/engine/results.py246CODE
LOWultralytics/engine/results.py482CODE
Over-Commented Block35 hits · 34 pts
SeverityFileLineSnippetContext
LOWpyproject.toml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWdocs/en/models/yolo-world.md341 "val": {"yolo_data": ["lvis.yaml"]},COMMENT
LOWdocs/en/yolov5/tutorials/hyperparameter-evolution.md101COMMENT
LOWexamples/cpp/ONNXRuntime/inference.cpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWexamples/cpp/LibTorch/CMakeLists.txt21COMMENT
LOWexamples/cpp/common/yolo_postprocess.hpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWexamples/cpp/common/yolo_draw.hpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWexamples/cpp/common/yolo_render.hpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOW.github/workflows/mirror.yml41 # - name: Push to GitCodeCOMMENT
LOW.github/workflows/docs.yml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/models/sam/predict.py2841 # gathered from all GPUs (as if they are propagated on a single GPU). Note that this step onlyCOMMENT
LOWultralytics/models/utils/ops.py161 # sample_points = 2.0 * sample_points - 1.0COMMENT
LOWultralytics/models/utils/loss.py161 # loss = {}COMMENT
LOWultralytics/cfg/datasets/depth-kitti.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-arkitscenes.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-vkitti2.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/nyu-depth.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-hypersim.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/dota8-multispectral.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/hand-keypoints.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/medical-pills.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-sunrgbd.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/cityscapes8.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/xView.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/dog-pose.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/tiger-pose.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-tartanair.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/ImageNet.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/signature.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/coco8-multispectral.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth-diode.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/cityscapes.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/depth8.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/ade20k.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
LOWultralytics/cfg/datasets/TT100K.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/licenseCOMMENT
Modern Structural Boilerplate31 hits · 32 pts
SeverityFileLineSnippetContext
LOWdocs/build_reference.py1167def update_mkdocs_file(reference_yaml: str) -> None:CODE
LOWultralytics/nn/backends/__init__.py30__all__ = [CODE
LOWultralytics/optim/__init__.py5__all__ = ["MuSGD", "Muon"]CODE
LOWultralytics/utils/metrics.py1060 def update_image_metrics(self, tp: np.ndarray, target_cls: np.ndarray, pred_cls: np.ndarray, im_name: str) -> None:CODE
LOWultralytics/utils/metrics.py1136 def update_stats(self, stat: dict[str, Any]) -> None:CODE
LOWultralytics/utils/metrics.py1302 def update_stats(self, stat: dict[str, Any]) -> None:CODE
LOWultralytics/utils/metrics.py1453 def update_stats(self, stat: dict[str, Any]) -> None:CODE
LOWultralytics/utils/metrics.py1708 def update_stats(self, preds: torch.Tensor, targets: torch.Tensor) -> None:CODE
LOWultralytics/utils/metrics.py1932 def update_stats(self, preds: torch.Tensor, targets: torch.Tensor) -> None:CODE
LOWultralytics/utils/tqdm.py323 def set_description(self, desc: str | None) -> None:CODE
LOWultralytics/utils/tqdm.py329 def set_postfix(self, **kwargs: Any) -> None:CODE
LOWultralytics/utils/export/__init__.py20__all__ = [CODE
LOWultralytics/models/sam/sam3/vitdet.py95 def _setup_rel_pos(self, rel_pos_zero_init: bool = True, input_size: tuple[int, int] | None = None) -> None:CODE
LOWultralytics/models/sam/sam3/vitdet.py119 def _setup_rope_freqs(self, input_size: tuple[int, int] | None = None) -> None:CODE
LOWultralytics/models/nas/val.py8__all__ = ["NASValidator"]CODE
LOWultralytics/models/yolo/model.py196 def set_classes(self, classes: list[str]) -> None:CODE
LOWultralytics/models/yolo/model.py307 def set_vocab(self, vocab: torch.nn.ModuleList, names: list[str]) -> None:CODE
LOWultralytics/models/yolo/model.py336 def set_classes(self, classes: list[str], embeddings: torch.Tensor | None = None) -> None:CODE
LOWultralytics/models/yolo/detect/val.py172 def update_metrics(self, preds: list[dict[str, torch.Tensor]], batch: dict[str, Any]) -> None:CODE
LOWultralytics/models/yolo/classify/val.py90 def update_metrics(self, preds: torch.Tensor, batch: dict[str, Any]) -> None:CODE
LOWultralytics/models/yolo/depth/val.py51 def update_metrics(self, preds: torch.Tensor, batch: dict[str, Any]) -> None:CODE
LOWultralytics/models/yolo/yoloe/__init__.py8__all__ = [CODE
LOWultralytics/models/yolo/world/__init__.py6__all__ = ["WorldTrainer", "WorldValidator"]CODE
LOWultralytics/models/yolo/world/train.py114 def set_text_embeddings(self, datasets: list[Any], batch: int | None) -> None:CODE
LOWultralytics/trackers/deep_oc_sort.py60 def update_features(self, feat: np.ndarray, score: float | None = None) -> None:CODE
LOWultralytics/trackers/bot_sort.py71 def update_features(self, feat: np.ndarray) -> None:CODE
LOWultralytics/trackers/track_tracker.py256 def update_features(self, feat: np.ndarray) -> None:CODE
LOWultralytics/data/build.py221 def set_epoch(self, epoch: int) -> None:CODE
LOWultralytics/data/dataset.py910 def update_labels(self, include_class: list[int] | None) -> None:CODE
LOWultralytics/data/base.py205 def update_labels(self, include_class: list[int] | None) -> None:CODE
LOWultralytics/data/base.py386 def set_rectangle(self) -> None:CODE
Verbosity Indicators21 hits · 19 pts
SeverityFileLineSnippetContext
LOWultralytics/models/sam/predict.py1708 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWultralytics/models/sam/predict.py1717 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWultralytics/models/sam/predict.py2830 # Step 1: run backbone and detector in a distributed manner -- this is done via Sam3ImageOnVideoMultiGPU,COMMENT
LOWultralytics/models/sam/predict.py2839 # Step 2: each GPU propagates its local SAM2 states to get the SAM2 prediction masks.COMMENT
LOWultralytics/models/sam/predict.py2873 # Step 4: based on `tracker_update_plan`, each GPU executes the update w.r.t. its local SAM2 inference statesCOMMENT
LOWultralytics/models/sam/predict.py2882 # Step 5: finally, build the outputs for this frame (it only needs to be done on GPU 0 sinceCOMMENT
LOWultralytics/models/sam/predict.py1731 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.COMMENT
LOWultralytics/models/sam/predict.py1747 # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices.COMMENT
LOWultralytics/models/sam/predict.py2853 # Step 3: based on detection outputs and the propagated SAM2 prediction masks, we make plansCOMMENT
LOWultralytics/models/sam/predict.py2986 # Step 1: propagate the local SAM2 states to get the current frame's predictionCOMMENT
LOWultralytics/models/sam/predict.py2998 # Step 2: all-gather `low_res_masks_local` into `low_res_masks_global`COMMENT
LOWultralytics/models/sam/predict.py3071 # Step 1: make the update plan and resolve heuristics on GPU 0COMMENT
LOWultralytics/models/sam/predict.py3202 # Step 4: Run SAM2 memory encoder on the current frame's prediction masksCOMMENT
LOWultralytics/models/sam/predict.py3223 # Step 4: update the SAM2 metadata based on the update planCOMMENT
LOWultralytics/models/sam/predict.py3348 # Step 1: add new objects from the detector to SAM2 inference statesCOMMENT
LOWultralytics/models/sam/predict.py3361 # Step 2: remove from SAM2 inference states those objects removed by heuristicsCOMMENT
LOWultralytics/models/sam/predict.py3659 # Step 1: log the frame index where each object ID first appearsCOMMENT
LOWultralytics/models/sam/predict.py3683 # Step 2: removed tracks that has not matched with detections for `hotstart_unmatch_thresh` frames with hotstartCOMMENT
LOWultralytics/models/sam/predict.py3711 # Step 3: removed tracks that overlaps with another track for `hotstart_dup_thresh` framesCOMMENT
LOWultralytics/models/sam/modules/sam.py651 # Step 1: condition the visual features of the current frame on previous memoriesCOMMENT
LOWultralytics/models/sam/modules/sam.py778 # Step 2: Concatenate the memories and forward through the transformer encoderCOMMENT
AI Slop Vocabulary7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml19# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.comCOMMENT
MEDIUMtests/test_python.py1294 # Test smart_value() with comprehensive casesCOMMENT
MEDIUMultralytics/solutions/object_counter.py111 # region's shape; a ~5-frame baseline is robust to tracker jitter where a 1-frame delta is not.COMMENT
MEDIUMultralytics/utils/__init__.py641 """Load YAML file to Python object with robust error handling.STRING
MEDIUMultralytics/utils/autodevice.py12 """Manages NVIDIA GPU information via pynvml with robust error handling.STRING
MEDIUMultralytics/utils/callbacks/platform.py219 """Collect comprehensive environment info using existing ultralytics utilities."""STRING
MEDIUMultralytics/cfg/trackers/ocsort.yaml7tracker_type: ocsort # (str) Tracker backend: ocsort; observation-centric SORT for robust multi-object trackingCODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALultralytics/utils/export/coreml.py153 pipeline.spec.description.metadata.userDefined.update(CODE
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMultralytics/models/sam/modules/tiny_encoder.py3# --------------------------------------------------------COMMENT
MEDIUMultralytics/models/sam/modules/tiny_encoder.py10# --------------------------------------------------------COMMENT
Modern AI Meta-Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMultralytics/cfg/trackers/deepocsort.yaml23model: auto # (str) ReID model path; "auto" uses detector features, or use a .pt checkpoint or exported embedding modelCODE
Overly Generic Function Names2 hits · 0 pts
SeverityFileLineSnippetContext
LOWultralytics/utils/__init__.py540 ... def my_function():STRING
LOWultralytics/utils/__init__.py1177 ... def process_data(data):STRING