diff --git a/docs/build_reference.py b/docs/build_reference.py
index 273c5a2..7524c68 100644
--- a/docs/build_reference.py
+++ b/docs/build_reference.py
@@ -10,6 +10,7 @@ import os
import re
from collections import defaultdict
from pathlib import Path
+
from ultralytics.utils import ROOT
NEW_YAML_DIR = ROOT.parent
@@ -44,9 +45,12 @@ def create_markdown(py_filepath, module_path, classes, functions):
header_content += f'---{part}---\n\n'
module_path = module_path.replace('.__init__', '')
- md_content = [f'## {class_name}\n---\n### ::: {module_path}.{class_name}\n
\n' for class_name in classes]
- md_content.extend(f'## {func_name}\n---\n### ::: {module_path}.{func_name}\n
\n' for func_name in functions)
- md_content = header_content + '\n'.join(md_content)
+ module_sep = module_path.replace(".", "/")
+ url = f'https://github.com/ultralytics/ultralytics/blob/main/{module_sep}.py'
+ title_content = f'# Reference for `{module_sep}.py`\n\n!!! note\n\n Full source code for this file is available at [{url}]({url}).\n\n'
+ md_content = [f'---\n## ::: {module_path}.{class_name}\n
\n' for class_name in classes]
+ md_content.extend(f'---\n## ::: {module_path}.{func_name}\n
\n' for func_name in functions)
+ md_content = header_content + title_content + '\n'.join(md_content)
if not md_content.endswith('\n'):
md_content += '\n'
diff --git a/docs/modes/predict.md b/docs/modes/predict.md
index a52d47f..0506019 100644
--- a/docs/modes/predict.md
+++ b/docs/modes/predict.md
@@ -6,9 +6,7 @@ keywords: Ultralytics, YOLOv8, predict mode, inference sources, prediction tasks
-YOLOv8 **predict mode** can generate predictions for various tasks, returning either a list of `Results` objects or a
-memory-efficient generator of `Results` objects when using the streaming mode. Enable streaming mode by
-passing `stream=True` in the predictor's call method.
+YOLOv8 **predict mode** can generate predictions for various tasks, returning either a list of `Results` objects or a memory-efficient generator of `Results` objects when using the streaming mode. Enable streaming mode by passing `stream=True` in the predictor's call method.
!!! example "Predict"
@@ -27,7 +25,7 @@ passing `stream=True` in the predictor's call method.
boxes = result.boxes # Boxes object for bbox outputs
masks = result.masks # Masks object for segmentation masks outputs
keypoints = result.keypoints # Keypoints object for pose outputs
- probs = result.probs # Class probabilities for classification outputs
+ probs = result.probs # Probs object for classification outputs
```
=== "Return a generator with `stream=True`"
@@ -45,7 +43,7 @@ passing `stream=True` in the predictor's call method.
boxes = result.boxes # Boxes object for bbox outputs
masks = result.masks # Masks object for segmentation masks outputs
keypoints = result.keypoints # Keypoints object for pose outputs
- probs = result.probs # Class probabilities for classification outputs
+ probs = result.probs # Probs object for classification outputs
```
## Inference Sources
@@ -281,45 +279,52 @@ Below are code examples for using each source type:
## Inference Arguments
-`model.predict` accepts multiple arguments that control the prediction operation. These arguments can be passed directly to `model.predict`:
+`model.predict()` accepts multiple arguments that can be passed at inference time to override defaults:
+
!!! example
```python
- model.predict(source, save=True, imgsz=320, conf=0.5)
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n model
+ model = YOLO('yolov8n.pt')
+
+ # Run inference on 'bus.jpg' with arguments
+ model.predict('bus.jpg', save=True, imgsz=320, conf=0.5)
```
All supported arguments:
-| Key | Value | Description |
-|----------------|------------------------|--------------------------------------------------------------------------------|
-| `source` | `'ultralytics/assets'` | source directory for images or videos |
-| `conf` | `0.25` | object confidence threshold for detection |
-| `iou` | `0.7` | intersection over union (IoU) threshold for NMS |
-| `imgsz` | `640` | image size as scalar or (h, w) list, i.e. (640, 480) |
-| `half` | `False` | use half precision (FP16) |
-| `device` | `None` | device to run on, i.e. cuda device=0/1/2/3 or device=cpu |
-| `show` | `False` | show results if possible |
-| `save` | `False` | save images with results |
-| `save_txt` | `False` | save results as .txt file |
-| `save_conf` | `False` | save results with confidence scores |
-| `save_crop` | `False` | save cropped images with results |
-| `hide_labels` | `False` | hide labels |
-| `hide_conf` | `False` | hide confidence scores |
-| `max_det` | `300` | maximum number of detections per image |
-| `vid_stride` | `False` | video frame-rate stride |
-| `line_width` | `None` | The line width of the bounding boxes. If None, it is scaled to the image size. |
-| `visualize` | `False` | visualize model features |
-| `augment` | `False` | apply image augmentation to prediction sources |
-| `agnostic_nms` | `False` | class-agnostic NMS |
-| `retina_masks` | `False` | use high-resolution segmentation masks |
-| `classes` | `None` | filter results by class, i.e. class=0, or class=[0,2,3] |
-| `boxes` | `True` | Show boxes in segmentation predictions |
+| Name | Type | Default | Description |
+|----------------|----------------|------------------------|--------------------------------------------------------------------------------|
+| `source` | `str` | `'ultralytics/assets'` | source directory for images or videos |
+| `conf` | `float` | `0.25` | object confidence threshold for detection |
+| `iou` | `float` | `0.7` | intersection over union (IoU) threshold for NMS |
+| `imgsz` | `int or tuple` | `640` | image size as scalar or (h, w) list, i.e. (640, 480) |
+| `half` | `bool` | `False` | use half precision (FP16) |
+| `device` | `None or str` | `None` | device to run on, i.e. cuda device=0/1/2/3 or device=cpu |
+| `show` | `bool` | `False` | show results if possible |
+| `save` | `bool` | `False` | save images with results |
+| `save_txt` | `bool` | `False` | save results as .txt file |
+| `save_conf` | `bool` | `False` | save results with confidence scores |
+| `save_crop` | `bool` | `False` | save cropped images with results |
+| `hide_labels` | `bool` | `False` | hide labels |
+| `hide_conf` | `bool` | `False` | hide confidence scores |
+| `max_det` | `int` | `300` | maximum number of detections per image |
+| `vid_stride` | `bool` | `False` | video frame-rate stride |
+| `line_width` | `None or int` | `None` | The line width of the bounding boxes. If None, it is scaled to the image size. |
+| `visualize` | `bool` | `False` | visualize model features |
+| `augment` | `bool` | `False` | apply image augmentation to prediction sources |
+| `agnostic_nms` | `bool` | `False` | class-agnostic NMS |
+| `retina_masks` | `bool` | `False` | use high-resolution segmentation masks |
+| `classes` | `None or list` | `None` | filter results by class, i.e. class=0, or class=[0,2,3] |
+| `boxes` | `bool` | `True` | Show boxes in segmentation predictions |
## Image and Video Formats
YOLOv8 supports various image and video formats, as specified in [data/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/utils.py). See the tables below for the valid suffixes and example predict commands.
-### Image Suffixes
+### Images
The below table contains valid Ultralytics image formats.
@@ -336,7 +341,7 @@ The below table contains valid Ultralytics image formats.
| .webp | `yolo predict source=image.webp` | [WebP](https://en.wikipedia.org/wiki/WebP) |
| .pfm | `yolo predict source=image.pfm` | [Portable FloatMap](https://en.wikipedia.org/wiki/Netpbm#File_formats) |
-### Video Suffixes
+### Videos
The below table contains valid Ultralytics video formats.
@@ -357,129 +362,235 @@ The below table contains valid Ultralytics video formats.
## Working with Results
-The `Results` object contains the following components:
-
-- `Results.boxes`: `Boxes` object with properties and methods for manipulating bounding boxes
-- `Results.masks`: `Masks` object for indexing masks or getting segment coordinates
-- `Results.keypoints`: `Keypoints` object for with properties and methods for manipulating predicted keypoints.
-- `Results.probs`: `Probs` object for containing class probabilities.
-- `Results.orig_img`: Original image loaded in memory
-- `Results.path`: `Path` containing the path to the input image
-
-Each result is composed of a `torch.Tensor` by default, which allows for easy manipulation:
+All Ultralytics `predict()` calls will return a list of `Results` objects:
!!! example "Results"
```python
- results = results.cuda()
- results = results.cpu()
- results = results.to('cpu')
- results = results.numpy()
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n model
+ model = YOLO('yolov8n.pt')
+
+ # Run inference on an image
+ results = model('bus.jpg') # list of 1 Results object
+ results = model(['bus.jpg', 'zidane.jpg']) # list of 2 Results objects
```
-### Boxes
+`Results` objects have the following attributes:
+
+| Attribute | Type | Description |
+|--------------|-----------------------|------------------------------------------------------------------------------------------|
+| `orig_img` | `numpy.ndarray` | The original image as a numpy array. |
+| `orig_shape` | `tuple` | The original image shape in (height, width) format. |
+| `boxes` | `Boxes, optional` | A Boxes object containing the detection bounding boxes. |
+| `masks` | `Masks, optional` | A Masks object containing the detection masks. |
+| `probs` | `Probs, optional` | A Probs object containing probabilities of each class for classification task. |
+| `keypoints` | `Keypoints, optional` | A Keypoints object containing detected keypoints for each object. |
+| `speed` | `dict` | A dictionary of preprocess, inference, and postprocess speeds in milliseconds per image. |
+| `names` | `dict` | A dictionary of class names. |
+| `path` | `str` | The path to the image file. |
+
+`Results` objects have the following methods:
+
+| Method | Return Type | Description |
+|-----------------|-----------------|-------------------------------------------------------------------------------------|
+| `__getitem__()` | `Results` | Return a Results object for the specified index. |
+| `__len__()` | `int` | Return the number of detections in the Results object. |
+| `update()` | `None` | Update the boxes, masks, and probs attributes of the Results object. |
+| `cpu()` | `Results` | Return a copy of the Results object with all tensors on CPU memory. |
+| `numpy()` | `Results` | Return a copy of the Results object with all tensors as numpy arrays. |
+| `cuda()` | `Results` | Return a copy of the Results object with all tensors on GPU memory. |
+| `to()` | `Results` | Return a copy of the Results object with tensors on the specified device and dtype. |
+| `new()` | `Results` | Return a new Results object with the same image, path, and names. |
+| `keys()` | `List[str]` | Return a list of non-empty attribute names. |
+| `plot()` | `numpy.ndarray` | Plots the detection results. Returns a numpy array of the annotated image. |
+| `verbose()` | `str` | Return log string for each task. |
+| `save_txt()` | `None` | Save predictions into a txt file. |
+| `save_crop()` | `None` | Save cropped predictions to `save_dir/cls/file_name.jpg`. |
+| `tojson()` | `None` | Convert the object to JSON format. |
+
+For more details see the `Results` class [documentation](../reference/engine/results.md#-results).
-`Boxes` object can be used to index, manipulate, and convert bounding boxes to different formats. Box format conversion
-operations are cached, meaning they're only calculated once per object, and those values are reused for future calls.
+### Boxes
-- Indexing a `Boxes` object returns a `Boxes` object:
+`Boxes` object can be used to index, manipulate, and convert bounding boxes to different formats.
!!! example "Boxes"
```python
- results = model(img)
- boxes = results[0].boxes
- box = boxes[0] # returns one box
- box.xyxy
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n model
+ model = YOLO('yolov8n.pt')
+
+ # Run inference on an image
+ results = model('bus.jpg') # results list
+
+ # View results
+ for r in results:
+ print(r.boxes) # print the Boxes object containing the detection bounding boxes
```
-- Properties and conversions
+Here is a table for the `Boxes` class methods and properties, including their name, type, and description:
-!!! example "Boxes Properties"
+| Name | Type | Description |
+|-----------|---------------------------|--------------------------------------------------------------------|
+| `cpu()` | Method | Move the object to CPU memory. |
+| `numpy()` | Method | Convert the object to a numpy array. |
+| `cuda()` | Method | Move the object to CUDA memory. |
+| `to()` | Method | Move the object to the specified device. |
+| `xyxy` | Property (`torch.Tensor`) | Return the boxes in xyxy format. |
+| `conf` | Property (`torch.Tensor`) | Return the confidence values of the boxes. |
+| `cls` | Property (`torch.Tensor`) | Return the class values of the boxes. |
+| `id` | Property (`torch.Tensor`) | Return the track IDs of the boxes (if available). |
+| `xywh` | Property (`torch.Tensor`) | Return the boxes in xywh format. |
+| `xyxyn` | Property (`torch.Tensor`) | Return the boxes in xyxy format normalized by original image size. |
+| `xywhn` | Property (`torch.Tensor`) | Return the boxes in xywh format normalized by original image size. |
- ```python
- boxes.xyxy # box with xyxy format, (N, 4)
- boxes.xywh # box with xywh format, (N, 4)
- boxes.xyxyn # box with xyxy format but normalized, (N, 4)
- boxes.xywhn # box with xywh format but normalized, (N, 4)
- boxes.conf # confidence score, (N, )
- boxes.cls # cls, (N, )
- boxes.data # raw bboxes tensor, (N, 6) or boxes.boxes
- ```
+For more details see the `Boxes` class [documentation](../reference/engine/results.md#boxes).
### Masks
-`Masks` object can be used index, manipulate and convert masks to segments. The segment conversion operation is cached.
+`Masks` object can be used index, manipulate and convert masks to segments.
!!! example "Masks"
```python
- results = model(inputs)
- masks = results[0].masks # Masks object
- masks.xy # x, y segments (pixels), List[segment] * N
- masks.xyn # x, y segments (normalized), List[segment] * N
- masks.data # raw masks tensor, (N, H, W) or masks.masks
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n-seg Segment model
+ model = YOLO('yolov8n-seg.pt')
+
+ # Run inference on an image
+ results = model('bus.jpg') # results list
+
+ # View results
+ for r in results:
+ print(r.masks) # print the Masks object containing the detected instance masks
```
+Here is a table for the `Masks` class methods and properties, including their name, type, and description:
+
+| Name | Type | Description |
+|------------|---------------------------|-----------------------------------------------------------------|
+| `cpu()` | Method | Returns the masks tensor on CPU memory. |
+| `numpy()` | Method | Returns the masks tensor as a numpy array. |
+| `cuda()` | Method | Returns the masks tensor on GPU memory. |
+| `to()` | Method | Returns the masks tensor with the specified device and dtype. |
+| `xyn` | Property (`torch.Tensor`) | A list of normalized segments represented as tensors. |
+| `xy` | Property (`torch.Tensor`) | A list of segments in pixel coordinates represented as tensors. |
+
+For more details see the `Masks` class [documentation](../reference/engine/results.md#masks).
+
### Keypoints
-`Keypoints` object can be used index, manipulate and normalize coordinates. The keypoint conversion operation is cached.
+`Keypoints` object can be used index, manipulate and normalize coordinates.
!!! example "Keypoints"
```python
- results = model(inputs)
- keypoints = results[0].keypoints # Masks object
- keypoints.xy # x, y keypoints (pixels), (num_dets, num_kpts, 2/3), the last dimension can be 2 or 3, depends the model.
- keypoints.xyn # x, y keypoints (normalized), (num_dets, num_kpts, 2/3)
- keypoints.conf # confidence score(num_dets, num_kpts) of each keypoint if the last dimension is 3.
- keypoints.data # raw keypoints tensor, (num_dets, num_kpts, 2/3)
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n-pose Pose model
+ model = YOLO('yolov8n-pose.pt')
+
+ # Run inference on an image
+ results = model('bus.jpg') # results list
+
+ # View results
+ for r in results:
+ print(r.keypoints) # print the Keypoints object containing the detected keypoints
```
-### probs
+Here is a table for the `Keypoints` class methods and properties, including their name, type, and description:
-`Probs` object can be used index, get top1&top5 indices and scores of classification.
+| Name | Type | Description |
+|-----------|---------------------------|-------------------------------------------------------------------|
+| `cpu()` | Method | Returns the keypoints tensor on CPU memory. |
+| `numpy()` | Method | Returns the keypoints tensor as a numpy array. |
+| `cuda()` | Method | Returns the keypoints tensor on GPU memory. |
+| `to()` | Method | Returns the keypoints tensor with the specified device and dtype. |
+| `xyn` | Property (`torch.Tensor`) | A list of normalized keypoints represented as tensors. |
+| `xy` | Property (`torch.Tensor`) | A list of keypoints in pixel coordinates represented as tensors. |
+| `conf` | Property (`torch.Tensor`) | Returns confidence values of keypoints if available, else None. |
+
+For more details see the `Keypoints` class [documentation](../reference/engine/results.md#keypoints).
+
+### Probs
+
+`Probs` object can be used index, get `top1` and `top5` indices and scores of classification.
!!! example "Probs"
```python
- results = model(inputs)
- probs = results[0].probs # cls prob, (num_class, )
- probs.top5 # The top5 indices of classification, List[Int] * 5.
- probs.top1 # The top1 indices of classification, a value with Int type.
- probs.top5conf # The top5 scores of classification, a tensor with shape (5, ).
- probs.top1conf # The top1 scores of classification. a value with torch.tensor type.
- keypoints.data # raw probs tensor, (num_class, )
+ from ultralytics import YOLO
+
+ # Load a pretrained YOLOv8n-cls Classify model
+ model = YOLO('yolov8n-cls.pt')
+
+ # Run inference on an image
+ results = model('bus.jpg') # results list
+
+ # View results
+ for r in results:
+ print(r.probs) # print the Probs object containing the detected class probabilities
```
-Class reference documentation for `Results` module and its components can be found [here](../reference/engine/results.md)
+Here's a table summarizing the methods and properties for the `Probs` class:
-## Plotting results
+| Name | Type | Description |
+|------------|-------------------------|-------------------------------------------------------------------------|
+| `cpu()` | Method | Returns a copy of the probs tensor on CPU memory. |
+| `numpy()` | Method | Returns a copy of the probs tensor as a numpy array. |
+| `cuda()` | Method | Returns a copy of the probs tensor on GPU memory. |
+| `to()` | Method | Returns a copy of the probs tensor with the specified device and dtype. |
+| `top1` | Property `int` | Index of the top 1 class. |
+| `top5` | Property `list[int]` | Indices of the top 5 classes. |
+| `top1conf` | Property `torch.Tensor` | Confidence of the top 1 class. |
+| `top5conf` | Property `torch.Tensor` | Confidences of the top 5 classes. |
-You can use `plot()` function of `Result` object to plot results on in image object. It plots all components(boxes,
-masks, classification probabilities, etc.) found in the results object
+For more details see the `Probs` class [documentation](../reference/engine/results.md#probs).
+
+## Plotting Results
+
+You can the `plot()` method of a `Result` objects to plot predictions. It plots all prediction types (boxes, masks, keypoints, probabilities, etc.) contained in the `Results` object.
!!! example "Plotting"
```python
- res = model(img)
- res_plotted = res[0].plot()
- cv2.imshow("result", res_plotted)
- ```
+ from PIL import Image
+ from ultralytics import YOLO
-| Argument | Description |
-|-------------------------------|----------------------------------------------------------------------------------------|
-| `conf (bool)` | Whether to plot the detection confidence score. |
-| `line_width (int, optional)` | The line width of the bounding boxes. If None, it is scaled to the image size. |
-| `font_size (float, optional)` | The font size of the text. If None, it is scaled to the image size. |
-| `font (str)` | The font to use for the text. |
-| `pil (bool)` | Whether to use PIL for image plotting. |
-| `example (str)` | An example string to display. Useful for indicating the expected format of the output. |
-| `img (numpy.ndarray)` | Plot to another image. if not, plot to original image. |
-| `labels (bool)` | Whether to plot the label of bounding boxes. |
-| `boxes (bool)` | Whether to plot the bounding boxes. |
-| `masks (bool)` | Whether to plot the masks. |
-| `probs (bool)` | Whether to plot classification probability. |
+ # Load a pretrained YOLOv8n model
+ model = YOLO('yolov8n.pt')
+
+ # Run inference on 'bus.jpg'
+ results = model('bus.jpg') # results list
+
+ # Show the results
+ for r in results:
+ im = r.plot() # plot a BGR numpy array of predictions
+ Image.fromarray(im[..., ::-1]).show() # show RGB image
+ ```
+
+ The `plot()` method has the following arguments available:
+
+ | Argument | Type | Description | Default |
+ |--------------|-----------------|--------------------------------------------------------------------------------|---------------|
+ | `conf` | `bool` | Whether to plot the detection confidence score. | `True` |
+ | `line_width` | `float` | The line width of the bounding boxes. If None, it is scaled to the image size. | `None` |
+ | `font_size` | `float` | The font size of the text. If None, it is scaled to the image size. | `None` |
+ | `font` | `str` | The font to use for the text. | `'Arial.ttf'` |
+ | `pil` | `bool` | Whether to return the image as a PIL Image. | `False` |
+ | `img` | `numpy.ndarray` | Plot to another image. if not, plot to original image. | `None` |
+ | `im_gpu` | `torch.Tensor` | Normalized image in gpu with shape (1, 3, 640, 640), for faster mask plotting. | `None` |
+ | `kpt_radius` | `int` | Radius of the drawn keypoints. Default is 5. | `5` |
+ | `kpt_line` | `bool` | Whether to draw lines connecting keypoints. | `True` |
+ | `labels` | `bool` | Whether to plot the label of bounding boxes. | `True` |
+ | `boxes` | `bool` | Whether to plot the bounding boxes. | `True` |
+ | `masks` | `bool` | Whether to plot the masks. | `True` |
+ | `probs` | `bool` | Whether to plot classification probability | `True` |
## Streaming Source `for`-loop
diff --git a/docs/overrides/partials/comments.html b/docs/overrides/partials/comments.html
index ff1455b..dcee5a9 100644
--- a/docs/overrides/partials/comments.html
+++ b/docs/overrides/partials/comments.html
@@ -11,7 +11,7 @@
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
- data-input-position="bottom"
+ data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
crossorigin="anonymous"
diff --git a/docs/reference/cfg/__init__.md b/docs/reference/cfg/__init__.md
index e96d0b0..0dcfc57 100644
--- a/docs/reference/cfg/__init__.md
+++ b/docs/reference/cfg/__init__.md
@@ -3,57 +3,52 @@ description: Explore Ultralytics cfg functions like cfg2dict, handle_deprecation
keywords: Ultralytics, YOLO, Configuration, cfg2dict, handle_deprecation, merge_equals_args, handle_yolo_settings, copy_default_cfg, Image Detection
---
-## cfg2dict
+# Reference for `ultralytics/cfg.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg.py).
+
---
-### ::: ultralytics.cfg.cfg2dict
+## ::: ultralytics.cfg.cfg2dict
-## get_cfg
---
-### ::: ultralytics.cfg.get_cfg
+## ::: ultralytics.cfg.get_cfg
-## _handle_deprecation
---
-### ::: ultralytics.cfg._handle_deprecation
+## ::: ultralytics.cfg._handle_deprecation
-## check_dict_alignment
---
-### ::: ultralytics.cfg.check_dict_alignment
+## ::: ultralytics.cfg.check_dict_alignment
-## merge_equals_args
---
-### ::: ultralytics.cfg.merge_equals_args
+## ::: ultralytics.cfg.merge_equals_args
-## handle_yolo_hub
---
-### ::: ultralytics.cfg.handle_yolo_hub
+## ::: ultralytics.cfg.handle_yolo_hub
-## handle_yolo_settings
---
-### ::: ultralytics.cfg.handle_yolo_settings
+## ::: ultralytics.cfg.handle_yolo_settings
-## parse_key_value_pair
---
-### ::: ultralytics.cfg.parse_key_value_pair
+## ::: ultralytics.cfg.parse_key_value_pair
-## smart_value
---
-### ::: ultralytics.cfg.smart_value
+## ::: ultralytics.cfg.smart_value
-## entrypoint
---
-### ::: ultralytics.cfg.entrypoint
+## ::: ultralytics.cfg.entrypoint
-## copy_default_cfg
---
-### ::: ultralytics.cfg.copy_default_cfg
+## ::: ultralytics.cfg.copy_default_cfg
diff --git a/docs/reference/data/annotator.md b/docs/reference/data/annotator.md
index 2cac116..e797c13 100644
--- a/docs/reference/data/annotator.md
+++ b/docs/reference/data/annotator.md
@@ -3,7 +3,12 @@ description: Enhance your machine learning model with Ultralytics’ auto_annota
keywords: Ultralytics, Auto-Annotate, Machine Learning, AI, Annotation, Data Processing, Model Training
---
-## auto_annotate
+# Reference for `ultralytics/data/annotator.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/annotator.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/annotator.py).
+
---
-### ::: ultralytics.data.annotator.auto_annotate
+## ::: ultralytics.data.annotator.auto_annotate
diff --git a/docs/reference/data/augment.md b/docs/reference/data/augment.md
index b59b226..5f958f3 100644
--- a/docs/reference/data/augment.md
+++ b/docs/reference/data/augment.md
@@ -3,97 +3,84 @@ description: Detailed exploration into Ultralytics data augmentation methods inc
keywords: Ultralytics, Data Augmentation, BaseTransform, MixUp, RandomHSV, LetterBox, Albumentations, classify_transforms, classify_albumentations
---
-## BaseTransform
+# Reference for `ultralytics/data/augment.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/augment.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/augment.py).
+
---
-### ::: ultralytics.data.augment.BaseTransform
+## ::: ultralytics.data.augment.BaseTransform
-## Compose
---
-### ::: ultralytics.data.augment.Compose
+## ::: ultralytics.data.augment.Compose
-## BaseMixTransform
---
-### ::: ultralytics.data.augment.BaseMixTransform
+## ::: ultralytics.data.augment.BaseMixTransform
-## Mosaic
---
-### ::: ultralytics.data.augment.Mosaic
+## ::: ultralytics.data.augment.Mosaic
-## MixUp
---
-### ::: ultralytics.data.augment.MixUp
+## ::: ultralytics.data.augment.MixUp
-## RandomPerspective
---
-### ::: ultralytics.data.augment.RandomPerspective
+## ::: ultralytics.data.augment.RandomPerspective
-## RandomHSV
---
-### ::: ultralytics.data.augment.RandomHSV
+## ::: ultralytics.data.augment.RandomHSV
-## RandomFlip
---
-### ::: ultralytics.data.augment.RandomFlip
+## ::: ultralytics.data.augment.RandomFlip
-## LetterBox
---
-### ::: ultralytics.data.augment.LetterBox
+## ::: ultralytics.data.augment.LetterBox
-## CopyPaste
---
-### ::: ultralytics.data.augment.CopyPaste
+## ::: ultralytics.data.augment.CopyPaste
-## Albumentations
---
-### ::: ultralytics.data.augment.Albumentations
+## ::: ultralytics.data.augment.Albumentations
-## Format
---
-### ::: ultralytics.data.augment.Format
+## ::: ultralytics.data.augment.Format
-## ClassifyLetterBox
---
-### ::: ultralytics.data.augment.ClassifyLetterBox
+## ::: ultralytics.data.augment.ClassifyLetterBox
-## CenterCrop
---
-### ::: ultralytics.data.augment.CenterCrop
+## ::: ultralytics.data.augment.CenterCrop
-## ToTensor
---
-### ::: ultralytics.data.augment.ToTensor
+## ::: ultralytics.data.augment.ToTensor
-## v8_transforms
---
-### ::: ultralytics.data.augment.v8_transforms
+## ::: ultralytics.data.augment.v8_transforms
-## classify_transforms
---
-### ::: ultralytics.data.augment.classify_transforms
+## ::: ultralytics.data.augment.classify_transforms
-## hsv2colorjitter
---
-### ::: ultralytics.data.augment.hsv2colorjitter
+## ::: ultralytics.data.augment.hsv2colorjitter
-## classify_albumentations
---
-### ::: ultralytics.data.augment.classify_albumentations
+## ::: ultralytics.data.augment.classify_albumentations
diff --git a/docs/reference/data/base.md b/docs/reference/data/base.md
index ff786b0..f027221 100644
--- a/docs/reference/data/base.md
+++ b/docs/reference/data/base.md
@@ -3,7 +3,12 @@ description: Explore BaseDataset in Ultralytics docs. Learn how this implementat
keywords: Ultralytics, docs, BaseDataset, data manipulation, dataset creation
---
-## BaseDataset
+# Reference for `ultralytics/data/base.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/base.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/base.py).
+
---
-### ::: ultralytics.data.base.BaseDataset
+## ::: ultralytics.data.base.BaseDataset
diff --git a/docs/reference/data/build.md b/docs/reference/data/build.md
index a64fa81..fa27913 100644
--- a/docs/reference/data/build.md
+++ b/docs/reference/data/build.md
@@ -3,37 +3,36 @@ description: Explore the Ultralytics YOLO v3 data build procedures, including th
keywords: Ultralytics, YOLO v3, Data build, DataLoader, InfiniteDataLoader, seed_worker, build_dataloader, load_inference_source
---
-## InfiniteDataLoader
+# Reference for `ultralytics/data/build.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/build.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/build.py).
+
---
-### ::: ultralytics.data.build.InfiniteDataLoader
+## ::: ultralytics.data.build.InfiniteDataLoader
-## _RepeatSampler
---
-### ::: ultralytics.data.build._RepeatSampler
+## ::: ultralytics.data.build._RepeatSampler
-## seed_worker
---
-### ::: ultralytics.data.build.seed_worker
+## ::: ultralytics.data.build.seed_worker
-## build_yolo_dataset
---
-### ::: ultralytics.data.build.build_yolo_dataset
+## ::: ultralytics.data.build.build_yolo_dataset
-## build_dataloader
---
-### ::: ultralytics.data.build.build_dataloader
+## ::: ultralytics.data.build.build_dataloader
-## check_source
---
-### ::: ultralytics.data.build.check_source
+## ::: ultralytics.data.build.check_source
-## load_inference_source
---
-### ::: ultralytics.data.build.load_inference_source
+## ::: ultralytics.data.build.load_inference_source
diff --git a/docs/reference/data/converter.md b/docs/reference/data/converter.md
index 4600cff..b0df74d 100644
--- a/docs/reference/data/converter.md
+++ b/docs/reference/data/converter.md
@@ -3,32 +3,32 @@ description: Explore Ultralytics data converter functions like coco91_to_coco80_
keywords: Ultralytics, Data Converter, coco91_to_coco80_class, merge_multi_segment, rle2polygon
---
-## coco91_to_coco80_class
+# Reference for `ultralytics/data/converter.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/converter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/converter.py).
+
---
-### ::: ultralytics.data.converter.coco91_to_coco80_class
+## ::: ultralytics.data.converter.coco91_to_coco80_class
-## convert_coco
---
-### ::: ultralytics.data.converter.convert_coco
+## ::: ultralytics.data.converter.convert_coco
-## rle2polygon
---
-### ::: ultralytics.data.converter.rle2polygon
+## ::: ultralytics.data.converter.rle2polygon
-## min_index
---
-### ::: ultralytics.data.converter.min_index
+## ::: ultralytics.data.converter.min_index
-## merge_multi_segment
---
-### ::: ultralytics.data.converter.merge_multi_segment
+## ::: ultralytics.data.converter.merge_multi_segment
-## delete_dsstore
---
-### ::: ultralytics.data.converter.delete_dsstore
+## ::: ultralytics.data.converter.delete_dsstore
diff --git a/docs/reference/data/dataset.md b/docs/reference/data/dataset.md
index fe94f61..ecd5ac5 100644
--- a/docs/reference/data/dataset.md
+++ b/docs/reference/data/dataset.md
@@ -3,17 +3,20 @@ description: Explore the YOLODataset and SemanticDataset classes in YOLO data. L
keywords: Ultralytics, YOLO, YOLODataset, SemanticDataset, data handling, data manipulation
---
-## YOLODataset
+# Reference for `ultralytics/data/dataset.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/dataset.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/dataset.py).
+
---
-### ::: ultralytics.data.dataset.YOLODataset
+## ::: ultralytics.data.dataset.YOLODataset
-## ClassificationDataset
---
-### ::: ultralytics.data.dataset.ClassificationDataset
+## ::: ultralytics.data.dataset.ClassificationDataset
-## SemanticDataset
---
-### ::: ultralytics.data.dataset.SemanticDataset
+## ::: ultralytics.data.dataset.SemanticDataset
diff --git a/docs/reference/data/loaders.md b/docs/reference/data/loaders.md
index 2de372e..41b5e51 100644
--- a/docs/reference/data/loaders.md
+++ b/docs/reference/data/loaders.md
@@ -3,42 +3,40 @@ description: Find detailed guides on Ultralytics YOLO data loaders, including Lo
keywords: Ultralytics, data loaders, LoadStreams, LoadImages, LoadTensor, YOLO, YouTube URLs
---
-## SourceTypes
+# Reference for `ultralytics/data/loaders.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/loaders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/loaders.py).
+
---
-### ::: ultralytics.data.loaders.SourceTypes
+## ::: ultralytics.data.loaders.SourceTypes
-## LoadStreams
---
-### ::: ultralytics.data.loaders.LoadStreams
+## ::: ultralytics.data.loaders.LoadStreams
-## LoadScreenshots
---
-### ::: ultralytics.data.loaders.LoadScreenshots
+## ::: ultralytics.data.loaders.LoadScreenshots
-## LoadImages
---
-### ::: ultralytics.data.loaders.LoadImages
+## ::: ultralytics.data.loaders.LoadImages
-## LoadPilAndNumpy
---
-### ::: ultralytics.data.loaders.LoadPilAndNumpy
+## ::: ultralytics.data.loaders.LoadPilAndNumpy
-## LoadTensor
---
-### ::: ultralytics.data.loaders.LoadTensor
+## ::: ultralytics.data.loaders.LoadTensor
-## autocast_list
---
-### ::: ultralytics.data.loaders.autocast_list
+## ::: ultralytics.data.loaders.autocast_list
-## get_best_youtube_url
---
-### ::: ultralytics.data.loaders.get_best_youtube_url
+## ::: ultralytics.data.loaders.get_best_youtube_url
diff --git a/docs/reference/data/utils.md b/docs/reference/data/utils.md
index fbfb97f..f9e7a21 100644
--- a/docs/reference/data/utils.md
+++ b/docs/reference/data/utils.md
@@ -3,72 +3,64 @@ description: Uncover a detailed guide to Ultralytics data utilities. Learn funct
keywords: Ultralytics, data utils, YOLO, img2label_paths, exif_size, polygon2mask, polygons2masks_overlap, check_cls_dataset, delete_dsstore, autosplit
---
-## HUBDatasetStats
+# Reference for `ultralytics/data/utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/utils.py).
+
---
-### ::: ultralytics.data.utils.HUBDatasetStats
+## ::: ultralytics.data.utils.HUBDatasetStats
-## img2label_paths
---
-### ::: ultralytics.data.utils.img2label_paths
+## ::: ultralytics.data.utils.img2label_paths
-## get_hash
---
-### ::: ultralytics.data.utils.get_hash
+## ::: ultralytics.data.utils.get_hash
-## exif_size
---
-### ::: ultralytics.data.utils.exif_size
+## ::: ultralytics.data.utils.exif_size
-## verify_image_label
---
-### ::: ultralytics.data.utils.verify_image_label
+## ::: ultralytics.data.utils.verify_image_label
-## polygon2mask
---
-### ::: ultralytics.data.utils.polygon2mask
+## ::: ultralytics.data.utils.polygon2mask
-## polygons2masks
---
-### ::: ultralytics.data.utils.polygons2masks
+## ::: ultralytics.data.utils.polygons2masks
-## polygons2masks_overlap
---
-### ::: ultralytics.data.utils.polygons2masks_overlap
+## ::: ultralytics.data.utils.polygons2masks_overlap
-## check_det_dataset
---
-### ::: ultralytics.data.utils.check_det_dataset
+## ::: ultralytics.data.utils.check_det_dataset
-## check_cls_dataset
---
-### ::: ultralytics.data.utils.check_cls_dataset
+## ::: ultralytics.data.utils.check_cls_dataset
-## compress_one_image
---
-### ::: ultralytics.data.utils.compress_one_image
+## ::: ultralytics.data.utils.compress_one_image
-## delete_dsstore
---
-### ::: ultralytics.data.utils.delete_dsstore
+## ::: ultralytics.data.utils.delete_dsstore
-## zip_directory
---
-### ::: ultralytics.data.utils.zip_directory
+## ::: ultralytics.data.utils.zip_directory
-## autosplit
---
-### ::: ultralytics.data.utils.autosplit
+## ::: ultralytics.data.utils.autosplit
diff --git a/docs/reference/engine/exporter.md b/docs/reference/engine/exporter.md
index 04ffead..e3c9ae1 100644
--- a/docs/reference/engine/exporter.md
+++ b/docs/reference/engine/exporter.md
@@ -3,32 +3,32 @@ description: Explore the exporter functionality of Ultralytics. Learn about expo
keywords: Ultralytics, Exporter, iOSDetectModel, Export Formats, Try export
---
-## Exporter
+# Reference for `ultralytics/engine/exporter.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/exporter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/exporter.py).
+
---
-### ::: ultralytics.engine.exporter.Exporter
+## ::: ultralytics.engine.exporter.Exporter
-## iOSDetectModel
---
-### ::: ultralytics.engine.exporter.iOSDetectModel
+## ::: ultralytics.engine.exporter.iOSDetectModel
-## export_formats
---
-### ::: ultralytics.engine.exporter.export_formats
+## ::: ultralytics.engine.exporter.export_formats
-## gd_outputs
---
-### ::: ultralytics.engine.exporter.gd_outputs
+## ::: ultralytics.engine.exporter.gd_outputs
-## try_export
---
-### ::: ultralytics.engine.exporter.try_export
+## ::: ultralytics.engine.exporter.try_export
-## export
---
-### ::: ultralytics.engine.exporter.export
+## ::: ultralytics.engine.exporter.export
diff --git a/docs/reference/engine/model.md b/docs/reference/engine/model.md
index f6e468a..1085fb6 100644
--- a/docs/reference/engine/model.md
+++ b/docs/reference/engine/model.md
@@ -3,7 +3,12 @@ description: Explore the detailed guide on using the Ultralytics YOLO Engine Mod
keywords: Ultralytics, YOLO, engine model, documentation, guide, implementation, training, evaluation
---
-## Model
+# Reference for `ultralytics/engine/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/model.py).
+
---
-### ::: ultralytics.engine.model.Model
+## ::: ultralytics.engine.model.Model
diff --git a/docs/reference/engine/predictor.md b/docs/reference/engine/predictor.md
index 96a2fff..6c3865a 100644
--- a/docs/reference/engine/predictor.md
+++ b/docs/reference/engine/predictor.md
@@ -3,7 +3,12 @@ description: Learn about Ultralytics BasePredictor, an essential component of ou
keywords: Ultralytics, BasePredictor, YOLO, prediction, engine
---
-## BasePredictor
+# Reference for `ultralytics/engine/predictor.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/predictor.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/predictor.py).
+
---
-### ::: ultralytics.engine.predictor.BasePredictor
+## ::: ultralytics.engine.predictor.BasePredictor
diff --git a/docs/reference/engine/results.md b/docs/reference/engine/results.md
index c997279..4c673ff 100644
--- a/docs/reference/engine/results.md
+++ b/docs/reference/engine/results.md
@@ -3,32 +3,32 @@ description: Master Ultralytics engine results including base tensors, boxes, an
keywords: Ultralytics, engine, results, base tensor, boxes, keypoints
---
-## BaseTensor
+# Reference for `ultralytics/engine/results.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/results.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/results.py).
+
---
-### ::: ultralytics.engine.results.BaseTensor
+## ::: ultralytics.engine.results.BaseTensor
-## Results
---
-### ::: ultralytics.engine.results.Results
+## ::: ultralytics.engine.results.Results
-## Boxes
---
-### ::: ultralytics.engine.results.Boxes
+## ::: ultralytics.engine.results.Boxes
-## Masks
---
-### ::: ultralytics.engine.results.Masks
+## ::: ultralytics.engine.results.Masks
-## Keypoints
---
-### ::: ultralytics.engine.results.Keypoints
+## ::: ultralytics.engine.results.Keypoints
-## Probs
---
-### ::: ultralytics.engine.results.Probs
+## ::: ultralytics.engine.results.Probs
diff --git a/docs/reference/engine/trainer.md b/docs/reference/engine/trainer.md
index 5f272ac..e3c5cd0 100644
--- a/docs/reference/engine/trainer.md
+++ b/docs/reference/engine/trainer.md
@@ -3,7 +3,12 @@ description: Learn about the BaseTrainer class in the Ultralytics library. From
keywords: Ultralytics, BaseTrainer, Machine Learning, Training Control, Python library
---
-## BaseTrainer
+# Reference for `ultralytics/engine/trainer.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py).
+
---
-### ::: ultralytics.engine.trainer.BaseTrainer
+## ::: ultralytics.engine.trainer.BaseTrainer
diff --git a/docs/reference/engine/validator.md b/docs/reference/engine/validator.md
index 036b554..d48338f 100644
--- a/docs/reference/engine/validator.md
+++ b/docs/reference/engine/validator.md
@@ -3,7 +3,12 @@ description: Learn about the Ultralytics BaseValidator module. Understand its pr
keywords: Ultralytics, BaseValidator, Ultralytics engine, module, components
---
-## BaseValidator
+# Reference for `ultralytics/engine/validator.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/validator.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/validator.py).
+
---
-### ::: ultralytics.engine.validator.BaseValidator
+## ::: ultralytics.engine.validator.BaseValidator
diff --git a/docs/reference/hub/__init__.md b/docs/reference/hub/__init__.md
index c7ef3b7..90348e3 100644
--- a/docs/reference/hub/__init__.md
+++ b/docs/reference/hub/__init__.md
@@ -3,42 +3,40 @@ description: Explore Ultralytics hub functions for model resetting, checking dat
keywords: Ultralytics, hub functions, model export, dataset check, reset model, YOLO Docs
---
-## login
+# Reference for `ultralytics/hub.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub.py).
+
---
-### ::: ultralytics.hub.login
+## ::: ultralytics.hub.login
-## logout
---
-### ::: ultralytics.hub.logout
+## ::: ultralytics.hub.logout
-## start
---
-### ::: ultralytics.hub.start
+## ::: ultralytics.hub.start
-## reset_model
---
-### ::: ultralytics.hub.reset_model
+## ::: ultralytics.hub.reset_model
-## export_fmts_hub
---
-### ::: ultralytics.hub.export_fmts_hub
+## ::: ultralytics.hub.export_fmts_hub
-## export_model
---
-### ::: ultralytics.hub.export_model
+## ::: ultralytics.hub.export_model
-## get_export
---
-### ::: ultralytics.hub.get_export
+## ::: ultralytics.hub.get_export
-## check_dataset
---
-### ::: ultralytics.hub.check_dataset
+## ::: ultralytics.hub.check_dataset
diff --git a/docs/reference/hub/auth.md b/docs/reference/hub/auth.md
index d3fdabe..7f5f7f2 100644
--- a/docs/reference/hub/auth.md
+++ b/docs/reference/hub/auth.md
@@ -3,7 +3,12 @@ description: Dive into the Ultralytics Auth API documentation & learn how to man
keywords: Ultralytics, Auth, API documentation, User Authentication, AI, Machine Learning
---
-## Auth
+# Reference for `ultralytics/hub/auth.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/auth.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/auth.py).
+
---
-### ::: ultralytics.hub.auth.Auth
+## ::: ultralytics.hub.auth.Auth
diff --git a/docs/reference/hub/session.md b/docs/reference/hub/session.md
index 6c348bb..a23d4cf 100644
--- a/docs/reference/hub/session.md
+++ b/docs/reference/hub/session.md
@@ -3,7 +3,12 @@ description: Explore details about the HUBTrainingSession in Ultralytics framewo
keywords: Ultralytics, HUBTrainingSession, Documentation, Model Training, AI, Machine Learning, YOLO
---
-## HUBTrainingSession
+# Reference for `ultralytics/hub/session.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/session.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/session.py).
+
---
-### ::: ultralytics.hub.session.HUBTrainingSession
+## ::: ultralytics.hub.session.HUBTrainingSession
diff --git a/docs/reference/hub/utils.md b/docs/reference/hub/utils.md
index 219e309..9378e2f 100644
--- a/docs/reference/hub/utils.md
+++ b/docs/reference/hub/utils.md
@@ -3,22 +3,24 @@ description: Explore Ultralytics docs for various Events, including "request_wit
keywords: Ultralytics, Events, request_with_credentials, smart_request, Ultralytics hub utils, requests_with_progress
---
-## Events
+# Reference for `ultralytics/hub/utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/utils.py).
+
---
-### ::: ultralytics.hub.utils.Events
+## ::: ultralytics.hub.utils.Events
-## request_with_credentials
---
-### ::: ultralytics.hub.utils.request_with_credentials
+## ::: ultralytics.hub.utils.request_with_credentials
-## requests_with_progress
---
-### ::: ultralytics.hub.utils.requests_with_progress
+## ::: ultralytics.hub.utils.requests_with_progress
-## smart_request
---
-### ::: ultralytics.hub.utils.smart_request
+## ::: ultralytics.hub.utils.smart_request
diff --git a/docs/reference/models/fastsam/model.md b/docs/reference/models/fastsam/model.md
index f23f8f9..a7952e3 100644
--- a/docs/reference/models/fastsam/model.md
+++ b/docs/reference/models/fastsam/model.md
@@ -3,7 +3,12 @@ description: Learn all about Ultralytics FastSAM model. Dive into our comprehens
keywords: Ultralytics, FastSAM model, Model documentation, Efficient model training
---
-## FastSAM
+# Reference for `ultralytics/models/fastsam/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/model.py).
+
---
-### ::: ultralytics.models.fastsam.model.FastSAM
+## ::: ultralytics.models.fastsam.model.FastSAM
diff --git a/docs/reference/models/fastsam/predict.md b/docs/reference/models/fastsam/predict.md
index 6feb2ff..4a3431b 100644
--- a/docs/reference/models/fastsam/predict.md
+++ b/docs/reference/models/fastsam/predict.md
@@ -3,7 +3,12 @@ description: Get detailed insights about Ultralytics FastSAMPredictor. Learn to
keywords: Ultralytics, FastSAMPredictor, predictive modeling, AI optimization, machine learning, deep learning, Ultralytics documentation
---
-## FastSAMPredictor
+# Reference for `ultralytics/models/fastsam/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/predict.py).
+
---
-### ::: ultralytics.models.fastsam.predict.FastSAMPredictor
+## ::: ultralytics.models.fastsam.predict.FastSAMPredictor
diff --git a/docs/reference/models/fastsam/prompt.md b/docs/reference/models/fastsam/prompt.md
index e0efa09..ae5305c 100644
--- a/docs/reference/models/fastsam/prompt.md
+++ b/docs/reference/models/fastsam/prompt.md
@@ -3,7 +3,12 @@ description: Learn to effectively utilize FastSAMPrompt model from Ultralytics.
keywords: Ultralytics, FastSAMPrompt, machine learning, model, guide, documentation
---
-## FastSAMPrompt
+# Reference for `ultralytics/models/fastsam/prompt.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/prompt.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/prompt.py).
+
---
-### ::: ultralytics.models.fastsam.prompt.FastSAMPrompt
+## ::: ultralytics.models.fastsam.prompt.FastSAMPrompt
diff --git a/docs/reference/models/fastsam/utils.md b/docs/reference/models/fastsam/utils.md
index cc88ff1..02f1e56 100644
--- a/docs/reference/models/fastsam/utils.md
+++ b/docs/reference/models/fastsam/utils.md
@@ -3,12 +3,16 @@ description: Learn how to adjust bounding boxes to image borders in Ultralytics
keywords: Ultralytics, bounding boxes, Bboxes, image borders, object detection, bbox_iou, model utilities
---
-## adjust_bboxes_to_image_border
+# Reference for `ultralytics/models/fastsam/utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/utils.py).
+
---
-### ::: ultralytics.models.fastsam.utils.adjust_bboxes_to_image_border
+## ::: ultralytics.models.fastsam.utils.adjust_bboxes_to_image_border
-## bbox_iou
---
-### ::: ultralytics.models.fastsam.utils.bbox_iou
+## ::: ultralytics.models.fastsam.utils.bbox_iou
diff --git a/docs/reference/models/fastsam/val.md b/docs/reference/models/fastsam/val.md
index 899da72..d6f6e6e 100644
--- a/docs/reference/models/fastsam/val.md
+++ b/docs/reference/models/fastsam/val.md
@@ -3,7 +3,12 @@ description: Learn about FastSAMValidator in Ultralytics models. Comprehensive g
keywords: Ultralytics, FastSAMValidator, model, synthetic, AI, machine learning, validation
---
-## FastSAMValidator
+# Reference for `ultralytics/models/fastsam/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/val.py).
+
---
-### ::: ultralytics.models.fastsam.val.FastSAMValidator
+## ::: ultralytics.models.fastsam.val.FastSAMValidator
diff --git a/docs/reference/models/nas/model.md b/docs/reference/models/nas/model.md
index 7a872f4..c28c825 100644
--- a/docs/reference/models/nas/model.md
+++ b/docs/reference/models/nas/model.md
@@ -3,7 +3,12 @@ description: Learn how our NAS model operates in Ultralytics. Comprehensive guid
keywords: Ultralytics, NAS model, NAS guide, machine learning, model documentation
---
-## NAS
+# Reference for `ultralytics/models/nas/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/model.py).
+
---
-### ::: ultralytics.models.nas.model.NAS
+## ::: ultralytics.models.nas.model.NAS
diff --git a/docs/reference/models/nas/predict.md b/docs/reference/models/nas/predict.md
index 6d9732b..58df075 100644
--- a/docs/reference/models/nas/predict.md
+++ b/docs/reference/models/nas/predict.md
@@ -3,7 +3,12 @@ description: Explore Ultralytics NASPredictor. Understand high-level architectur
keywords: NASPredictor, Ultralytics, Ultralytics model, model architecture, efficient predictions
---
-## NASPredictor
+# Reference for `ultralytics/models/nas/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/predict.py).
+
---
-### ::: ultralytics.models.nas.predict.NASPredictor
+## ::: ultralytics.models.nas.predict.NASPredictor
diff --git a/docs/reference/models/nas/val.md b/docs/reference/models/nas/val.md
index a005d07..aca74d3 100644
--- a/docs/reference/models/nas/val.md
+++ b/docs/reference/models/nas/val.md
@@ -3,7 +3,12 @@ description: Explore the utilities and functions of the Ultralytics NASValidator
keywords: Ultralytics, NASValidator, models.nas.val.NASValidator, AI models, allocation, optimization
---
-## NASValidator
+# Reference for `ultralytics/models/nas/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/val.py).
+
---
-### ::: ultralytics.models.nas.val.NASValidator
+## ::: ultralytics.models.nas.val.NASValidator
diff --git a/docs/reference/models/rtdetr/model.md b/docs/reference/models/rtdetr/model.md
index d9f5157..9042710 100644
--- a/docs/reference/models/rtdetr/model.md
+++ b/docs/reference/models/rtdetr/model.md
@@ -3,7 +3,12 @@ description: Explore the specifics of using the RTDETR model in Ultralytics. Det
keywords: Ultralytics, RTDETR model, Ultralytics models, object detection, Ultralytics documentation
---
-## RTDETR
+# Reference for `ultralytics/models/rtdetr/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/model.py).
+
---
-### ::: ultralytics.models.rtdetr.model.RTDETR
+## ::: ultralytics.models.rtdetr.model.RTDETR
diff --git a/docs/reference/models/rtdetr/predict.md b/docs/reference/models/rtdetr/predict.md
index 65ceb74..d5be43b 100644
--- a/docs/reference/models/rtdetr/predict.md
+++ b/docs/reference/models/rtdetr/predict.md
@@ -3,7 +3,12 @@ description: Learn how to use the RTDETRPredictor model of the Ultralytics packa
keywords: Ultralytics, RTDETRPredictor, model documentation, guide, real-time object detection
---
-## RTDETRPredictor
+# Reference for `ultralytics/models/rtdetr/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/predict.py).
+
---
-### ::: ultralytics.models.rtdetr.predict.RTDETRPredictor
+## ::: ultralytics.models.rtdetr.predict.RTDETRPredictor
diff --git a/docs/reference/models/rtdetr/train.md b/docs/reference/models/rtdetr/train.md
index 02540f1..a260cff 100644
--- a/docs/reference/models/rtdetr/train.md
+++ b/docs/reference/models/rtdetr/train.md
@@ -3,12 +3,16 @@ description: Get insights into RTDETRTrainer, a crucial component of Ultralytics
keywords: Ultralytics, RTDETRTrainer, model training, Ultralytics models, PyTorch models, neural networks, machine learning, deep learning
---
-## RTDETRTrainer
+# Reference for `ultralytics/models/rtdetr/train.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/train.py).
+
---
-### ::: ultralytics.models.rtdetr.train.RTDETRTrainer
+## ::: ultralytics.models.rtdetr.train.RTDETRTrainer
-## train
---
-### ::: ultralytics.models.rtdetr.train.train
+## ::: ultralytics.models.rtdetr.train.train
diff --git a/docs/reference/models/rtdetr/val.md b/docs/reference/models/rtdetr/val.md
index 489efe2..3ee076c 100644
--- a/docs/reference/models/rtdetr/val.md
+++ b/docs/reference/models/rtdetr/val.md
@@ -3,12 +3,16 @@ description: Explore RTDETRDataset in Ultralytics Models. Learn about the RTDETR
keywords: Ultralytics, RTDETRDataset, RTDETRValidator, real-time object detection, models documentation
---
-## RTDETRDataset
+# Reference for `ultralytics/models/rtdetr/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/val.py).
+
---
-### ::: ultralytics.models.rtdetr.val.RTDETRDataset
+## ::: ultralytics.models.rtdetr.val.RTDETRDataset
-## RTDETRValidator
---
-### ::: ultralytics.models.rtdetr.val.RTDETRValidator
+## ::: ultralytics.models.rtdetr.val.RTDETRValidator
diff --git a/docs/reference/models/sam/amg.md b/docs/reference/models/sam/amg.md
index 844020d..625dba0 100644
--- a/docs/reference/models/sam/amg.md
+++ b/docs/reference/models/sam/amg.md
@@ -3,87 +3,76 @@ description: Explore Ultralytics methods for mask data processing, transformatio
keywords: Ultralytics, Mask Data, Transformation, Encoding, RLE encoding, Image cropping, Pytorch, SAM, AMG, Ultralytics model
---
-## MaskData
+# Reference for `ultralytics/models/sam/amg.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py).
+
---
-### ::: ultralytics.models.sam.amg.MaskData
+## ::: ultralytics.models.sam.amg.MaskData
-## is_box_near_crop_edge
---
-### ::: ultralytics.models.sam.amg.is_box_near_crop_edge
+## ::: ultralytics.models.sam.amg.is_box_near_crop_edge
-## box_xyxy_to_xywh
---
-### ::: ultralytics.models.sam.amg.box_xyxy_to_xywh
+## ::: ultralytics.models.sam.amg.box_xyxy_to_xywh
-## batch_iterator
---
-### ::: ultralytics.models.sam.amg.batch_iterator
+## ::: ultralytics.models.sam.amg.batch_iterator
-## mask_to_rle_pytorch
---
-### ::: ultralytics.models.sam.amg.mask_to_rle_pytorch
+## ::: ultralytics.models.sam.amg.mask_to_rle_pytorch
-## rle_to_mask
---
-### ::: ultralytics.models.sam.amg.rle_to_mask
+## ::: ultralytics.models.sam.amg.rle_to_mask
-## area_from_rle
---
-### ::: ultralytics.models.sam.amg.area_from_rle
+## ::: ultralytics.models.sam.amg.area_from_rle
-## calculate_stability_score
---
-### ::: ultralytics.models.sam.amg.calculate_stability_score
+## ::: ultralytics.models.sam.amg.calculate_stability_score
-## build_point_grid
---
-### ::: ultralytics.models.sam.amg.build_point_grid
+## ::: ultralytics.models.sam.amg.build_point_grid
-## build_all_layer_point_grids
---
-### ::: ultralytics.models.sam.amg.build_all_layer_point_grids
+## ::: ultralytics.models.sam.amg.build_all_layer_point_grids
-## generate_crop_boxes
---
-### ::: ultralytics.models.sam.amg.generate_crop_boxes
+## ::: ultralytics.models.sam.amg.generate_crop_boxes
-## uncrop_boxes_xyxy
---
-### ::: ultralytics.models.sam.amg.uncrop_boxes_xyxy
+## ::: ultralytics.models.sam.amg.uncrop_boxes_xyxy
-## uncrop_points
---
-### ::: ultralytics.models.sam.amg.uncrop_points
+## ::: ultralytics.models.sam.amg.uncrop_points
-## uncrop_masks
---
-### ::: ultralytics.models.sam.amg.uncrop_masks
+## ::: ultralytics.models.sam.amg.uncrop_masks
-## remove_small_regions
---
-### ::: ultralytics.models.sam.amg.remove_small_regions
+## ::: ultralytics.models.sam.amg.remove_small_regions
-## coco_encode_rle
---
-### ::: ultralytics.models.sam.amg.coco_encode_rle
+## ::: ultralytics.models.sam.amg.coco_encode_rle
-## batched_mask_to_box
---
-### ::: ultralytics.models.sam.amg.batched_mask_to_box
+## ::: ultralytics.models.sam.amg.batched_mask_to_box
diff --git a/docs/reference/models/sam/build.md b/docs/reference/models/sam/build.md
index c5a8035..523b24c 100644
--- a/docs/reference/models/sam/build.md
+++ b/docs/reference/models/sam/build.md
@@ -3,32 +3,32 @@ description: Master building SAM ViT models with Ultralytics. Discover steps to
keywords: Ultralytics, SAM, build sam, vision transformer, vits, build_sam_vit_l, build_sam_vit_b, build_sam
---
-## build_sam_vit_h
+# Reference for `ultralytics/models/sam/build.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py).
+
---
-### ::: ultralytics.models.sam.build.build_sam_vit_h
+## ::: ultralytics.models.sam.build.build_sam_vit_h
-## build_sam_vit_l
---
-### ::: ultralytics.models.sam.build.build_sam_vit_l
+## ::: ultralytics.models.sam.build.build_sam_vit_l
-## build_sam_vit_b
---
-### ::: ultralytics.models.sam.build.build_sam_vit_b
+## ::: ultralytics.models.sam.build.build_sam_vit_b
-## build_mobile_sam
---
-### ::: ultralytics.models.sam.build.build_mobile_sam
+## ::: ultralytics.models.sam.build.build_mobile_sam
-## _build_sam
---
-### ::: ultralytics.models.sam.build._build_sam
+## ::: ultralytics.models.sam.build._build_sam
-## build_sam
---
-### ::: ultralytics.models.sam.build.build_sam
+## ::: ultralytics.models.sam.build.build_sam
diff --git a/docs/reference/models/sam/model.md b/docs/reference/models/sam/model.md
index 3bbc85e..b55c7d5 100644
--- a/docs/reference/models/sam/model.md
+++ b/docs/reference/models/sam/model.md
@@ -3,7 +3,12 @@ description: Dive into the SAM model details in the Ultralytics YOLO documentati
keywords: Ultralytics, YOLO, SAM Model, Documentations, Machine Learning, AI, Convolutional neural network
---
-## SAM
+# Reference for `ultralytics/models/sam/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py).
+
---
-### ::: ultralytics.models.sam.model.SAM
+## ::: ultralytics.models.sam.model.SAM
diff --git a/docs/reference/models/sam/modules/decoders.md b/docs/reference/models/sam/modules/decoders.md
index 764e154..d1fb7d2 100644
--- a/docs/reference/models/sam/modules/decoders.md
+++ b/docs/reference/models/sam/modules/decoders.md
@@ -3,12 +3,16 @@ description: Explore MaskDecoder, a part of the Ultralytics models. Gain insight
keywords: Ultralytics, MaskDecoder, SAM modules, decoders, MLP, YOLO, machine learning, image recognition
---
-## MaskDecoder
+# Reference for `ultralytics/models/sam/modules/decoders.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py).
+
---
-### ::: ultralytics.models.sam.modules.decoders.MaskDecoder
+## ::: ultralytics.models.sam.modules.decoders.MaskDecoder
-## MLP
---
-### ::: ultralytics.models.sam.modules.decoders.MLP
+## ::: ultralytics.models.sam.modules.decoders.MLP
diff --git a/docs/reference/models/sam/modules/encoders.md b/docs/reference/models/sam/modules/encoders.md
index b57b0e7..867c5ca 100644
--- a/docs/reference/models/sam/modules/encoders.md
+++ b/docs/reference/models/sam/modules/encoders.md
@@ -3,52 +3,48 @@ description: Discover detailed information on ImageEncoderViT, PositionEmbedding
keywords: Ultralytics, Encoders, Modules, Documentation, ImageEncoderViT, PositionEmbeddingRandom, Attention, window_partition, get_rel_pos
---
-## ImageEncoderViT
+# Reference for `ultralytics/models/sam/modules/encoders.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py).
+
---
-### ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT
+## ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT
-## PromptEncoder
---
-### ::: ultralytics.models.sam.modules.encoders.PromptEncoder
+## ::: ultralytics.models.sam.modules.encoders.PromptEncoder
-## PositionEmbeddingRandom
---
-### ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom
+## ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom
-## Block
---
-### ::: ultralytics.models.sam.modules.encoders.Block
+## ::: ultralytics.models.sam.modules.encoders.Block
-## Attention
---
-### ::: ultralytics.models.sam.modules.encoders.Attention
+## ::: ultralytics.models.sam.modules.encoders.Attention
-## PatchEmbed
---
-### ::: ultralytics.models.sam.modules.encoders.PatchEmbed
+## ::: ultralytics.models.sam.modules.encoders.PatchEmbed
-## window_partition
---
-### ::: ultralytics.models.sam.modules.encoders.window_partition
+## ::: ultralytics.models.sam.modules.encoders.window_partition
-## window_unpartition
---
-### ::: ultralytics.models.sam.modules.encoders.window_unpartition
+## ::: ultralytics.models.sam.modules.encoders.window_unpartition
-## get_rel_pos
---
-### ::: ultralytics.models.sam.modules.encoders.get_rel_pos
+## ::: ultralytics.models.sam.modules.encoders.get_rel_pos
-## add_decomposed_rel_pos
---
-### ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos
+## ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos
diff --git a/docs/reference/models/sam/modules/sam.md b/docs/reference/models/sam/modules/sam.md
index 353aaeb..add5e5e 100644
--- a/docs/reference/models/sam/modules/sam.md
+++ b/docs/reference/models/sam/modules/sam.md
@@ -3,7 +3,12 @@ description: Explore the Sam module of Ultralytics. Discover detailed methods, c
keywords: Ultralytics, Sam module, deep learning, model training, Ultralytics documentation
---
-## Sam
+# Reference for `ultralytics/models/sam/modules/sam.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py).
+
---
-### ::: ultralytics.models.sam.modules.sam.Sam
+## ::: ultralytics.models.sam.modules.sam.Sam
diff --git a/docs/reference/models/sam/modules/tiny_encoder.md b/docs/reference/models/sam/modules/tiny_encoder.md
index 0225b67..f2208f0 100644
--- a/docs/reference/models/sam/modules/tiny_encoder.md
+++ b/docs/reference/models/sam/modules/tiny_encoder.md
@@ -3,57 +3,52 @@ description: Get in-depth insights about Ultralytics Tiny Encoder Modules such a
keywords: Ultralytics, Tiny Encoder, Conv2d_BN, MBConv, ConvLayer, Attention, BasicLayer, TinyViT, Machine learning modules, Ultralytics models
---
-## Conv2d_BN
+# Reference for `ultralytics/models/sam/modules/tiny_encoder.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py).
+
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.Conv2d_BN
+## ::: ultralytics.models.sam.modules.tiny_encoder.Conv2d_BN
-## PatchEmbed
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.PatchEmbed
+## ::: ultralytics.models.sam.modules.tiny_encoder.PatchEmbed
-## MBConv
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.MBConv
+## ::: ultralytics.models.sam.modules.tiny_encoder.MBConv
-## PatchMerging
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.PatchMerging
+## ::: ultralytics.models.sam.modules.tiny_encoder.PatchMerging
-## ConvLayer
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.ConvLayer
+## ::: ultralytics.models.sam.modules.tiny_encoder.ConvLayer
-## Mlp
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.Mlp
+## ::: ultralytics.models.sam.modules.tiny_encoder.Mlp
-## Attention
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.Attention
+## ::: ultralytics.models.sam.modules.tiny_encoder.Attention
-## TinyViTBlock
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.TinyViTBlock
+## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViTBlock
-## BasicLayer
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.BasicLayer
+## ::: ultralytics.models.sam.modules.tiny_encoder.BasicLayer
-## LayerNorm2d
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.LayerNorm2d
+## ::: ultralytics.models.sam.modules.tiny_encoder.LayerNorm2d
-## TinyViT
---
-### ::: ultralytics.models.sam.modules.tiny_encoder.TinyViT
+## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViT
diff --git a/docs/reference/models/sam/modules/transformer.md b/docs/reference/models/sam/modules/transformer.md
index 62a0b1c..b635a93 100644
--- a/docs/reference/models/sam/modules/transformer.md
+++ b/docs/reference/models/sam/modules/transformer.md
@@ -3,17 +3,20 @@ description: Learn about TwoWayTransformer and Attention modules in Ultralytics.
keywords: Ultralytics, TwoWayTransformer, Attention, AI models, transformers
---
-## TwoWayTransformer
+# Reference for `ultralytics/models/sam/modules/transformer.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py).
+
---
-### ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer
+## ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer
-## TwoWayAttentionBlock
---
-### ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock
+## ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock
-## Attention
---
-### ::: ultralytics.models.sam.modules.transformer.Attention
+## ::: ultralytics.models.sam.modules.transformer.Attention
diff --git a/docs/reference/models/sam/predict.md b/docs/reference/models/sam/predict.md
index 2722f39..ea427e9 100644
--- a/docs/reference/models/sam/predict.md
+++ b/docs/reference/models/sam/predict.md
@@ -3,7 +3,12 @@ description: Master the ultralytics.models.sam.predict.Predictor class with our
keywords: Ultralytics, predictor, models, sam.predict.Predictor, AI, machine learning, predictive models
---
-## Predictor
+# Reference for `ultralytics/models/sam/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py).
+
---
-### ::: ultralytics.models.sam.predict.Predictor
+## ::: ultralytics.models.sam.predict.Predictor
diff --git a/docs/reference/models/utils/loss.md b/docs/reference/models/utils/loss.md
index 41c8f39..386ab72 100644
--- a/docs/reference/models/utils/loss.md
+++ b/docs/reference/models/utils/loss.md
@@ -3,12 +3,16 @@ description: Learn to use the DETRLoss function provided by Ultralytics YOLO. Un
keywords: Ultralytics, YOLO, Documentation, DETRLoss, Detection Loss, Loss function, DETR, RTDETR Detection Models
---
-## DETRLoss
+# Reference for `ultralytics/models/utils/loss.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py).
+
---
-### ::: ultralytics.models.utils.loss.DETRLoss
+## ::: ultralytics.models.utils.loss.DETRLoss
-## RTDETRDetectionLoss
---
-### ::: ultralytics.models.utils.loss.RTDETRDetectionLoss
+## ::: ultralytics.models.utils.loss.RTDETRDetectionLoss
diff --git a/docs/reference/models/utils/ops.md b/docs/reference/models/utils/ops.md
index 290b237..fe353f0 100644
--- a/docs/reference/models/utils/ops.md
+++ b/docs/reference/models/utils/ops.md
@@ -3,17 +3,20 @@ description: Discover details for "HungarianMatcher" & "inverse_sigmoid" functio
keywords: Ultralytics, YOLO, HungarianMatcher, inverse_sigmoid, detection models, model utilities, ops
---
-## HungarianMatcher
+# Reference for `ultralytics/models/utils/ops.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/ops.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/ops.py).
+
---
-### ::: ultralytics.models.utils.ops.HungarianMatcher
+## ::: ultralytics.models.utils.ops.HungarianMatcher
-## get_cdn_group
---
-### ::: ultralytics.models.utils.ops.get_cdn_group
+## ::: ultralytics.models.utils.ops.get_cdn_group
-## inverse_sigmoid
---
-### ::: ultralytics.models.utils.ops.inverse_sigmoid
+## ::: ultralytics.models.utils.ops.inverse_sigmoid
diff --git a/docs/reference/models/yolo/classify/predict.md b/docs/reference/models/yolo/classify/predict.md
index 81a8d60..a8d03dd 100644
--- a/docs/reference/models/yolo/classify/predict.md
+++ b/docs/reference/models/yolo/classify/predict.md
@@ -3,12 +3,16 @@ description: Explore the Ultralytics ClassificationPredictor guide for model pre
keywords: Ultralytics, classification predictor, predict, YOLO, AI models, model visualization
---
-## ClassificationPredictor
+# Reference for `ultralytics/models/yolo/classify/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/predict.py).
+
---
-### ::: ultralytics.models.yolo.classify.predict.ClassificationPredictor
+## ::: ultralytics.models.yolo.classify.predict.ClassificationPredictor
-## predict
---
-### ::: ultralytics.models.yolo.classify.predict.predict
+## ::: ultralytics.models.yolo.classify.predict.predict
diff --git a/docs/reference/models/yolo/classify/train.md b/docs/reference/models/yolo/classify/train.md
index 567c22f..c3dfba1 100644
--- a/docs/reference/models/yolo/classify/train.md
+++ b/docs/reference/models/yolo/classify/train.md
@@ -3,12 +3,16 @@ description: Delve into Classification Trainer at Ultralytics YOLO docs and opti
keywords: Ultralytics, YOLO, Classification Trainer, deep learning, training process, AI models, documentation
---
-## ClassificationTrainer
+# Reference for `ultralytics/models/yolo/classify/train.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/train.py).
+
---
-### ::: ultralytics.models.yolo.classify.train.ClassificationTrainer
+## ::: ultralytics.models.yolo.classify.train.ClassificationTrainer
-## train
---
-### ::: ultralytics.models.yolo.classify.train.train
+## ::: ultralytics.models.yolo.classify.train.train
diff --git a/docs/reference/models/yolo/classify/val.md b/docs/reference/models/yolo/classify/val.md
index 860b071..b761355 100644
--- a/docs/reference/models/yolo/classify/val.md
+++ b/docs/reference/models/yolo/classify/val.md
@@ -3,12 +3,16 @@ description: Explore YOLO ClassificationValidator, a key element of Ultralytics
keywords: Ultralytics, YOLO, ClassificationValidator, model validation, model fine-tuning, deep learning, computer vision
---
-## ClassificationValidator
+# Reference for `ultralytics/models/yolo/classify/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/val.py).
+
---
-### ::: ultralytics.models.yolo.classify.val.ClassificationValidator
+## ::: ultralytics.models.yolo.classify.val.ClassificationValidator
-## val
---
-### ::: ultralytics.models.yolo.classify.val.val
+## ::: ultralytics.models.yolo.classify.val.val
diff --git a/docs/reference/models/yolo/detect/predict.md b/docs/reference/models/yolo/detect/predict.md
index 1c5c869..31325bc 100644
--- a/docs/reference/models/yolo/detect/predict.md
+++ b/docs/reference/models/yolo/detect/predict.md
@@ -3,12 +3,16 @@ description: Explore the guide to using the DetectionPredictor in Ultralytics YO
keywords: Ultralytics, YOLO, DetectionPredictor, detect, predict, object detection, analysis
---
-## DetectionPredictor
+# Reference for `ultralytics/models/yolo/detect/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/predict.py).
+
---
-### ::: ultralytics.models.yolo.detect.predict.DetectionPredictor
+## ::: ultralytics.models.yolo.detect.predict.DetectionPredictor
-## predict
---
-### ::: ultralytics.models.yolo.detect.predict.predict
+## ::: ultralytics.models.yolo.detect.predict.predict
diff --git a/docs/reference/models/yolo/detect/train.md b/docs/reference/models/yolo/detect/train.md
index efe2d8b..bee758e 100644
--- a/docs/reference/models/yolo/detect/train.md
+++ b/docs/reference/models/yolo/detect/train.md
@@ -3,12 +3,16 @@ description: Maximize your model's potential with Ultralytics YOLO Detection Tra
keywords: Ultralytics YOLO, YOLO, Detection Trainer, Model Training, Machine Learning, Deep Learning, Computer Vision
---
-## DetectionTrainer
+# Reference for `ultralytics/models/yolo/detect/train.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py).
+
---
-### ::: ultralytics.models.yolo.detect.train.DetectionTrainer
+## ::: ultralytics.models.yolo.detect.train.DetectionTrainer
-## train
---
-### ::: ultralytics.models.yolo.detect.train.train
+## ::: ultralytics.models.yolo.detect.train.train
diff --git a/docs/reference/models/yolo/detect/val.md b/docs/reference/models/yolo/detect/val.md
index cab8dfb..0b51b45 100644
--- a/docs/reference/models/yolo/detect/val.md
+++ b/docs/reference/models/yolo/detect/val.md
@@ -3,12 +3,16 @@ description: Discover function valuation of your YOLO models with the Ultralytic
keywords: Ultralytics, YOLO, Detection Validator, model valuation, precision, recall
---
-## DetectionValidator
+# Reference for `ultralytics/models/yolo/detect/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/val.py).
+
---
-### ::: ultralytics.models.yolo.detect.val.DetectionValidator
+## ::: ultralytics.models.yolo.detect.val.DetectionValidator
-## val
---
-### ::: ultralytics.models.yolo.detect.val.val
+## ::: ultralytics.models.yolo.detect.val.val
diff --git a/docs/reference/models/yolo/model.md b/docs/reference/models/yolo/model.md
index 5efdec8..2121a05 100644
--- a/docs/reference/models/yolo/model.md
+++ b/docs/reference/models/yolo/model.md
@@ -3,7 +3,12 @@ description: Discover the Ultralytics YOLO model class. Learn advanced technique
keywords: Ultralytics YOLO, YOLO, YOLO model, Model Training, Machine Learning, Deep Learning, Computer Vision
---
-## YOLO
+# Reference for `ultralytics/models/yolo/model.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/model.py).
+
---
-### ::: ultralytics.models.yolo.model.YOLO
+## ::: ultralytics.models.yolo.model.YOLO
diff --git a/docs/reference/models/yolo/pose/predict.md b/docs/reference/models/yolo/pose/predict.md
index 5e6b50e..1c09093 100644
--- a/docs/reference/models/yolo/pose/predict.md
+++ b/docs/reference/models/yolo/pose/predict.md
@@ -3,12 +3,16 @@ description: Discover how to use PosePredictor in the Ultralytics YOLO model. In
keywords: Ultralytics, YOLO, PosePredictor, machine learning, AI, predictive models
---
-## PosePredictor
+# Reference for `ultralytics/models/yolo/pose/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/predict.py).
+
---
-### ::: ultralytics.models.yolo.pose.predict.PosePredictor
+## ::: ultralytics.models.yolo.pose.predict.PosePredictor
-## predict
---
-### ::: ultralytics.models.yolo.pose.predict.predict
+## ::: ultralytics.models.yolo.pose.predict.predict
diff --git a/docs/reference/models/yolo/pose/train.md b/docs/reference/models/yolo/pose/train.md
index b3fb1b7..5f6ad69 100644
--- a/docs/reference/models/yolo/pose/train.md
+++ b/docs/reference/models/yolo/pose/train.md
@@ -3,12 +3,16 @@ description: Explore Ultralytics PoseTrainer for YOLO models. Get a step-by-step
keywords: Ultralytics, YOLO, PoseTrainer, pose training, AI modeling, custom data training
---
-## PoseTrainer
+# Reference for `ultralytics/models/yolo/pose/train.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/train.py).
+
---
-### ::: ultralytics.models.yolo.pose.train.PoseTrainer
+## ::: ultralytics.models.yolo.pose.train.PoseTrainer
-## train
---
-### ::: ultralytics.models.yolo.pose.train.train
+## ::: ultralytics.models.yolo.pose.train.train
diff --git a/docs/reference/models/yolo/pose/val.md b/docs/reference/models/yolo/pose/val.md
index 1084a97..c131235 100644
--- a/docs/reference/models/yolo/pose/val.md
+++ b/docs/reference/models/yolo/pose/val.md
@@ -3,12 +3,16 @@ description: Explore the PoseValidator—review how Ultralytics YOLO validates p
keywords: PoseValidator, Ultralytics, YOLO, Object detection, Pose validation
---
-## PoseValidator
+# Reference for `ultralytics/models/yolo/pose/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/val.py).
+
---
-### ::: ultralytics.models.yolo.pose.val.PoseValidator
+## ::: ultralytics.models.yolo.pose.val.PoseValidator
-## val
---
-### ::: ultralytics.models.yolo.pose.val.val
+## ::: ultralytics.models.yolo.pose.val.val
diff --git a/docs/reference/models/yolo/segment/predict.md b/docs/reference/models/yolo/segment/predict.md
index 5b23755..a9ad69e 100644
--- a/docs/reference/models/yolo/segment/predict.md
+++ b/docs/reference/models/yolo/segment/predict.md
@@ -3,12 +3,16 @@ description: Discover how to utilize the YOLO Segmentation Predictor in Ultralyt
keywords: YOLO, Ultralytics, object detection, segmentation predictor
---
-## SegmentationPredictor
+# Reference for `ultralytics/models/yolo/segment/predict.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/predict.py).
+
---
-### ::: ultralytics.models.yolo.segment.predict.SegmentationPredictor
+## ::: ultralytics.models.yolo.segment.predict.SegmentationPredictor
-## predict
---
-### ::: ultralytics.models.yolo.segment.predict.predict
+## ::: ultralytics.models.yolo.segment.predict.predict
diff --git a/docs/reference/models/yolo/segment/train.md b/docs/reference/models/yolo/segment/train.md
index ec4830b..9c4dc87 100644
--- a/docs/reference/models/yolo/segment/train.md
+++ b/docs/reference/models/yolo/segment/train.md
@@ -3,12 +3,16 @@ description: Maximize your YOLO model's performance with our SegmentationTrainer
keywords: Ultralytics, YOLO, SegmentationTrainer, image segmentation, object detection, model training, YOLO model
---
-## SegmentationTrainer
+# Reference for `ultralytics/models/yolo/segment/train.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/train.py).
+
---
-### ::: ultralytics.models.yolo.segment.train.SegmentationTrainer
+## ::: ultralytics.models.yolo.segment.train.SegmentationTrainer
-## train
---
-### ::: ultralytics.models.yolo.segment.train.train
+## ::: ultralytics.models.yolo.segment.train.train
diff --git a/docs/reference/models/yolo/segment/val.md b/docs/reference/models/yolo/segment/val.md
index eef0922..898090a 100644
--- a/docs/reference/models/yolo/segment/val.md
+++ b/docs/reference/models/yolo/segment/val.md
@@ -3,12 +3,16 @@ description: Get practical insights about our SegmentationValidator in YOLO Ultr
keywords: Ultralytics, YOLO, SegmentationValidator, model segmentation, image classification, object detection
---
-## SegmentationValidator
+# Reference for `ultralytics/models/yolo/segment/val.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/val.py).
+
---
-### ::: ultralytics.models.yolo.segment.val.SegmentationValidator
+## ::: ultralytics.models.yolo.segment.val.SegmentationValidator
-## val
---
-### ::: ultralytics.models.yolo.segment.val.val
+## ::: ultralytics.models.yolo.segment.val.val
diff --git a/docs/reference/nn/autobackend.md b/docs/reference/nn/autobackend.md
index 6dc601d..af21d60 100644
--- a/docs/reference/nn/autobackend.md
+++ b/docs/reference/nn/autobackend.md
@@ -3,12 +3,16 @@ description: Get to know more about Ultralytics nn.autobackend.check_class_names
keywords: Ultralytics, AutoBackend, check_class_names, YOLO, YOLO models, optimization
---
-## AutoBackend
+# Reference for `ultralytics/nn/autobackend.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/autobackend.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/autobackend.py).
+
---
-### ::: ultralytics.nn.autobackend.AutoBackend
+## ::: ultralytics.nn.autobackend.AutoBackend
-## check_class_names
---
-### ::: ultralytics.nn.autobackend.check_class_names
+## ::: ultralytics.nn.autobackend.check_class_names
diff --git a/docs/reference/nn/modules/block.md b/docs/reference/nn/modules/block.md
index ee62389..ae72e3b 100644
--- a/docs/reference/nn/modules/block.md
+++ b/docs/reference/nn/modules/block.md
@@ -3,87 +3,76 @@ description: Explore Ultralytics YOLO neural network modules, Proto to Bottlenec
keywords: YOLO, Ultralytics, neural network, nn.modules.block, Proto, HGBlock, SPPF, C2, C3, RepC3, C3Ghost, Bottleneck, BottleneckCSP
---
-## DFL
+# Reference for `ultralytics/nn/modules/block.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/block.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/block.py).
+
---
-### ::: ultralytics.nn.modules.block.DFL
+## ::: ultralytics.nn.modules.block.DFL
-## Proto
---
-### ::: ultralytics.nn.modules.block.Proto
+## ::: ultralytics.nn.modules.block.Proto
-## HGStem
---
-### ::: ultralytics.nn.modules.block.HGStem
+## ::: ultralytics.nn.modules.block.HGStem
-## HGBlock
---
-### ::: ultralytics.nn.modules.block.HGBlock
+## ::: ultralytics.nn.modules.block.HGBlock
-## SPP
---
-### ::: ultralytics.nn.modules.block.SPP
+## ::: ultralytics.nn.modules.block.SPP
-## SPPF
---
-### ::: ultralytics.nn.modules.block.SPPF
+## ::: ultralytics.nn.modules.block.SPPF
-## C1
---
-### ::: ultralytics.nn.modules.block.C1
+## ::: ultralytics.nn.modules.block.C1
-## C2
---
-### ::: ultralytics.nn.modules.block.C2
+## ::: ultralytics.nn.modules.block.C2
-## C2f
---
-### ::: ultralytics.nn.modules.block.C2f
+## ::: ultralytics.nn.modules.block.C2f
-## C3
---
-### ::: ultralytics.nn.modules.block.C3
+## ::: ultralytics.nn.modules.block.C3
-## C3x
---
-### ::: ultralytics.nn.modules.block.C3x
+## ::: ultralytics.nn.modules.block.C3x
-## RepC3
---
-### ::: ultralytics.nn.modules.block.RepC3
+## ::: ultralytics.nn.modules.block.RepC3
-## C3TR
---
-### ::: ultralytics.nn.modules.block.C3TR
+## ::: ultralytics.nn.modules.block.C3TR
-## C3Ghost
---
-### ::: ultralytics.nn.modules.block.C3Ghost
+## ::: ultralytics.nn.modules.block.C3Ghost
-## GhostBottleneck
---
-### ::: ultralytics.nn.modules.block.GhostBottleneck
+## ::: ultralytics.nn.modules.block.GhostBottleneck
-## Bottleneck
---
-### ::: ultralytics.nn.modules.block.Bottleneck
+## ::: ultralytics.nn.modules.block.Bottleneck
-## BottleneckCSP
---
-### ::: ultralytics.nn.modules.block.BottleneckCSP
+## ::: ultralytics.nn.modules.block.BottleneckCSP
diff --git a/docs/reference/nn/modules/conv.md b/docs/reference/nn/modules/conv.md
index 66e3571..bf83f8a 100644
--- a/docs/reference/nn/modules/conv.md
+++ b/docs/reference/nn/modules/conv.md
@@ -3,72 +3,64 @@ description: Explore various Ultralytics convolution modules including Conv2, DW
keywords: Ultralytics, Convolution Modules, Conv2, DWConv, ConvTranspose, GhostConv, ChannelAttention, CBAM, autopad
---
-## Conv
+# Reference for `ultralytics/nn/modules/conv.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/conv.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/conv.py).
+
---
-### ::: ultralytics.nn.modules.conv.Conv
+## ::: ultralytics.nn.modules.conv.Conv
-## Conv2
---
-### ::: ultralytics.nn.modules.conv.Conv2
+## ::: ultralytics.nn.modules.conv.Conv2
-## LightConv
---
-### ::: ultralytics.nn.modules.conv.LightConv
+## ::: ultralytics.nn.modules.conv.LightConv
-## DWConv
---
-### ::: ultralytics.nn.modules.conv.DWConv
+## ::: ultralytics.nn.modules.conv.DWConv
-## DWConvTranspose2d
---
-### ::: ultralytics.nn.modules.conv.DWConvTranspose2d
+## ::: ultralytics.nn.modules.conv.DWConvTranspose2d
-## ConvTranspose
---
-### ::: ultralytics.nn.modules.conv.ConvTranspose
+## ::: ultralytics.nn.modules.conv.ConvTranspose
-## Focus
---
-### ::: ultralytics.nn.modules.conv.Focus
+## ::: ultralytics.nn.modules.conv.Focus
-## GhostConv
---
-### ::: ultralytics.nn.modules.conv.GhostConv
+## ::: ultralytics.nn.modules.conv.GhostConv
-## RepConv
---
-### ::: ultralytics.nn.modules.conv.RepConv
+## ::: ultralytics.nn.modules.conv.RepConv
-## ChannelAttention
---
-### ::: ultralytics.nn.modules.conv.ChannelAttention
+## ::: ultralytics.nn.modules.conv.ChannelAttention
-## SpatialAttention
---
-### ::: ultralytics.nn.modules.conv.SpatialAttention
+## ::: ultralytics.nn.modules.conv.SpatialAttention
-## CBAM
---
-### ::: ultralytics.nn.modules.conv.CBAM
+## ::: ultralytics.nn.modules.conv.CBAM
-## Concat
---
-### ::: ultralytics.nn.modules.conv.Concat
+## ::: ultralytics.nn.modules.conv.Concat
-## autopad
---
-### ::: ultralytics.nn.modules.conv.autopad
+## ::: ultralytics.nn.modules.conv.autopad
diff --git a/docs/reference/nn/modules/head.md b/docs/reference/nn/modules/head.md
index 51565ea..bbbeab9 100644
--- a/docs/reference/nn/modules/head.md
+++ b/docs/reference/nn/modules/head.md
@@ -3,27 +3,28 @@ description: Explore docs covering Ultralytics YOLO detection, pose & RTDETRDeco
keywords: Ultralytics, YOLO, Detection, Pose, RTDETRDecoder, nn modules, guides
---
-## Detect
+# Reference for `ultralytics/nn/modules/head.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/head.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/head.py).
+
---
-### ::: ultralytics.nn.modules.head.Detect
+## ::: ultralytics.nn.modules.head.Detect
-## Segment
---
-### ::: ultralytics.nn.modules.head.Segment
+## ::: ultralytics.nn.modules.head.Segment
-## Pose
---
-### ::: ultralytics.nn.modules.head.Pose
+## ::: ultralytics.nn.modules.head.Pose
-## Classify
---
-### ::: ultralytics.nn.modules.head.Classify
+## ::: ultralytics.nn.modules.head.Classify
-## RTDETRDecoder
---
-### ::: ultralytics.nn.modules.head.RTDETRDecoder
+## ::: ultralytics.nn.modules.head.RTDETRDecoder
diff --git a/docs/reference/nn/modules/transformer.md b/docs/reference/nn/modules/transformer.md
index 8f5f724..be689a1 100644
--- a/docs/reference/nn/modules/transformer.md
+++ b/docs/reference/nn/modules/transformer.md
@@ -3,52 +3,48 @@ description: Learn about Ultralytics transformer encoder, layer, MLP block, Laye
keywords: Ultralytics, Ultralytics documentation, TransformerEncoderLayer, TransformerLayer, MLPBlock, LayerNorm2d, DeformableTransformerDecoderLayer
---
-## TransformerEncoderLayer
+# Reference for `ultralytics/nn/modules/transformer.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/transformer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/transformer.py).
+
---
-### ::: ultralytics.nn.modules.transformer.TransformerEncoderLayer
+## ::: ultralytics.nn.modules.transformer.TransformerEncoderLayer
-## AIFI
---
-### ::: ultralytics.nn.modules.transformer.AIFI
+## ::: ultralytics.nn.modules.transformer.AIFI
-## TransformerLayer
---
-### ::: ultralytics.nn.modules.transformer.TransformerLayer
+## ::: ultralytics.nn.modules.transformer.TransformerLayer
-## TransformerBlock
---
-### ::: ultralytics.nn.modules.transformer.TransformerBlock
+## ::: ultralytics.nn.modules.transformer.TransformerBlock
-## MLPBlock
---
-### ::: ultralytics.nn.modules.transformer.MLPBlock
+## ::: ultralytics.nn.modules.transformer.MLPBlock
-## MLP
---
-### ::: ultralytics.nn.modules.transformer.MLP
+## ::: ultralytics.nn.modules.transformer.MLP
-## LayerNorm2d
---
-### ::: ultralytics.nn.modules.transformer.LayerNorm2d
+## ::: ultralytics.nn.modules.transformer.LayerNorm2d
-## MSDeformAttn
---
-### ::: ultralytics.nn.modules.transformer.MSDeformAttn
+## ::: ultralytics.nn.modules.transformer.MSDeformAttn
-## DeformableTransformerDecoderLayer
---
-### ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoderLayer
+## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoderLayer
-## DeformableTransformerDecoder
---
-### ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoder
+## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoder
diff --git a/docs/reference/nn/modules/utils.md b/docs/reference/nn/modules/utils.md
index e3212c2..1604e77 100644
--- a/docs/reference/nn/modules/utils.md
+++ b/docs/reference/nn/modules/utils.md
@@ -3,27 +3,28 @@ description: Explore Ultralytics neural network utils, such as bias_init_with_pr
keywords: Ultralytics, neural network, nn.modules.utils, bias_init_with_prob, inverse_sigmoid, multi_scale_deformable_attn_pytorch
---
-## _get_clones
+# Reference for `ultralytics/nn/modules/utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/utils.py).
+
---
-### ::: ultralytics.nn.modules.utils._get_clones
+## ::: ultralytics.nn.modules.utils._get_clones
-## bias_init_with_prob
---
-### ::: ultralytics.nn.modules.utils.bias_init_with_prob
+## ::: ultralytics.nn.modules.utils.bias_init_with_prob
-## linear_init_
---
-### ::: ultralytics.nn.modules.utils.linear_init_
+## ::: ultralytics.nn.modules.utils.linear_init_
-## inverse_sigmoid
---
-### ::: ultralytics.nn.modules.utils.inverse_sigmoid
+## ::: ultralytics.nn.modules.utils.inverse_sigmoid
-## multi_scale_deformable_attn_pytorch
---
-### ::: ultralytics.nn.modules.utils.multi_scale_deformable_attn_pytorch
+## ::: ultralytics.nn.modules.utils.multi_scale_deformable_attn_pytorch
diff --git a/docs/reference/nn/tasks.md b/docs/reference/nn/tasks.md
index 8285fa4..52c1ab7 100644
--- a/docs/reference/nn/tasks.md
+++ b/docs/reference/nn/tasks.md
@@ -1,74 +1,65 @@
-## BaseModel
+# Reference for `ultralytics/nn/tasks.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py).
+
---
-### ::: ultralytics.nn.tasks.BaseModel
+## ::: ultralytics.nn.tasks.BaseModel
-## DetectionModel
---
-### ::: ultralytics.nn.tasks.DetectionModel
+## ::: ultralytics.nn.tasks.DetectionModel
-## SegmentationModel
---
-### ::: ultralytics.nn.tasks.SegmentationModel
+## ::: ultralytics.nn.tasks.SegmentationModel
-## PoseModel
---
-### ::: ultralytics.nn.tasks.PoseModel
+## ::: ultralytics.nn.tasks.PoseModel
-## ClassificationModel
---
-### ::: ultralytics.nn.tasks.ClassificationModel
+## ::: ultralytics.nn.tasks.ClassificationModel
-## RTDETRDetectionModel
---
-### ::: ultralytics.nn.tasks.RTDETRDetectionModel
+## ::: ultralytics.nn.tasks.RTDETRDetectionModel
-## Ensemble
---
-### ::: ultralytics.nn.tasks.Ensemble
+## ::: ultralytics.nn.tasks.Ensemble
-## temporary_modules
---
-### ::: ultralytics.nn.tasks.temporary_modules
+## ::: ultralytics.nn.tasks.temporary_modules
-## torch_safe_load
---
-### ::: ultralytics.nn.tasks.torch_safe_load
+## ::: ultralytics.nn.tasks.torch_safe_load
-## attempt_load_weights
---
-### ::: ultralytics.nn.tasks.attempt_load_weights
+## ::: ultralytics.nn.tasks.attempt_load_weights
-## attempt_load_one_weight
---
-### ::: ultralytics.nn.tasks.attempt_load_one_weight
+## ::: ultralytics.nn.tasks.attempt_load_one_weight
-## parse_model
---
-### ::: ultralytics.nn.tasks.parse_model
+## ::: ultralytics.nn.tasks.parse_model
-## yaml_model_load
---
-### ::: ultralytics.nn.tasks.yaml_model_load
+## ::: ultralytics.nn.tasks.yaml_model_load
-## guess_model_scale
---
-### ::: ultralytics.nn.tasks.guess_model_scale
+## ::: ultralytics.nn.tasks.guess_model_scale
-## guess_model_task
---
-### ::: ultralytics.nn.tasks.guess_model_task
+## ::: ultralytics.nn.tasks.guess_model_task
diff --git a/docs/reference/trackers/basetrack.md b/docs/reference/trackers/basetrack.md
index 323c5d7..858db47 100644
--- a/docs/reference/trackers/basetrack.md
+++ b/docs/reference/trackers/basetrack.md
@@ -3,12 +3,16 @@ description: Get familiar with TrackState in Ultralytics. Learn how it is used i
keywords: Ultralytics, TrackState, BaseTrack, Ultralytics tracker, Ultralytics documentation
---
-## TrackState
+# Reference for `ultralytics/trackers/basetrack.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/basetrack.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/basetrack.py).
+
---
-### ::: ultralytics.trackers.basetrack.TrackState
+## ::: ultralytics.trackers.basetrack.TrackState
-## BaseTrack
---
-### ::: ultralytics.trackers.basetrack.BaseTrack
+## ::: ultralytics.trackers.basetrack.BaseTrack
diff --git a/docs/reference/trackers/bot_sort.md b/docs/reference/trackers/bot_sort.md
index dae14e4..7aac57e 100644
--- a/docs/reference/trackers/bot_sort.md
+++ b/docs/reference/trackers/bot_sort.md
@@ -3,12 +3,16 @@ description: Master the use of Ultralytics BOTrack, a key component of the power
keywords: Ultralytics, BOTSORT, BOTrack, tracking system, official documentation, machine learning, AI tracking
---
-## BOTrack
+# Reference for `ultralytics/trackers/bot_sort.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/bot_sort.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/bot_sort.py).
+
---
-### ::: ultralytics.trackers.bot_sort.BOTrack
+## ::: ultralytics.trackers.bot_sort.BOTrack
-## BOTSORT
---
-### ::: ultralytics.trackers.bot_sort.BOTSORT
+## ::: ultralytics.trackers.bot_sort.BOTSORT
diff --git a/docs/reference/trackers/byte_tracker.md b/docs/reference/trackers/byte_tracker.md
index cd9e1b6..24cc344 100644
--- a/docs/reference/trackers/byte_tracker.md
+++ b/docs/reference/trackers/byte_tracker.md
@@ -3,12 +3,16 @@ description: Step-in to explore in-depth the functionalities of Ultralytics BYTE
keywords: STrack, Ultralytics, BYTETracker, documentation, Ultralytics tracker, object tracking, YOLO
---
-## STrack
+# Reference for `ultralytics/trackers/byte_tracker.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/byte_tracker.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/byte_tracker.py).
+
---
-### ::: ultralytics.trackers.byte_tracker.STrack
+## ::: ultralytics.trackers.byte_tracker.STrack
-## BYTETracker
---
-### ::: ultralytics.trackers.byte_tracker.BYTETracker
+## ::: ultralytics.trackers.byte_tracker.BYTETracker
diff --git a/docs/reference/trackers/track.md b/docs/reference/trackers/track.md
index 9f517f8..3fbf3e8 100644
--- a/docs/reference/trackers/track.md
+++ b/docs/reference/trackers/track.md
@@ -3,17 +3,20 @@ description: Explore Ultralytics documentation on prediction function starters &
keywords: Ultralytics, YOLO, on predict start, register tracker, prediction functions, documentation
---
-## on_predict_start
+# Reference for `ultralytics/trackers/track.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/track.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/track.py).
+
---
-### ::: ultralytics.trackers.track.on_predict_start
+## ::: ultralytics.trackers.track.on_predict_start
-## on_predict_postprocess_end
---
-### ::: ultralytics.trackers.track.on_predict_postprocess_end
+## ::: ultralytics.trackers.track.on_predict_postprocess_end
-## register_tracker
---
-### ::: ultralytics.trackers.track.register_tracker
+## ::: ultralytics.trackers.track.register_tracker
diff --git a/docs/reference/trackers/utils/gmc.md b/docs/reference/trackers/utils/gmc.md
index 9ca814a..3365e11 100644
--- a/docs/reference/trackers/utils/gmc.md
+++ b/docs/reference/trackers/utils/gmc.md
@@ -3,7 +3,12 @@ description: Explore the Ultralytics GMC tool in our comprehensive documentation
keywords: Ultralytics, GMC utility, Ultralytics documentation, Ultralytics tracker, machine learning tools
---
-## GMC
+# Reference for `ultralytics/trackers/utils/gmc.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/gmc.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/gmc.py).
+
---
-### ::: ultralytics.trackers.utils.gmc.GMC
+## ::: ultralytics.trackers.utils.gmc.GMC
diff --git a/docs/reference/trackers/utils/kalman_filter.md b/docs/reference/trackers/utils/kalman_filter.md
index b3ad228..75667e8 100644
--- a/docs/reference/trackers/utils/kalman_filter.md
+++ b/docs/reference/trackers/utils/kalman_filter.md
@@ -3,12 +3,16 @@ description: Explore KalmanFilterXYAH, a key component of Ultralytics trackers.
keywords: Ultralytics, KalmanFilterXYAH, tracker, documentation, guide
---
-## KalmanFilterXYAH
+# Reference for `ultralytics/trackers/utils/kalman_filter.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/kalman_filter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/kalman_filter.py).
+
---
-### ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYAH
+## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYAH
-## KalmanFilterXYWH
---
-### ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYWH
+## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYWH
diff --git a/docs/reference/trackers/utils/matching.md b/docs/reference/trackers/utils/matching.md
index 4b9a0bb..290b8a2 100644
--- a/docs/reference/trackers/utils/matching.md
+++ b/docs/reference/trackers/utils/matching.md
@@ -3,62 +3,56 @@ description: Explore in-depth guidance for using Ultralytics trackers utils matc
keywords: Ultralytics, Trackers Utils, Matching, merge_matches, linear_assignment, iou_distance, embedding_distance, fuse_motion, fuse_score, documentation
---
-## merge_matches
+# Reference for `ultralytics/trackers/utils/matching.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/matching.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/matching.py).
+
---
-### ::: ultralytics.trackers.utils.matching.merge_matches
+## ::: ultralytics.trackers.utils.matching.merge_matches
-## _indices_to_matches
---
-### ::: ultralytics.trackers.utils.matching._indices_to_matches
+## ::: ultralytics.trackers.utils.matching._indices_to_matches
-## linear_assignment
---
-### ::: ultralytics.trackers.utils.matching.linear_assignment
+## ::: ultralytics.trackers.utils.matching.linear_assignment
-## ious
---
-### ::: ultralytics.trackers.utils.matching.ious
+## ::: ultralytics.trackers.utils.matching.ious
-## iou_distance
---
-### ::: ultralytics.trackers.utils.matching.iou_distance
+## ::: ultralytics.trackers.utils.matching.iou_distance
-## v_iou_distance
---
-### ::: ultralytics.trackers.utils.matching.v_iou_distance
+## ::: ultralytics.trackers.utils.matching.v_iou_distance
-## embedding_distance
---
-### ::: ultralytics.trackers.utils.matching.embedding_distance
+## ::: ultralytics.trackers.utils.matching.embedding_distance
-## gate_cost_matrix
---
-### ::: ultralytics.trackers.utils.matching.gate_cost_matrix
+## ::: ultralytics.trackers.utils.matching.gate_cost_matrix
-## fuse_motion
---
-### ::: ultralytics.trackers.utils.matching.fuse_motion
+## ::: ultralytics.trackers.utils.matching.fuse_motion
-## fuse_iou
---
-### ::: ultralytics.trackers.utils.matching.fuse_iou
+## ::: ultralytics.trackers.utils.matching.fuse_iou
-## fuse_score
---
-### ::: ultralytics.trackers.utils.matching.fuse_score
+## ::: ultralytics.trackers.utils.matching.fuse_score
-## bbox_ious
---
-### ::: ultralytics.trackers.utils.matching.bbox_ious
+## ::: ultralytics.trackers.utils.matching.bbox_ious
diff --git a/docs/reference/utils/__init__.md b/docs/reference/utils/__init__.md
index c9a35bb..83fa71c 100644
--- a/docs/reference/utils/__init__.md
+++ b/docs/reference/utils/__init__.md
@@ -3,167 +3,140 @@ description: Explore the Ultralytics Utils package, with handy functions like co
keywords: Ultralytics, Utils, utilitarian functions, colorstr, yaml_save, set_logging, is_kaggle, is_docker, clean_url
---
-## SimpleClass
+# Reference for `ultralytics/utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils.py).
+
---
-### ::: ultralytics.utils.SimpleClass
+## ::: ultralytics.utils.SimpleClass
-## IterableSimpleNamespace
---
-### ::: ultralytics.utils.IterableSimpleNamespace
+## ::: ultralytics.utils.IterableSimpleNamespace
-## EmojiFilter
---
-### ::: ultralytics.utils.EmojiFilter
+## ::: ultralytics.utils.EmojiFilter
-## ThreadingLocked
---
-### ::: ultralytics.utils.ThreadingLocked
+## ::: ultralytics.utils.ThreadingLocked
-## TryExcept
---
-### ::: ultralytics.utils.TryExcept
+## ::: ultralytics.utils.TryExcept
-## SettingsManager
---
-### ::: ultralytics.utils.SettingsManager
+## ::: ultralytics.utils.SettingsManager
-## plt_settings
---
-### ::: ultralytics.utils.plt_settings
+## ::: ultralytics.utils.plt_settings
-## set_logging
---
-### ::: ultralytics.utils.set_logging
+## ::: ultralytics.utils.set_logging
-## emojis
---
-### ::: ultralytics.utils.emojis
+## ::: ultralytics.utils.emojis
-## yaml_save
---
-### ::: ultralytics.utils.yaml_save
+## ::: ultralytics.utils.yaml_save
-## yaml_load
---
-### ::: ultralytics.utils.yaml_load
+## ::: ultralytics.utils.yaml_load
-## yaml_print
---
-### ::: ultralytics.utils.yaml_print
+## ::: ultralytics.utils.yaml_print
-## is_colab
---
-### ::: ultralytics.utils.is_colab
+## ::: ultralytics.utils.is_colab
-## is_kaggle
---
-### ::: ultralytics.utils.is_kaggle
+## ::: ultralytics.utils.is_kaggle
-## is_jupyter
---
-### ::: ultralytics.utils.is_jupyter
+## ::: ultralytics.utils.is_jupyter
-## is_docker
---
-### ::: ultralytics.utils.is_docker
+## ::: ultralytics.utils.is_docker
-## is_online
---
-### ::: ultralytics.utils.is_online
+## ::: ultralytics.utils.is_online
-## is_pip_package
---
-### ::: ultralytics.utils.is_pip_package
+## ::: ultralytics.utils.is_pip_package
-## is_dir_writeable
---
-### ::: ultralytics.utils.is_dir_writeable
+## ::: ultralytics.utils.is_dir_writeable
-## is_pytest_running
---
-### ::: ultralytics.utils.is_pytest_running
+## ::: ultralytics.utils.is_pytest_running
-## is_github_actions_ci
---
-### ::: ultralytics.utils.is_github_actions_ci
+## ::: ultralytics.utils.is_github_actions_ci
-## is_git_dir
---
-### ::: ultralytics.utils.is_git_dir
+## ::: ultralytics.utils.is_git_dir
-## get_git_dir
---
-### ::: ultralytics.utils.get_git_dir
+## ::: ultralytics.utils.get_git_dir
-## get_git_origin_url
---
-### ::: ultralytics.utils.get_git_origin_url
+## ::: ultralytics.utils.get_git_origin_url
-## get_git_branch
---
-### ::: ultralytics.utils.get_git_branch
+## ::: ultralytics.utils.get_git_branch
-## get_default_args
---
-### ::: ultralytics.utils.get_default_args
+## ::: ultralytics.utils.get_default_args
-## get_user_config_dir
---
-### ::: ultralytics.utils.get_user_config_dir
+## ::: ultralytics.utils.get_user_config_dir
-## colorstr
---
-### ::: ultralytics.utils.colorstr
+## ::: ultralytics.utils.colorstr
-## threaded
---
-### ::: ultralytics.utils.threaded
+## ::: ultralytics.utils.threaded
-## set_sentry
---
-### ::: ultralytics.utils.set_sentry
+## ::: ultralytics.utils.set_sentry
-## deprecation_warn
---
-### ::: ultralytics.utils.deprecation_warn
+## ::: ultralytics.utils.deprecation_warn
-## clean_url
---
-### ::: ultralytics.utils.clean_url
+## ::: ultralytics.utils.clean_url
-## url2file
---
-### ::: ultralytics.utils.url2file
+## ::: ultralytics.utils.url2file
diff --git a/docs/reference/utils/autobatch.md b/docs/reference/utils/autobatch.md
index a6c7be2..cdcdd08 100644
--- a/docs/reference/utils/autobatch.md
+++ b/docs/reference/utils/autobatch.md
@@ -3,12 +3,16 @@ description: Explore Ultralytics documentation for check_train_batch_size utilit
keywords: Ultralytics, check_train_batch_size, autobatch, utility, machine learning, documentation
---
-## check_train_batch_size
+# Reference for `ultralytics/utils/autobatch.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/autobatch.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/autobatch.py).
+
---
-### ::: ultralytics.utils.autobatch.check_train_batch_size
+## ::: ultralytics.utils.autobatch.check_train_batch_size
-## autobatch
---
-### ::: ultralytics.utils.autobatch.autobatch
+## ::: ultralytics.utils.autobatch.autobatch
diff --git a/docs/reference/utils/benchmarks.md b/docs/reference/utils/benchmarks.md
index 672d373..4b96053 100644
--- a/docs/reference/utils/benchmarks.md
+++ b/docs/reference/utils/benchmarks.md
@@ -3,12 +3,16 @@ description: Discover how to profile your models using Ultralytics utilities. En
keywords: Ultralytics, ProfileModels, benchmarks, model profiling, performance optimization
---
-## ProfileModels
+# Reference for `ultralytics/utils/benchmarks.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/benchmarks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/benchmarks.py).
+
---
-### ::: ultralytics.utils.benchmarks.ProfileModels
+## ::: ultralytics.utils.benchmarks.ProfileModels
-## benchmark
---
-### ::: ultralytics.utils.benchmarks.benchmark
+## ::: ultralytics.utils.benchmarks.benchmark
diff --git a/docs/reference/utils/callbacks/base.md b/docs/reference/utils/callbacks/base.md
index a491155..36509d7 100644
--- a/docs/reference/utils/callbacks/base.md
+++ b/docs/reference/utils/callbacks/base.md
@@ -3,137 +3,116 @@ description: Explore how to use the on-train, on-validation, on-pretrain, and on
keywords: Ultralytics, Callbacks, On-train, On-validation, On-pretrain, On-predict, Parameters update, Model saving, Integration callbacks
---
-## on_pretrain_routine_start
+# Reference for `ultralytics/utils/callbacks/base.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/base.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/base.py).
+
---
-### ::: ultralytics.utils.callbacks.base.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_start
-## on_pretrain_routine_end
---
-### ::: ultralytics.utils.callbacks.base.on_pretrain_routine_end
+## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_end
-## on_train_start
---
-### ::: ultralytics.utils.callbacks.base.on_train_start
+## ::: ultralytics.utils.callbacks.base.on_train_start
-## on_train_epoch_start
---
-### ::: ultralytics.utils.callbacks.base.on_train_epoch_start
+## ::: ultralytics.utils.callbacks.base.on_train_epoch_start
-## on_train_batch_start
---
-### ::: ultralytics.utils.callbacks.base.on_train_batch_start
+## ::: ultralytics.utils.callbacks.base.on_train_batch_start
-## optimizer_step
---
-### ::: ultralytics.utils.callbacks.base.optimizer_step
+## ::: ultralytics.utils.callbacks.base.optimizer_step
-## on_before_zero_grad
---
-### ::: ultralytics.utils.callbacks.base.on_before_zero_grad
+## ::: ultralytics.utils.callbacks.base.on_before_zero_grad
-## on_train_batch_end
---
-### ::: ultralytics.utils.callbacks.base.on_train_batch_end
+## ::: ultralytics.utils.callbacks.base.on_train_batch_end
-## on_train_epoch_end
---
-### ::: ultralytics.utils.callbacks.base.on_train_epoch_end
+## ::: ultralytics.utils.callbacks.base.on_train_epoch_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.base.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.base.on_fit_epoch_end
-## on_model_save
---
-### ::: ultralytics.utils.callbacks.base.on_model_save
+## ::: ultralytics.utils.callbacks.base.on_model_save
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.base.on_train_end
+## ::: ultralytics.utils.callbacks.base.on_train_end
-## on_params_update
---
-### ::: ultralytics.utils.callbacks.base.on_params_update
+## ::: ultralytics.utils.callbacks.base.on_params_update
-## teardown
---
-### ::: ultralytics.utils.callbacks.base.teardown
+## ::: ultralytics.utils.callbacks.base.teardown
-## on_val_start
---
-### ::: ultralytics.utils.callbacks.base.on_val_start
+## ::: ultralytics.utils.callbacks.base.on_val_start
-## on_val_batch_start
---
-### ::: ultralytics.utils.callbacks.base.on_val_batch_start
+## ::: ultralytics.utils.callbacks.base.on_val_batch_start
-## on_val_batch_end
---
-### ::: ultralytics.utils.callbacks.base.on_val_batch_end
+## ::: ultralytics.utils.callbacks.base.on_val_batch_end
-## on_val_end
---
-### ::: ultralytics.utils.callbacks.base.on_val_end
+## ::: ultralytics.utils.callbacks.base.on_val_end
-## on_predict_start
---
-### ::: ultralytics.utils.callbacks.base.on_predict_start
+## ::: ultralytics.utils.callbacks.base.on_predict_start
-## on_predict_batch_start
---
-### ::: ultralytics.utils.callbacks.base.on_predict_batch_start
+## ::: ultralytics.utils.callbacks.base.on_predict_batch_start
-## on_predict_batch_end
---
-### ::: ultralytics.utils.callbacks.base.on_predict_batch_end
+## ::: ultralytics.utils.callbacks.base.on_predict_batch_end
-## on_predict_postprocess_end
---
-### ::: ultralytics.utils.callbacks.base.on_predict_postprocess_end
+## ::: ultralytics.utils.callbacks.base.on_predict_postprocess_end
-## on_predict_end
---
-### ::: ultralytics.utils.callbacks.base.on_predict_end
+## ::: ultralytics.utils.callbacks.base.on_predict_end
-## on_export_start
---
-### ::: ultralytics.utils.callbacks.base.on_export_start
+## ::: ultralytics.utils.callbacks.base.on_export_start
-## on_export_end
---
-### ::: ultralytics.utils.callbacks.base.on_export_end
+## ::: ultralytics.utils.callbacks.base.on_export_end
-## get_default_callbacks
---
-### ::: ultralytics.utils.callbacks.base.get_default_callbacks
+## ::: ultralytics.utils.callbacks.base.get_default_callbacks
-## add_integration_callbacks
---
-### ::: ultralytics.utils.callbacks.base.add_integration_callbacks
+## ::: ultralytics.utils.callbacks.base.add_integration_callbacks
diff --git a/docs/reference/utils/callbacks/clearml.md b/docs/reference/utils/callbacks/clearml.md
index 42f097c..7bac81f 100644
--- a/docs/reference/utils/callbacks/clearml.md
+++ b/docs/reference/utils/callbacks/clearml.md
@@ -3,37 +3,36 @@ description: Uncover the specifics of Ultralytics ClearML callbacks, from pretra
keywords: Ultralytics, clearML, callbacks, pretrain routine start, validation end, train epoch end, training end
---
-## _log_debug_samples
+# Reference for `ultralytics/utils/callbacks/clearml.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/clearml.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/clearml.py).
+
---
-### ::: ultralytics.utils.callbacks.clearml._log_debug_samples
+## ::: ultralytics.utils.callbacks.clearml._log_debug_samples
-## _log_plot
---
-### ::: ultralytics.utils.callbacks.clearml._log_plot
+## ::: ultralytics.utils.callbacks.clearml._log_plot
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.clearml.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.clearml.on_pretrain_routine_start
-## on_train_epoch_end
---
-### ::: ultralytics.utils.callbacks.clearml.on_train_epoch_end
+## ::: ultralytics.utils.callbacks.clearml.on_train_epoch_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.clearml.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.clearml.on_fit_epoch_end
-## on_val_end
---
-### ::: ultralytics.utils.callbacks.clearml.on_val_end
+## ::: ultralytics.utils.callbacks.clearml.on_val_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.clearml.on_train_end
+## ::: ultralytics.utils.callbacks.clearml.on_train_end
diff --git a/docs/reference/utils/callbacks/comet.md b/docs/reference/utils/callbacks/comet.md
index fa7af61..603c714 100644
--- a/docs/reference/utils/callbacks/comet.md
+++ b/docs/reference/utils/callbacks/comet.md
@@ -3,122 +3,104 @@ description: Explore comprehensive documentation for utilising Comet Callbacks i
keywords: Ultralytics, Comet Callbacks, Training optimisation, Logging, Experiment Workflows
---
-## _get_comet_mode
+# Reference for `ultralytics/utils/callbacks/comet.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/comet.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/comet.py).
+
---
-### ::: ultralytics.utils.callbacks.comet._get_comet_mode
+## ::: ultralytics.utils.callbacks.comet._get_comet_mode
-## _get_comet_model_name
---
-### ::: ultralytics.utils.callbacks.comet._get_comet_model_name
+## ::: ultralytics.utils.callbacks.comet._get_comet_model_name
-## _get_eval_batch_logging_interval
---
-### ::: ultralytics.utils.callbacks.comet._get_eval_batch_logging_interval
+## ::: ultralytics.utils.callbacks.comet._get_eval_batch_logging_interval
-## _get_max_image_predictions_to_log
---
-### ::: ultralytics.utils.callbacks.comet._get_max_image_predictions_to_log
+## ::: ultralytics.utils.callbacks.comet._get_max_image_predictions_to_log
-## _scale_confidence_score
---
-### ::: ultralytics.utils.callbacks.comet._scale_confidence_score
+## ::: ultralytics.utils.callbacks.comet._scale_confidence_score
-## _should_log_confusion_matrix
---
-### ::: ultralytics.utils.callbacks.comet._should_log_confusion_matrix
+## ::: ultralytics.utils.callbacks.comet._should_log_confusion_matrix
-## _should_log_image_predictions
---
-### ::: ultralytics.utils.callbacks.comet._should_log_image_predictions
+## ::: ultralytics.utils.callbacks.comet._should_log_image_predictions
-## _get_experiment_type
---
-### ::: ultralytics.utils.callbacks.comet._get_experiment_type
+## ::: ultralytics.utils.callbacks.comet._get_experiment_type
-## _create_experiment
---
-### ::: ultralytics.utils.callbacks.comet._create_experiment
+## ::: ultralytics.utils.callbacks.comet._create_experiment
-## _fetch_trainer_metadata
---
-### ::: ultralytics.utils.callbacks.comet._fetch_trainer_metadata
+## ::: ultralytics.utils.callbacks.comet._fetch_trainer_metadata
-## _scale_bounding_box_to_original_image_shape
---
-### ::: ultralytics.utils.callbacks.comet._scale_bounding_box_to_original_image_shape
+## ::: ultralytics.utils.callbacks.comet._scale_bounding_box_to_original_image_shape
-## _format_ground_truth_annotations_for_detection
---
-### ::: ultralytics.utils.callbacks.comet._format_ground_truth_annotations_for_detection
+## ::: ultralytics.utils.callbacks.comet._format_ground_truth_annotations_for_detection
-## _format_prediction_annotations_for_detection
---
-### ::: ultralytics.utils.callbacks.comet._format_prediction_annotations_for_detection
+## ::: ultralytics.utils.callbacks.comet._format_prediction_annotations_for_detection
-## _fetch_annotations
---
-### ::: ultralytics.utils.callbacks.comet._fetch_annotations
+## ::: ultralytics.utils.callbacks.comet._fetch_annotations
-## _create_prediction_metadata_map
---
-### ::: ultralytics.utils.callbacks.comet._create_prediction_metadata_map
+## ::: ultralytics.utils.callbacks.comet._create_prediction_metadata_map
-## _log_confusion_matrix
---
-### ::: ultralytics.utils.callbacks.comet._log_confusion_matrix
+## ::: ultralytics.utils.callbacks.comet._log_confusion_matrix
-## _log_images
---
-### ::: ultralytics.utils.callbacks.comet._log_images
+## ::: ultralytics.utils.callbacks.comet._log_images
-## _log_image_predictions
---
-### ::: ultralytics.utils.callbacks.comet._log_image_predictions
+## ::: ultralytics.utils.callbacks.comet._log_image_predictions
-## _log_plots
---
-### ::: ultralytics.utils.callbacks.comet._log_plots
+## ::: ultralytics.utils.callbacks.comet._log_plots
-## _log_model
---
-### ::: ultralytics.utils.callbacks.comet._log_model
+## ::: ultralytics.utils.callbacks.comet._log_model
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.comet.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.comet.on_pretrain_routine_start
-## on_train_epoch_end
---
-### ::: ultralytics.utils.callbacks.comet.on_train_epoch_end
+## ::: ultralytics.utils.callbacks.comet.on_train_epoch_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.comet.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.comet.on_fit_epoch_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.comet.on_train_end
+## ::: ultralytics.utils.callbacks.comet.on_train_end
diff --git a/docs/reference/utils/callbacks/dvc.md b/docs/reference/utils/callbacks/dvc.md
index 7e32912..c5e52c3 100644
--- a/docs/reference/utils/callbacks/dvc.md
+++ b/docs/reference/utils/callbacks/dvc.md
@@ -3,52 +3,48 @@ description: Browse through Ultralytics YOLO docs to learn about important loggi
keywords: Ultralytics, YOLO, callbacks, logger, training, pretraining, machine learning, models
---
-## _logger_disabled
+# Reference for `ultralytics/utils/callbacks/dvc.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/dvc.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/dvc.py).
+
---
-### ::: ultralytics.utils.callbacks.dvc._logger_disabled
+## ::: ultralytics.utils.callbacks.dvc._logger_disabled
-## _log_images
---
-### ::: ultralytics.utils.callbacks.dvc._log_images
+## ::: ultralytics.utils.callbacks.dvc._log_images
-## _log_plots
---
-### ::: ultralytics.utils.callbacks.dvc._log_plots
+## ::: ultralytics.utils.callbacks.dvc._log_plots
-## _log_confusion_matrix
---
-### ::: ultralytics.utils.callbacks.dvc._log_confusion_matrix
+## ::: ultralytics.utils.callbacks.dvc._log_confusion_matrix
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_start
-## on_pretrain_routine_end
---
-### ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_end
+## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_end
-## on_train_start
---
-### ::: ultralytics.utils.callbacks.dvc.on_train_start
+## ::: ultralytics.utils.callbacks.dvc.on_train_start
-## on_train_epoch_start
---
-### ::: ultralytics.utils.callbacks.dvc.on_train_epoch_start
+## ::: ultralytics.utils.callbacks.dvc.on_train_epoch_start
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.dvc.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.dvc.on_fit_epoch_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.dvc.on_train_end
+## ::: ultralytics.utils.callbacks.dvc.on_train_end
diff --git a/docs/reference/utils/callbacks/hub.md b/docs/reference/utils/callbacks/hub.md
index f8dba4d..b5d3c88 100644
--- a/docs/reference/utils/callbacks/hub.md
+++ b/docs/reference/utils/callbacks/hub.md
@@ -3,42 +3,40 @@ description: Explore the detailed information on key Ultralytics callbacks such
keywords: Ultralytics, callbacks, on_pretrain_routine_end, on_model_save, on_train_start, on_predict_start, hub, training
---
-## on_pretrain_routine_end
+# Reference for `ultralytics/utils/callbacks/hub.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/hub.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/hub.py).
+
---
-### ::: ultralytics.utils.callbacks.hub.on_pretrain_routine_end
+## ::: ultralytics.utils.callbacks.hub.on_pretrain_routine_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.hub.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.hub.on_fit_epoch_end
-## on_model_save
---
-### ::: ultralytics.utils.callbacks.hub.on_model_save
+## ::: ultralytics.utils.callbacks.hub.on_model_save
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.hub.on_train_end
+## ::: ultralytics.utils.callbacks.hub.on_train_end
-## on_train_start
---
-### ::: ultralytics.utils.callbacks.hub.on_train_start
+## ::: ultralytics.utils.callbacks.hub.on_train_start
-## on_val_start
---
-### ::: ultralytics.utils.callbacks.hub.on_val_start
+## ::: ultralytics.utils.callbacks.hub.on_val_start
-## on_predict_start
---
-### ::: ultralytics.utils.callbacks.hub.on_predict_start
+## ::: ultralytics.utils.callbacks.hub.on_predict_start
-## on_export_start
---
-### ::: ultralytics.utils.callbacks.hub.on_export_start
+## ::: ultralytics.utils.callbacks.hub.on_export_start
diff --git a/docs/reference/utils/callbacks/mlflow.md b/docs/reference/utils/callbacks/mlflow.md
index a5f95c1..0eaba24 100644
--- a/docs/reference/utils/callbacks/mlflow.md
+++ b/docs/reference/utils/callbacks/mlflow.md
@@ -3,17 +3,20 @@ description: Understand routines at the end of pre-training and training in Ultr
keywords: Ultralytics, MLflow, Callbacks, on_pretrain_routine_end, on_train_end, Machine Learning, Training
---
-## on_pretrain_routine_end
+# Reference for `ultralytics/utils/callbacks/mlflow.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/mlflow.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/mlflow.py).
+
---
-### ::: ultralytics.utils.callbacks.mlflow.on_pretrain_routine_end
+## ::: ultralytics.utils.callbacks.mlflow.on_pretrain_routine_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.mlflow.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.mlflow.on_fit_epoch_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.mlflow.on_train_end
+## ::: ultralytics.utils.callbacks.mlflow.on_train_end
diff --git a/docs/reference/utils/callbacks/neptune.md b/docs/reference/utils/callbacks/neptune.md
index 92de1f5..914f12b 100644
--- a/docs/reference/utils/callbacks/neptune.md
+++ b/docs/reference/utils/callbacks/neptune.md
@@ -3,42 +3,40 @@ description: Explore exhaustive details about Ultralytics callbacks in Neptune,
keywords: Ultralytics, Neptune callbacks, on_train_epoch_end, on_val_end, _log_plot, _log_images, on_pretrain_routine_start, on_fit_epoch_end, on_train_end
---
-## _log_scalars
+# Reference for `ultralytics/utils/callbacks/neptune.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/neptune.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/neptune.py).
+
---
-### ::: ultralytics.utils.callbacks.neptune._log_scalars
+## ::: ultralytics.utils.callbacks.neptune._log_scalars
-## _log_images
---
-### ::: ultralytics.utils.callbacks.neptune._log_images
+## ::: ultralytics.utils.callbacks.neptune._log_images
-## _log_plot
---
-### ::: ultralytics.utils.callbacks.neptune._log_plot
+## ::: ultralytics.utils.callbacks.neptune._log_plot
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.neptune.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.neptune.on_pretrain_routine_start
-## on_train_epoch_end
---
-### ::: ultralytics.utils.callbacks.neptune.on_train_epoch_end
+## ::: ultralytics.utils.callbacks.neptune.on_train_epoch_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.neptune.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.neptune.on_fit_epoch_end
-## on_val_end
---
-### ::: ultralytics.utils.callbacks.neptune.on_val_end
+## ::: ultralytics.utils.callbacks.neptune.on_val_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.neptune.on_train_end
+## ::: ultralytics.utils.callbacks.neptune.on_train_end
diff --git a/docs/reference/utils/callbacks/raytune.md b/docs/reference/utils/callbacks/raytune.md
index dc7a2a1..7c21782 100644
--- a/docs/reference/utils/callbacks/raytune.md
+++ b/docs/reference/utils/callbacks/raytune.md
@@ -3,7 +3,12 @@ description: Discover the functionality of the on_fit_epoch_end callback in the
keywords: Ultralytics, YOLO, on_fit_epoch_end, callbacks, documentation, deep learning, YOLO framework
---
-## on_fit_epoch_end
+# Reference for `ultralytics/utils/callbacks/raytune.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune.py).
+
---
-### ::: ultralytics.utils.callbacks.raytune.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.raytune.on_fit_epoch_end
diff --git a/docs/reference/utils/callbacks/tensorboard.md b/docs/reference/utils/callbacks/tensorboard.md
index d6b494d..078c2ad 100644
--- a/docs/reference/utils/callbacks/tensorboard.md
+++ b/docs/reference/utils/callbacks/tensorboard.md
@@ -3,22 +3,24 @@ description: Explore Ultralytics YOLO Docs for a deep understanding of log_scala
keywords: Ultralytics, YOLO, documentation, callback utilities, log_scalars, on_batch_end, tensorboard
---
-## _log_scalars
+# Reference for `ultralytics/utils/callbacks/tensorboard.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/tensorboard.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/tensorboard.py).
+
---
-### ::: ultralytics.utils.callbacks.tensorboard._log_scalars
+## ::: ultralytics.utils.callbacks.tensorboard._log_scalars
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.tensorboard.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.tensorboard.on_pretrain_routine_start
-## on_batch_end
---
-### ::: ultralytics.utils.callbacks.tensorboard.on_batch_end
+## ::: ultralytics.utils.callbacks.tensorboard.on_batch_end
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.tensorboard.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.tensorboard.on_fit_epoch_end
diff --git a/docs/reference/utils/callbacks/wb.md b/docs/reference/utils/callbacks/wb.md
index 17a8a92..dc86469 100644
--- a/docs/reference/utils/callbacks/wb.md
+++ b/docs/reference/utils/callbacks/wb.md
@@ -3,27 +3,28 @@ description: Deep dive into Ultralytics callbacks. Learn how to use the _log_plo
keywords: Ultralytics, callbacks, _log_plots, on_fit_epoch_end, on_train_end
---
-## _log_plots
+# Reference for `ultralytics/utils/callbacks/wb.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/wb.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/wb.py).
+
---
-### ::: ultralytics.utils.callbacks.wb._log_plots
+## ::: ultralytics.utils.callbacks.wb._log_plots
-## on_pretrain_routine_start
---
-### ::: ultralytics.utils.callbacks.wb.on_pretrain_routine_start
+## ::: ultralytics.utils.callbacks.wb.on_pretrain_routine_start
-## on_fit_epoch_end
---
-### ::: ultralytics.utils.callbacks.wb.on_fit_epoch_end
+## ::: ultralytics.utils.callbacks.wb.on_fit_epoch_end
-## on_train_epoch_end
---
-### ::: ultralytics.utils.callbacks.wb.on_train_epoch_end
+## ::: ultralytics.utils.callbacks.wb.on_train_epoch_end
-## on_train_end
---
-### ::: ultralytics.utils.callbacks.wb.on_train_end
+## ::: ultralytics.utils.callbacks.wb.on_train_end
diff --git a/docs/reference/utils/checks.md b/docs/reference/utils/checks.md
index 3161113..8921682 100644
--- a/docs/reference/utils/checks.md
+++ b/docs/reference/utils/checks.md
@@ -3,92 +3,80 @@ description: Learn about our routine checks that safeguard Ultralytics operation
keywords: Ultralytics, utility checks, ASCII, check_version, pip_update, check_python, check_torchvision, check_yaml, YOLO filename
---
-## is_ascii
+# Reference for `ultralytics/utils/checks.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/checks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/checks.py).
+
---
-### ::: ultralytics.utils.checks.is_ascii
+## ::: ultralytics.utils.checks.is_ascii
-## check_imgsz
---
-### ::: ultralytics.utils.checks.check_imgsz
+## ::: ultralytics.utils.checks.check_imgsz
-## check_version
---
-### ::: ultralytics.utils.checks.check_version
+## ::: ultralytics.utils.checks.check_version
-## check_latest_pypi_version
---
-### ::: ultralytics.utils.checks.check_latest_pypi_version
+## ::: ultralytics.utils.checks.check_latest_pypi_version
-## check_pip_update_available
---
-### ::: ultralytics.utils.checks.check_pip_update_available
+## ::: ultralytics.utils.checks.check_pip_update_available
-## check_font
---
-### ::: ultralytics.utils.checks.check_font
+## ::: ultralytics.utils.checks.check_font
-## check_python
---
-### ::: ultralytics.utils.checks.check_python
+## ::: ultralytics.utils.checks.check_python
-## check_requirements
---
-### ::: ultralytics.utils.checks.check_requirements
+## ::: ultralytics.utils.checks.check_requirements
-## check_torchvision
---
-### ::: ultralytics.utils.checks.check_torchvision
+## ::: ultralytics.utils.checks.check_torchvision
-## check_suffix
---
-### ::: ultralytics.utils.checks.check_suffix
+## ::: ultralytics.utils.checks.check_suffix
-## check_yolov5u_filename
---
-### ::: ultralytics.utils.checks.check_yolov5u_filename
+## ::: ultralytics.utils.checks.check_yolov5u_filename
-## check_file
---
-### ::: ultralytics.utils.checks.check_file
+## ::: ultralytics.utils.checks.check_file
-## check_yaml
---
-### ::: ultralytics.utils.checks.check_yaml
+## ::: ultralytics.utils.checks.check_yaml
-## check_imshow
---
-### ::: ultralytics.utils.checks.check_imshow
+## ::: ultralytics.utils.checks.check_imshow
-## check_yolo
---
-### ::: ultralytics.utils.checks.check_yolo
+## ::: ultralytics.utils.checks.check_yolo
-## check_amp
---
-### ::: ultralytics.utils.checks.check_amp
+## ::: ultralytics.utils.checks.check_amp
-## git_describe
---
-### ::: ultralytics.utils.checks.git_describe
+## ::: ultralytics.utils.checks.git_describe
-## print_args
---
-### ::: ultralytics.utils.checks.print_args
+## ::: ultralytics.utils.checks.print_args
diff --git a/docs/reference/utils/dist.md b/docs/reference/utils/dist.md
index 325c52c..16ecaea 100644
--- a/docs/reference/utils/dist.md
+++ b/docs/reference/utils/dist.md
@@ -3,22 +3,24 @@ description: Discover the role of dist.find_free_network_port & dist.generate_dd
keywords: Ultralytics, DDP, DDP utility functions, Distributed Data Processing, find free network port, generate DDP command
---
-## find_free_network_port
+# Reference for `ultralytics/utils/dist.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/dist.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/dist.py).
+
---
-### ::: ultralytics.utils.dist.find_free_network_port
+## ::: ultralytics.utils.dist.find_free_network_port
-## generate_ddp_file
---
-### ::: ultralytics.utils.dist.generate_ddp_file
+## ::: ultralytics.utils.dist.generate_ddp_file
-## generate_ddp_command
---
-### ::: ultralytics.utils.dist.generate_ddp_command
+## ::: ultralytics.utils.dist.generate_ddp_command
-## ddp_cleanup
---
-### ::: ultralytics.utils.dist.ddp_cleanup
+## ::: ultralytics.utils.dist.ddp_cleanup
diff --git a/docs/reference/utils/downloads.md b/docs/reference/utils/downloads.md
index 9abfd03..297f79b 100644
--- a/docs/reference/utils/downloads.md
+++ b/docs/reference/utils/downloads.md
@@ -3,37 +3,36 @@ description: Learn about the download utilities in Ultralytics YOLO, featuring f
keywords: Ultralytics, YOLO, download utilities, is_url, check_disk_space, get_github_assets, download, documentation
---
-## is_url
+# Reference for `ultralytics/utils/downloads.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/downloads.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/downloads.py).
+
---
-### ::: ultralytics.utils.downloads.is_url
+## ::: ultralytics.utils.downloads.is_url
-## unzip_file
---
-### ::: ultralytics.utils.downloads.unzip_file
+## ::: ultralytics.utils.downloads.unzip_file
-## check_disk_space
---
-### ::: ultralytics.utils.downloads.check_disk_space
+## ::: ultralytics.utils.downloads.check_disk_space
-## safe_download
---
-### ::: ultralytics.utils.downloads.safe_download
+## ::: ultralytics.utils.downloads.safe_download
-## get_github_assets
---
-### ::: ultralytics.utils.downloads.get_github_assets
+## ::: ultralytics.utils.downloads.get_github_assets
-## attempt_download_asset
---
-### ::: ultralytics.utils.downloads.attempt_download_asset
+## ::: ultralytics.utils.downloads.attempt_download_asset
-## download
---
-### ::: ultralytics.utils.downloads.download
+## ::: ultralytics.utils.downloads.download
diff --git a/docs/reference/utils/errors.md b/docs/reference/utils/errors.md
index 2c21c5f..aa8efc2 100644
--- a/docs/reference/utils/errors.md
+++ b/docs/reference/utils/errors.md
@@ -3,7 +3,12 @@ description: Learn about the HUBModelError in Ultralytics. Enhance your understa
keywords: Ultralytics, HUBModelError, Machine Learning, Error troubleshooting, Ultralytics documentation
---
-## HUBModelError
+# Reference for `ultralytics/utils/errors.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/errors.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/errors.py).
+
---
-### ::: ultralytics.utils.errors.HUBModelError
+## ::: ultralytics.utils.errors.HUBModelError
diff --git a/docs/reference/utils/files.md b/docs/reference/utils/files.md
index 677c14d..68bbc57 100644
--- a/docs/reference/utils/files.md
+++ b/docs/reference/utils/files.md
@@ -3,42 +3,40 @@ description: Discover how to use Ultralytics utility functions for file-related
keywords: Ultralytics, utility functions, file operations, working directory, file age, file size, create directories
---
-## WorkingDirectory
+# Reference for `ultralytics/utils/files.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/files.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/files.py).
+
---
-### ::: ultralytics.utils.files.WorkingDirectory
+## ::: ultralytics.utils.files.WorkingDirectory
-## spaces_in_path
---
-### ::: ultralytics.utils.files.spaces_in_path
+## ::: ultralytics.utils.files.spaces_in_path
-## increment_path
---
-### ::: ultralytics.utils.files.increment_path
+## ::: ultralytics.utils.files.increment_path
-## file_age
---
-### ::: ultralytics.utils.files.file_age
+## ::: ultralytics.utils.files.file_age
-## file_date
---
-### ::: ultralytics.utils.files.file_date
+## ::: ultralytics.utils.files.file_date
-## file_size
---
-### ::: ultralytics.utils.files.file_size
+## ::: ultralytics.utils.files.file_size
-## get_latest_run
---
-### ::: ultralytics.utils.files.get_latest_run
+## ::: ultralytics.utils.files.get_latest_run
-## make_dirs
---
-### ::: ultralytics.utils.files.make_dirs
+## ::: ultralytics.utils.files.make_dirs
diff --git a/docs/reference/utils/instance.md b/docs/reference/utils/instance.md
index 35d4eda..6651fa7 100644
--- a/docs/reference/utils/instance.md
+++ b/docs/reference/utils/instance.md
@@ -3,17 +3,20 @@ description: Dive into Ultralytics detailed utility guide. Learn about Bboxes, _
keywords: Ultralytics, Bboxes, _ntuple, utility, ultralytics utils.instance
---
-## Bboxes
+# Reference for `ultralytics/utils/instance.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/instance.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/instance.py).
+
---
-### ::: ultralytics.utils.instance.Bboxes
+## ::: ultralytics.utils.instance.Bboxes
-## Instances
---
-### ::: ultralytics.utils.instance.Instances
+## ::: ultralytics.utils.instance.Instances
-## _ntuple
---
-### ::: ultralytics.utils.instance._ntuple
+## ::: ultralytics.utils.instance._ntuple
diff --git a/docs/reference/utils/loss.md b/docs/reference/utils/loss.md
index b4aceb9..c72352b 100644
--- a/docs/reference/utils/loss.md
+++ b/docs/reference/utils/loss.md
@@ -3,42 +3,40 @@ description: Explore Ultralytics' versatile loss functions - VarifocalLoss, Bbox
keywords: Ultralytics, Loss functions, VarifocalLoss, BboxLoss, v8DetectionLoss, v8PoseLoss, YOLO, Ultralytics Documentation
---
-## VarifocalLoss
+# Reference for `ultralytics/utils/loss.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/loss.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/loss.py).
+
---
-### ::: ultralytics.utils.loss.VarifocalLoss
+## ::: ultralytics.utils.loss.VarifocalLoss
-## FocalLoss
---
-### ::: ultralytics.utils.loss.FocalLoss
+## ::: ultralytics.utils.loss.FocalLoss
-## BboxLoss
---
-### ::: ultralytics.utils.loss.BboxLoss
+## ::: ultralytics.utils.loss.BboxLoss
-## KeypointLoss
---
-### ::: ultralytics.utils.loss.KeypointLoss
+## ::: ultralytics.utils.loss.KeypointLoss
-## v8DetectionLoss
---
-### ::: ultralytics.utils.loss.v8DetectionLoss
+## ::: ultralytics.utils.loss.v8DetectionLoss
-## v8SegmentationLoss
---
-### ::: ultralytics.utils.loss.v8SegmentationLoss
+## ::: ultralytics.utils.loss.v8SegmentationLoss
-## v8PoseLoss
---
-### ::: ultralytics.utils.loss.v8PoseLoss
+## ::: ultralytics.utils.loss.v8PoseLoss
-## v8ClassificationLoss
---
-### ::: ultralytics.utils.loss.v8ClassificationLoss
+## ::: ultralytics.utils.loss.v8ClassificationLoss
diff --git a/docs/reference/utils/metrics.md b/docs/reference/utils/metrics.md
index 0fe138c..ad0f5ce 100644
--- a/docs/reference/utils/metrics.md
+++ b/docs/reference/utils/metrics.md
@@ -3,92 +3,80 @@ description: Explore Ultralytics YOLO metrics tools - from confusion matrix, det
keywords: Ultralytics, YOLO, YOLOv3, YOLOv4, metrics, confusion matrix, detection metrics, pose metrics, box IOU, mask IOU, plot precision-recall curves, compute average precision
---
-## ConfusionMatrix
+# Reference for `ultralytics/utils/metrics.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/metrics.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/metrics.py).
+
---
-### ::: ultralytics.utils.metrics.ConfusionMatrix
+## ::: ultralytics.utils.metrics.ConfusionMatrix
-## Metric
---
-### ::: ultralytics.utils.metrics.Metric
+## ::: ultralytics.utils.metrics.Metric
-## DetMetrics
---
-### ::: ultralytics.utils.metrics.DetMetrics
+## ::: ultralytics.utils.metrics.DetMetrics
-## SegmentMetrics
---
-### ::: ultralytics.utils.metrics.SegmentMetrics
+## ::: ultralytics.utils.metrics.SegmentMetrics
-## PoseMetrics
---
-### ::: ultralytics.utils.metrics.PoseMetrics
+## ::: ultralytics.utils.metrics.PoseMetrics
-## ClassifyMetrics
---
-### ::: ultralytics.utils.metrics.ClassifyMetrics
+## ::: ultralytics.utils.metrics.ClassifyMetrics
-## box_area
---
-### ::: ultralytics.utils.metrics.box_area
+## ::: ultralytics.utils.metrics.box_area
-## bbox_ioa
---
-### ::: ultralytics.utils.metrics.bbox_ioa
+## ::: ultralytics.utils.metrics.bbox_ioa
-## box_iou
---
-### ::: ultralytics.utils.metrics.box_iou
+## ::: ultralytics.utils.metrics.box_iou
-## bbox_iou
---
-### ::: ultralytics.utils.metrics.bbox_iou
+## ::: ultralytics.utils.metrics.bbox_iou
-## mask_iou
---
-### ::: ultralytics.utils.metrics.mask_iou
+## ::: ultralytics.utils.metrics.mask_iou
-## kpt_iou
---
-### ::: ultralytics.utils.metrics.kpt_iou
+## ::: ultralytics.utils.metrics.kpt_iou
-## smooth_BCE
---
-### ::: ultralytics.utils.metrics.smooth_BCE
+## ::: ultralytics.utils.metrics.smooth_BCE
-## smooth
---
-### ::: ultralytics.utils.metrics.smooth
+## ::: ultralytics.utils.metrics.smooth
-## plot_pr_curve
---
-### ::: ultralytics.utils.metrics.plot_pr_curve
+## ::: ultralytics.utils.metrics.plot_pr_curve
-## plot_mc_curve
---
-### ::: ultralytics.utils.metrics.plot_mc_curve
+## ::: ultralytics.utils.metrics.plot_mc_curve
-## compute_ap
---
-### ::: ultralytics.utils.metrics.compute_ap
+## ::: ultralytics.utils.metrics.compute_ap
-## ap_per_class
---
-### ::: ultralytics.utils.metrics.ap_per_class
+## ::: ultralytics.utils.metrics.ap_per_class
diff --git a/docs/reference/utils/ops.md b/docs/reference/utils/ops.md
index 3e77626..062f638 100644
--- a/docs/reference/utils/ops.md
+++ b/docs/reference/utils/ops.md
@@ -3,142 +3,120 @@ description: Explore detailed documentation for Ultralytics utility operations.
keywords: Ultralytics YOLO, Utility Operations, segment2box, make_divisible, clip_boxes, scale_image, xywh2xyxy, xyxy2xywhn, xywh2ltwh, ltwh2xywh, segments2boxes, crop_mask, process_mask, scale_masks, masks2segments
---
-## Profile
+# Reference for `ultralytics/utils/ops.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/ops.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/ops.py).
+
---
-### ::: ultralytics.utils.ops.Profile
+## ::: ultralytics.utils.ops.Profile
-## coco80_to_coco91_class
---
-### ::: ultralytics.utils.ops.coco80_to_coco91_class
+## ::: ultralytics.utils.ops.coco80_to_coco91_class
-## segment2box
---
-### ::: ultralytics.utils.ops.segment2box
+## ::: ultralytics.utils.ops.segment2box
-## scale_boxes
---
-### ::: ultralytics.utils.ops.scale_boxes
+## ::: ultralytics.utils.ops.scale_boxes
-## make_divisible
---
-### ::: ultralytics.utils.ops.make_divisible
+## ::: ultralytics.utils.ops.make_divisible
-## non_max_suppression
---
-### ::: ultralytics.utils.ops.non_max_suppression
+## ::: ultralytics.utils.ops.non_max_suppression
-## clip_boxes
---
-### ::: ultralytics.utils.ops.clip_boxes
+## ::: ultralytics.utils.ops.clip_boxes
-## clip_coords
---
-### ::: ultralytics.utils.ops.clip_coords
+## ::: ultralytics.utils.ops.clip_coords
-## scale_image
---
-### ::: ultralytics.utils.ops.scale_image
+## ::: ultralytics.utils.ops.scale_image
-## xyxy2xywh
---
-### ::: ultralytics.utils.ops.xyxy2xywh
+## ::: ultralytics.utils.ops.xyxy2xywh
-## xywh2xyxy
---
-### ::: ultralytics.utils.ops.xywh2xyxy
+## ::: ultralytics.utils.ops.xywh2xyxy
-## xywhn2xyxy
---
-### ::: ultralytics.utils.ops.xywhn2xyxy
+## ::: ultralytics.utils.ops.xywhn2xyxy
-## xyxy2xywhn
---
-### ::: ultralytics.utils.ops.xyxy2xywhn
+## ::: ultralytics.utils.ops.xyxy2xywhn
-## xyn2xy
---
-### ::: ultralytics.utils.ops.xyn2xy
+## ::: ultralytics.utils.ops.xyn2xy
-## xywh2ltwh
---
-### ::: ultralytics.utils.ops.xywh2ltwh
+## ::: ultralytics.utils.ops.xywh2ltwh
-## xyxy2ltwh
---
-### ::: ultralytics.utils.ops.xyxy2ltwh
+## ::: ultralytics.utils.ops.xyxy2ltwh
-## ltwh2xywh
---
-### ::: ultralytics.utils.ops.ltwh2xywh
+## ::: ultralytics.utils.ops.ltwh2xywh
-## ltwh2xyxy
---
-### ::: ultralytics.utils.ops.ltwh2xyxy
+## ::: ultralytics.utils.ops.ltwh2xyxy
-## segments2boxes
---
-### ::: ultralytics.utils.ops.segments2boxes
+## ::: ultralytics.utils.ops.segments2boxes
-## resample_segments
---
-### ::: ultralytics.utils.ops.resample_segments
+## ::: ultralytics.utils.ops.resample_segments
-## crop_mask
---
-### ::: ultralytics.utils.ops.crop_mask
+## ::: ultralytics.utils.ops.crop_mask
-## process_mask_upsample
---
-### ::: ultralytics.utils.ops.process_mask_upsample
+## ::: ultralytics.utils.ops.process_mask_upsample
-## process_mask
---
-### ::: ultralytics.utils.ops.process_mask
+## ::: ultralytics.utils.ops.process_mask
-## process_mask_native
---
-### ::: ultralytics.utils.ops.process_mask_native
+## ::: ultralytics.utils.ops.process_mask_native
-## scale_masks
---
-### ::: ultralytics.utils.ops.scale_masks
+## ::: ultralytics.utils.ops.scale_masks
-## scale_coords
---
-### ::: ultralytics.utils.ops.scale_coords
+## ::: ultralytics.utils.ops.scale_coords
-## masks2segments
---
-### ::: ultralytics.utils.ops.masks2segments
+## ::: ultralytics.utils.ops.masks2segments
-## clean_str
---
-### ::: ultralytics.utils.ops.clean_str
+## ::: ultralytics.utils.ops.clean_str
diff --git a/docs/reference/utils/patches.md b/docs/reference/utils/patches.md
index 2dfdf9d..c4a5e5d 100644
--- a/docs/reference/utils/patches.md
+++ b/docs/reference/utils/patches.md
@@ -3,22 +3,24 @@ description: Learn about Ultralytics utils patches including imread, imshow and
keywords: Ultralytics, Utils, Patches, imread, imshow, torch_save, image processing
---
-## imread
+# Reference for `ultralytics/utils/patches.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py).
+
---
-### ::: ultralytics.utils.patches.imread
+## ::: ultralytics.utils.patches.imread
-## imwrite
---
-### ::: ultralytics.utils.patches.imwrite
+## ::: ultralytics.utils.patches.imwrite
-## imshow
---
-### ::: ultralytics.utils.patches.imshow
+## ::: ultralytics.utils.patches.imshow
-## torch_save
---
-### ::: ultralytics.utils.patches.torch_save
+## ::: ultralytics.utils.patches.torch_save
diff --git a/docs/reference/utils/plotting.md b/docs/reference/utils/plotting.md
index f19bbc6..94d7494 100644
--- a/docs/reference/utils/plotting.md
+++ b/docs/reference/utils/plotting.md
@@ -3,42 +3,40 @@ description: Master advanced plotting utils from Ultralytics including color ann
keywords: Ultralytics, plotting, utils, color annotation, label plotting, image plotting, feature visualization
---
-## Colors
+# Reference for `ultralytics/utils/plotting.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/plotting.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/plotting.py).
+
---
-### ::: ultralytics.utils.plotting.Colors
+## ::: ultralytics.utils.plotting.Colors
-## Annotator
---
-### ::: ultralytics.utils.plotting.Annotator
+## ::: ultralytics.utils.plotting.Annotator
-## plot_labels
---
-### ::: ultralytics.utils.plotting.plot_labels
+## ::: ultralytics.utils.plotting.plot_labels
-## save_one_box
---
-### ::: ultralytics.utils.plotting.save_one_box
+## ::: ultralytics.utils.plotting.save_one_box
-## plot_images
---
-### ::: ultralytics.utils.plotting.plot_images
+## ::: ultralytics.utils.plotting.plot_images
-## plot_results
---
-### ::: ultralytics.utils.plotting.plot_results
+## ::: ultralytics.utils.plotting.plot_results
-## output_to_target
---
-### ::: ultralytics.utils.plotting.output_to_target
+## ::: ultralytics.utils.plotting.output_to_target
-## feature_visualization
---
-### ::: ultralytics.utils.plotting.feature_visualization
+## ::: ultralytics.utils.plotting.feature_visualization
diff --git a/docs/reference/utils/tal.md b/docs/reference/utils/tal.md
index b277c3e..2eba458 100644
--- a/docs/reference/utils/tal.md
+++ b/docs/reference/utils/tal.md
@@ -3,32 +3,32 @@ description: Explore Ultralytics utilities for optimized task assignment, boundi
keywords: Ultralytics, task aligned assigner, select highest overlaps, make anchors, dist2bbox, bbox2dist, utilities, algorithm
---
-## TaskAlignedAssigner
+# Reference for `ultralytics/utils/tal.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tal.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tal.py).
+
---
-### ::: ultralytics.utils.tal.TaskAlignedAssigner
+## ::: ultralytics.utils.tal.TaskAlignedAssigner
-## select_candidates_in_gts
---
-### ::: ultralytics.utils.tal.select_candidates_in_gts
+## ::: ultralytics.utils.tal.select_candidates_in_gts
-## select_highest_overlaps
---
-### ::: ultralytics.utils.tal.select_highest_overlaps
+## ::: ultralytics.utils.tal.select_highest_overlaps
-## make_anchors
---
-### ::: ultralytics.utils.tal.make_anchors
+## ::: ultralytics.utils.tal.make_anchors
-## dist2bbox
---
-### ::: ultralytics.utils.tal.dist2bbox
+## ::: ultralytics.utils.tal.dist2bbox
-## bbox2dist
---
-### ::: ultralytics.utils.tal.bbox2dist
+## ::: ultralytics.utils.tal.bbox2dist
diff --git a/docs/reference/utils/torch_utils.md b/docs/reference/utils/torch_utils.md
index 1a2188a..de4bb1e 100644
--- a/docs/reference/utils/torch_utils.md
+++ b/docs/reference/utils/torch_utils.md
@@ -3,137 +3,116 @@ description: Explore Ultralytics-tailored torch utility features like Model EMA,
keywords: Ultralytics, Torch Utils, Model EMA, Early Stopping, Smart Inference, Get CPU Info, Time Sync, Fuse Deconv and bn, Get num params, Get FLOPs, Scale img, Copy attr, Intersect dicts, De_parallel, Init seeds, Profile
---
-## ModelEMA
+# Reference for `ultralytics/utils/torch_utils.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/torch_utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/torch_utils.py).
+
---
-### ::: ultralytics.utils.torch_utils.ModelEMA
+## ::: ultralytics.utils.torch_utils.ModelEMA
-## EarlyStopping
---
-### ::: ultralytics.utils.torch_utils.EarlyStopping
+## ::: ultralytics.utils.torch_utils.EarlyStopping
-## torch_distributed_zero_first
---
-### ::: ultralytics.utils.torch_utils.torch_distributed_zero_first
+## ::: ultralytics.utils.torch_utils.torch_distributed_zero_first
-## smart_inference_mode
---
-### ::: ultralytics.utils.torch_utils.smart_inference_mode
+## ::: ultralytics.utils.torch_utils.smart_inference_mode
-## get_cpu_info
---
-### ::: ultralytics.utils.torch_utils.get_cpu_info
+## ::: ultralytics.utils.torch_utils.get_cpu_info
-## select_device
---
-### ::: ultralytics.utils.torch_utils.select_device
+## ::: ultralytics.utils.torch_utils.select_device
-## time_sync
---
-### ::: ultralytics.utils.torch_utils.time_sync
+## ::: ultralytics.utils.torch_utils.time_sync
-## fuse_conv_and_bn
---
-### ::: ultralytics.utils.torch_utils.fuse_conv_and_bn
+## ::: ultralytics.utils.torch_utils.fuse_conv_and_bn
-## fuse_deconv_and_bn
---
-### ::: ultralytics.utils.torch_utils.fuse_deconv_and_bn
+## ::: ultralytics.utils.torch_utils.fuse_deconv_and_bn
-## model_info
---
-### ::: ultralytics.utils.torch_utils.model_info
+## ::: ultralytics.utils.torch_utils.model_info
-## get_num_params
---
-### ::: ultralytics.utils.torch_utils.get_num_params
+## ::: ultralytics.utils.torch_utils.get_num_params
-## get_num_gradients
---
-### ::: ultralytics.utils.torch_utils.get_num_gradients
+## ::: ultralytics.utils.torch_utils.get_num_gradients
-## model_info_for_loggers
---
-### ::: ultralytics.utils.torch_utils.model_info_for_loggers
+## ::: ultralytics.utils.torch_utils.model_info_for_loggers
-## get_flops
---
-### ::: ultralytics.utils.torch_utils.get_flops
+## ::: ultralytics.utils.torch_utils.get_flops
-## get_flops_with_torch_profiler
---
-### ::: ultralytics.utils.torch_utils.get_flops_with_torch_profiler
+## ::: ultralytics.utils.torch_utils.get_flops_with_torch_profiler
-## initialize_weights
---
-### ::: ultralytics.utils.torch_utils.initialize_weights
+## ::: ultralytics.utils.torch_utils.initialize_weights
-## scale_img
---
-### ::: ultralytics.utils.torch_utils.scale_img
+## ::: ultralytics.utils.torch_utils.scale_img
-## make_divisible
---
-### ::: ultralytics.utils.torch_utils.make_divisible
+## ::: ultralytics.utils.torch_utils.make_divisible
-## copy_attr
---
-### ::: ultralytics.utils.torch_utils.copy_attr
+## ::: ultralytics.utils.torch_utils.copy_attr
-## get_latest_opset
---
-### ::: ultralytics.utils.torch_utils.get_latest_opset
+## ::: ultralytics.utils.torch_utils.get_latest_opset
-## intersect_dicts
---
-### ::: ultralytics.utils.torch_utils.intersect_dicts
+## ::: ultralytics.utils.torch_utils.intersect_dicts
-## is_parallel
---
-### ::: ultralytics.utils.torch_utils.is_parallel
+## ::: ultralytics.utils.torch_utils.is_parallel
-## de_parallel
---
-### ::: ultralytics.utils.torch_utils.de_parallel
+## ::: ultralytics.utils.torch_utils.de_parallel
-## one_cycle
---
-### ::: ultralytics.utils.torch_utils.one_cycle
+## ::: ultralytics.utils.torch_utils.one_cycle
-## init_seeds
---
-### ::: ultralytics.utils.torch_utils.init_seeds
+## ::: ultralytics.utils.torch_utils.init_seeds
-## strip_optimizer
---
-### ::: ultralytics.utils.torch_utils.strip_optimizer
+## ::: ultralytics.utils.torch_utils.strip_optimizer
-## profile
---
-### ::: ultralytics.utils.torch_utils.profile
+## ::: ultralytics.utils.torch_utils.profile
diff --git a/docs/reference/utils/tuner.md b/docs/reference/utils/tuner.md
index 58c1f72..d51906f 100644
--- a/docs/reference/utils/tuner.md
+++ b/docs/reference/utils/tuner.md
@@ -3,7 +3,12 @@ description: Learn to utilize the run_ray_tune function with Ultralytics. Make y
keywords: Ultralytics, run_ray_tune, machine learning tuning, machine learning efficiency
---
-## run_ray_tune
+# Reference for `ultralytics/utils/tuner.py`
+
+!!! note
+
+ Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tuner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tuner.py).
+
---
-### ::: ultralytics.utils.tuner.run_ray_tune
+## ::: ultralytics.utils.tuner.run_ray_tune
diff --git a/mkdocs.yml b/mkdocs.yml
index 9687f2c..2511cae 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -390,8 +390,15 @@ nav:
# Plugins including 301 redirects navigation ---------------------------------------------------------------------------
plugins:
- - mkdocstrings
- search
+ - mkdocstrings:
+ enabled: true
+ default_handler: python
+ handlers:
+ python:
+ options:
+ show_root_heading: true
+ show_source: true
- ultralytics:
add_desc: False
add_image: True
diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py
index 87b9195..111fd24 100644
--- a/ultralytics/cfg/__init__.py
+++ b/ultralytics/cfg/__init__.py
@@ -222,7 +222,9 @@ def handle_yolo_hub(args: List[str]) -> None:
args (List[str]): A list of command line arguments
Example:
+ ```python
python my_script.py hub login your_api_key
+ ```
"""
from ultralytics import hub
@@ -246,7 +248,9 @@ def handle_yolo_settings(args: List[str]) -> None:
args (List[str]): A list of command line arguments for YOLO settings management.
Example:
+ ```python
python my_script.py yolo settings reset
+ ```
"""
if any(args):
if args[0] == 'reset':
diff --git a/ultralytics/engine/results.py b/ultralytics/engine/results.py
index 01e0f9f..dbdaec3 100644
--- a/ultralytics/engine/results.py
+++ b/ultralytics/engine/results.py
@@ -82,10 +82,10 @@ class Results(SimpleClass):
boxes (Boxes, optional): A Boxes object containing the detection bounding boxes.
masks (Masks, optional): A Masks object containing the detection masks.
probs (Probs, optional): A Probs object containing probabilities of each class for classification task.
+ keypoints (Keypoints, optional): A Keypoints object containing detected keypoints for each object.
+ speed (dict): A dictionary of preprocess, inference, and postprocess speeds in milliseconds per image.
names (dict): A dictionary of class names.
path (str): The path to the image file.
- keypoints (Keypoints, optional): A Keypoints object containing detected keypoints for each object.
- speed (dict): A dictionary of preprocess, inference and postprocess speeds in milliseconds per image.
_keys (tuple): A tuple of attribute names for non-empty attributes.
"""
@@ -110,6 +110,11 @@ class Results(SimpleClass):
setattr(r, k, getattr(self, k)[idx])
return r
+ def __len__(self):
+ """Return the number of detections in the Results object."""
+ for k in self.keys:
+ return len(getattr(self, k))
+
def update(self, boxes=None, masks=None, probs=None):
"""Update the boxes, masks, and probs attributes of the Results object."""
if boxes is not None:
@@ -148,11 +153,6 @@ class Results(SimpleClass):
setattr(r, k, getattr(self, k).to(*args, **kwargs))
return r
- def __len__(self):
- """Return the number of detections in the Results object."""
- for k in self.keys:
- return len(getattr(self, k))
-
def new(self):
"""Return a new Results object with the same image, path, and names."""
return Results(orig_img=self.orig_img, path=self.path, names=self.names)
@@ -199,6 +199,18 @@ class Results(SimpleClass):
Returns:
(numpy.ndarray): A numpy array of the annotated image.
+
+ Example:
+ ```python
+ from PIL import Image
+ from ultralytics import YOLO
+
+ model = YOLO('yolov8n.pt')
+ results = model('bus.jpg') # results list
+ for r in results:
+ im = r.plot() # BGR numpy array
+ Image.fromarray(im[..., ::-1]).show() # show RGB image
+ ```
"""
if img is None and isinstance(self.orig_img, torch.Tensor):
img = np.ascontiguousarray(self.orig_img[0].permute(1, 2, 0).cpu().detach().numpy()) * 255
@@ -328,10 +340,6 @@ class Results(SimpleClass):
file=save_dir / self.names[int(d.cls)] / f'{file_name.stem}.jpg',
BGR=True)
- def pandas(self):
- """Convert the object to a pandas DataFrame (not yet implemented)."""
- LOGGER.warning("WARNING ⚠️ 'Results.pandas' method is not yet implemented.")
-
def tojson(self, normalize=False):
"""Convert the object to JSON format."""
if self.probs is not None:
@@ -368,15 +376,11 @@ class Boxes(BaseTensor):
Args:
boxes (torch.Tensor | numpy.ndarray): A tensor or numpy array containing the detection boxes,
- with shape (num_boxes, 6). The last two columns should contain confidence and class values.
+ with shape (num_boxes, 6) or (num_boxes, 7). The last two columns contain confidence and class values.
+ If present, the third last column contains track IDs.
orig_shape (tuple): Original image size, in the format (height, width).
Attributes:
- boxes (torch.Tensor | numpy.ndarray): The detection boxes with shape (num_boxes, 6).
- orig_shape (torch.Tensor | numpy.ndarray): Original image size, in the format (height, width).
- is_track (bool): True if the boxes also include track IDs, False otherwise.
-
- Properties:
xyxy (torch.Tensor | numpy.ndarray): The boxes in xyxy format.
conf (torch.Tensor | numpy.ndarray): The confidence values of the boxes.
cls (torch.Tensor | numpy.ndarray): The class values of the boxes.
@@ -384,14 +388,13 @@ class Boxes(BaseTensor):
xywh (torch.Tensor | numpy.ndarray): The boxes in xywh format.
xyxyn (torch.Tensor | numpy.ndarray): The boxes in xyxy format normalized by original image size.
xywhn (torch.Tensor | numpy.ndarray): The boxes in xywh format normalized by original image size.
- data (torch.Tensor): The raw bboxes tensor
+ data (torch.Tensor): The raw bboxes tensor (alias for `boxes`).
Methods:
cpu(): Move the object to CPU memory.
numpy(): Convert the object to a numpy array.
cuda(): Move the object to CUDA memory.
to(*args, **kwargs): Move the object to the specified device.
- pandas(): Convert the object to a pandas DataFrame (not yet implemented).
"""
def __init__(self, boxes, orig_shape) -> None:
@@ -459,27 +462,20 @@ class Masks(BaseTensor):
"""
A class for storing and manipulating detection masks.
- Args:
- masks (torch.Tensor | np.ndarray): A tensor containing the detection masks, with shape (num_masks, height, width).
- orig_shape (tuple): Original image size, in the format (height, width).
-
Attributes:
- masks (torch.Tensor | np.ndarray): A tensor containing the detection masks, with shape (num_masks, height, width).
- orig_shape (tuple): Original image size, in the format (height, width).
-
- Properties:
- xy (list): A list of segments (pixels) which includes x, y segments of each detection.
- xyn (list): A list of segments (normalized) which includes x, y segments of each detection.
+ segments (list): Deprecated property for segments (normalized).
+ xy (list): A list of segments in pixel coordinates.
+ xyn (list): A list of normalized segments.
Methods:
- cpu(): Returns a copy of the masks tensor on CPU memory.
- numpy(): Returns a copy of the masks tensor as a numpy array.
- cuda(): Returns a copy of the masks tensor on GPU memory.
- to(): Returns a copy of the masks tensor with the specified device and dtype.
+ cpu(): Returns the masks tensor on CPU memory.
+ numpy(): Returns the masks tensor as a numpy array.
+ cuda(): Returns the masks tensor on GPU memory.
+ to(device, dtype): Returns the masks tensor with the specified device and dtype.
"""
def __init__(self, masks, orig_shape) -> None:
- """Initialize the Masks class."""
+ """Initialize the Masks class with the given masks tensor and original image shape."""
if masks.ndim == 2:
masks = masks[None, :]
super().__init__(masks, orig_shape)
@@ -487,15 +483,16 @@ class Masks(BaseTensor):
@property
@lru_cache(maxsize=1)
def segments(self):
- """Return segments (deprecated; normalized)."""
- LOGGER.warning("WARNING ⚠️ 'Masks.segments' is deprecated. Use 'Masks.xyn' for segments (normalized) and "
- "'Masks.xy' for segments (pixels) instead.")
+ """Return segments (normalized). Deprecated; use xyn property instead."""
+ LOGGER.warning(
+ "WARNING ⚠️ 'Masks.segments' is deprecated. Use 'Masks.xyn' for segments (normalized) and 'Masks.xy' for segments (pixels) instead."
+ )
return self.xyn
@property
@lru_cache(maxsize=1)
def xyn(self):
- """Return segments (normalized)."""
+ """Return normalized segments."""
return [
ops.scale_coords(self.data.shape[1:], x, self.orig_shape, normalize=True)
for x in ops.masks2segments(self.data)]
@@ -503,46 +500,36 @@ class Masks(BaseTensor):
@property
@lru_cache(maxsize=1)
def xy(self):
- """Return segments (pixels)."""
+ """Return segments in pixel coordinates."""
return [
ops.scale_coords(self.data.shape[1:], x, self.orig_shape, normalize=False)
for x in ops.masks2segments(self.data)]
@property
def masks(self):
- """Return the raw masks tensor (deprecated)."""
+ """Return the raw masks tensor. Deprecated; use data attribute instead."""
LOGGER.warning("WARNING ⚠️ 'Masks.masks' is deprecated. Use 'Masks.data' instead.")
return self.data
- def pandas(self):
- """Convert the object to a pandas DataFrame (not yet implemented)."""
- LOGGER.warning("WARNING ⚠️ 'Masks.pandas' method is not yet implemented.")
-
class Keypoints(BaseTensor):
"""
A class for storing and manipulating detection keypoints.
- Args:
- keypoints (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_dets, num_kpts, 2/3).
- orig_shape (tuple): Original image size, in the format (height, width).
-
Attributes:
- keypoints (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_dets, num_kpts, 2/3).
- orig_shape (tuple): Original image size, in the format (height, width).
-
- Properties:
- xy (list): A list of keypoints (pixels) which includes x, y keypoints of each detection.
- xyn (list): A list of keypoints (normalized) which includes x, y keypoints of each detection.
+ xy (torch.Tensor): A collection of keypoints containing x, y coordinates for each detection.
+ xyn (torch.Tensor): A normalized version of xy with coordinates in the range [0, 1].
+ conf (torch.Tensor): Confidence values associated with keypoints if available, otherwise None.
Methods:
cpu(): Returns a copy of the keypoints tensor on CPU memory.
numpy(): Returns a copy of the keypoints tensor as a numpy array.
cuda(): Returns a copy of the keypoints tensor on GPU memory.
- to(): Returns a copy of the keypoints tensor with the specified device and dtype.
+ to(device, dtype): Returns a copy of the keypoints tensor with the specified device and dtype.
"""
def __init__(self, keypoints, orig_shape) -> None:
+ """Initializes the Keypoints object with detection keypoints and original image size."""
if keypoints.ndim == 2:
keypoints = keypoints[None, :]
super().__init__(keypoints, orig_shape)
@@ -551,11 +538,13 @@ class Keypoints(BaseTensor):
@property
@lru_cache(maxsize=1)
def xy(self):
+ """Returns x, y coordinates of keypoints."""
return self.data[..., :2]
@property
@lru_cache(maxsize=1)
def xyn(self):
+ """Returns normalized x, y coordinates of keypoints."""
xy = self.xy.clone() if isinstance(self.xy, torch.Tensor) else np.copy(self.xy)
xy[..., 0] /= self.orig_shape[1]
xy[..., 1] /= self.orig_shape[0]
@@ -564,22 +553,19 @@ class Keypoints(BaseTensor):
@property
@lru_cache(maxsize=1)
def conf(self):
+ """Returns confidence values of keypoints if available, else None."""
return self.data[..., 2] if self.has_visible else None
class Probs(BaseTensor):
"""
- A class for storing and manipulating classify predictions.
-
- Args:
- probs (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_class, ).
+ A class for storing and manipulating classification predictions.
Attributes:
- probs (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_class).
-
- Properties:
- top5 (list[int]): Top 1 indice.
- top1 (int): Top 5 indices.
+ top1 (int): Index of the top 1 class.
+ top5 (list[int]): Indices of the top 5 classes.
+ top1conf (torch.Tensor): Confidence of the top 1 class.
+ top5conf (torch.Tensor): Confidences of the top 5 classes.
Methods:
cpu(): Returns a copy of the probs tensor on CPU memory.
@@ -591,6 +577,12 @@ class Probs(BaseTensor):
def __init__(self, probs, orig_shape=None) -> None:
super().__init__(probs, orig_shape)
+ @property
+ @lru_cache(maxsize=1)
+ def top1(self):
+ """Return the index of top 1."""
+ return int(self.data.argmax())
+
@property
@lru_cache(maxsize=1)
def top5(self):
@@ -599,18 +591,12 @@ class Probs(BaseTensor):
@property
@lru_cache(maxsize=1)
- def top1(self):
- """Return the indices of top 1."""
- return int(self.data.argmax())
+ def top1conf(self):
+ """Return the confidence of top 1."""
+ return self.data[self.top1]
@property
@lru_cache(maxsize=1)
def top5conf(self):
"""Return the confidences of top 5."""
return self.data[self.top5]
-
- @property
- @lru_cache(maxsize=1)
- def top1conf(self):
- """Return the confidences of top 1."""
- return self.data[self.top1]
diff --git a/ultralytics/hub/__init__.py b/ultralytics/hub/__init__.py
index f6389f0..33bd537 100644
--- a/ultralytics/hub/__init__.py
+++ b/ultralytics/hub/__init__.py
@@ -16,8 +16,10 @@ def login(api_key=''):
api_key (str, optional): May be an API key or a combination API key and model ID, i.e. key_id
Example:
+ ```python
from ultralytics import hub
hub.login('API_KEY')
+ ```
"""
Auth(api_key, verbose=True)
@@ -27,8 +29,10 @@ def logout():
Log out of Ultralytics HUB by removing the API key from the settings file. To log in again, use 'yolo hub login'.
Example:
+ ```python
from ultralytics import hub
hub.logout()
+ ```
"""
SETTINGS['api_key'] = ''
yaml_save(USER_CONFIG_DIR / 'settings.yaml', SETTINGS)
diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py
index afd327d..dd2bf1f 100644
--- a/ultralytics/nn/tasks.py
+++ b/ultralytics/nn/tasks.py
@@ -510,8 +510,10 @@ def temporary_modules(modules=None):
modules (dict, optional): A dictionary mapping old module paths to new module paths.
Example:
+ ```python
with temporary_modules({'old.module.path': 'new.module.path'}):
import old.module.path # this will now import new.module.path
+ ```
Note:
The changes are only in effect inside the context manager and are undone once the context manager exits.
diff --git a/ultralytics/utils/files.py b/ultralytics/utils/files.py
index d6fe7b1..750dfa7 100644
--- a/ultralytics/utils/files.py
+++ b/ultralytics/utils/files.py
@@ -40,9 +40,11 @@ def spaces_in_path(path):
Yields:
(Path): Temporary path with spaces replaced by underscores if spaces were present, otherwise the original path.
- Examples:
+ Example:
+ ```python
with spaces_in_path('/path/with spaces') as new_path:
# your code here
+ ```
"""
# If path has spaces, replace them with underscores
diff --git a/ultralytics/utils/ops.py b/ultralytics/utils/ops.py
index 1e18258..de20481 100644
--- a/ultralytics/utils/ops.py
+++ b/ultralytics/utils/ops.py
@@ -61,10 +61,12 @@ def coco80_to_coco91_class(): #
For details see https://tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/.
Example:
+ ```python
a = np.loadtxt('data/coco.names', dtype='str', delimiter='\n')
b = np.loadtxt('data/coco_paper.names', dtype='str', delimiter='\n')
x1 = [list(a[i] == b).index(True) + 1 for i in range(80)] # darknet to coco
x2 = [list(b[i] == a).index(True) if any(b[i] == a) else None for i in range(91)] # coco to darknet
+ ```
"""
return [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34,
diff --git a/ultralytics/utils/plotting.py b/ultralytics/utils/plotting.py
index 65c9266..a54381d 100644
--- a/ultralytics/utils/plotting.py
+++ b/ultralytics/utils/plotting.py
@@ -332,7 +332,7 @@ def save_one_box(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=10, square=False,
Returns:
(numpy.ndarray): The cropped image.
- Examples:
+ Example:
```python
from ultralytics.utils.plotting import save_one_box