Repository Analysis

ultralytics/ultralytics

Ultralytics YOLO 🚀

17.5 Moderate AI signal View on GitHub
17.5
Adjusted Score
17.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
57,777
Stars
Python
Language
180,945
Lines of Code
908
Files
1366
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 442MEDIUM 43LOW 880

Pattern Findings

1366 matches across 18 categories. Click a row to expand file-level details.

Docstring Block Structure331 hits · 1630 pts
SeverityFileLineSnippet
HIGHCONTRIBUTING.md64Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argument. arg2
HIGHCONTRIBUTING.md87Example function demonstrating Google-style docstrings. Args: arg1: The first argument. arg2: The s
HIGHdocs/build_docs.py344Remove comments and empty lines from a string of code, preserving newlines and URLs. Args: content (str): C
HIGHdocs/en/help/contributing.md61Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumen
HIGHdocs/en/help/contributing.md83Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumen
HIGHdocs/en/help/contributing.md105Example function demonstrating Google-style docstrings. Args: arg1 (int): The first argumen
HIGHdocs/en/help/contributing.md146Example function demonstrating Google-style docstrings. Args: arg1: The first argument.
HIGHultralytics/nn/tasks.py1407Context manager for temporarily adding or modifying modules in Python's module cache (`sys.modules`). This function
HIGHultralytics/nn/tasks.py1494Attempt to load a PyTorch model with the torch.load() function. If a ModuleNotFoundError is raised, it catches the e
HIGHultralytics/nn/text_model.py89Convert input texts to CLIP tokens. Args: texts (str | list[str]): Input text or list of texts to t
HIGHultralytics/nn/text_model.py110Encode tokenized texts into normalized feature vectors. This method processes tokenized text inputs through the
HIGHultralytics/nn/text_model.py135Encode images into normalized feature vectors. This method processes image inputs through the CLIP model to gen
HIGHultralytics/nn/text_model.py220Convert input texts to MobileCLIP tokens. Args: texts (list[str]): List of text strings to tokenize
HIGHultralytics/nn/text_model.py236Encode tokenized texts into normalized feature vectors. Args: texts (torch.Tensor): Tokenized text
HIGHultralytics/nn/text_model.py297Convert input texts to MobileCLIP tokens. Args: texts (list[str]): List of text strings to tokenize
HIGHultralytics/nn/text_model.py318Encode tokenized texts into normalized feature vectors. Args: texts (torch.Tensor): Tokenized text
HIGHultralytics/nn/text_model.py339Build a text encoding model based on the specified variant. Args: variant (str): Model variant in format "b
HIGHultralytics/nn/autobackend.py37Check class names and convert to dict format if needed. Args: names (list | dict): Class names as list or d
HIGHultralytics/nn/autobackend.py231Delegate attribute access to the backend. This allows AutoBackend to transparently expose backend attributes
HIGHultralytics/nn/autobackend.py320Take a path to a model file and return the model format string. Args: p (str): Path to the model fi
HIGHultralytics/nn/modules/utils.py16Create a list of cloned modules from the given module. Args: module (nn.Module): The module to be cloned.
HIGHultralytics/nn/modules/utils.py36Initialize conv/fc bias value according to a given probability value. This function calculates the bias initializat
HIGHultralytics/nn/modules/utils.py78Calculate the inverse sigmoid function for a tensor. This function applies the inverse of the sigmoid function to a
HIGHultralytics/nn/modules/block.py1437C2PSA module with attention mechanism for enhanced feature extraction and processing. This module implements a conv
HIGHultralytics/solutions/object_blurrer.py50Apply a blurring effect to detected objects in the input image. This method extracts tracking information, appl
HIGHultralytics/solutions/security_alarm.py116Monitor the frame, process object detections, and trigger alerts if thresholds are met. This method processes t
HIGHultralytics/solutions/distance_calculation.py70Process a video frame and calculate the distance between two selected bounding boxes. This method extracts trac
HIGHultralytics/solutions/trackzone.py50Process the input frame to track objects within a defined region. This method initializes the annotator, create
HIGHultralytics/solutions/object_counter.py138Process input data (frames or object tracks) and update object counts. This method initializes the counting reg
HIGHultralytics/solutions/instance_segmentation.py52Perform instance segmentation on the input image and annotate the results. Args: im0 (np.ndarray):
HIGHultralytics/solutions/similarity_search.py131Return top-k semantically similar images to the given query. Args: query (str): Natural language te
HIGHultralytics/solutions/queue_management.py48Process queue management for a single frame of video. Args: im0 (np.ndarray): Input image for proce
HIGHultralytics/solutions/parking_management.py222Process the input image for parking lot management and visualization. This function analyzes the input image, e
HIGHultralytics/solutions/ai_gym.py50Monitor workouts using Ultralytics YOLO Pose Model. This function processes an input image to track and analyze
HIGHultralytics/solutions/vision_eye.py39Perform object detection, vision mapping, and annotation on the input image. Args: im0 (np.ndarray)
HIGHultralytics/solutions/object_cropper.py51Crop detected objects from the input image and save them as separate images. Args: im0 (np.ndarray)
HIGHultralytics/solutions/solutions.py212Display the results of the processing, which could involve showing frames, printing counts, or saving results.
HIGHultralytics/solutions/solutions.py470Draw specific keypoints for gym steps counting. Args: keypoints (list[list[float]]): Keypoints data
HIGHultralytics/solutions/analytics.py96Process image data and run object tracking to update analytics charts. Args: im0 (np.ndarray): Inpu
HIGHultralytics/solutions/analytics.py141Update the graph with new data for single or multiple classes. Args: frame_number (int): The curren
HIGHultralytics/solutions/speed_estimation.py62Process an input frame to estimate object speeds based on tracking data. Args: im0 (np.ndarray): In
HIGHultralytics/optim/muon.py10Compute the zeroth power / orthogonalization of matrix G using Newton-Schulz iteration. This function implements a
HIGHultralytics/optim/muon.py60Compute Muon optimizer update with momentum and orthogonalization. This function applies momentum to the gradient,
HIGHultralytics/optim/muon.py100Hybrid optimizer combining Muon and SGD updates for neural network training. This optimizer implements a combinatio
HIGHultralytics/optim/muon.py181Perform a single optimization step. Applies either hybrid Muon+SGD updates or pure SGD updates depending on the
HIGHultralytics/optim/muon.py255Muon optimizer for usage in non-distributed settings. This optimizer implements the Muon algorithm, which combines
HIGHultralytics/optim/muon.py298Perform a single optimization step. Applies Muon updates to all parameters, incorporating momentum and orthogon
HIGHultralytics/utils/instance.py36A class for handling bounding boxes in multiple formats. The class supports various bounding box formats like 'xyxy
HIGHultralytics/utils/instance.py140Concatenate a list of Bboxes objects into a single Bboxes object. Args: boxes_list (list[Bboxes]):
HIGHultralytics/utils/instance.py162Retrieve a specific bounding box or a set of bounding boxes using indexing. Args: index (int | slic
HIGHultralytics/utils/instance.py318Retrieve a specific instance or a set of instances using indexing. Args: index (int | slice | np.nd
HIGHultralytics/utils/instance.py437Concatenate a list of Instances objects into a single Instances object. Args: instances_list (list[
HIGHultralytics/utils/metrics.py236Calculate probabilistic IoU between oriented bounding boxes. Args: obb1 (torch.Tensor): Ground truth OBBs,
HIGHultralytics/utils/metrics.py616Generate a summarized representation of the confusion matrix as a list of dictionaries, with optional normalizat
HIGHultralytics/utils/metrics.py1227Generate a summarized representation of per-class detection metrics as a list of dictionaries. Includes shared s
HIGHultralytics/utils/metrics.py1384Generate a summarized representation of per-class segmentation metrics as a list of dictionaries. Includes both
HIGHultralytics/utils/metrics.py1539Generate a summarized representation of per-class pose metrics as a list of dictionaries. Includes both box and
HIGHultralytics/utils/metrics.py1628Generate a single-row summary of classification metrics (Top-1 and Top-5 accuracy). Args: normalize
HIGHultralytics/utils/files.py58Context manager to handle paths with spaces in their names. If a path contains spaces, it replaces them with unders
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
271 more matches not shown…
Unused Imports404 hits · 372 pts
SeverityFileLineSnippet
LOWtests/conftest.py6
LOWdocs/build_docs.py23
LOWdocs/build_reference.py11
LOWexamples/YOLO-Axelera-Python/yolo11-seg.py13
LOWexamples/YOLO-Axelera-Python/yolo26-pose-tracker.py23
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py3
LOWexamples/YOLOv8-OpenCV-ONNX-Python/main.py3
LOWexamples/YOLOv8-ONNXRuntime/main.py3
LOWexamples/YOLOv8-TFLite-Python/main.py3
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py3
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py3
LOWexamples/RTDETR-ONNXRuntime-Python/main.py3
LOWexamples/YOLOv8-Segmentation-ONNXRuntime-Python/main.py3
LOWultralytics/__init__.py13
LOWultralytics/__init__.py14
LOWultralytics/__init__.py15
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/__init__.py32
LOWultralytics/nn/text_model.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/__init__.py3
LOWultralytics/nn/autobackend.py3
LOWultralytics/nn/backends/deepx.py3
LOWultralytics/nn/backends/qnn.py3
LOWultralytics/nn/backends/triton.py3
LOWultralytics/nn/backends/paddle.py3
LOWultralytics/nn/backends/onnx.py3
LOWultralytics/nn/backends/onnx.py157
LOWultralytics/nn/backends/openvino.py3
LOWultralytics/nn/backends/__init__.py9
LOWultralytics/nn/backends/__init__.py10
LOWultralytics/nn/backends/__init__.py11
LOWultralytics/nn/backends/__init__.py12
LOWultralytics/nn/backends/__init__.py13
LOWultralytics/nn/backends/__init__.py14
LOWultralytics/nn/backends/__init__.py15
LOWultralytics/nn/backends/__init__.py16
LOWultralytics/nn/backends/__init__.py16
LOWultralytics/nn/backends/__init__.py17
LOWultralytics/nn/backends/__init__.py18
LOWultralytics/nn/backends/__init__.py19
LOWultralytics/nn/backends/__init__.py19
LOWultralytics/nn/backends/__init__.py20
LOWultralytics/nn/backends/__init__.py21
LOWultralytics/nn/backends/__init__.py22
LOWultralytics/nn/backends/__init__.py23
LOWultralytics/nn/backends/__init__.py24
344 more matches not shown…
Magic Placeholder Names66 hits · 360 pts
SeverityFileLineSnippet
HIGHdocs/en/platform/quickstart.md294 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/quickstart.md306 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/quickstart.md361export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/index.md133 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/index.md146 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"
HIGHdocs/en/platform/index.md184 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/index.md196 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/index.md208 headers: { Authorization: "Bearer YOUR_API_KEY" },
HIGHdocs/en/platform/index.md309 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/index.md322 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"
HIGHdocs/en/platform/index.md337 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/deploy/inference.md145Authorization: Bearer YOUR_API_KEY
HIGHdocs/en/platform/deploy/inference.md166 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/deploy/inference.md179 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/deploy/inference.md199 headers: { Authorization: "Bearer YOUR_API_KEY" },
HIGHdocs/en/platform/deploy/inference.md408 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/deploy/endpoints.md277Authorization: Bearer YOUR_API_KEY
HIGHdocs/en/platform/deploy/endpoints.md297 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/deploy/endpoints.md324 headers: { Authorization: "Bearer YOUR_API_KEY" },
HIGHdocs/en/platform/deploy/endpoints.md338 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/deploy/monitoring.md173 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/deploy/monitoring.md200 headers: { Authorization: "Bearer YOUR_API_KEY" },
HIGHdocs/en/platform/deploy/monitoring.md214 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/train/cloud-training.md214export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/train/index.md124 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/api/index.md17 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md70Authorization: Bearer YOUR_API_KEY
HIGHdocs/en/platform/api/index.md82 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md91 headers = {"Authorization": "Bearer YOUR_API_KEY"}
HIGHdocs/en/platform/api/index.md103 headers: { Authorization: "Bearer YOUR_API_KEY" },
HIGHdocs/en/platform/api/index.md208 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md644 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md827 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md915 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md1185 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md1755 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md2065 yolo settings api_key=YOUR_API_KEY
HIGHdocs/en/platform/api/index.md2071 export ULTRALYTICS_API_KEY=YOUR_API_KEY
HIGHdocs/en/platform/api/index.md2079 settings.api_key = "YOUR_API_KEY"
HIGHdocs/en/platform/api/index.md2202curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/api/index.md2209curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/api-keys.md69 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/account/api-keys.md75 $env:ULTRALYTICS_API_KEY = "YOUR_API_KEY"
HIGHdocs/en/platform/account/api-keys.md83yolo settings api_key="YOUR_API_KEY"
HIGHdocs/en/platform/account/api-keys.md97api_key = "YOUR_API_KEY"
HIGHdocs/en/platform/account/api-keys.md105curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/api-keys.md124export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/account/trash.md154 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/trash.md161 curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/activity.md144 The routes shown below require an active platform browser session. The `Authorization: Bearer YOUR_API_KEY` header i
HIGHdocs/en/platform/account/activity.md149 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/activity.md156 curl -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/activity.md163 curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/activity.md173 curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/account/activity.md179 curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
HIGHdocs/en/platform/data/index.md172 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/platform/data/index.md181 os.environ["ULTRALYTICS_API_KEY"] = "YOUR_API_KEY"
HIGHdocs/en/platform/data/datasets.md589 export ULTRALYTICS_API_KEY="YOUR_API_KEY"
HIGHdocs/en/datasets/explorer/index.md102yolo settings openai_api_key="YOUR_API_KEY"
HIGHdocs/en/integrations/weights-biases.md68 wandb.login(key="YOUR_API_KEY")
6 more matches not shown…
Cross-File Repetition44 hits · 220 pts
SeverityFileLineSnippet
HIGHultralytics/nn/tasks.py0compute loss. args: batch (dict): batch to compute loss on. preds (torch.tensor | list[torch.tensor], optional): predict
HIGHultralytics/nn/tasks.py0compute loss. args: batch (dict): batch to compute loss on. preds (torch.tensor | list[torch.tensor], optional): predict
HIGHultralytics/nn/tasks.py0compute loss. args: batch (dict): batch to compute loss on. preds (torch.tensor | list[torch.tensor], optional): predict
HIGHultralytics/nn/tasks.py0compute loss. args: batch (dict): batch to compute loss on. preds (torch.tensor | list[torch.tensor], optional): predict
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for v3/v5/v8/v9/v11 backward compatibility.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for v3/v5/v8/v9/v11 backward compatibility.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for v3/v5/v8/v9/v11 backward compatibility.
HIGHultralytics/nn/modules/head.py0initialize detect() biases, warning: requires stride availability.
HIGHultralytics/nn/modules/head.py0initialize detect() biases, warning: requires stride availability.
HIGHultralytics/nn/modules/head.py0initialize detect() biases, warning: requires stride availability.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0remove the one2many head for inference optimization.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for backward compatibility.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for backward compatibility.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for backward compatibility.
HIGHultralytics/nn/modules/head.py0returns the one-to-many head components, here for backward compatibility.
HIGHultralytics/nn/modules/head.py0return model outputs and mask coefficients if training, otherwise return outputs and mask coefficients.
HIGHultralytics/nn/modules/head.py0return model outputs and mask coefficients if training, otherwise return outputs and mask coefficients.
HIGHultralytics/nn/modules/head.py0return model outputs and mask coefficients if training, otherwise return outputs and mask coefficients.
HIGHultralytics/nn/modules/head.py0return model outputs and mask coefficients if training, otherwise return outputs and mask coefficients.
HIGHultralytics/utils/metrics.py0return a list of curves for accessing specific metrics curves.
HIGHultralytics/utils/metrics.py0return a list of curves for accessing specific metrics curves.
HIGHultralytics/utils/metrics.py0return a list of curves for accessing specific metrics curves.
HIGHultralytics/utils/metrics.py0return a list of curves for accessing specific metrics curves.
HIGHultralytics/utils/metrics.py0return a list of curves for accessing specific metrics curves.
HIGHultralytics/utils/metrics.py0update statistics by appending new values to existing stat collections. args: stat (dict[str, any]): dictionary containi
HIGHultralytics/utils/metrics.py0update statistics by appending new values to existing stat collections. args: stat (dict[str, any]): dictionary containi
HIGHultralytics/utils/metrics.py0update statistics by appending new values to existing stat collections. args: stat (dict[str, any]): dictionary containi
HIGHultralytics/utils/metrics.py0return a list of computed performance metrics and statistics.
HIGHultralytics/utils/metrics.py0return a list of computed performance metrics and statistics.
HIGHultralytics/utils/metrics.py0return a list of computed performance metrics and statistics.
HIGHultralytics/utils/loss.py0calculate the sum of the loss for box, cls and dfl multiplied by batch size.
HIGHultralytics/utils/loss.py0calculate the sum of the loss for box, cls and dfl multiplied by batch size.
HIGHultralytics/utils/loss.py0calculate the sum of the loss for box, cls and dfl multiplied by batch size.
HIGHultralytics/models/sam/modules/tiny_encoder.py0set image size to make model compatible with different image sizes.
HIGHultralytics/models/sam/modules/sam.py0set image size to make model compatible with different image sizes.
HIGHultralytics/models/sam/modules/sam.py0set image size to make model compatible with different image sizes.
HIGHultralytics/models/yolo/model.py0map head to model, trainer, validator, and predictor classes.
HIGHultralytics/models/yolo/model.py0map head to model, trainer, validator, and predictor classes.
HIGHultralytics/models/yolo/model.py0map head to model, trainer, validator, and predictor classes.
Excessive Try-Catch Wrapping140 hits · 145 pts
SeverityFileLineSnippet
LOWtests/test_exports.py84 except Exception as error: # pragma: no cover - assertion handled below
LOWdocs/build_docs.py144 except Exception as e:
LOWdocs/build_docs.py183 except Exception as e:
LOWdocs/build_docs.py200 except Exception:
LOWdocs/build_docs.py209 except Exception:
LOWdocs/build_docs.py476 except Exception as e:
LOWdocs/build_docs.py523 except Exception as e:
LOWdocs/build_docs.py538 except Exception as e:
LOWdocs/build_docs.py552 except Exception as e:
LOWdocs/build_docs.py682 except Exception as e:
LOWdocs/build_reference.py176 except Exception:
LOWdocs/build_reference.py629 except Exception:
MEDIUMdocs/en/usage/simple-utilities.md489 print("Error: Could not open video.")
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md122 except Exception as e:
MEDIUMdocs/en/guides/vertex-ai-deployment-with-docker.md123 print(f"Error initializing YOLO model: {e}")
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md204 except Exception as e:
MEDIUMdocs/en/guides/vertex-ai-deployment-with-docker.md206 print(f"Error in YOLO detection: {e}")
LOWdocs/en/guides/vertex-ai-deployment-with-docker.md352 except Exception as e:
LOW.github/workflows/merge-main-into-prs.yml78 except Exception as update_error:
LOW.github/workflows/merge-main-into-prs.yml84 except Exception as e:
LOWultralytics/nn/autobackend.py82 except Exception:
LOWultralytics/nn/backends/tensorrt.py66 except Exception as e:
LOWultralytics/solutions/security_alarm.py112 except Exception as e:
LOWultralytics/solutions/similarity_search.py113 except Exception as e:
LOWultralytics/utils/autobatch.py127 except Exception as e:
LOWultralytics/utils/events.py22 except Exception:
LOWultralytics/utils/checks.py112 except Exception as e:
LOWultralytics/utils/checks.py295 except Exception:
LOWultralytics/utils/checks.py316 except Exception:
LOWultralytics/utils/checks.py385 except Exception:
LOWultralytics/utils/checks.py509 except Exception as e:
LOWultralytics/utils/checks.py747 except Exception as e:
LOWultralytics/utils/checks.py941 except Exception:
LOWultralytics/utils/checks.py1040 except Exception: # broad clause to capture all Intel GPU exception types
LOWultralytics/utils/plotting.py219 except Exception:
LOWultralytics/utils/plotting.py873 except Exception:
LOWultralytics/utils/plotting.py941 except Exception as e:
LOWultralytics/utils/cpu.py57 except Exception:
LOWultralytics/utils/cpu.py63 except Exception:
LOWultralytics/utils/__init__.py632 except Exception as e:
LOWultralytics/utils/__init__.py637 except Exception:
LOWultralytics/utils/__init__.py770 except Exception:
LOWultralytics/utils/__init__.py799 except Exception:
LOWultralytics/utils/__init__.py1115 except Exception as e:
LOWultralytics/utils/__init__.py1271 except Exception as e:
LOWultralytics/utils/__init__.py1280 except Exception as e:
LOWultralytics/utils/__init__.py211 except Exception:
LOWultralytics/utils/logger.py99 except Exception:
LOWultralytics/utils/logger.py120 except Exception:
LOWultralytics/utils/logger.py232 except Exception:
LOWultralytics/utils/logger.py251 except Exception as e:
LOWultralytics/utils/logger.py345 except Exception as e:
LOWultralytics/utils/logger.py467 except Exception:
LOWultralytics/utils/tqdm.py287 except Exception:
LOWultralytics/utils/tqdm.py333 except Exception:
LOWultralytics/utils/tqdm.py360 except Exception:
LOWultralytics/utils/tqdm.py374 except Exception:
LOWultralytics/utils/tqdm.py384 except Exception:
LOWultralytics/utils/downloads.py71 except Exception:
LOWultralytics/utils/downloads.py381 except Exception as e:
80 more matches not shown…
Deep Nesting118 hits · 112 pts
SeverityFileLineSnippet
LOWtests/test_solutions.py179
LOWdocs/build_docs.py85
LOWdocs/build_docs.py188
LOWdocs/build_docs.py343
LOWdocs/build_docs.py585
LOWdocs/build_reference.py625
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py42
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py87
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py71
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py115
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py314
LOWultralytics/nn/tasks.py1493
LOWultralytics/nn/tasks.py1639
LOWultralytics/nn/tasks.py1874
LOWultralytics/nn/tasks.py226
LOWultralytics/nn/tasks.py760
LOWultralytics/nn/tasks.py999
LOWultralytics/nn/autobackend.py319
LOWultralytics/nn/backends/onnx.py37
LOWultralytics/nn/backends/tensorflow.py39
LOWultralytics/nn/backends/tensorflow.py124
LOWultralytics/nn/backends/tensorrt.py25
LOWultralytics/nn/modules/conv.py447
LOWultralytics/solutions/distance_calculation.py44
LOWultralytics/solutions/distance_calculation.py69
LOWultralytics/solutions/object_counter.py54
LOWultralytics/solutions/ai_gym.py49
LOWultralytics/solutions/streamlit_inference.py126
LOWultralytics/solutions/analytics.py138
LOWultralytics/solutions/speed_estimation.py61
LOWultralytics/optim/muon.py180
LOWultralytics/utils/metrics.py105
LOWultralytics/utils/metrics.py537
LOWultralytics/utils/files.py57
LOWultralytics/utils/checks.py192
LOWultralytics/utils/checks.py407
LOWultralytics/utils/checks.py595
LOWultralytics/utils/checks.py637
LOWultralytics/utils/checks.py1005
LOWultralytics/utils/plotting.py698
LOWultralytics/utils/plotting.py896
LOWultralytics/utils/plotting.py189
LOWultralytics/utils/plotting.py434
LOWultralytics/utils/cpu.py32
LOWultralytics/utils/__init__.py421
LOWultralytics/utils/__init__.py910
LOWultralytics/utils/logger.py127
LOWultralytics/utils/downloads.py286
LOWultralytics/utils/downloads.py462
LOWultralytics/utils/ops.py622
LOWultralytics/utils/loss.py494
LOWultralytics/utils/tuner.py118
LOWultralytics/utils/benchmarks.py69
LOWultralytics/utils/benchmarks.py294
LOWultralytics/utils/benchmarks.py604
LOWultralytics/utils/torch_utils.py343
LOWultralytics/utils/torch_utils.py504
LOWultralytics/utils/torch_utils.py813
LOWultralytics/utils/torch_utils.py949
LOWultralytics/utils/callbacks/platform.py46
58 more matches not shown…
Hyper-Verbose Identifiers115 hits · 107 pts
SeverityFileLineSnippet
LOWtests/test_solutions.py207def test_left_click_selection():
LOWtests/test_solutions.py234def test_analytics_graph_not_supported():
LOWtests/test_solutions.py252def test_config_update_method_with_invalid_argument():
LOWtests/test_solutions.py270def test_streamlit_handle_video_upload_creates_file(tmp_path):
LOWtests/test_solutions.py303def test_similarity_search_app_init():
LOWtests/test_solutions.py312def test_similarity_search_complete(tmp_path):
LOWtests/test_solutions.py326def test_distance_calculation_process_method():
LOWtests/test_solutions.py351def test_display_output_method():
LOWtests/test_engine.py180def test_train_reuses_loaded_checkpoint_model(monkeypatch, kwargs, uses_weights):
LOWtests/test_engine.py223def test_setup_model_respects_pretrained_arg_for_pt_models(monkeypatch, pretrained, uses_weights):
LOWtests/conftest.py34def pytest_collection_modifyitems(config, items):
LOWtests/test_exports.py122def test_export_openvino_matrix(task, dynamic, int8, half, batch, nms, end2end):
LOWtests/test_exports.py184def test_export_torchscript_matrix(task, dynamic, int8, half, batch, nms, end2end):
LOWtests/test_exports.py215def test_export_coreml_matrix(task, dynamic, int8, half, nms, batch, end2end):
LOWtests/test_exports.py256def test_export_tflite_matrix(task, dynamic, int8, half, batch, nms, end2end):
LOWtests/test_exports.py290def test_export_coreml_rtdetr():
LOWtests/test_exports.py407def test_export_executorch_matrix(task):
LOWtests/test_python.py96def test_predict_csv_multi_row(tmp_path):
LOWtests/test_python.py108def test_predict_csv_single_row(tmp_path):
LOWtests/test_python.py176def test_predict_all_image_formats():
LOWtests/test_python.py298def test_predict_callback_and_setup():
LOWtests/test_python.py402def test_safe_download_unzips_local_path_archive(tmp_path):
LOWtests/test_python.py423def test_safe_download_skips_unsafe_archive_members(tmp_path):
LOWtests/test_python.py436def test_safe_download_skips_unsafe_tar_members(tmp_path):
LOWtests/test_python.py630def test_utils_patches_torch_save(tmp_path):
LOWtests/test_python.py705def test_classify_transforms_train(image, auto_augment, erasing, force_color_jitter):
LOWtests/test_python.py926def test_semantic_polygon_data():
LOWtests/test_integrations.py43def test_mlflow_keep_run_active():
LOWtests/test_cuda.py92def test_export_engine_matrix(task, dynamic, int8, half, batch):
LOWtests/test_cuda.py136def test_predict_multiple_devices():
LOWdocs/build_docs.py343def remove_comments_and_empty_lines(content: str, file_type: str) -> str:
LOWdocs/build_reference.py125def extract_classes_and_functions(filepath: Path) -> tuple[list[str], list[str]]:
LOWdocs/build_reference.py133def create_placeholder_markdown(py_filepath: Path, module_path: str, classes: list[str], functions: list[str]) -> Path:
LOWdocs/build_reference.py208def collect_signature_parameters(args: ast.arguments, src: str, *, skip_self: bool = True) -> list[ParameterDoc]:
LOWdocs/build_reference.py528def _get_definition_signature(node: ast.AST, src: str) -> str:
LOWdocs/build_reference.py1156def build_reference_placeholders(update_nav: bool = True) -> list[str]:
LOWdocs/en/guides/nvidia-dali.md128 def yolo_dali_pipeline_centered(image_dir, target_size=640):
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py95 def preprocess_crops_for_video_cls(
LOW…amples/YOLOv8-Action-Recognition/action_recognition.py207 def preprocess_crops_for_video_cls(
LOWultralytics/nn/modules/utils.py101def multi_scale_deformable_attn_pytorch(
LOWultralytics/nn/modules/conv.py420 def get_equivalent_kernel_bias(self):
LOWultralytics/solutions/solutions.py438 def _estimate_pose_angle_cached(a: tuple[float, float], b: tuple[float, float], c: tuple[float, float]) -> float:
LOWultralytics/solutions/solutions.py537 def plot_angle_and_count_and_stage(
LOWultralytics/utils/checks.py279def check_latest_pypi_version(package_name="ultralytics"):
LOWultralytics/utils/checks.py299def check_pip_update_available():
LOWultralytics/utils/checks.py521def check_executorch_requirements():
LOWultralytics/utils/checks.py622def check_model_file_from_stem(model: str = "yolo11n") -> str | Path:
LOWultralytics/utils/tqdm.py13def is_noninteractive_console() -> bool:
LOWultralytics/utils/downloads.py247def get_google_drive_file_info(link: str) -> tuple[str, str | None]:
LOWultralytics/utils/loss.py398 def get_assigned_targets_and_loss(self, preds: dict[str, torch.Tensor], batch: dict[str, Any]) -> tuple:
LOWultralytics/utils/loss.py578 def calculate_segmentation_loss(
LOWultralytics/utils/tuner.py72def _validate_ax_search_space(space):
LOWultralytics/utils/tuner.py118def _convert_bohb_search_space(space):
LOWultralytics/utils/tuner.py215def _convert_zoopt_search_space(space):
LOWultralytics/utils/torch_utils.py471def get_flops_with_torch_profiler(model, imgsz=640):
LOWultralytics/utils/torch_utils.py64def torch_distributed_zero_first(local_rank: int):
LOWultralytics/utils/callbacks/comet.py64def _get_eval_batch_logging_interval() -> int:
LOWultralytics/utils/callbacks/comet.py69def _get_max_image_predictions_to_log() -> int:
LOWultralytics/utils/callbacks/comet.py80def _should_log_confusion_matrix() -> bool:
LOWultralytics/utils/callbacks/comet.py85def _should_log_image_predictions() -> bool:
55 more matches not shown…
Self-Referential Comments31 hits · 76 pts
SeverityFileLineSnippet
MEDIUMtests/test_cli.py87 # Create a FastSAM model
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py107 # Create the label text with class name and score
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py260 # Create an argument parser to handle command-line arguments
MEDIUMexamples/YOLOv8-ONNXRuntime/main.py271 # Create an instance of the YOLOv8 class with the specified arguments
MEDIUMexamples/RTDETR-ONNXRuntime-Python/main.py139 # Create the label text with class name and score
MEDIUMexamples/RTDETR-ONNXRuntime-Python/main.py292 # Create the detector instance with specified parameters
MEDIUMultralytics/solutions/heatmap.py62 # Create a meshgrid with region of interest (ROI) for vectorized distance calculations
MEDIUMultralytics/solutions/heatmap.py68 # Create a mask of points within the radius
MEDIUMultralytics/solutions/security_alarm.py94 # Create the email
MEDIUMultralytics/solutions/trackzone.py69 if self.mask is None: # Create a mask for the region
MEDIUMultralytics/solutions/similarity_search.py123 self.index = self.faiss.IndexFlatIP(vectors.shape[1]) # Create a new FAISS index using inner product
MEDIUMultralytics/solutions/streamlit_inference.py219 self.sidebar() # Create the sidebar
MEDIUMultralytics/solutions/streamlit_inference.py272 # Create an instance of the Inference class and run inference
MEDIUMultralytics/solutions/analytics.py223 # Create the legend using labels from the bars
MEDIUMultralytics/utils/files.py79 # Create a temporary directory and construct the new path
MEDIUMultralytics/utils/loss.py725 # Create a tensor to hold batched keypoints
MEDIUMultralytics/utils/patches.py124 >>> img = np.zeros((100, 100, 3), dtype=np.uint8) # Create a black image
MEDIUMultralytics/utils/patches.py149 >>> img = np.zeros((300, 300, 3), dtype=np.uint8) # Create a black image
MEDIUMultralytics/utils/tuner.py458 # Define the trainable function with allocated resources
MEDIUMultralytics/utils/tuner.py461 # Define the scheduler for hyperparameter search
MEDIUMultralytics/utils/tuner.py480 # Create the Ray Tune hyperparameter search tuner
MEDIUMultralytics/models/sam/amg.py211 >>> mask[40:60, 40:60] = True # Create a square
MEDIUMultralytics/models/sam/amg.py212 >>> mask[45:55, 45:55] = False # Create a hole
MEDIUMultralytics/models/sam/predict.py1908 # Initialize the object index set and mappings
MEDIUMultralytics/models/sam/build_sam3.py239 # Create the SAM3SemanticModel model
MEDIUMultralytics/models/sam/sam3/vitdet.py315 """This module implements Vision Transformer (ViT) backbone in :paper:`vitdet`. "Exploring Plain Vision Transformer
MEDIUMultralytics/models/utils/ops.py157 # This function is for future RT-DETR Segment models
MEDIUMultralytics/models/utils/loss.py155 # This function is for future RT-DETR Segment models
MEDIUMultralytics/models/utils/loss.py176 # This function is for future RT-DETR Segment models
MEDIUMultralytics/data/converter.py402 # Create a binary mask for the current class and find contours
MEDIUMultralytics/data/utils.py342 rect = plt.Rectangle((x, y), w, h, linewidth=2, edgecolor=color, facecolor="none") # Create a rectangle
Redundant / Tautological Comments47 hits · 62 pts
SeverityFileLineSnippet
LOWdocs/build_docs.py238 # Check if parent is a span with class="normal"
LOWdocs/build_docs.py664 # Print results and auto-serve on macOS
LOWdocs/build_reference.py419 # Check if text contains Markdown structures that need line preservation
LOWdocs/build_reference.py1112 # Check if the document paths are the same (ignoring structure or formatting differences)
LOWexamples/YOLOv8-SAHI-Inference-Video/yolov8_sahi.py110 # Display results if requested
LOWexamples/YOLOv8-Region-Counter/yolov8_region_counter.py177 # Check if detection inside region
LOWexamples/YOLOv8-ONNXRuntime/main.py277 # Display the output image in a window
LOW…es/YOLO-Interactive-Tracking-UI/interactive_tracker.py17save_video = False # Set True to save output video
LOWexamples/RTDETR-ONNXRuntime-Python/main.py25 # Check if the local path already exists
LOW.github/workflows/merge-main-into-prs.yml66 # Check if PR is behind the default branch
LOW.github/workflows/conda-check-prs.yml68 # Print results to action log
LOWultralytics/nn/autobackend.py190 # Check if format supports FP16
LOWultralytics/nn/backends/onnx.py84 # Check if dynamic shapes
LOWultralytics/solutions/heatmap.py46 if self.region is not None: # Check if user provided the region coordinates
LOWultralytics/solutions/heatmap.py116 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/object_blurrer.py86 self.display_output(plot_im) # Display the output using the base class function
LOWultralytics/solutions/security_alarm.py148 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/distance_calculation.py118 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/trackzone.py85 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/object_counter.py181 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/similarity_search.py93 # Check if the FAISS index and corresponding image paths already exist
LOWultralytics/solutions/queue_management.py90 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/parking_management.py53 try: # Check if tkinter is installed
LOWultralytics/solutions/parking_management.py272 self.display_output(plot_im) # Display output with base class function
LOWultralytics/solutions/ai_gym.py99 self.display_output(plot_im) # Display output image, if environment support display
LOWultralytics/solutions/streamlit_inference.py269 # Check if a model name is provided as a command-line argument
LOWultralytics/solutions/analytics.py225 bar.set_label(label) # Assign label to each bar
LOWultralytics/solutions/speed_estimation.py111 self.display_output(plot_im) # Display output with base class function
LOWultralytics/utils/metrics.py423 if gt_cls.shape[0] == 0: # Check if labels is empty
LOWultralytics/utils/checks.py380 # Check if package is installed (look for "ii" status)
LOWultralytics/utils/__init__.py625 # Read file content
LOWultralytics/utils/__init__.py1389 if not self.file.exists() or not self: # Check if file doesn't exist or is empty
LOWultralytics/utils/downloads.py190 # Check if destination directory already exists and contains files
LOWultralytics/utils/downloads.py371 # Check if download is complete (only if we have expected_size)
LOWultralytics/utils/benchmarks.py231 # Print results
LOWultralytics/utils/callbacks/wb.py174 # Check if we actually have plots to save
LOWultralytics/utils/export/imx.py294 # Check if the model has the expected number of layers
LOWultralytics/utils/export/engine.py284 # Write file
LOWultralytics/models/sam/amg.py169 # Check if boxes has a channel dimension
LOWultralytics/models/sam/amg.py179 # Check if points has a channel dimension
LOWultralytics/models/yolo/detect/val.py285 # Print results per class
LOWultralytics/data/converter.py861 # Check if this is a classification dataset
LOWultralytics/data/converter.py906 # Check if dataset already exists (enables image reuse across split changes)
LOWultralytics/data/dataset.py194 # Check if the dataset is all boxes or all segments
LOWultralytics/engine/predictor.py304 # Check if save_dir/ label file exists
LOWultralytics/engine/model.py122 # Check if Ultralytics HUB model from https://hub.ultralytics.com
LOWultralytics/engine/model.py133 # Check if Triton Server model
Over-Commented Block30 hits · 29 pts
SeverityFileLineSnippet
LOWmkdocs.yml901# Plugins --------------------------------------------------------------------------------------------------------------
LOWpyproject.toml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWdocs/en/models/yolo-world.md341
LOWdocs/en/models/yoloe.md561 val=dict(yolo_data=["lvis.yaml"]),
LOWdocs/en/yolov5/tutorials/hyperparameter_evolution.md101
LOWexamples/YOLOv8-CPP-Inference/inference.h1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWexamples/YOLOv8-MNN-CPP/main_interpreter.cpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWexamples/YOLOv8-MNN-CPP/main.cpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWexamples/YOLOv8-LibTorch-CPP-Inference/CMakeLists.txt21
LOWexamples/YOLO11-Triton-CPP/main.cpp1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWexamples/YOLOv8-ONNXRuntime-CPP/inference.h1// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOW.github/workflows/mirror.yml41 # git remote add gitcode https://ultralytics:${{ secrets.GITCODE_TOKEN }}@gitcode.net/ultralytics/ultralytics.
LOW.github/workflows/docs.yml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/models/sam/predict.py1501 # we fall back and look up its previous output in "output_dict_per_obj".
LOWultralytics/models/sam/predict.py2821 # the returned `tracker_low_res_masks_global` contains the concatenated masklet predictions
LOWultralytics/models/utils/ops.py161 # sample_points = torch.rand([bs, 1, self.num_sample_points, 2])
LOWultralytics/models/utils/loss.py161 # loss = {}
LOWultralytics/cfg/datasets/dota8-multispectral.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/hand-keypoints.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/medical-pills.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/cityscapes8.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/xView.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/dog-pose.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/tiger-pose.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/ImageNet.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/signature.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/coco8-multispectral.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/cityscapes.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/ade20k.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
LOWultralytics/cfg/datasets/TT100K.yaml1# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
Verbosity Indicators25 hits · 23 pts
SeverityFileLineSnippet
LOWultralytics/models/sam/predict.py1696 # Step 0: clear the input on those frames where this object id has point or mask input
LOWultralytics/models/sam/predict.py1705 # Step 1: Update the object id mapping (note that it must be done after Step 0,
LOWultralytics/models/sam/predict.py1719 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.
LOWultralytics/models/sam/predict.py1735 # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices.
LOWultralytics/models/sam/predict.py2811 # Step 1: run backbone and detector in a distributed manner -- this is done via Sam3ImageOnVideoMultiGPU,
LOWultralytics/models/sam/predict.py2820 # Step 2: each GPU propagates its local SAM2 states to get the SAM2 prediction masks.
LOWultralytics/models/sam/predict.py2834 # Step 3: based on detection outputs and the propagated SAM2 prediction masks, we make plans
LOWultralytics/models/sam/predict.py2854 # Step 4: based on `tracker_update_plan`, each GPU executes the update w.r.t. its local SAM2 inference states
LOWultralytics/models/sam/predict.py2863 # Step 5: finally, build the outputs for this frame (it only needs to be done on GPU 0 since
LOWultralytics/models/sam/predict.py2967 # Step 1: propagate the local SAM2 states to get the current frame's prediction
LOWultralytics/models/sam/predict.py2979 # Step 2: all-gather `low_res_masks_local` into `low_res_masks_global`
LOWultralytics/models/sam/predict.py3052 # Step 1: make the update plan and resolve heuristics on GPU 0
LOWultralytics/models/sam/predict.py3183 # Step 4: Run SAM2 memory encoder on the current frame's prediction masks
LOWultralytics/models/sam/predict.py3201 # Step 4: update the SAM2 metadata based on the update plan
LOWultralytics/models/sam/predict.py3326 # Step 1: add new objects from the detector to SAM2 inference states
LOWultralytics/models/sam/predict.py3339 # Step 2: remove from SAM2 inference states those objects removed by heuristics
LOWultralytics/models/sam/predict.py3637 # Step 1: log the frame index where each object ID first appears
LOWultralytics/models/sam/predict.py3661 # Step 2: removed tracks that has not matched with detections for `hotstart_unmatch_thresh` frames with hotstart
LOWultralytics/models/sam/predict.py3689 # Step 3: removed tracks that overlaps with another track for `hotstart_dup_thresh` frames
LOWultralytics/models/sam/modules/sam.py651 # Step 1: condition the visual features of the current frame on previous memories
LOWultralytics/models/sam/modules/sam.py778 # Step 2: Concatenate the memories and forward through the transformer encoder
LOWultralytics/trackers/byte_tracker.py312 # Step 2: First association, with high score detection boxes
LOWultralytics/trackers/byte_tracker.py337 # Step 3: Second association, with low score detection boxes association the untrack to the low score detections
LOWultralytics/trackers/byte_tracker.py370 # Step 4: Init new stracks
LOWultralytics/trackers/byte_tracker.py377 # Step 5: Update state
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALultralytics/utils/export/coreml.py150 pipeline.spec.description.metadata.userDefined.update(
AI Slop Vocabulary5 hits · 9 pts
SeverityFileLineSnippet
MEDIUMpyproject.toml19# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
MEDIUMtests/test_python.py495 # Test smart_value() with comprehensive cases
MEDIUMultralytics/utils/__init__.py613 """Load YAML file to Python object with robust error handling.
MEDIUMultralytics/utils/autodevice.py13 """Manages NVIDIA GPU information via pynvml with robust error handling.
MEDIUMultralytics/utils/callbacks/platform.py271 """Collect comprehensive environment info using existing ultralytics utilities."""
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMultralytics/models/sam/modules/tiny_encoder.py3# --------------------------------------------------------
MEDIUMultralytics/models/sam/modules/tiny_encoder.py10# --------------------------------------------------------
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippet
LOWdocs/en/platform/api/index.md1571 "name": "Jane Doe",
LOWdocs/en/platform/api/index.md1573 "line1": "123 Main St",
LOWdocs/en/platform/api/index.md1804 "email": "user@example.com",
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippet
HIGHultralytics/engine/exporter.py61 $ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWultralytics/hub/google/__init__.py171# Usage example
Overly Generic Function Names2 hits · 0 pts
SeverityFileLineSnippet
LOWultralytics/utils/__init__.py512 ... def my_function():
LOWultralytics/utils/__init__.py1140 ... def process_data(data):