diff --git a/docs/build_reference.py b/docs/build_reference.py
index 7dcb6dba..7b2b4094 100644
--- a/docs/build_reference.py
+++ b/docs/build_reference.py
@@ -51,7 +51,7 @@ def create_markdown(py_filepath: Path, module_path: str, classes: list, function
f"# Reference for `{module_path}.py`\n\n"
f"!!! Note\n\n"
f" This file is available at [{url}]({url}). If you spot a problem please help fix it by [contributing]"
- f"(https://docs.ultralytics.com/help/contributing/) a [Pull Request]({edit}) 🛠️. Thank you 🙏!\n\n"
+ f"(/help/contributing.md) a [Pull Request]({edit}) 🛠️. Thank you 🙏!\n\n"
)
md_content = ["
\n"] + [f"## ::: {module_name}.{class_name}\n\n
\n" for class_name in classes]
md_content.extend(f"## ::: {module_name}.{func_name}\n\n
\n" for func_name in functions)
diff --git a/docs/en/guides/distance-calculation.md b/docs/en/guides/distance-calculation.md
index c479d5f6..607ee6d4 100644
--- a/docs/en/guides/distance-calculation.md
+++ b/docs/en/guides/distance-calculation.md
@@ -42,8 +42,7 @@ Measuring the gap between two objects is known as distance calculation within a
=== "Video Stream"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import distance_calculation
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -54,14 +53,10 @@ Measuring the gap between two objects is known as distance calculation within a
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("distance_calculation.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("distance_calculation.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
# Init distance-calculation obj
- dist_obj = distance_calculation.DistanceCalculation()
- dist_obj.set_args(names=names, view_img=True)
+ dist_obj = solutions.DistanceCalculation(names=names, view_img=True)
while cap.isOpened():
success, im0 = cap.read()
@@ -84,15 +79,16 @@ Measuring the gap between two objects is known as distance calculation within a
- Mouse Right Click will delete all drawn points
- Mouse Left Click can be used to draw points
-### Optional Arguments `set_args`
+### Arguments `DistanceCalculation()`
-| Name | Type | Default | Description |
-|------------------|--------|-----------------|--------------------------------------------------------|
-| `names` | `dict` | `None` | Classes names |
-| `view_img` | `bool` | `False` | Display frames with counts |
-| `line_thickness` | `int` | `2` | Increase bounding boxes thickness |
-| `line_color` | `RGB` | `(255, 255, 0)` | Line Color for centroids mapping on two bounding boxes |
-| `centroid_color` | `RGB` | `(255, 0, 255)` | Centroid color for each bounding box |
+| `Name` | `Type` | `Default` | Description |
+|--------------------|---------|-----------------|-----------------------------------------------------------|
+| `names` | `dict` | `None` | Dictionary mapping class indices to class names. |
+| `pixels_per_meter` | `int` | `10` | Conversion factor from pixels to meters. |
+| `view_img` | `bool` | `False` | Flag to indicate if the video stream should be displayed. |
+| `line_thickness` | `int` | `2` | Thickness of the lines drawn on the image. |
+| `line_color` | `tuple` | `(255, 255, 0)` | Color of the lines drawn on the image (BGR format). |
+| `centroid_color` | `tuple` | `(255, 0, 255)` | Color of the centroids drawn (BGR format). |
### Arguments `model.track`
diff --git a/docs/en/guides/heatmaps.md b/docs/en/guides/heatmaps.md
index a458ad8d..b2537185 100644
--- a/docs/en/guides/heatmaps.md
+++ b/docs/en/guides/heatmaps.md
@@ -44,8 +44,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Heatmap"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -54,19 +53,13 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("heatmap_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("heatmap_output.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
# Init heatmap
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ classes_names=model.names)
while cap.isOpened():
success, im0 = cap.read()
@@ -87,8 +80,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Line Counting"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -97,30 +89,24 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("heatmap_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("heatmap_output.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
line_points = [(20, 400), (1080, 404)] # line for object counting
# Init heatmap
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- count_reg_pts=line_points,
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ count_reg_pts=line_points,
+ classes_names=model.names)
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
- tracks = model.track(im0, persist=True, show=False)
+ tracks = model.track(im0, persist=True, show=False)
im0 = heatmap_obj.generate_heatmap(im0, tracks)
video_writer.write(im0)
@@ -131,8 +117,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Polygon Counting"
```python
- from ultralytics import YOLO
- import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -150,22 +135,19 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360), (20, 400)]
# Init heatmap
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- count_reg_pts=region_points,
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ count_reg_pts=region_points,
+ classes_names=model.names)
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
+
tracks = model.track(im0, persist=True, show=False)
-
im0 = heatmap_obj.generate_heatmap(im0, tracks)
video_writer.write(im0)
@@ -177,8 +159,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Region Counting"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -187,31 +168,25 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("heatmap_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("heatmap_output.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
# Define region points
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360)]
# Init heatmap
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- count_reg_pts=region_points,
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ count_reg_pts=region_points,
+ classes_names=model.names)
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
+
tracks = model.track(im0, persist=True, show=False)
-
im0 = heatmap_obj.generate_heatmap(im0, tracks)
video_writer.write(im0)
@@ -223,8 +198,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Im0"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8s.pt") # YOLOv8 custom/pretrained model
@@ -233,13 +207,10 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
h, w = im0.shape[:2] # image height and width
# Heatmap Init
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ classes_names=model.names)
results = model.track(im0, persist=True)
im0 = heatmap_obj.generate_heatmap(im0, tracks=results)
@@ -249,8 +220,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
=== "Specific Classes"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import heatmap
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -259,21 +229,15 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("heatmap_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("heatmap_output.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
classes_for_heatmap = [0, 2] # classes for heatmap
# Init heatmap
- heatmap_obj = heatmap.Heatmap()
- heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
- imw=w,
- imh=h,
- view_img=True,
- shape="circle",
- classes_names=model.names)
+ heatmap_obj = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
+ view_img=True,
+ shape="circle",
+ classes_names=model.names)
while cap.isOpened():
success, im0 = cap.read()
@@ -291,28 +255,27 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
cv2.destroyAllWindows()
```
-### Arguments `set_args`
+### Arguments `Heatmap()`
-| Name | Type | Default | Description |
-|----------------------|----------------|---------------------|-----------------------------------------------------------|
-| `view_img` | `bool` | `False` | Display the frame with heatmap |
-| `colormap` | `cv2.COLORMAP` | `None` | cv2.COLORMAP for heatmap |
-| `imw` | `int` | `None` | Width of Heatmap |
-| `imh` | `int` | `None` | Height of Heatmap |
-| `line_thickness` | `int` | `2` | Increase bounding boxes and count text thickness |
-| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
-| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
-| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
-| `heatmap_alpha` | `float` | `0.5` | Heatmap alpha value |
-| `count_reg_pts` | `list` | `None` | Object counting region points |
-| `count_txt_color` | `RGB Color` | `(0, 0, 0)` | Foreground color for Object counts text |
-| `count_reg_color` | `RGB Color` | `(255, 0, 255)` | Counting region color |
-| `region_thickness` | `int` | `5` | Counting region thickness value |
-| `decay_factor` | `float` | `0.99` | Decay factor for heatmap area removal after specific time |
-| `shape` | `str` | `circle` | Heatmap shape for display "rect" or "circle" supported |
-| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
-| `count_bg_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
-| `cls_txtdisplay_gap` | `int` | `50` | Display gap between each class count |
+| Name | Type | Default | Description |
+|--------------------|------------------|--------------------|-------------------------------------------------------------------|
+| `classes_names` | `dict` | `None` | Dictionary of class names. |
+| `imw` | `int` | `0` | Image width. |
+| `imh` | `int` | `0` | Image height. |
+| `colormap` | `int` | `cv2.COLORMAP_JET` | Colormap to use for the heatmap. |
+| `heatmap_alpha` | `float` | `0.5` | Alpha blending value for heatmap overlay. |
+| `view_img` | `bool` | `False` | Whether to display the image with the heatmap overlay. |
+| `view_in_counts` | `bool` | `True` | Whether to display the count of objects entering the region. |
+| `view_out_counts` | `bool` | `True` | Whether to display the count of objects exiting the region. |
+| `count_reg_pts` | `list` or `None` | `None` | Points defining the counting region (either a line or a polygon). |
+| `count_txt_color` | `tuple` | `(0, 0, 0)` | Text color for displaying counts. |
+| `count_bg_color` | `tuple` | `(255, 255, 255)` | Background color for displaying counts. |
+| `count_reg_color` | `tuple` | `(255, 0, 255)` | Color for the counting region. |
+| `region_thickness` | `int` | `5` | Thickness of the region line. |
+| `line_dist_thresh` | `int` | `15` | Distance threshold for line-based counting. |
+| `line_thickness` | `int` | `2` | Thickness of the lines used in drawing. |
+| `decay_factor` | `float` | `0.99` | Decay factor for the heatmap to reduce intensity over time. |
+| `shape` | `str` | `"circle"` | Shape of the heatmap blobs ('circle' or 'rect'). |
### Arguments `model.track`
diff --git a/docs/en/guides/object-counting.md b/docs/en/guides/object-counting.md
index 267c48c0..a52a0358 100644
--- a/docs/en/guides/object-counting.md
+++ b/docs/en/guides/object-counting.md
@@ -51,42 +51,39 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
=== "Count in Region"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import object_counter
import cv2
-
+ from ultralytics import YOLO, solutions
+
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
-
+
# Define region points
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360)]
-
+
# Video writer
- video_writer = cv2.VideoWriter("object_counting_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
-
+ video_writer = cv2.VideoWriter("object_counting_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
+
# Init Object Counter
- counter = object_counter.ObjectCounter()
- counter.set_args(view_img=True,
- reg_pts=region_points,
- classes_names=model.names,
- draw_tracks=True,
- line_thickness=2)
-
+ counter = solutions.ObjectCounter(
+ view_img=True,
+ reg_pts=region_points,
+ classes_names=model.names,
+ draw_tracks=True,
+ line_thickness=2,
+ )
+
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
tracks = model.track(im0, persist=True, show=False)
-
+
im0 = counter.start_counting(im0, tracks)
video_writer.write(im0)
-
+
cap.release()
video_writer.release()
cv2.destroyAllWindows()
@@ -95,9 +92,8 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
=== "Count in Polygon"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import object_counter
import cv2
+ from ultralytics import YOLO, solutions
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
@@ -108,18 +104,16 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360), (20, 400)]
# Video writer
- video_writer = cv2.VideoWriter("object_counting_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("object_counting_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
# Init Object Counter
- counter = object_counter.ObjectCounter()
- counter.set_args(view_img=True,
- reg_pts=region_points,
- classes_names=model.names,
- draw_tracks=True,
- line_thickness=2)
+ counter = solutions.ObjectCounter(
+ view_img=True,
+ reg_pts=region_points,
+ classes_names=model.names,
+ draw_tracks=True,
+ line_thickness=2,
+ )
while cap.isOpened():
success, im0 = cap.read()
@@ -139,42 +133,39 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
=== "Count in Line"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import object_counter
import cv2
-
+ from ultralytics import YOLO, solutions
+
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
-
+
# Define line points
line_points = [(20, 400), (1080, 400)]
-
+
# Video writer
- video_writer = cv2.VideoWriter("object_counting_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
-
+ video_writer = cv2.VideoWriter("object_counting_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
+
# Init Object Counter
- counter = object_counter.ObjectCounter()
- counter.set_args(view_img=True,
- reg_pts=line_points,
- classes_names=model.names,
- draw_tracks=True,
- line_thickness=2)
-
+ counter = solutions.ObjectCounter(
+ view_img=True,
+ reg_pts=line_points,
+ classes_names=model.names,
+ draw_tracks=True,
+ line_thickness=2,
+ )
+
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
tracks = model.track(im0, persist=True, show=False)
-
+
im0 = counter.start_counting(im0, tracks)
video_writer.write(im0)
-
+
cap.release()
video_writer.release()
cv2.destroyAllWindows()
@@ -183,43 +174,39 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
=== "Specific Classes"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import object_counter
import cv2
-
+ from ultralytics import YOLO, solutions
+
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
-
+
line_points = [(20, 400), (1080, 400)] # line or region points
classes_to_count = [0, 2] # person and car classes for count
-
+
# Video writer
- video_writer = cv2.VideoWriter("object_counting_output.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
-
+ video_writer = cv2.VideoWriter("object_counting_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
+
# Init Object Counter
- counter = object_counter.ObjectCounter()
- counter.set_args(view_img=True,
- reg_pts=line_points,
- classes_names=model.names,
- draw_tracks=True,
- line_thickness=2)
-
+ counter = solutions.ObjectCounter(
+ view_img=True,
+ reg_pts=line_points,
+ classes_names=model.names,
+ draw_tracks=True,
+ line_thickness=2,
+ )
+
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
- tracks = model.track(im0, persist=True, show=False,
- classes=classes_to_count)
-
+ tracks = model.track(im0, persist=True, show=False, classes=classes_to_count)
+
im0 = counter.start_counting(im0, tracks)
video_writer.write(im0)
-
+
cap.release()
video_writer.release()
cv2.destroyAllWindows()
@@ -229,24 +216,27 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
You can move the region anywhere in the frame by clicking on its edges
-### Optional Arguments `set_args`
+### Argument `ObjectCounter`
-| Name | Type | Default | Description |
-|--------------------|-------------|----------------------------|--------------------------------------------------|
-| `view_img` | `bool` | `False` | Display frames with counts |
-| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
-| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
-| `line_thickness` | `int` | `2` | Increase bounding boxes and count text thickness |
-| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | Points defining the Region Area |
-| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
-| `count_reg_color` | `RGB Color` | `(255, 0, 255)` | Color of the Object counting Region or Line |
-| `track_thickness` | `int` | `2` | Thickness of Tracking Lines |
-| `draw_tracks` | `bool` | `False` | Enable drawing Track lines |
-| `track_color` | `RGB Color` | `(0, 255, 0)` | Color for each track line |
-| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
-| `count_txt_color` | `RGB Color` | `(255, 255, 255)` | Foreground color for Object counts text |
-| `region_thickness` | `int` | `5` | Thickness for object counter region or line |
-| `count_bg_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
+Here's a table with the `ObjectCounter` arguments:
+
+| Name | Type | Default | Description |
+|----------------------|---------|----------------------------|------------------------------------------------------------------------|
+| `classes_names` | `dict` | `None` | Dictionary of class names. |
+| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | List of points defining the counting region. |
+| `count_reg_color` | `tuple` | `(255, 0, 255)` | RGB color of the counting region. |
+| `count_txt_color` | `tuple` | `(0, 0, 0)` | RGB color of the count text. |
+| `count_bg_color` | `tuple` | `(255, 255, 255)` | RGB color of the count text background. |
+| `line_thickness` | `int` | `2` | Line thickness for bounding boxes. |
+| `track_thickness` | `int` | `2` | Thickness of the track lines. |
+| `view_img` | `bool` | `False` | Flag to control whether to display the video stream. |
+| `view_in_counts` | `bool` | `True` | Flag to control whether to display the in counts on the video stream. |
+| `view_out_counts` | `bool` | `True` | Flag to control whether to display the out counts on the video stream. |
+| `draw_tracks` | `bool` | `False` | Flag to control whether to draw the object tracks. |
+| `track_color` | `tuple` | `None` | RGB color of the tracks. |
+| `region_thickness` | `int` | `5` | Thickness of the object counting region. |
+| `line_dist_thresh` | `int` | `15` | Euclidean distance threshold for line counter. |
+| `cls_txtdisplay_gap` | `int` | `50` | Display gap between each class count. |
### Arguments `model.track`
diff --git a/docs/en/guides/object-cropping.md b/docs/en/guides/object-cropping.md
index 240230a8..e08ddda2 100644
--- a/docs/en/guides/object-cropping.md
+++ b/docs/en/guides/object-cropping.md
@@ -83,20 +83,20 @@ Object cropping with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
### Arguments `model.predict`
-| 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 |
-| `max_det` | `int` | `300` | maximum number of detections per image |
-| `vid_stride` | `bool` | `False` | video frame-rate stride |
-| `stream_buffer` | `bool` | `False` | buffer all streaming frames (True) or return the most recent frame (False) |
-| `visualize` | `bool` | `False` | visualize model features |
-| `augment` | `bool` | `False` | apply image augmentation to prediction sources |
-| `agnostic_nms` | `bool` | `False` | class-agnostic NMS |
-| `classes` | `list[int]` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] |
-| `retina_masks` | `bool` | `False` | use high-resolution segmentation masks |
-| `embed` | `list[int]` | `None` | return feature vectors/embeddings from given layers |
+| Argument | Type | Default | Description |
+|-----------------|----------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `source` | `str` | `'ultralytics/assets'` | Specifies the data source for inference. Can be an image path, video file, directory, URL, or device ID for live feeds. Supports a wide range of formats and sources, enabling flexible application across different types of input. |
+| `conf` | `float` | `0.25` | Sets the minimum confidence threshold for detections. Objects detected with confidence below this threshold will be disregarded. Adjusting this value can help reduce false positives. |
+| `iou` | `float` | `0.7` | Intersection Over Union (IoU) threshold for Non-Maximum Suppression (NMS). Lower values result in fewer detections by eliminating overlapping boxes, useful for reducing duplicates. |
+| `imgsz` | `int or tuple` | `640` | Defines the image size for inference. Can be a single integer `640` for square resizing or a (height, width) tuple. Proper sizing can improve detection accuracy and processing speed. |
+| `half` | `bool` | `False` | Enables half-precision (FP16) inference, which can speed up model inference on supported GPUs with minimal impact on accuracy. |
+| `device` | `str` | `None` | Specifies the device for inference (e.g., `cpu`, `cuda:0` or `0`). Allows users to select between CPU, a specific GPU, or other compute devices for model execution. |
+| `max_det` | `int` | `300` | Maximum number of detections allowed per image. Limits the total number of objects the model can detect in a single inference, preventing excessive outputs in dense scenes. |
+| `vid_stride` | `int` | `1` | Frame stride for video inputs. Allows skipping frames in videos to speed up processing at the cost of temporal resolution. A value of 1 processes every frame, higher values skip frames. |
+| `stream_buffer` | `bool` | `False` | Determines if all frames should be buffered when processing video streams (`True`), or if the model should return the most recent frame (`False`). Useful for real-time applications. |
+| `visualize` | `bool` | `False` | Activates visualization of model features during inference, providing insights into what the model is "seeing". Useful for debugging and model interpretation. |
+| `augment` | `bool` | `False` | Enables test-time augmentation (TTA) for predictions, potentially improving detection robustness at the cost of inference speed. |
+| `agnostic_nms` | `bool` | `False` | Enables class-agnostic Non-Maximum Suppression (NMS), which merges overlapping boxes of different classes. Useful in multi-class detection scenarios where class overlap is common. |
+| `classes` | `list[int]` | `None` | Filters predictions to a set of class IDs. Only detections belonging to the specified classes will be returned. Useful for focusing on relevant objects in multi-class detection tasks. |
+| `retina_masks` | `bool` | `False` | Uses high-resolution segmentation masks if available in the model. This can enhance mask quality for segmentation tasks, providing finer detail. |
+| `embed` | `list[int]` | `None` | Specifies the layers from which to extract feature vectors or embeddings. Useful for downstream tasks like clustering or similarity search.
diff --git a/docs/en/guides/parking-management.md b/docs/en/guides/parking-management.md
index e68e0194..421398cc 100644
--- a/docs/en/guides/parking-management.md
+++ b/docs/en/guides/parking-management.md
@@ -23,24 +23,24 @@ Parking management with [Ultralytics YOLOv8](https://github.com/ultralytics/ultr
|  |  |
| Parking management Aeriel View using Ultralytics YOLOv8 | Parking management Top View using Ultralytics YOLOv8 |
-
## Parking Management System Code Workflow
### Selection of Points
!!! Tip "Point Selection is now Easy"
-
+
Choosing parking points is a critical and complex task in parking management systems. Ultralytics streamlines this process by providing a tool that lets you define parking lot areas, which can be utilized later for additional processing.
- Capture a frame from the video or camera stream where you want to manage the parking lot.
- Use the provided code to launch a graphical interface, where you can select an image and start outlining parking regions by mouse click to create polygons.
!!! Warning "Image Size"
-
+
Max Image Size of 1920 * 1080 supported
```python
from ultralytics.solutions.parking_management import ParkingPtsSelection, tk
+
root = tk.Tk()
ParkingPtsSelection(root)
root.mainloop()
@@ -50,7 +50,6 @@ root.mainloop()

-
### Python Code for Parking Management
!!! Example "Parking management using YOLOv8 Example"
@@ -59,7 +58,7 @@ root.mainloop()
```python
import cv2
- from ultralytics.solutions.parking_management import ParkingManagement
+ from ultralytics import solutions
# Path to json file, that created with above point selection app
polygon_json_path = "bounding_boxes.json"
@@ -72,11 +71,10 @@ root.mainloop()
cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("parking management.avi",
- cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
+ video_writer = cv2.VideoWriter("parking management.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
# Initialize parking management object
- management = ParkingManagement(model_path="yolov8n.pt")
+ management = solutions.ParkingManagement(model_path="yolov8n.pt")
while cap.isOpened():
ret, im0 = cap.read()
@@ -98,16 +96,17 @@ root.mainloop()
video_writer.release()
cv2.destroyAllWindows()
```
-
-### Optional Arguments `ParkingManagement()`
-| Name | Type | Default | Description |
-|--------------------------|-------------|-------------------|-----------------------------------------------------|
-| `occupied_region_color` | `RGB Color` | `(0, 255, 0)` | Parking space occupied region color |
-| `available_region_color` | `RGB Color` | `(0, 0, 255)` | Parking space available region color |
-| `margin` | `int` | `10` | Gap between text display for multiple classes count |
-| `txt_color` | `RGB Color` | `(255, 255, 255)` | Foreground color for object counts text |
-| `bg_color` | `RGB Color` | `(255, 255, 255)` | Rectangle behind text background color |
+### Optional Arguments `ParkingManagement`
+
+| Name | Type | Default | Description |
+|--------------------------|---------|-------------------|----------------------------------------|
+| `model_path` | `str` | `None` | Path to the YOLOv8 model. |
+| `txt_color` | `tuple` | `(0, 0, 0)` | RGB color tuple for text. |
+| `bg_color` | `tuple` | `(255, 255, 255)` | RGB color tuple for background. |
+| `occupied_region_color` | `tuple` | `(0, 255, 0)` | RGB color tuple for occupied regions. |
+| `available_region_color` | `tuple` | `(0, 0, 255)` | RGB color tuple for available regions. |
+| `margin` | `int` | `10` | Margin for text display. |
### Arguments `model.track`
diff --git a/docs/en/guides/queue-management.md b/docs/en/guides/queue-management.md
index e02da630..b4b450e2 100644
--- a/docs/en/guides/queue-management.md
+++ b/docs/en/guides/queue-management.md
@@ -28,30 +28,23 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra
```python
import cv2
- from ultralytics import YOLO
- from ultralytics.solutions import queue_management
+ from ultralytics import YOLO, solutions
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
- w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH,
- cv2.CAP_PROP_FRAME_HEIGHT,
- cv2.CAP_PROP_FPS))
+ w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
- video_writer = cv2.VideoWriter("queue_management.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("queue_management.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
queue_region = [(20, 400), (1080, 404), (1080, 360), (20, 360)]
- queue = queue_management.QueueManager()
- queue.set_args(classes_names=model.names,
- reg_pts=queue_region,
- line_thickness=3,
- fontsize=1.0,
- region_color=(255, 144, 31))
+ queue = solutions.QueueManager(classes_names=model.names,
+ reg_pts=queue_region,
+ line_thickness=3,
+ fontsize=1.0,
+ region_color=(255, 144, 31))
while cap.isOpened():
success, im0 = cap.read()
@@ -77,30 +70,23 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra
```python
import cv2
- from ultralytics import YOLO
- from ultralytics.solutions import queue_management
+ from ultralytics import YOLO, solutions
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
- w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH,
- cv2.CAP_PROP_FRAME_HEIGHT,
- cv2.CAP_PROP_FPS))
+ w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
- video_writer = cv2.VideoWriter("queue_management.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("queue_management.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
queue_region = [(20, 400), (1080, 404), (1080, 360), (20, 360)]
- queue = queue_management.QueueManager()
- queue.set_args(classes_names=model.names,
- reg_pts=queue_region,
- line_thickness=3,
- fontsize=1.0,
- region_color=(255, 144, 31))
+ queue = solutions.QueueManager(classes_names=model.names,
+ reg_pts=queue_region,
+ line_thickness=3,
+ fontsize=1.0,
+ region_color=(255, 144, 31))
while cap.isOpened():
success, im0 = cap.read()
@@ -122,22 +108,22 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra
cv2.destroyAllWindows()
```
-### Optional Arguments `set_args`
+### Arguments `QueueManager`
-| Name | Type | Default | Description |
-|---------------------|-------------|----------------------------|---------------------------------------------|
-| `view_img` | `bool` | `False` | Display frames with counts |
-| `view_queue_counts` | `bool` | `True` | Display Queue counts only on video frame |
-| `line_thickness` | `int` | `2` | Increase bounding boxes thickness |
-| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | Points defining the Region Area |
-| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
-| `region_color` | `RGB Color` | `(255, 0, 255)` | Color of the Object counting Region or Line |
-| `track_thickness` | `int` | `2` | Thickness of Tracking Lines |
-| `draw_tracks` | `bool` | `False` | Enable drawing Track lines |
-| `track_color` | `RGB Color` | `(0, 255, 0)` | Color for each track line |
-| `count_txt_color` | `RGB Color` | `(255, 255, 255)` | Foreground color for Object counts text |
-| `region_thickness` | `int` | `5` | Thickness for object counter region or line |
-| `fontsize` | `float` | `0.6` | Font size of counting text |
+| Name | Type | Default | Description |
+|---------------------|------------------|----------------------------|-------------------------------------------------------------------------------------|
+| `classes_names` | `dict` | `model.names` | A dictionary mapping class IDs to class names. |
+| `reg_pts` | `list of tuples` | `[(20, 400), (1260, 400)]` | Points defining the counting region polygon. Defaults to a predefined rectangle. |
+| `line_thickness` | `int` | `2` | Thickness of the annotation lines. |
+| `track_thickness` | `int` | `2` | Thickness of the track lines. |
+| `view_img` | `bool` | `False` | Whether to display the image frames. |
+| `region_color` | `tuple` | `(255, 0, 255)` | Color of the counting region lines (BGR). |
+| `view_queue_counts` | `bool` | `True` | Whether to display the queue counts. |
+| `draw_tracks` | `bool` | `False` | Whether to draw tracks of the objects. |
+| `count_txt_color` | `tuple` | `(255, 255, 255)` | Color of the count text (BGR). |
+| `track_color` | `tuple` | `None` | Color of the tracks. If `None`, different colors will be used for different tracks. |
+| `region_thickness` | `int` | `5` | Thickness of the counting region lines. |
+| `fontsize` | `float` | `0.7` | Font size for the text annotations. |
### Arguments `model.track`
diff --git a/docs/en/guides/speed-estimation.md b/docs/en/guides/speed-estimation.md
index 210f7f74..95142c72 100644
--- a/docs/en/guides/speed-estimation.md
+++ b/docs/en/guides/speed-estimation.md
@@ -39,8 +39,7 @@ Speed estimation is the process of calculating the rate of movement of an object
=== "Speed Estimation"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import speed_estimation
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n.pt")
@@ -51,18 +50,14 @@ Speed estimation is the process of calculating the rate of movement of an object
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
# Video writer
- video_writer = cv2.VideoWriter("speed_estimation.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("speed_estimation.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
line_pts = [(0, 360), (1280, 360)]
# Init speed-estimation obj
- speed_obj = speed_estimation.SpeedEstimator()
- speed_obj.set_args(reg_pts=line_pts,
- names=names,
- view_img=True)
+ speed_obj = solutions.SpeedEstimator(reg_pts=line_pts,
+ names=names,
+ view_img=True)
while cap.isOpened():
@@ -86,16 +81,16 @@ Speed estimation is the process of calculating the rate of movement of an object
Speed will be an estimate and may not be completely accurate. Additionally, the estimation can vary depending on GPU speed.
-### Optional Arguments `set_args`
+### Arguments `SpeedEstimator`
-| Name | Type | Default | Description |
-|--------------------|--------|----------------------------|---------------------------------------------------|
-| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | Points defining the Region Area |
-| `names` | `dict` | `None` | Classes names |
-| `view_img` | `bool` | `False` | Display frames with counts |
-| `line_thickness` | `int` | `2` | Increase bounding boxes thickness |
-| `region_thickness` | `int` | `5` | Thickness for object counter region or line |
-| `spdl_dist_thresh` | `int` | `10` | Euclidean Distance threshold for speed check line |
+| Name | Type | Default | Description |
+|--------------------|--------|----------------------------|------------------------------------------------------|
+| `names` | `dict` | `None` | Dictionary of class names. |
+| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | List of region points for speed estimation. |
+| `view_img` | `bool` | `False` | Whether to display the image with annotations. |
+| `line_thickness` | `int` | `2` | Thickness of the lines for drawing boxes and tracks. |
+| `region_thickness` | `int` | `5` | Thickness of the region lines. |
+| `spdl_dist_thresh` | `int` | `10` | Distance threshold for speed calculation. |
### Arguments `model.track`
diff --git a/docs/en/guides/vision-eye.md b/docs/en/guides/vision-eye.md
index 30017723..c51cf2d7 100644
--- a/docs/en/guides/vision-eye.md
+++ b/docs/en/guides/vision-eye.md
@@ -169,8 +169,6 @@ keywords: Ultralytics, YOLOv8, Object Detection, Object Tracking, IDetection, Vi
|---------------|---------|------------------|--------------------------------------------------|
| `color` | `tuple` | `(235, 219, 11)` | Line and object centroid color |
| `pin_color` | `tuple` | `(255, 0, 255)` | VisionEye pinpoint color |
-| `thickness` | `int` | `2` | pinpoint to object line thickness |
-| `pins_radius` | `int` | `10` | Pinpoint and object centroid point circle radius |
## Note
diff --git a/docs/en/guides/workouts-monitoring.md b/docs/en/guides/workouts-monitoring.md
index 3c60be8f..370aaf20 100644
--- a/docs/en/guides/workouts-monitoring.md
+++ b/docs/en/guides/workouts-monitoring.md
@@ -39,8 +39,7 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi
=== "Workouts Monitoring"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import ai_gym
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n-pose.pt")
@@ -48,11 +47,10 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
- gym_object = ai_gym.AIGym() # init AI GYM module
- gym_object.set_args(line_thickness=2,
- view_img=True,
- pose_type="pushup",
- kpts_to_check=[6, 8, 10])
+ gym_object = solutions.AIGym(line_thickness=2,
+ view_img=True,
+ pose_type="pushup",
+ kpts_to_check=[6, 8, 10])
frame_count = 0
while cap.isOpened():
@@ -71,8 +69,7 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi
=== "Workouts Monitoring with Save Output"
```python
- from ultralytics import YOLO
- from ultralytics.solutions import ai_gym
+ from ultralytics import YOLO, solutions
import cv2
model = YOLO("yolov8n-pose.pt")
@@ -80,16 +77,12 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
- video_writer = cv2.VideoWriter("workouts.avi",
- cv2.VideoWriter_fourcc(*'mp4v'),
- fps,
- (w, h))
+ video_writer = cv2.VideoWriter("workouts.avi", cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
- gym_object = ai_gym.AIGym() # init AI GYM module
- gym_object.set_args(line_thickness=2,
- view_img=True,
- pose_type="pushup",
- kpts_to_check=[6, 8, 10])
+ gym_object = solutions.AIGym(line_thickness=2,
+ view_img=True,
+ pose_type="pushup",
+ kpts_to_check=[6, 8, 10])
frame_count = 0
while cap.isOpened():
@@ -115,16 +108,16 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi

-### Arguments `set_args`
+### Arguments `AIGym`
-| Name | Type | Default | Description |
-|-------------------|--------|----------|----------------------------------------------------------------------------------------|
-| `kpts_to_check` | `list` | `None` | List of three keypoints index, for counting specific workout, followed by keypoint Map |
-| `view_img` | `bool` | `False` | Display the frame with counts |
-| `line_thickness` | `int` | `2` | Increase the thickness of count value |
-| `pose_type` | `str` | `pushup` | Pose that need to be monitored, `pullup` and `abworkout` also supported |
-| `pose_up_angle` | `int` | `145` | Pose Up Angle value |
-| `pose_down_angle` | `int` | `90` | Pose Down Angle value |
+| Name | Type | Default | Description |
+|-------------------|---------|----------|----------------------------------------------------------------------------------------|
+| `kpts_to_check` | `list` | `None` | List of three keypoints index, for counting specific workout, followed by keypoint Map |
+| `line_thickness` | `int` | `2` | Thickness of the lines drawn. |
+| `view_img` | `bool` | `False` | Flag to display the image. |
+| `pose_up_angle` | `float` | `145.0` | Angle threshold for the 'up' pose. |
+| `pose_down_angle` | `float` | `90.0` | Angle threshold for the 'down' pose. |
+| `pose_type` | `str` | `pullup` | Type of pose to detect (`'pullup`', `pushup`, `abworkout`). |
### Arguments `model.predict`
diff --git a/docs/en/reference/cfg/__init__.md b/docs/en/reference/cfg/__init__.md
index 152994ba..c930e1ef 100644
--- a/docs/en/reference/cfg/__init__.md
+++ b/docs/en/reference/cfg/__init__.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, Configuration, cfg2dict, handle_deprecation, merge_
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/cfg/__init__.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/cfg/__init__.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/annotator.md b/docs/en/reference/data/annotator.md
index 766b30bc..8e9309ec 100644
--- a/docs/en/reference/data/annotator.md
+++ b/docs/en/reference/data/annotator.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Auto-Annotate, Machine Learning, AI, Annotation, Data Pro
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/annotator.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/annotator.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/augment.md b/docs/en/reference/data/augment.md
index 66e05237..a019408f 100644
--- a/docs/en/reference/data/augment.md
+++ b/docs/en/reference/data/augment.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Data Augmentation, BaseTransform, MixUp, RandomHSV, Lette
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/augment.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/augment.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/base.md b/docs/en/reference/data/base.md
index bbea8039..7dc50253 100644
--- a/docs/en/reference/data/base.md
+++ b/docs/en/reference/data/base.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, docs, BaseDataset, data manipulation, dataset creation
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/base.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/base.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/build.md b/docs/en/reference/data/build.md
index 08bae433..6d615f66 100644
--- a/docs/en/reference/data/build.md
+++ b/docs/en/reference/data/build.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO v3, Data build, DataLoader, InfiniteDataLoader, seed
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/build.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/build.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/converter.md b/docs/en/reference/data/converter.md
index 97572851..3b0508a3 100644
--- a/docs/en/reference/data/converter.md
+++ b/docs/en/reference/data/converter.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Data Converter, coco91_to_coco80_class, merge_multi_segme
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/converter.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/converter.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/dataset.md b/docs/en/reference/data/dataset.md
index b7643e49..bdc7eb7d 100644
--- a/docs/en/reference/data/dataset.md
+++ b/docs/en/reference/data/dataset.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, YOLODataset, SemanticDataset, data handling, data m
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/dataset.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/dataset.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/explorer/explorer.md b/docs/en/reference/data/explorer/explorer.md
index e7b363a9..cbcfd23e 100644
--- a/docs/en/reference/data/explorer/explorer.md
+++ b/docs/en/reference/data/explorer/explorer.md
@@ -8,7 +8,7 @@ keywords: Ultralytics, explorer.py, data explorer, Semantic search, vector simil
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py). If you spot a problem please help fix it by [contributing](../../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/explorer.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/explorer.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/explorer/gui/dash.md b/docs/en/reference/data/explorer/gui/dash.md
index bd613eec..37b0697c 100644
--- a/docs/en/reference/data/explorer/gui/dash.md
+++ b/docs/en/reference/data/explorer/gui/dash.md
@@ -8,7 +8,7 @@ keywords: Ultralytics, data explorer, gui, function reference, documentation, AI
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/gui/dash.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/gui/dash.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/gui/dash.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/gui/dash.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/gui/dash.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/gui/dash.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/explorer/utils.md b/docs/en/reference/data/explorer/utils.md
index 4aaaef5a..e34939cd 100644
--- a/docs/en/reference/data/explorer/utils.md
+++ b/docs/en/reference/data/explorer/utils.md
@@ -8,7 +8,7 @@ keywords: Ultralytics, data explorer, function reference, documentation, get tab
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py). If you spot a problem please help fix it by [contributing](../../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/utils.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/loaders.md b/docs/en/reference/data/loaders.md
index 022c6cc4..a713a9a2 100644
--- a/docs/en/reference/data/loaders.md
+++ b/docs/en/reference/data/loaders.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, data loaders, LoadStreams, LoadImages, LoadTensor, YOLO,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/loaders.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/loaders.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/split_dota.md b/docs/en/reference/data/split_dota.md
index 7cf5985c..cc10ff5f 100644
--- a/docs/en/reference/data/split_dota.md
+++ b/docs/en/reference/data/split_dota.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, DOTA dataset, object detection, image processing, p
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/split_dota.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/split_dota.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/data/utils.md b/docs/en/reference/data/utils.md
index 2178e2f8..7ac3add6 100644
--- a/docs/en/reference/data/utils.md
+++ b/docs/en/reference/data/utils.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, data utils, YOLO, img2label_paths, exif_size, polygon2mas
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/utils.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/exporter.md b/docs/en/reference/engine/exporter.md
index f4e1aa4b..45215ac3 100644
--- a/docs/en/reference/engine/exporter.md
+++ b/docs/en/reference/engine/exporter.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Exporter, IOSDetectModel, Export Formats, Try export
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/exporter.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/exporter.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/model.md b/docs/en/reference/engine/model.md
index 24c40d16..ecc71f2d 100644
--- a/docs/en/reference/engine/model.md
+++ b/docs/en/reference/engine/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, engine model, documentation, guide, implementation,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/predictor.md b/docs/en/reference/engine/predictor.md
index 93623a07..315c34bb 100644
--- a/docs/en/reference/engine/predictor.md
+++ b/docs/en/reference/engine/predictor.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, BasePredictor, YOLO, prediction, engine
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/predictor.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/predictor.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/results.md b/docs/en/reference/engine/results.md
index 8a810604..0f5fc4e7 100644
--- a/docs/en/reference/engine/results.md
+++ b/docs/en/reference/engine/results.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, engine, results, base tensor, boxes, keypoints
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/results.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/results.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/trainer.md b/docs/en/reference/engine/trainer.md
index a0a72fd5..e1a060e5 100644
--- a/docs/en/reference/engine/trainer.md
+++ b/docs/en/reference/engine/trainer.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, BaseTrainer, Machine Learning, Training Control, Python l
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/trainer.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/trainer.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/tuner.md b/docs/en/reference/engine/tuner.md
index ebedd89b..db3af522 100644
--- a/docs/en/reference/engine/tuner.md
+++ b/docs/en/reference/engine/tuner.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Tuner, YOLO, hyperparameter tuning, optimization, object
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/tuner.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/tuner.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/engine/validator.md b/docs/en/reference/engine/validator.md
index c22dac50..cbb28919 100644
--- a/docs/en/reference/engine/validator.md
+++ b/docs/en/reference/engine/validator.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, BaseValidator, Ultralytics engine, module, components
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/validator.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/validator.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/hub/__init__.md b/docs/en/reference/hub/__init__.md
index 6b64b0a0..1eebf8e8 100644
--- a/docs/en/reference/hub/__init__.md
+++ b/docs/en/reference/hub/__init__.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, hub functions, model export, dataset check, reset model,
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/__init__.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/__init__.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/hub/auth.md b/docs/en/reference/hub/auth.md
index 8b8db006..3b454495 100644
--- a/docs/en/reference/hub/auth.md
+++ b/docs/en/reference/hub/auth.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Auth, API documentation, User Authentication, AI, Machine
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/auth.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/auth.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/hub/session.md b/docs/en/reference/hub/session.md
index ce0fe4aa..0baa61e0 100644
--- a/docs/en/reference/hub/session.md
+++ b/docs/en/reference/hub/session.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, HUBTrainingSession, Documentation, Model Training, AI, Ma
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/session.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/session.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/hub/utils.md b/docs/en/reference/hub/utils.md
index 276278e3..9deb9a1e 100644
--- a/docs/en/reference/hub/utils.md
+++ b/docs/en/reference/hub/utils.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Events, request_with_credentials, smart_request, Ultralyt
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/utils.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/fastsam/model.md b/docs/en/reference/models/fastsam/model.md
index 3daad48e..830d3431 100644
--- a/docs/en/reference/models/fastsam/model.md
+++ b/docs/en/reference/models/fastsam/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, FastSAM model, Model documentation, Efficient model train
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/fastsam/predict.md b/docs/en/reference/models/fastsam/predict.md
index 4bfc38d1..a336e168 100644
--- a/docs/en/reference/models/fastsam/predict.md
+++ b/docs/en/reference/models/fastsam/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, FastSAMPredictor, predictive modeling, AI optimization, m
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/fastsam/prompt.md b/docs/en/reference/models/fastsam/prompt.md
index 3261b74c..c1efb4be 100644
--- a/docs/en/reference/models/fastsam/prompt.md
+++ b/docs/en/reference/models/fastsam/prompt.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, FastSAMPrompt, machine learning, model, guide, documentat
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/prompt.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/prompt.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/fastsam/utils.md b/docs/en/reference/models/fastsam/utils.md
index acad666d..b5074e11 100644
--- a/docs/en/reference/models/fastsam/utils.md
+++ b/docs/en/reference/models/fastsam/utils.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, bounding boxes, Bboxes, image borders, object detection,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/utils.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/fastsam/val.md b/docs/en/reference/models/fastsam/val.md
index 67694207..71bf6b24 100644
--- a/docs/en/reference/models/fastsam/val.md
+++ b/docs/en/reference/models/fastsam/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, FastSAMValidator, model, synthetic, AI, machine learning,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/nas/model.md b/docs/en/reference/models/nas/model.md
index d3b6ed96..e844453e 100644
--- a/docs/en/reference/models/nas/model.md
+++ b/docs/en/reference/models/nas/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, NAS model, NAS guide, machine learning, model documentati
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/nas/predict.md b/docs/en/reference/models/nas/predict.md
index 79387748..ee22af4d 100644
--- a/docs/en/reference/models/nas/predict.md
+++ b/docs/en/reference/models/nas/predict.md
@@ -7,7 +7,7 @@ keywords: NASPredictor, Ultralytics, Ultralytics model, model architecture, effi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/nas/val.md b/docs/en/reference/models/nas/val.md
index b5a61412..ff631fe6 100644
--- a/docs/en/reference/models/nas/val.md
+++ b/docs/en/reference/models/nas/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, NASValidator, models.nas.val.NASValidator, AI models, all
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/rtdetr/model.md b/docs/en/reference/models/rtdetr/model.md
index d199b4a3..9776f4c6 100644
--- a/docs/en/reference/models/rtdetr/model.md
+++ b/docs/en/reference/models/rtdetr/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, RTDETR model, Ultralytics models, object detection, Ultra
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/rtdetr/predict.md b/docs/en/reference/models/rtdetr/predict.md
index 37f970fd..311aee49 100644
--- a/docs/en/reference/models/rtdetr/predict.md
+++ b/docs/en/reference/models/rtdetr/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, RTDETRPredictor, model documentation, guide, real-time ob
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/rtdetr/train.md b/docs/en/reference/models/rtdetr/train.md
index 1fe106e7..4e61b6d1 100644
--- a/docs/en/reference/models/rtdetr/train.md
+++ b/docs/en/reference/models/rtdetr/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, RTDETRTrainer, model training, Ultralytics models, PyTorc
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/train.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/rtdetr/val.md b/docs/en/reference/models/rtdetr/val.md
index 33a20715..b0d4d42c 100644
--- a/docs/en/reference/models/rtdetr/val.md
+++ b/docs/en/reference/models/rtdetr/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, RTDETRDataset, RTDETRValidator, real-time object detectio
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/amg.md b/docs/en/reference/models/sam/amg.md
index 9f35b367..9786d76f 100644
--- a/docs/en/reference/models/sam/amg.md
+++ b/docs/en/reference/models/sam/amg.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Mask Data, Transformation, Encoding, RLE encoding, Image
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/amg.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/amg.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/build.md b/docs/en/reference/models/sam/build.md
index 7d519414..85d93479 100644
--- a/docs/en/reference/models/sam/build.md
+++ b/docs/en/reference/models/sam/build.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, SAM, build sam, vision transformer, vits, build_sam_vit_l
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/build.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/build.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/model.md b/docs/en/reference/models/sam/model.md
index 50320ab1..1987609f 100644
--- a/docs/en/reference/models/sam/model.md
+++ b/docs/en/reference/models/sam/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, SAM Model, Documentations, Machine Learning, AI, Co
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/modules/decoders.md b/docs/en/reference/models/sam/modules/decoders.md
index 20206fb4..2c504414 100644
--- a/docs/en/reference/models/sam/modules/decoders.md
+++ b/docs/en/reference/models/sam/modules/decoders.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, MaskDecoder, SAM modules, decoders, MLP, YOLO, machine le
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/decoders.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/decoders.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/modules/encoders.md b/docs/en/reference/models/sam/modules/encoders.md
index c2039e26..080de3c8 100644
--- a/docs/en/reference/models/sam/modules/encoders.md
+++ b/docs/en/reference/models/sam/modules/encoders.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Encoders, Modules, Documentation, ImageEncoderViT, Positi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/encoders.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/encoders.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/modules/sam.md b/docs/en/reference/models/sam/modules/sam.md
index 66a8e257..871967d9 100644
--- a/docs/en/reference/models/sam/modules/sam.md
+++ b/docs/en/reference/models/sam/modules/sam.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Sam module, deep learning, model training, Ultralytics do
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/sam.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/sam.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/modules/tiny_encoder.md b/docs/en/reference/models/sam/modules/tiny_encoder.md
index 767d4c30..8712102c 100644
--- a/docs/en/reference/models/sam/modules/tiny_encoder.md
+++ b/docs/en/reference/models/sam/modules/tiny_encoder.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Tiny Encoder, Conv2d_BN, MBConv, ConvLayer, Attention, Ba
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/tiny_encoder.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/tiny_encoder.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/modules/transformer.md b/docs/en/reference/models/sam/modules/transformer.md
index 67b57e90..308542c6 100644
--- a/docs/en/reference/models/sam/modules/transformer.md
+++ b/docs/en/reference/models/sam/modules/transformer.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, TwoWayTransformer, Attention, AI models, transformers
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/transformer.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/transformer.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/sam/predict.md b/docs/en/reference/models/sam/predict.md
index 6eed5f06..5d2dcae0 100644
--- a/docs/en/reference/models/sam/predict.md
+++ b/docs/en/reference/models/sam/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, predictor, models, sam.predict.Predictor, AI, machine lea
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/utils/loss.md b/docs/en/reference/models/utils/loss.md
index ad3fe205..3291b3a0 100644
--- a/docs/en/reference/models/utils/loss.md
+++ b/docs/en/reference/models/utils/loss.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, Documentation, DETRLoss, Detection Loss, Loss funct
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/loss.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/loss.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/utils/ops.md b/docs/en/reference/models/utils/ops.md
index a295d18b..3e6260b2 100644
--- a/docs/en/reference/models/utils/ops.md
+++ b/docs/en/reference/models/utils/ops.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, HungarianMatcher, inverse_sigmoid, detection models
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/ops.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/ops.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/classify/predict.md b/docs/en/reference/models/yolo/classify/predict.md
index c427269e..959f651b 100644
--- a/docs/en/reference/models/yolo/classify/predict.md
+++ b/docs/en/reference/models/yolo/classify/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, classification predictor, predict, YOLO, AI models, model
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/classify/train.md b/docs/en/reference/models/yolo/classify/train.md
index 9cd5034f..22c0d61f 100644
--- a/docs/en/reference/models/yolo/classify/train.md
+++ b/docs/en/reference/models/yolo/classify/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, Classification Trainer, deep learning, training pro
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/train.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/classify/val.md b/docs/en/reference/models/yolo/classify/val.md
index 12e1f46a..7c6d2a9a 100644
--- a/docs/en/reference/models/yolo/classify/val.md
+++ b/docs/en/reference/models/yolo/classify/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, ClassificationValidator, model validation, model fi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/detect/predict.md b/docs/en/reference/models/yolo/detect/predict.md
index 9e918ab2..e1206bfe 100644
--- a/docs/en/reference/models/yolo/detect/predict.md
+++ b/docs/en/reference/models/yolo/detect/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, DetectionPredictor, detect, predict, object detecti
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/detect/train.md b/docs/en/reference/models/yolo/detect/train.md
index d81715e5..f1643b3d 100644
--- a/docs/en/reference/models/yolo/detect/train.md
+++ b/docs/en/reference/models/yolo/detect/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, YOLO, Detection Trainer, Model Training, Machine Lea
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/train.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/detect/val.md b/docs/en/reference/models/yolo/detect/val.md
index 48f5a092..31e0e1ae 100644
--- a/docs/en/reference/models/yolo/detect/val.md
+++ b/docs/en/reference/models/yolo/detect/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, Detection Validator, model valuation, precision, re
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/model.md b/docs/en/reference/models/yolo/model.md
index 36192874..56073d80 100644
--- a/docs/en/reference/models/yolo/model.md
+++ b/docs/en/reference/models/yolo/model.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, YOLO, YOLO model, Model Training, Machine Learning,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/model.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/model.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/obb/predict.md b/docs/en/reference/models/yolo/obb/predict.md
index fb420c4f..ef37848f 100644
--- a/docs/en/reference/models/yolo/obb/predict.md
+++ b/docs/en/reference/models/yolo/obb/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, OBBPredictor, YOLO, Oriented Bounding Box, object detecti
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/predict.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/obb/train.md b/docs/en/reference/models/yolo/obb/train.md
index f2ad913c..fae945f6 100644
--- a/docs/en/reference/models/yolo/obb/train.md
+++ b/docs/en/reference/models/yolo/obb/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO OBB Trainer, Oriented Bounding Box, OBB model traini
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/train.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/obb/val.md b/docs/en/reference/models/yolo/obb/val.md
index 76ebcda9..46a75c80 100644
--- a/docs/en/reference/models/yolo/obb/val.md
+++ b/docs/en/reference/models/yolo/obb/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, OBBValidator, object detection, oriented bounding b
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/val.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/pose/predict.md b/docs/en/reference/models/yolo/pose/predict.md
index 3b8ca5fd..7899b25b 100644
--- a/docs/en/reference/models/yolo/pose/predict.md
+++ b/docs/en/reference/models/yolo/pose/predict.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, PosePredictor, machine learning, AI, predictive mod
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/pose/train.md b/docs/en/reference/models/yolo/pose/train.md
index 64514038..e700f58e 100644
--- a/docs/en/reference/models/yolo/pose/train.md
+++ b/docs/en/reference/models/yolo/pose/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, PoseTrainer, pose training, AI modeling, custom dat
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/train.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/pose/val.md b/docs/en/reference/models/yolo/pose/val.md
index ea759b72..f21dcad6 100644
--- a/docs/en/reference/models/yolo/pose/val.md
+++ b/docs/en/reference/models/yolo/pose/val.md
@@ -7,7 +7,7 @@ keywords: PoseValidator, Ultralytics, YOLO, Object detection, Pose validation
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/segment/predict.md b/docs/en/reference/models/yolo/segment/predict.md
index 6bebb741..9ba7d715 100644
--- a/docs/en/reference/models/yolo/segment/predict.md
+++ b/docs/en/reference/models/yolo/segment/predict.md
@@ -7,7 +7,7 @@ keywords: YOLO, Ultralytics, object detection, segmentation predictor
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/predict.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/predict.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/segment/train.md b/docs/en/reference/models/yolo/segment/train.md
index 38a2ece0..af8fd4e1 100644
--- a/docs/en/reference/models/yolo/segment/train.md
+++ b/docs/en/reference/models/yolo/segment/train.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, SegmentationTrainer, image segmentation, object det
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/train.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/segment/val.md b/docs/en/reference/models/yolo/segment/val.md
index 3e26f8b6..be0788c3 100644
--- a/docs/en/reference/models/yolo/segment/val.md
+++ b/docs/en/reference/models/yolo/segment/val.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, SegmentationValidator, model segmentation, image cl
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/val.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/val.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/world/train.md b/docs/en/reference/models/yolo/world/train.md
index 20240e51..113a443e 100644
--- a/docs/en/reference/models/yolo/world/train.md
+++ b/docs/en/reference/models/yolo/world/train.md
@@ -2,7 +2,7 @@
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/world/train.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/world/train.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/models/yolo/world/train_world.md b/docs/en/reference/models/yolo/world/train_world.md
index 8030331d..e9a72a73 100644
--- a/docs/en/reference/models/yolo/world/train_world.md
+++ b/docs/en/reference/models/yolo/world/train_world.md
@@ -2,7 +2,7 @@
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train_world.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train_world.py). If you spot a problem please help fix it by [contributing](../../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/world/train_world.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train_world.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train_world.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/world/train_world.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/autobackend.md b/docs/en/reference/nn/autobackend.md
index 7c913c94..faf22345 100644
--- a/docs/en/reference/nn/autobackend.md
+++ b/docs/en/reference/nn/autobackend.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, AutoBackend, check_class_names, YOLO, YOLO models, optimi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/autobackend.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/autobackend.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/modules/block.md b/docs/en/reference/nn/modules/block.md
index 2e83adf4..99f08a74 100644
--- a/docs/en/reference/nn/modules/block.md
+++ b/docs/en/reference/nn/modules/block.md
@@ -7,7 +7,7 @@ keywords: YOLO, Ultralytics, neural network, nn.modules.block, Proto, HGBlock, S
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/block.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/block.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/modules/conv.md b/docs/en/reference/nn/modules/conv.md
index 969dd44f..e542349e 100644
--- a/docs/en/reference/nn/modules/conv.md
+++ b/docs/en/reference/nn/modules/conv.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Convolution Modules, Conv2, DWConv, ConvTranspose, GhostC
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/conv.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/conv.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/modules/head.md b/docs/en/reference/nn/modules/head.md
index af24d09c..30f7fb6a 100644
--- a/docs/en/reference/nn/modules/head.md
+++ b/docs/en/reference/nn/modules/head.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, Detection, Pose, RTDETRDecoder, nn modules, guides
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/head.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/head.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/modules/transformer.md b/docs/en/reference/nn/modules/transformer.md
index ddb52ad5..6e6992d1 100644
--- a/docs/en/reference/nn/modules/transformer.md
+++ b/docs/en/reference/nn/modules/transformer.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Ultralytics documentation, TransformerEncoderLayer, Trans
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/transformer.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/transformer.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/modules/utils.md b/docs/en/reference/nn/modules/utils.md
index e199efe8..7e1a34d4 100644
--- a/docs/en/reference/nn/modules/utils.md
+++ b/docs/en/reference/nn/modules/utils.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, neural network, nn.modules.utils, bias_init_with_prob, in
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/utils.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/nn/tasks.md b/docs/en/reference/nn/tasks.md
index 9934a516..355578a6 100644
--- a/docs/en/reference/nn/tasks.md
+++ b/docs/en/reference/nn/tasks.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, nn tasks, DetectionModel, PoseModel, RTDETRDetectio
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/tasks.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/tasks.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/ai_gym.md b/docs/en/reference/solutions/ai_gym.md
index d1e8234d..69a96fe3 100644
--- a/docs/en/reference/solutions/ai_gym.md
+++ b/docs/en/reference/solutions/ai_gym.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, AI Gym, pose estimation, real-time tracking, machin
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/ai_gym.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/ai_gym.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/distance_calculation.md b/docs/en/reference/solutions/distance_calculation.md
index 2e726a9b..14cced81 100644
--- a/docs/en/reference/solutions/distance_calculation.md
+++ b/docs/en/reference/solutions/distance_calculation.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, distance calculation, object tracking, data visuali
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/distance_calculation.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/distance_calculation.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/heatmap.md b/docs/en/reference/solutions/heatmap.md
index 04852d30..22d90bb5 100644
--- a/docs/en/reference/solutions/heatmap.md
+++ b/docs/en/reference/solutions/heatmap.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, heatmaps, object tracking, data visualization, real
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/heatmap.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/heatmap.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/object_counter.md b/docs/en/reference/solutions/object_counter.md
index dd24664a..a6b14617 100644
--- a/docs/en/reference/solutions/object_counter.md
+++ b/docs/en/reference/solutions/object_counter.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, object tracking software, real-time counting solutio
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/object_counter.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/object_counter.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/parking_management.md b/docs/en/reference/solutions/parking_management.md
index 4bf9a8ff..0ef25c74 100644
--- a/docs/en/reference/solutions/parking_management.md
+++ b/docs/en/reference/solutions/parking_management.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, object tracking software, real-time counting solutio
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/parking_management.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/parking_management.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/parking_management.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/parking_management.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/parking_management.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/parking_management.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/queue_management.md b/docs/en/reference/solutions/queue_management.md
index 775b5dbc..c23ac818 100644
--- a/docs/en/reference/solutions/queue_management.md
+++ b/docs/en/reference/solutions/queue_management.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, AI Queue Management, retail analytics, queue detect
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/queue_management.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/queue_management.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/queue_management.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/queue_management.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/queue_management.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/queue_management.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/solutions/speed_estimation.md b/docs/en/reference/solutions/speed_estimation.md
index 93cf3b65..9b8ea4c2 100644
--- a/docs/en/reference/solutions/speed_estimation.md
+++ b/docs/en/reference/solutions/speed_estimation.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, speed estimation software, real-time vehicle trackin
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/speed_estimation.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/speed_estimation.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/basetrack.md b/docs/en/reference/trackers/basetrack.md
index c2eda45e..89307cf7 100644
--- a/docs/en/reference/trackers/basetrack.md
+++ b/docs/en/reference/trackers/basetrack.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, TrackState, BaseTrack, Ultralytics tracker, Ultralytics d
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/basetrack.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/basetrack.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/bot_sort.md b/docs/en/reference/trackers/bot_sort.md
index 64778343..5fa11886 100644
--- a/docs/en/reference/trackers/bot_sort.md
+++ b/docs/en/reference/trackers/bot_sort.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, BOTSORT, BOTrack, tracking system, official documentation
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/bot_sort.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/bot_sort.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/byte_tracker.md b/docs/en/reference/trackers/byte_tracker.md
index 0465c21a..e9d0cdfd 100644
--- a/docs/en/reference/trackers/byte_tracker.md
+++ b/docs/en/reference/trackers/byte_tracker.md
@@ -7,7 +7,7 @@ keywords: STrack, Ultralytics, BYTETracker, documentation, Ultralytics tracker,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/byte_tracker.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/byte_tracker.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/track.md b/docs/en/reference/trackers/track.md
index 31f5ba32..4a9d515b 100644
--- a/docs/en/reference/trackers/track.md
+++ b/docs/en/reference/trackers/track.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, on predict start, register tracker, prediction func
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/track.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/track.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/utils/gmc.md b/docs/en/reference/trackers/utils/gmc.md
index 1b462995..1a10c73e 100644
--- a/docs/en/reference/trackers/utils/gmc.md
+++ b/docs/en/reference/trackers/utils/gmc.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, GMC utility, Ultralytics documentation, Ultralytics track
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/gmc.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/gmc.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/utils/kalman_filter.md b/docs/en/reference/trackers/utils/kalman_filter.md
index c6505f9f..cb254470 100644
--- a/docs/en/reference/trackers/utils/kalman_filter.md
+++ b/docs/en/reference/trackers/utils/kalman_filter.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, KalmanFilterXYAH, tracker, documentation, guide
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/kalman_filter.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/kalman_filter.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/trackers/utils/matching.md b/docs/en/reference/trackers/utils/matching.md
index e0c70706..453459e7 100644
--- a/docs/en/reference/trackers/utils/matching.md
+++ b/docs/en/reference/trackers/utils/matching.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Trackers Utils, Matching, merge_matches, linear_assignmen
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/matching.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/matching.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/__init__.md b/docs/en/reference/utils/__init__.md
index 36f11b5a..6acc73cd 100644
--- a/docs/en/reference/utils/__init__.md
+++ b/docs/en/reference/utils/__init__.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Utils, utilitarian functions, colorstr, yaml_save, set_lo
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/__init__.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/__init__.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/__init__.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/__init__.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/autobatch.md b/docs/en/reference/utils/autobatch.md
index f4deb596..aa270d02 100644
--- a/docs/en/reference/utils/autobatch.md
+++ b/docs/en/reference/utils/autobatch.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, check_train_batch_size, autobatch, utility, machine learn
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/autobatch.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/autobatch.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/benchmarks.md b/docs/en/reference/utils/benchmarks.md
index 5c59acc2..4490737f 100644
--- a/docs/en/reference/utils/benchmarks.md
+++ b/docs/en/reference/utils/benchmarks.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, ProfileModels, benchmarks, model profiling, performance o
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/benchmarks.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/benchmarks.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/base.md b/docs/en/reference/utils/callbacks/base.md
index 3d1acc76..4a18f881 100644
--- a/docs/en/reference/utils/callbacks/base.md
+++ b/docs/en/reference/utils/callbacks/base.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Callbacks, On-train, On-validation, On-pretrain, On-predi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/base.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/base.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/clearml.md b/docs/en/reference/utils/callbacks/clearml.md
index a1b5ff8d..36af86e6 100644
--- a/docs/en/reference/utils/callbacks/clearml.md
+++ b/docs/en/reference/utils/callbacks/clearml.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, clearML, callbacks, pretrain routine start, validation en
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/clearml.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/clearml.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/comet.md b/docs/en/reference/utils/callbacks/comet.md
index b194a6b9..fa90493d 100644
--- a/docs/en/reference/utils/callbacks/comet.md
+++ b/docs/en/reference/utils/callbacks/comet.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Comet Callbacks, Training optimisation, Logging, Experime
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/comet.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/comet.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/dvc.md b/docs/en/reference/utils/callbacks/dvc.md
index 50371c98..a430790b 100644
--- a/docs/en/reference/utils/callbacks/dvc.md
+++ b/docs/en/reference/utils/callbacks/dvc.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, callbacks, logger, training, pretraining, machine l
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/dvc.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/dvc.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/hub.md b/docs/en/reference/utils/callbacks/hub.md
index 5053513b..596016f1 100644
--- a/docs/en/reference/utils/callbacks/hub.md
+++ b/docs/en/reference/utils/callbacks/hub.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, callbacks, on_pretrain_routine_end, on_model_save, on_tra
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/hub.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/hub.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/mlflow.md b/docs/en/reference/utils/callbacks/mlflow.md
index 3c4c1566..484368f0 100644
--- a/docs/en/reference/utils/callbacks/mlflow.md
+++ b/docs/en/reference/utils/callbacks/mlflow.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, MLflow, Callbacks, on_pretrain_routine_end, on_train_end,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/mlflow.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/mlflow.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/neptune.md b/docs/en/reference/utils/callbacks/neptune.md
index 5045a601..bd0b7d50 100644
--- a/docs/en/reference/utils/callbacks/neptune.md
+++ b/docs/en/reference/utils/callbacks/neptune.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Neptune callbacks, on_train_epoch_end, on_val_end, _log_p
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/neptune.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/neptune.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/raytune.md b/docs/en/reference/utils/callbacks/raytune.md
index 48957fb1..1154a42f 100644
--- a/docs/en/reference/utils/callbacks/raytune.md
+++ b/docs/en/reference/utils/callbacks/raytune.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, on_fit_epoch_end, callbacks, documentation, deep le
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/raytune.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/raytune.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/tensorboard.md b/docs/en/reference/utils/callbacks/tensorboard.md
index 64d852fc..cdb298bf 100644
--- a/docs/en/reference/utils/callbacks/tensorboard.md
+++ b/docs/en/reference/utils/callbacks/tensorboard.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, documentation, callback utilities, log_scalars, on_
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/tensorboard.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/tensorboard.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/callbacks/wb.md b/docs/en/reference/utils/callbacks/wb.md
index 826ad90c..69883e14 100644
--- a/docs/en/reference/utils/callbacks/wb.md
+++ b/docs/en/reference/utils/callbacks/wb.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, callbacks, _log_plots, on_fit_epoch_end, on_train_end
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/wb.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/wb.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/checks.md b/docs/en/reference/utils/checks.md
index 3848023b..1d9f27de 100644
--- a/docs/en/reference/utils/checks.md
+++ b/docs/en/reference/utils/checks.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, utility checks, ASCII, check_version, pip_update, check_p
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/checks.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/checks.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/dist.md b/docs/en/reference/utils/dist.md
index 5176f387..8f3ed2f4 100644
--- a/docs/en/reference/utils/dist.md
+++ b/docs/en/reference/utils/dist.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, DDP, DDP utility functions, Distributed Data Processing,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/dist.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/dist.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/downloads.md b/docs/en/reference/utils/downloads.md
index 61a5f0d2..3c60da01 100644
--- a/docs/en/reference/utils/downloads.md
+++ b/docs/en/reference/utils/downloads.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, download utilities, is_url, check_disk_space, get_g
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/downloads.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/downloads.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/errors.md b/docs/en/reference/utils/errors.md
index 80c3f639..d856eb4f 100644
--- a/docs/en/reference/utils/errors.md
+++ b/docs/en/reference/utils/errors.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, HUBModelError, Machine Learning, Error troubleshooting, U
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/errors.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/errors.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/files.md b/docs/en/reference/utils/files.md
index 79e3a81b..2269a7db 100644
--- a/docs/en/reference/utils/files.md
+++ b/docs/en/reference/utils/files.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, utility functions, file operations, working directory, fi
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/files.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/files.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/instance.md b/docs/en/reference/utils/instance.md
index df9d10bb..539ebdf3 100644
--- a/docs/en/reference/utils/instance.md
+++ b/docs/en/reference/utils/instance.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Bboxes, _ntuple, utility, ultralytics utils.instance
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/instance.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/instance.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/loss.md b/docs/en/reference/utils/loss.md
index 9336537c..f376403a 100644
--- a/docs/en/reference/utils/loss.md
+++ b/docs/en/reference/utils/loss.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Loss functions, VarifocalLoss, BboxLoss, v8DetectionLoss,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/loss.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/loss.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/metrics.md b/docs/en/reference/utils/metrics.md
index 7ab969d3..13f4d31e 100644
--- a/docs/en/reference/utils/metrics.md
+++ b/docs/en/reference/utils/metrics.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, YOLOv3, YOLOv4, metrics, confusion matrix, detectio
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/metrics.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/metrics.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/ops.md b/docs/en/reference/utils/ops.md
index 892dfc4b..24766e82 100644
--- a/docs/en/reference/utils/ops.md
+++ b/docs/en/reference/utils/ops.md
@@ -7,7 +7,7 @@ keywords: Ultralytics YOLO, Utility Operations, segment2box, make_divisible, cli
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/ops.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/ops.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/patches.md b/docs/en/reference/utils/patches.md
index 3b864de0..ff950760 100644
--- a/docs/en/reference/utils/patches.md
+++ b/docs/en/reference/utils/patches.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Utils, Patches, imread, imshow, torch_save, image process
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/patches.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/patches.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/plotting.md b/docs/en/reference/utils/plotting.md
index ab167188..87517150 100644
--- a/docs/en/reference/utils/plotting.md
+++ b/docs/en/reference/utils/plotting.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, plotting, utils, color annotation, label plotting, image
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/plotting.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/plotting.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/tal.md b/docs/en/reference/utils/tal.md
index ba80a2bb..3beca7e5 100644
--- a/docs/en/reference/utils/tal.md
+++ b/docs/en/reference/utils/tal.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, task aligned assigner, select highest overlaps, make anch
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tal.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tal.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/torch_utils.md b/docs/en/reference/utils/torch_utils.md
index bbceef4b..6d8a9a9a 100644
--- a/docs/en/reference/utils/torch_utils.md
+++ b/docs/en/reference/utils/torch_utils.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, Torch Utils, Model EMA, Early Stopping, Smart Inference,
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/torch_utils.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/torch_utils.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/triton.md b/docs/en/reference/utils/triton.md
index 63a7bb3b..a6926f4d 100644
--- a/docs/en/reference/utils/triton.md
+++ b/docs/en/reference/utils/triton.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, YOLO, TritonRemoteModel, machine learning, model serving,
!!! Note
- This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/triton.py) 🛠️. Thank you 🙏!
+ This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/triton.py) 🛠️. Thank you 🙏!
diff --git a/docs/en/reference/utils/tuner.md b/docs/en/reference/utils/tuner.md
index 2db05781..d321b287 100644
--- a/docs/en/reference/utils/tuner.md
+++ b/docs/en/reference/utils/tuner.md
@@ -7,7 +7,7 @@ keywords: Ultralytics, run_ray_tune, machine learning tuning, machine learning e
!!! Note
- 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). If you spot a problem please help fix it by [contributing](../../help/contributing.md/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tuner.py) 🛠️. Thank you 🙏!
+ 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). If you spot a problem please help fix it by [contributing](/help/contributing.md) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tuner.py) 🛠️. Thank you 🙏!
diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml
index 72a92474..5e5f8f43 100644
--- a/docs/mkdocs_github_authors.yaml
+++ b/docs/mkdocs_github_authors.yaml
@@ -1,5 +1,6 @@
1185102784@qq.com: Laughing-q
130829914+IvorZhu331@users.noreply.github.com: IvorZhu331
+135830346+UltralyticsAssistant@users.noreply.github.com: UltralyticsAssistant
1579093407@qq.com: null
17216799+ouphi@users.noreply.github.com: ouphi
17316848+maianumerosky@users.noreply.github.com: maianumerosky
@@ -18,6 +19,7 @@ abirami.vina@gmail.com: abirami-vina
ayush.chaurarsia@gmail.com: AyushExel
chr043416@gmail.com: RizwanMunawar
glenn.jocher@ultralytics.com: glenn-jocher
+jpedrofonseca_94@hotmail.com: null
lakshanthad@yahoo.com: lakshanthad
muhammadrizwanmunawar123@gmail.com: RizwanMunawar
not.committed.yet: null
diff --git a/ultralytics/solutions/__init__.py b/ultralytics/solutions/__init__.py
index 9e68dc12..0c1272fe 100644
--- a/ultralytics/solutions/__init__.py
+++ b/ultralytics/solutions/__init__.py
@@ -1 +1,19 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
+
+from .ai_gym import AIGym
+from .distance_calculation import DistanceCalculation
+from .heatmap import Heatmap
+from .object_counter import ObjectCounter
+from .parking_management import ParkingManagement
+from .queue_management import QueueManager
+from .speed_estimation import SpeedEstimator
+
+__all__ = (
+ "AIGym",
+ "DistanceCalculation",
+ "Heatmap",
+ "ObjectCounter",
+ "ParkingManagement",
+ "QueueManager",
+ "SpeedEstimator",
+)
diff --git a/ultralytics/solutions/ai_gym.py b/ultralytics/solutions/ai_gym.py
index 495250ed..1e007e77 100644
--- a/ultralytics/solutions/ai_gym.py
+++ b/ultralytics/solutions/ai_gym.py
@@ -9,34 +9,7 @@ from ultralytics.utils.plotting import Annotator
class AIGym:
"""A class to manage the gym steps of people in a real-time video stream based on their poses."""
- def __init__(self):
- """Initializes the AIGym with default values for Visual and Image parameters."""
-
- # Image and line thickness
- self.im0 = None
- self.tf = None
-
- # Keypoints and count information
- self.keypoints = None
- self.poseup_angle = None
- self.posedown_angle = None
- self.threshold = 0.001
-
- # Store stage, count and angle information
- self.angle = None
- self.count = None
- self.stage = None
- self.pose_type = "pushup"
- self.kpts_to_check = None
-
- # Visual Information
- self.view_img = False
- self.annotator = None
-
- # Check if environment support imshow
- self.env_check = check_imshow(warn=True)
-
- def set_args(
+ def __init__(
self,
kpts_to_check,
line_thickness=2,
@@ -46,22 +19,40 @@ class AIGym:
pose_type="pullup",
):
"""
- Configures the AIGym line_thickness, save image and view image parameters.
+ Initializes the AIGym class with the specified parameters.
Args:
- kpts_to_check (list): 3 keypoints for counting
- line_thickness (int): Line thickness for bounding boxes.
- view_img (bool): display the im0
- pose_up_angle (float): Angle to set pose position up
- pose_down_angle (float): Angle to set pose position down
- pose_type (str): "pushup", "pullup" or "abworkout"
+ kpts_to_check (list): Indices of keypoints to check.
+ line_thickness (int, optional): Thickness of the lines drawn. Defaults to 2.
+ view_img (bool, optional): Flag to display the image. Defaults to False.
+ pose_up_angle (float, optional): Angle threshold for the 'up' pose. Defaults to 145.0.
+ pose_down_angle (float, optional): Angle threshold for the 'down' pose. Defaults to 90.0.
+ pose_type (str, optional): Type of pose to detect ('pullup', 'pushup', 'abworkout'). Defaults to "pullup".
"""
- self.kpts_to_check = kpts_to_check
+
+ # Image and line thickness
+ self.im0 = None
self.tf = line_thickness
- self.view_img = view_img
+
+ # Keypoints and count information
+ self.keypoints = None
self.poseup_angle = pose_up_angle
self.posedown_angle = pose_down_angle
+ self.threshold = 0.001
+
+ # Store stage, count and angle information
+ self.angle = None
+ self.count = None
+ self.stage = None
self.pose_type = pose_type
+ self.kpts_to_check = kpts_to_check
+
+ # Visual Information
+ self.view_img = view_img
+ self.annotator = None
+
+ # Check if environment supports imshow
+ self.env_check = check_imshow(warn=True)
def start_counting(self, im0, results, frame_count):
"""
@@ -69,19 +60,24 @@ class AIGym:
Args:
im0 (ndarray): Current frame from the video stream.
- results (list): Pose estimation data
- frame_count (int): store current frame count
+ results (list): Pose estimation data.
+ frame_count (int): Current frame count.
"""
+
self.im0 = im0
+
+ # Initialize count, angle, and stage lists on the first frame
if frame_count == 1:
self.count = [0] * len(results[0])
self.angle = [0] * len(results[0])
self.stage = ["-" for _ in results[0]]
+
self.keypoints = results[0].keypoints.data
self.annotator = Annotator(im0, line_width=2)
for ind, k in enumerate(reversed(self.keypoints)):
- if self.pose_type in {"pushup", "pullup"}:
+ # Estimate angle and draw specific points based on pose type
+ if self.pose_type in {"pushup", "pullup", "abworkout"}:
self.angle[ind] = self.annotator.estimate_pose_angle(
k[int(self.kpts_to_check[0])].cpu(),
k[int(self.kpts_to_check[1])].cpu(),
@@ -89,55 +85,32 @@ class AIGym:
)
self.im0 = self.annotator.draw_specific_points(k, self.kpts_to_check, shape=(640, 640), radius=10)
- if self.pose_type == "abworkout":
- self.angle[ind] = self.annotator.estimate_pose_angle(
- k[int(self.kpts_to_check[0])].cpu(),
- k[int(self.kpts_to_check[1])].cpu(),
- k[int(self.kpts_to_check[2])].cpu(),
- )
- self.im0 = self.annotator.draw_specific_points(k, self.kpts_to_check, shape=(640, 640), radius=10)
- if self.angle[ind] > self.poseup_angle:
- self.stage[ind] = "down"
- if self.angle[ind] < self.posedown_angle and self.stage[ind] == "down":
- self.stage[ind] = "up"
- self.count[ind] += 1
+ # Check and update pose stages and counts based on angle
+ if self.pose_type in {"abworkout", "pullup"}:
+ if self.angle[ind] > self.poseup_angle:
+ self.stage[ind] = "down"
+ if self.angle[ind] < self.posedown_angle and self.stage[ind] == "down":
+ self.stage[ind] = "up"
+ self.count[ind] += 1
+
+ elif self.pose_type == "pushup":
+ if self.angle[ind] > self.poseup_angle:
+ self.stage[ind] = "up"
+ if self.angle[ind] < self.posedown_angle and self.stage[ind] == "up":
+ self.stage[ind] = "down"
+ self.count[ind] += 1
+
self.annotator.plot_angle_and_count_and_stage(
angle_text=self.angle[ind],
count_text=self.count[ind],
stage_text=self.stage[ind],
center_kpt=k[int(self.kpts_to_check[1])],
- line_thickness=self.tf,
- )
-
- if self.pose_type == "pushup":
- if self.angle[ind] > self.poseup_angle:
- self.stage[ind] = "up"
- if self.angle[ind] < self.posedown_angle and self.stage[ind] == "up":
- self.stage[ind] = "down"
- self.count[ind] += 1
- self.annotator.plot_angle_and_count_and_stage(
- angle_text=self.angle[ind],
- count_text=self.count[ind],
- stage_text=self.stage[ind],
- center_kpt=k[int(self.kpts_to_check[1])],
- line_thickness=self.tf,
- )
- if self.pose_type == "pullup":
- if self.angle[ind] > self.poseup_angle:
- self.stage[ind] = "down"
- if self.angle[ind] < self.posedown_angle and self.stage[ind] == "down":
- self.stage[ind] = "up"
- self.count[ind] += 1
- self.annotator.plot_angle_and_count_and_stage(
- angle_text=self.angle[ind],
- count_text=self.count[ind],
- stage_text=self.stage[ind],
- center_kpt=k[int(self.kpts_to_check[1])],
- line_thickness=self.tf,
)
+ # Draw keypoints
self.annotator.kpts(k, shape=(640, 640), radius=1, kpt_line=True)
+ # Display the image if environment supports it and view_img is True
if self.env_check and self.view_img:
cv2.imshow("Ultralytics YOLOv8 AI GYM", self.im0)
if cv2.waitKey(1) & 0xFF == ord("q"):
@@ -147,4 +120,5 @@ class AIGym:
if __name__ == "__main__":
- AIGym()
+ kpts_to_check = [0, 1, 2] # example keypoints
+ aigym = AIGym(kpts_to_check)
diff --git a/ultralytics/solutions/distance_calculation.py b/ultralytics/solutions/distance_calculation.py
index f09209ec..2707e6ad 100644
--- a/ultralytics/solutions/distance_calculation.py
+++ b/ultralytics/solutions/distance_calculation.py
@@ -9,39 +9,9 @@ from ultralytics.utils.plotting import Annotator, colors
class DistanceCalculation:
- """A class to calculate distance between two objects in real-time video stream based on their tracks."""
+ """A class to calculate distance between two objects in a real-time video stream based on their tracks."""
- def __init__(self):
- """Initializes the distance calculation class with default values for Visual, Image, track and distance
- parameters.
- """
-
- # Visual & im0 information
- self.im0 = None
- self.annotator = None
- self.view_img = False
- self.line_color = (255, 255, 0)
- self.centroid_color = (255, 0, 255)
-
- # Predict/track information
- self.clss = None
- self.names = None
- self.boxes = None
- self.line_thickness = 2
- self.trk_ids = None
-
- # Distance calculation information
- self.centroids = []
- self.pixel_per_meter = 10
-
- # Mouse event
- self.left_mouse_count = 0
- self.selected_boxes = {}
-
- # Check if environment support imshow
- self.env_check = check_imshow(warn=True)
-
- def set_args(
+ def __init__(
self,
names,
pixels_per_meter=10,
@@ -51,52 +21,66 @@ class DistanceCalculation:
centroid_color=(255, 0, 255),
):
"""
- Configures the distance calculation and display parameters.
+ Initializes the DistanceCalculation class with the given parameters.
Args:
- names (dict): object detection classes names
- pixels_per_meter (int): Number of pixels in meter
- view_img (bool): Flag indicating frame display
- line_thickness (int): Line thickness for bounding boxes.
- line_color (RGB): color of centroids line
- centroid_color (RGB): colors of bbox centroids
+ names (dict): Dictionary mapping class indices to class names.
+ pixels_per_meter (int, optional): Conversion factor from pixels to meters. Defaults to 10.
+ view_img (bool, optional): Flag to indicate if the video stream should be displayed. Defaults to False.
+ line_thickness (int, optional): Thickness of the lines drawn on the image. Defaults to 2.
+ line_color (tuple, optional): Color of the lines drawn on the image (BGR format). Defaults to (255, 255, 0).
+ centroid_color (tuple, optional): Color of the centroids drawn (BGR format). Defaults to (255, 0, 255).
"""
- self.names = names
- self.pixel_per_meter = pixels_per_meter
+ # Visual & image information
+ self.im0 = None
+ self.annotator = None
self.view_img = view_img
- self.line_thickness = line_thickness
self.line_color = line_color
self.centroid_color = centroid_color
+ # Prediction & tracking information
+ self.clss = None
+ self.names = names
+ self.boxes = None
+ self.line_thickness = line_thickness
+ self.trk_ids = None
+
+ # Distance calculation information
+ self.centroids = []
+ self.pixel_per_meter = pixels_per_meter
+
+ # Mouse event information
+ self.left_mouse_count = 0
+ self.selected_boxes = {}
+
+ # Check if environment supports imshow
+ self.env_check = check_imshow(warn=True)
+
def mouse_event_for_distance(self, event, x, y, flags, param):
"""
- This function is designed to move region with mouse events in a real-time video stream.
+ Handles mouse events to select regions in a real-time video stream.
Args:
- event (int): The type of mouse event (e.g., cv2.EVENT_MOUSEMOVE, cv2.EVENT_LBUTTONDOWN, etc.).
- x (int): The x-coordinate of the mouse pointer.
- y (int): The y-coordinate of the mouse pointer.
- flags (int): Any flags associated with the event (e.g., cv2.EVENT_FLAG_CTRLKEY,
- cv2.EVENT_FLAG_SHIFTKEY, etc.).
- param (dict): Additional parameters you may want to pass to the function.
+ event (int): Type of mouse event (e.g., cv2.EVENT_MOUSEMOVE, cv2.EVENT_LBUTTONDOWN, etc.).
+ x (int): X-coordinate of the mouse pointer.
+ y (int): Y-coordinate of the mouse pointer.
+ flags (int): Flags associated with the event (e.g., cv2.EVENT_FLAG_CTRLKEY, cv2.EVENT_FLAG_SHIFTKEY, etc.).
+ param (dict): Additional parameters passed to the function.
"""
- global selected_boxes
- global left_mouse_count
if event == cv2.EVENT_LBUTTONDOWN:
self.left_mouse_count += 1
if self.left_mouse_count <= 2:
for box, track_id in zip(self.boxes, self.trk_ids):
if box[0] < x < box[2] and box[1] < y < box[3] and track_id not in self.selected_boxes:
- self.selected_boxes[track_id] = []
self.selected_boxes[track_id] = box
- if event == cv2.EVENT_RBUTTONDOWN:
+ elif event == cv2.EVENT_RBUTTONDOWN:
self.selected_boxes = {}
self.left_mouse_count = 0
def extract_tracks(self, tracks):
"""
- Extracts results from the provided data.
+ Extracts tracking results from the provided data.
Args:
tracks (list): List of tracks obtained from the object tracking process.
@@ -105,55 +89,65 @@ class DistanceCalculation:
self.clss = tracks[0].boxes.cls.cpu().tolist()
self.trk_ids = tracks[0].boxes.id.int().cpu().tolist()
- def calculate_centroid(self, box):
+ @staticmethod
+ def calculate_centroid(box):
"""
- Calculate the centroid of bounding box.
+ Calculates the centroid of a bounding box.
Args:
- box (list): Bounding box data
+ box (list): Bounding box coordinates [x1, y1, x2, y2].
+
+ Returns:
+ (tuple): Centroid coordinates (x, y).
"""
return int((box[0] + box[2]) // 2), int((box[1] + box[3]) // 2)
def calculate_distance(self, centroid1, centroid2):
"""
- Calculate distance between two centroids.
+ Calculates the distance between two centroids.
Args:
- centroid1 (point): First bounding box data
- centroid2 (point): Second bounding box data
+ centroid1 (tuple): Coordinates of the first centroid (x, y).
+ centroid2 (tuple): Coordinates of the second centroid (x, y).
+
+ Returns:
+ (tuple): Distance in meters and millimeters.
"""
pixel_distance = math.sqrt((centroid1[0] - centroid2[0]) ** 2 + (centroid1[1] - centroid2[1]) ** 2)
- return pixel_distance / self.pixel_per_meter, (pixel_distance / self.pixel_per_meter) * 1000
+ distance_m = pixel_distance / self.pixel_per_meter
+ distance_mm = distance_m * 1000
+ return distance_m, distance_mm
def start_process(self, im0, tracks):
"""
- Calculate distance between two bounding boxes based on tracking data.
+ Processes the video frame and calculates the distance between two bounding boxes.
Args:
- im0 (nd array): Image
+ im0 (ndarray): The image frame.
tracks (list): List of tracks obtained from the object tracking process.
+
+ Returns:
+ (ndarray): The processed image frame.
"""
self.im0 = im0
if tracks[0].boxes.id is None:
if self.view_img:
self.display_frames()
- return
- self.extract_tracks(tracks)
+ return im0
- self.annotator = Annotator(self.im0, line_width=2)
+ self.extract_tracks(tracks)
+ self.annotator = Annotator(self.im0, line_width=self.line_thickness)
for box, cls, track_id in zip(self.boxes, self.clss, self.trk_ids):
self.annotator.box_label(box, color=colors(int(cls), True), label=self.names[int(cls)])
if len(self.selected_boxes) == 2:
- for trk_id, _ in self.selected_boxes.items():
+ for trk_id in self.selected_boxes.keys():
if trk_id == track_id:
self.selected_boxes[track_id] = box
if len(self.selected_boxes) == 2:
- for trk_id, box in self.selected_boxes.items():
- centroid = self.calculate_centroid(self.selected_boxes[trk_id])
- self.centroids.append(centroid)
+ self.centroids = [self.calculate_centroid(self.selected_boxes[trk_id]) for trk_id in self.selected_boxes]
distance_m, distance_mm = self.calculate_distance(self.centroids[0], self.centroids[1])
self.annotator.plot_distance_and_line(
@@ -168,7 +162,7 @@ class DistanceCalculation:
return im0
def display_frames(self):
- """Display frame."""
+ """Displays the current frame with annotations."""
cv2.namedWindow("Ultralytics Distance Estimation")
cv2.setMouseCallback("Ultralytics Distance Estimation", self.mouse_event_for_distance)
cv2.imshow("Ultralytics Distance Estimation", self.im0)
@@ -178,4 +172,5 @@ class DistanceCalculation:
if __name__ == "__main__":
- DistanceCalculation()
+ names = {0: "person", 1: "car"} # example class names
+ distance_calculation = DistanceCalculation(names)
diff --git a/ultralytics/solutions/heatmap.py b/ultralytics/solutions/heatmap.py
index 4ff305d7..04d467f3 100644
--- a/ultralytics/solutions/heatmap.py
+++ b/ultralytics/solutions/heatmap.py
@@ -16,62 +16,11 @@ from shapely.geometry import LineString, Point, Polygon
class Heatmap:
"""A class to draw heatmaps in real-time video stream based on their tracks."""
- def __init__(self):
- """Initializes the heatmap class with default values for Visual, Image, track, count and heatmap parameters."""
-
- # Visual information
- self.annotator = None
- self.view_img = False
- self.shape = "circle"
-
- self.names = None # Classes names
-
- # Image information
- self.imw = None
- self.imh = None
- self.im0 = None
- self.tf = 2
- self.view_in_counts = True
- self.view_out_counts = True
-
- # Heatmap colormap and heatmap np array
- self.colormap = None
- self.heatmap = None
- self.heatmap_alpha = 0.5
-
- # Predict/track information
- self.boxes = None
- self.track_ids = None
- self.clss = None
- self.track_history = defaultdict(list)
-
- # Region & Line Information
- self.count_reg_pts = None
- self.counting_region = None
- self.line_dist_thresh = 15
- self.region_thickness = 5
- self.region_color = (255, 0, 255)
-
- # Object Counting Information
- self.in_counts = 0
- self.out_counts = 0
- self.count_ids = []
- self.class_wise_count = {}
- self.count_txt_color = (0, 0, 0)
- self.count_bg_color = (255, 255, 255)
- self.cls_txtdisplay_gap = 50
-
- # Decay factor
- self.decay_factor = 0.99
-
- # Check if environment support imshow
- self.env_check = check_imshow(warn=True)
-
- def set_args(
+ def __init__(
self,
- imw,
- imh,
- classes_names=None,
+ classes_names,
+ imw=0,
+ imh=0,
colormap=cv2.COLORMAP_JET,
heatmap_alpha=0.5,
view_img=False,
@@ -87,71 +36,78 @@ class Heatmap:
decay_factor=0.99,
shape="circle",
):
- """
- Configures the heatmap colormap, width, height and display parameters.
+ """Initializes the heatmap class with default values for Visual, Image, track, count and heatmap parameters."""
- Args:
- colormap (cv2.COLORMAP): The colormap to be set.
- imw (int): The width of the frame.
- imh (int): The height of the frame.
- classes_names (dict): Classes names
- line_thickness (int): Line thickness for bounding boxes.
- heatmap_alpha (float): alpha value for heatmap display
- view_img (bool): Flag indicating frame display
- view_in_counts (bool): Flag to control whether to display the incounts on video stream.
- view_out_counts (bool): Flag to control whether to display the outcounts on video stream.
- count_reg_pts (list): Object counting region points
- count_txt_color (RGB color): count text color value
- count_bg_color (RGB color): count highlighter line color
- count_reg_color (RGB color): Color of object counting region
- region_thickness (int): Object counting Region thickness
- line_dist_thresh (int): Euclidean Distance threshold for line counter
- decay_factor (float): value for removing heatmap area after object passed
- shape (str): Heatmap shape, rect or circle shape supported
- """
- self.tf = line_thickness
- self.names = classes_names
+ # Visual information
+ self.annotator = None
+ self.view_img = view_img
+ self.shape = shape
+
+ self.initialized = False
+ self.names = classes_names # Classes names
+
+ # Image information
self.imw = imw
self.imh = imh
- self.heatmap_alpha = heatmap_alpha
- self.view_img = view_img
+ self.im0 = None
+ self.tf = line_thickness
self.view_in_counts = view_in_counts
self.view_out_counts = view_out_counts
+
+ # Heatmap colormap and heatmap np array
self.colormap = colormap
+ self.heatmap = None
+ self.heatmap_alpha = heatmap_alpha
+
+ # Predict/track information
+ self.boxes = None
+ self.track_ids = None
+ self.clss = None
+ self.track_history = defaultdict(list)
+
+ # Region & Line Information
+ self.counting_region = None
+ self.line_dist_thresh = line_dist_thresh
+ self.region_thickness = region_thickness
+ self.region_color = count_reg_color
+
+ # Object Counting Information
+ self.in_counts = 0
+ self.out_counts = 0
+ self.count_ids = []
+ self.class_wise_count = {}
+ self.count_txt_color = count_txt_color
+ self.count_bg_color = count_bg_color
+ self.cls_txtdisplay_gap = 50
+
+ # Decay factor
+ self.decay_factor = decay_factor
+
+ # Check if environment supports imshow
+ self.env_check = check_imshow(warn=True)
# Region and line selection
- if count_reg_pts is not None:
- if len(count_reg_pts) == 2:
+ self.count_reg_pts = count_reg_pts
+ print(self.count_reg_pts)
+ if self.count_reg_pts is not None:
+ if len(self.count_reg_pts) == 2:
print("Line Counter Initiated.")
- self.count_reg_pts = count_reg_pts
self.counting_region = LineString(self.count_reg_pts)
- elif len(count_reg_pts) >= 3:
+ elif len(self.count_reg_pts) >= 3:
print("Polygon Counter Initiated.")
- self.count_reg_pts = count_reg_pts
self.counting_region = Polygon(self.count_reg_pts)
else:
print("Invalid Region points provided, region_points must be 2 for lines or >= 3 for polygons.")
print("Using Line Counter Now")
self.counting_region = LineString(self.count_reg_pts)
- # Heatmap new frame
- self.heatmap = np.zeros((int(self.imh), int(self.imw)), dtype=np.float32)
-
- self.count_txt_color = count_txt_color
- self.count_bg_color = count_bg_color
- self.region_color = count_reg_color
- self.region_thickness = region_thickness
- self.decay_factor = decay_factor
- self.line_dist_thresh = line_dist_thresh
- self.shape = shape
-
- # shape of heatmap, if not selected
+ # Shape of heatmap, if not selected
if self.shape not in {"circle", "rect"}:
print("Unknown shape value provided, 'circle' & 'rect' supported")
print("Using Circular shape now")
self.shape = "circle"
- def extract_results(self, tracks):
+ def extract_results(self, tracks, _intialized=False):
"""
Extracts results from the provided data.
@@ -171,18 +127,20 @@ class Heatmap:
tracks (list): List of tracks obtained from the object tracking process.
"""
self.im0 = im0
- if tracks[0].boxes.id is None:
- self.heatmap = np.zeros((int(self.imh), int(self.imw)), dtype=np.float32)
- if self.view_img and self.env_check:
- self.display_frames()
- return im0
+
+ # Initialize heatmap only once
+ if not self.initialized:
+ self.heatmap = np.zeros((int(self.im0.shape[0]), int(self.im0.shape[1])), dtype=np.float32)
+ self.initialized = True
+
self.heatmap *= self.decay_factor # decay factor
+
self.extract_results(tracks)
self.annotator = Annotator(self.im0, self.tf, None)
- if self.count_reg_pts is not None:
+ if self.track_ids is not None:
# Draw counting region
- if self.view_in_counts or self.view_out_counts:
+ if self.count_reg_pts is not None:
self.annotator.draw_region(
reg_pts=self.count_reg_pts, color=self.region_color, thickness=self.region_thickness
)
@@ -214,25 +172,12 @@ class Heatmap:
prev_position = self.track_history[track_id][-2] if len(self.track_history[track_id]) > 1 else None
- # Count objects in any polygon
- if len(self.count_reg_pts) >= 3:
- is_inside = self.counting_region.contains(Point(track_line[-1]))
+ if self.count_reg_pts is not None:
+ # Count objects in any polygon
+ if len(self.count_reg_pts) >= 3:
+ is_inside = self.counting_region.contains(Point(track_line[-1]))
- if prev_position is not None and is_inside and track_id not in self.count_ids:
- self.count_ids.append(track_id)
-
- if (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) > 0:
- self.in_counts += 1
- self.class_wise_count[self.names[cls]]["IN"] += 1
- else:
- self.out_counts += 1
- self.class_wise_count[self.names[cls]]["OUT"] += 1
-
- # Count objects using line
- elif len(self.count_reg_pts) == 2:
- if prev_position is not None and track_id not in self.count_ids:
- distance = Point(track_line[-1]).distance(self.counting_region)
- if distance < self.line_dist_thresh and track_id not in self.count_ids:
+ if prev_position is not None and is_inside and track_id not in self.count_ids:
self.count_ids.append(track_id)
if (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) > 0:
@@ -242,6 +187,22 @@ class Heatmap:
self.out_counts += 1
self.class_wise_count[self.names[cls]]["OUT"] += 1
+ # Count objects using line
+ elif len(self.count_reg_pts) == 2:
+ if prev_position is not None and track_id not in self.count_ids:
+ distance = Point(track_line[-1]).distance(self.counting_region)
+ if distance < self.line_dist_thresh and track_id not in self.count_ids:
+ self.count_ids.append(track_id)
+
+ if (box[0] - prev_position[0]) * (
+ self.counting_region.centroid.x - prev_position[0]
+ ) > 0:
+ self.in_counts += 1
+ self.class_wise_count[self.names[cls]]["IN"] += 1
+ else:
+ self.out_counts += 1
+ self.class_wise_count[self.names[cls]]["OUT"] += 1
+
else:
for box, cls in zip(self.boxes, self.clss):
if self.shape == "circle":
@@ -258,26 +219,26 @@ class Heatmap:
else:
self.heatmap[int(box[1]) : int(box[3]), int(box[0]) : int(box[2])] += 2
+ if self.count_reg_pts is not None:
+ labels_dict = {}
+
+ for key, value in self.class_wise_count.items():
+ if value["IN"] != 0 or value["OUT"] != 0:
+ if not self.view_in_counts and not self.view_out_counts:
+ continue
+ elif not self.view_in_counts:
+ labels_dict[str.capitalize(key)] = f"OUT {value['OUT']}"
+ elif not self.view_out_counts:
+ labels_dict[str.capitalize(key)] = f"IN {value['IN']}"
+ else:
+ labels_dict[str.capitalize(key)] = f"IN {value['IN']} OUT {value['OUT']}"
+
+ if labels_dict is not None:
+ self.annotator.display_analytics(self.im0, labels_dict, self.count_txt_color, self.count_bg_color, 10)
+
# Normalize, apply colormap to heatmap and combine with original image
heatmap_normalized = cv2.normalize(self.heatmap, None, 0, 255, cv2.NORM_MINMAX)
heatmap_colored = cv2.applyColorMap(heatmap_normalized.astype(np.uint8), self.colormap)
-
- labels_dict = {}
-
- for key, value in self.class_wise_count.items():
- if value["IN"] != 0 or value["OUT"] != 0:
- if not self.view_in_counts and not self.view_out_counts:
- continue
- elif not self.view_in_counts:
- labels_dict[str.capitalize(key)] = f"OUT {value['OUT']}"
- elif not self.view_out_counts:
- labels_dict[str.capitalize(key)] = f"IN {value['IN']}"
- else:
- labels_dict[str.capitalize(key)] = f"IN {value['IN']} OUT {value['OUT']}"
-
- if labels_dict is not None:
- self.annotator.display_analytics(self.im0, labels_dict, self.count_txt_color, self.count_bg_color, 10)
-
self.im0 = cv2.addWeighted(self.im0, 1 - self.heatmap_alpha, heatmap_colored, self.heatmap_alpha, 0)
if self.env_check and self.view_img:
@@ -294,4 +255,5 @@ class Heatmap:
if __name__ == "__main__":
- Heatmap()
+ classes_names = {0: "person", 1: "car"} # example class names
+ heatmap = Heatmap(classes_names)
diff --git a/ultralytics/solutions/object_counter.py b/ultralytics/solutions/object_counter.py
index 9dc4ba63..c6d4a079 100644
--- a/ultralytics/solutions/object_counter.py
+++ b/ultralytics/solutions/object_counter.py
@@ -15,55 +15,10 @@ from shapely.geometry import LineString, Point, Polygon
class ObjectCounter:
"""A class to manage the counting of objects in a real-time video stream based on their tracks."""
- def __init__(self):
- """Initializes the Counter with default values for various tracking and counting parameters."""
-
- # Mouse events
- self.is_drawing = False
- self.selected_point = None
-
- # Region & Line Information
- self.reg_pts = [(20, 400), (1260, 400)]
- self.line_dist_thresh = 15
- self.counting_region = None
- self.region_color = (255, 0, 255)
- self.region_thickness = 5
-
- # Image and annotation Information
- self.im0 = None
- self.tf = None
- self.view_img = False
- self.view_in_counts = True
- self.view_out_counts = True
-
- self.names = None # Classes names
- self.annotator = None # Annotator
- self.window_name = "Ultralytics YOLOv8 Object Counter"
-
- # Object counting Information
- self.in_counts = 0
- self.out_counts = 0
- self.count_ids = []
- self.class_wise_count = {}
- self.count_txt_thickness = 0
- self.count_txt_color = (255, 255, 255)
- self.count_bg_color = (255, 255, 255)
- self.cls_txtdisplay_gap = 50
- self.fontsize = 0.6
-
- # Tracks info
- self.track_history = defaultdict(list)
- self.track_thickness = 2
- self.draw_tracks = False
- self.track_color = None
-
- # Check if environment support imshow
- self.env_check = check_imshow(warn=True)
-
- def set_args(
+ def __init__(
self,
classes_names,
- reg_pts,
+ reg_pts=None,
count_reg_color=(255, 0, 255),
count_txt_color=(0, 0, 0),
count_bg_color=(255, 255, 255),
@@ -79,66 +34,90 @@ class ObjectCounter:
cls_txtdisplay_gap=50,
):
"""
- Configures the Counter's image, bounding box line thickness, and counting region points.
+ Initializes the ObjectCounter with various tracking and counting parameters.
Args:
+ classes_names (dict): Dictionary of class names.
+ reg_pts (list): List of points defining the counting region.
+ count_reg_color (tuple): RGB color of the counting region.
+ count_txt_color (tuple): RGB color of the count text.
+ count_bg_color (tuple): RGB color of the count text background.
line_thickness (int): Line thickness for bounding boxes.
+ track_thickness (int): Thickness of the track lines.
view_img (bool): Flag to control whether to display the video stream.
- view_in_counts (bool): Flag to control whether to display the incounts on video stream.
- view_out_counts (bool): Flag to control whether to display the outcounts on video stream.
- reg_pts (list): Initial list of points defining the counting region.
- classes_names (dict): Classes names
- track_thickness (int): Track thickness
- draw_tracks (Bool): draw tracks
- count_txt_color (RGB color): count text color value
- count_bg_color (RGB color): count highlighter line color
- count_reg_color (RGB color): Color of object counting region
- track_color (RGB color): color for tracks
- region_thickness (int): Object counting Region thickness
- line_dist_thresh (int): Euclidean Distance threshold for line counter
- cls_txtdisplay_gap (int): Display gap between each class count
+ view_in_counts (bool): Flag to control whether to display the in counts on the video stream.
+ view_out_counts (bool): Flag to control whether to display the out counts on the video stream.
+ draw_tracks (bool): Flag to control whether to draw the object tracks.
+ track_color (tuple): RGB color of the tracks.
+ region_thickness (int): Thickness of the object counting region.
+ line_dist_thresh (int): Euclidean distance threshold for line counter.
+ cls_txtdisplay_gap (int): Display gap between each class count.
"""
+
+ # Mouse events
+ self.is_drawing = False
+ self.selected_point = None
+
+ # Region & Line Information
+ self.reg_pts = [(20, 400), (1260, 400)] if reg_pts is None else reg_pts
+ self.line_dist_thresh = line_dist_thresh
+ self.counting_region = None
+ self.region_color = count_reg_color
+ self.region_thickness = region_thickness
+
+ # Image and annotation Information
+ self.im0 = None
self.tf = line_thickness
self.view_img = view_img
self.view_in_counts = view_in_counts
self.view_out_counts = view_out_counts
+
+ self.names = classes_names # Classes names
+ self.annotator = None # Annotator
+ self.window_name = "Ultralytics YOLOv8 Object Counter"
+
+ # Object counting Information
+ self.in_counts = 0
+ self.out_counts = 0
+ self.count_ids = []
+ self.class_wise_count = {}
+ self.count_txt_thickness = 0
+ self.count_txt_color = count_txt_color
+ self.count_bg_color = count_bg_color
+ self.cls_txtdisplay_gap = cls_txtdisplay_gap
+ self.fontsize = 0.6
+
+ # Tracks info
+ self.track_history = defaultdict(list)
self.track_thickness = track_thickness
self.draw_tracks = draw_tracks
+ self.track_color = track_color
- # Region and line selection
- if len(reg_pts) == 2:
+ # Check if environment supports imshow
+ self.env_check = check_imshow(warn=True)
+
+ # Initialize counting region
+ if len(self.reg_pts) == 2:
print("Line Counter Initiated.")
- self.reg_pts = reg_pts
self.counting_region = LineString(self.reg_pts)
- elif len(reg_pts) >= 3:
+ elif len(self.reg_pts) >= 3:
print("Polygon Counter Initiated.")
- self.reg_pts = reg_pts
self.counting_region = Polygon(self.reg_pts)
else:
print("Invalid Region points provided, region_points must be 2 for lines or >= 3 for polygons.")
print("Using Line Counter Now")
self.counting_region = LineString(self.reg_pts)
- self.names = classes_names
- self.track_color = track_color
- self.count_txt_color = count_txt_color
- self.count_bg_color = count_bg_color
- self.region_color = count_reg_color
- self.region_thickness = region_thickness
- self.line_dist_thresh = line_dist_thresh
- self.cls_txtdisplay_gap = cls_txtdisplay_gap
-
def mouse_event_for_region(self, event, x, y, flags, params):
"""
- This function is designed to move region with mouse events in a real-time video stream.
+ Handles mouse events for defining and moving the counting region in a real-time video stream.
Args:
event (int): The type of mouse event (e.g., cv2.EVENT_MOUSEMOVE, cv2.EVENT_LBUTTONDOWN, etc.).
x (int): The x-coordinate of the mouse pointer.
y (int): The y-coordinate of the mouse pointer.
- flags (int): Any flags associated with the event (e.g., cv2.EVENT_FLAG_CTRLKEY,
- cv2.EVENT_FLAG_SHIFTKEY, etc.).
- params (dict): Additional parameters you may want to pass to the function.
+ flags (int): Any associated event flags (e.g., cv2.EVENT_FLAG_CTRLKEY, cv2.EVENT_FLAG_SHIFTKEY, etc.).
+ params (dict): Additional parameters for the function.
"""
if event == cv2.EVENT_LBUTTONDOWN:
for i, point in enumerate(self.reg_pts):
@@ -240,11 +219,11 @@ class ObjectCounter:
else:
labels_dict[str.capitalize(key)] = f"IN {value['IN']} OUT {value['OUT']}"
- if labels_dict is not None:
+ if labels_dict:
self.annotator.display_analytics(self.im0, labels_dict, self.count_txt_color, self.count_bg_color, 10)
def display_frames(self):
- """Display frame."""
+ """Displays the current frame with annotations and regions in a window."""
if self.env_check:
cv2.namedWindow(self.window_name)
if len(self.reg_pts) == 4: # only add mouse event If user drawn region
@@ -271,4 +250,5 @@ class ObjectCounter:
if __name__ == "__main__":
- ObjectCounter()
+ classes_names = {0: "person", 1: "car"} # example class names
+ ObjectCounter(classes_names)
diff --git a/ultralytics/solutions/parking_management.py b/ultralytics/solutions/parking_management.py
index b4fcfc33..6bdbf92a 100644
--- a/ultralytics/solutions/parking_management.py
+++ b/ultralytics/solutions/parking_management.py
@@ -8,17 +8,22 @@ from PIL import Image, ImageTk
from ultralytics.utils.checks import check_imshow, check_requirements
from ultralytics.utils.plotting import Annotator
-check_requirements("tkinter")
-import tkinter as tk
-
class ParkingPtsSelection:
def __init__(self, master):
- """Initializes the UI for selecting parking zone points in a tkinter window."""
+ """
+ Initializes the UI for selecting parking zone points in a tkinter window.
+
+ Args:
+ master (tk.Tk): The main tkinter window object.
+ """
+ check_requirements("tkinter")
+ import tkinter as tk
+
self.master = master
master.title("Ultralytics Parking Zones Points Selector")
- # Resizable false
+ # Disable window resizing
master.resizable(False, False)
# Setup canvas for image display
@@ -36,7 +41,6 @@ class ParkingPtsSelection:
self.image_path = None
self.image = None
self.canvas_image = None
- self.canvas = None
self.bounding_boxes = []
self.current_box = []
self.img_width = 0
@@ -101,7 +105,6 @@ class ParkingPtsSelection:
Args:
box (list): Bounding box data
"""
-
for i in range(4):
x1, y1 = box[i]
x2, y2 = box[(i + 1) % 4]
@@ -151,6 +154,17 @@ class ParkingManagement:
available_region_color=(0, 0, 255),
margin=10,
):
+ """
+ Initializes the parking management system with a YOLOv8 model and visualization settings.
+
+ Args:
+ model_path (str): Path to the YOLOv8 model.
+ txt_color (tuple): RGB color tuple for text.
+ bg_color (tuple): RGB color tuple for background.
+ occupied_region_color (tuple): RGB color tuple for occupied regions.
+ available_region_color (tuple): RGB color tuple for available regions.
+ margin (int): Margin for text display.
+ """
# Model path and initialization
self.model_path = model_path
self.model = self.load_model()
@@ -166,7 +180,7 @@ class ParkingManagement:
self.available_region_color = available_region_color
self.window_name = "Ultralytics YOLOv8 Parking Management System"
- # Check if environment support imshow
+ # Check if environment supports imshow
self.env_check = check_imshow(warn=True)
def load_model(self):
@@ -184,7 +198,6 @@ class ParkingManagement:
Args:
json_file (str): file that have all parking slot points
"""
-
with open(json_file, "r") as json_file:
return json.load(json_file)
diff --git a/ultralytics/solutions/queue_management.py b/ultralytics/solutions/queue_management.py
index ca8db49d..96ac6291 100644
--- a/ultralytics/solutions/queue_management.py
+++ b/ultralytics/solutions/queue_management.py
@@ -13,49 +13,12 @@ from shapely.geometry import Point, Polygon
class QueueManager:
- """A class to manage the queue management in real-time video stream based on their tracks."""
+ """A class to manage the queue in a real-time video stream based on object tracks."""
- def __init__(self):
- """Initializes the queue manager with default values for various tracking and counting parameters."""
-
- # Mouse events
- self.is_drawing = False
- self.selected_point = None
-
- # Region & Line Information
- self.reg_pts = [(20, 60), (20, 680), (1120, 680), (1120, 60)]
- self.counting_region = None
- self.region_color = (255, 0, 255)
- self.region_thickness = 5
-
- # Image and annotation Information
- self.im0 = None
- self.tf = None
- self.view_img = False
- self.view_queue_counts = True
- self.fontsize = 0.6
-
- self.names = None # Classes names
- self.annotator = None # Annotator
- self.window_name = "Ultralytics YOLOv8 Queue Manager"
-
- # Object counting Information
- self.counts = 0
- self.count_txt_color = (255, 255, 255)
-
- # Tracks info
- self.track_history = defaultdict(list)
- self.track_thickness = 2
- self.draw_tracks = False
- self.track_color = None
-
- # Check if environment support imshow
- self.env_check = check_imshow(warn=True)
-
- def set_args(
+ def __init__(
self,
classes_names,
- reg_pts,
+ reg_pts=None,
line_thickness=2,
track_thickness=2,
view_img=False,
@@ -68,48 +31,65 @@ class QueueManager:
fontsize=0.7,
):
"""
- Configures the Counter's image, bounding box line thickness, and counting region points.
+ Initializes the QueueManager with specified parameters for tracking and counting objects.
Args:
- line_thickness (int): Line thickness for bounding boxes.
- view_img (bool): Flag to control whether to display the video stream.
- view_queue_counts (bool): Flag to control whether to display the counts on video stream.
- reg_pts (list): Initial list of points defining the counting region.
- classes_names (dict): Classes names
- region_color (RGB color): Color of queue region
- track_thickness (int): Track thickness
- draw_tracks (Bool): draw tracks
- count_txt_color (RGB color): count text color value
- track_color (RGB color): color for tracks
- region_thickness (int): Object counting Region thickness
- fontsize (float): Text display font size
+ classes_names (dict): A dictionary mapping class IDs to class names.
+ reg_pts (list of tuples, optional): Points defining the counting region polygon. Defaults to a predefined
+ rectangle.
+ line_thickness (int, optional): Thickness of the annotation lines. Defaults to 2.
+ track_thickness (int, optional): Thickness of the track lines. Defaults to 2.
+ view_img (bool, optional): Whether to display the image frames. Defaults to False.
+ region_color (tuple, optional): Color of the counting region lines (BGR). Defaults to (255, 0, 255).
+ view_queue_counts (bool, optional): Whether to display the queue counts. Defaults to True.
+ draw_tracks (bool, optional): Whether to draw tracks of the objects. Defaults to False.
+ count_txt_color (tuple, optional): Color of the count text (BGR). Defaults to (255, 255, 255).
+ track_color (tuple, optional): Color of the tracks. If None, different colors will be used for different
+ tracks. Defaults to None.
+ region_thickness (int, optional): Thickness of the counting region lines. Defaults to 5.
+ fontsize (float, optional): Font size for the text annotations. Defaults to 0.7.
"""
+
+ # Mouse events state
+ self.is_drawing = False
+ self.selected_point = None
+
+ # Region & Line Information
+ self.reg_pts = reg_pts if reg_pts is not None else [(20, 60), (20, 680), (1120, 680), (1120, 60)]
+ self.counting_region = (
+ Polygon(self.reg_pts) if len(self.reg_pts) >= 3 else Polygon([(20, 60), (20, 680), (1120, 680), (1120, 60)])
+ )
+ self.region_color = region_color
+ self.region_thickness = region_thickness
+
+ # Image and annotation Information
+ self.im0 = None
self.tf = line_thickness
self.view_img = view_img
self.view_queue_counts = view_queue_counts
+ self.fontsize = fontsize
+
+ self.names = classes_names # Class names
+ self.annotator = None # Annotator
+ self.window_name = "Ultralytics YOLOv8 Queue Manager"
+
+ # Object counting Information
+ self.counts = 0
+ self.count_txt_color = count_txt_color
+
+ # Tracks info
+ self.track_history = defaultdict(list)
self.track_thickness = track_thickness
self.draw_tracks = draw_tracks
- self.region_color = region_color
-
- if len(reg_pts) >= 3:
- print("Queue region initiated...")
- self.reg_pts = reg_pts
- self.counting_region = Polygon(self.reg_pts)
- else:
- print("Invalid region points provided...")
- print("Using default region now....")
- self.counting_region = Polygon(self.reg_pts)
-
- self.names = classes_names
self.track_color = track_color
- self.count_txt_color = count_txt_color
- self.region_thickness = region_thickness
- self.fontsize = fontsize
+
+ # Check if environment supports imshow
+ self.env_check = check_imshow(warn=True)
def extract_and_process_tracks(self, tracks):
"""Extracts and processes tracks for queue management in a video stream."""
- # Annotator Init and queue region drawing
+ # Initialize annotator and draw the queue region
self.annotator = Annotator(self.im0, self.tf, self.names)
if tracks[0].boxes.id is not None:
@@ -122,48 +102,48 @@ class QueueManager:
# Draw bounding box
self.annotator.box_label(box, label=f"{self.names[cls]}#{track_id}", color=colors(int(track_id), True))
- # Draw Tracks
+ # Update track history
track_line = self.track_history[track_id]
track_line.append((float((box[0] + box[2]) / 2), float((box[1] + box[3]) / 2)))
if len(track_line) > 30:
track_line.pop(0)
- # Draw track trails
+ # Draw track trails if enabled
if self.draw_tracks:
self.annotator.draw_centroid_and_tracks(
track_line,
- color=self.track_color if self.track_color else colors(int(track_id), True),
+ color=self.track_color or colors(int(track_id), True),
track_thickness=self.track_thickness,
)
prev_position = self.track_history[track_id][-2] if len(self.track_history[track_id]) > 1 else None
+ # Check if the object is inside the counting region
if len(self.reg_pts) >= 3:
is_inside = self.counting_region.contains(Point(track_line[-1]))
if prev_position is not None and is_inside:
self.counts += 1
- label = "Queue Counts : " + str(self.counts)
-
+ # Display queue counts
+ label = f"Queue Counts : {str(self.counts)}"
if label is not None:
self.annotator.queue_counts_display(
label,
points=self.reg_pts,
region_color=self.region_color,
txt_color=self.count_txt_color,
- fontsize=self.fontsize,
)
- self.counts = 0
+ self.counts = 0 # Reset counts after displaying
self.display_frames()
def display_frames(self):
- """Display frame."""
+ """Displays the current frame with annotations."""
if self.env_check:
self.annotator.draw_region(reg_pts=self.reg_pts, thickness=self.region_thickness, color=self.region_color)
cv2.namedWindow(self.window_name)
cv2.imshow(self.window_name, self.im0)
- # Break Window
+ # Close window on 'q' key press
if cv2.waitKey(1) & 0xFF == ord("q"):
return
@@ -175,13 +155,14 @@ class QueueManager:
im0 (ndarray): Current frame from the video stream.
tracks (list): List of tracks obtained from the object tracking process.
"""
- self.im0 = im0 # store image
- self.extract_and_process_tracks(tracks) # draw region even if no objects
+ self.im0 = im0 # Store the current frame
+ self.extract_and_process_tracks(tracks) # Extract and process tracks
if self.view_img:
- self.display_frames()
+ self.display_frames() # Display the frame if enabled
return self.im0
if __name__ == "__main__":
- QueueManager()
+ classes_names = {0: "person", 1: "car"} # example class names
+ queue_manager = QueueManager(classes_names)
diff --git a/ultralytics/solutions/speed_estimation.py b/ultralytics/solutions/speed_estimation.py
index f3f17959..b2b88fbb 100644
--- a/ultralytics/solutions/speed_estimation.py
+++ b/ultralytics/solutions/speed_estimation.py
@@ -11,73 +11,52 @@ from ultralytics.utils.plotting import Annotator, colors
class SpeedEstimator:
- """A class to estimation speed of objects in real-time video stream based on their tracks."""
+ """A class to estimate the speed of objects in a real-time video stream based on their tracks."""
- def __init__(self):
- """Initializes the speed-estimator class with default values for Visual, Image, track and speed parameters."""
+ def __init__(self, names, reg_pts=None, view_img=False, line_thickness=2, region_thickness=5, spdl_dist_thresh=10):
+ """
+ Initializes the SpeedEstimator with the given parameters.
- # Visual & im0 information
+ Args:
+ names (dict): Dictionary of class names.
+ reg_pts (list, optional): List of region points for speed estimation. Defaults to [(20, 400), (1260, 400)].
+ view_img (bool, optional): Whether to display the image with annotations. Defaults to False.
+ line_thickness (int, optional): Thickness of the lines for drawing boxes and tracks. Defaults to 2.
+ region_thickness (int, optional): Thickness of the region lines. Defaults to 5.
+ spdl_dist_thresh (int, optional): Distance threshold for speed calculation. Defaults to 10.
+ """
+ # Visual & image information
self.im0 = None
self.annotator = None
- self.view_img = False
+ self.view_img = view_img
# Region information
- self.reg_pts = [(20, 400), (1260, 400)]
- self.region_thickness = 3
+ self.reg_pts = reg_pts if reg_pts is not None else [(20, 400), (1260, 400)]
+ self.region_thickness = region_thickness
- # Predict/track information
+ # Tracking information
self.clss = None
- self.names = None
+ self.names = names
self.boxes = None
self.trk_ids = None
self.trk_pts = None
- self.line_thickness = 2
+ self.line_thickness = line_thickness
self.trk_history = defaultdict(list)
- # Speed estimator information
+ # Speed estimation information
self.current_time = 0
self.dist_data = {}
self.trk_idslist = []
- self.spdl_dist_thresh = 10
+ self.spdl_dist_thresh = spdl_dist_thresh
self.trk_previous_times = {}
self.trk_previous_points = {}
- # Check if environment support imshow
+ # Check if the environment supports imshow
self.env_check = check_imshow(warn=True)
- def set_args(
- self,
- reg_pts,
- names,
- view_img=False,
- line_thickness=2,
- region_thickness=5,
- spdl_dist_thresh=10,
- ):
- """
- Configures the speed estimation and display parameters.
-
- Args:
- reg_pts (list): Initial list of points defining the speed calculation region.
- names (dict): object detection classes names
- view_img (bool): Flag indicating frame display
- line_thickness (int): Line thickness for bounding boxes.
- region_thickness (int): Speed estimation region thickness
- spdl_dist_thresh (int): Euclidean distance threshold for speed line
- """
- if reg_pts is None:
- print("Region points not provided, using default values")
- else:
- self.reg_pts = reg_pts
- self.names = names
- self.view_img = view_img
- self.line_thickness = line_thickness
- self.region_thickness = region_thickness
- self.spdl_dist_thresh = spdl_dist_thresh
-
def extract_tracks(self, tracks):
"""
- Extracts results from the provided data.
+ Extracts results from the provided tracking data.
Args:
tracks (list): List of tracks obtained from the object tracking process.
@@ -88,11 +67,14 @@ class SpeedEstimator:
def store_track_info(self, track_id, box):
"""
- Store track data.
+ Stores track data.
Args:
- track_id (int): object track id.
- box (list): object bounding box data
+ track_id (int): Object track id.
+ box (list): Object bounding box data.
+
+ Returns:
+ (list): Updated tracking history for the given track_id.
"""
track = self.trk_history[track_id]
bbox_center = (float((box[0] + box[2]) / 2), float((box[1] + box[3]) / 2))
@@ -106,43 +88,39 @@ class SpeedEstimator:
def plot_box_and_track(self, track_id, box, cls, track):
"""
- Plot track and bounding box.
+ Plots track and bounding box.
Args:
- track_id (int): object track id.
- box (list): object bounding box data
- cls (str): object class name
- track (list): tracking history for tracks path drawing
+ track_id (int): Object track id.
+ box (list): Object bounding box data.
+ cls (str): Object class name.
+ track (list): Tracking history for drawing tracks path.
"""
- speed_label = f"{int(self.dist_data[track_id])}km/ph" if track_id in self.dist_data else self.names[int(cls)]
+ speed_label = f"{int(self.dist_data[track_id])} km/h" if track_id in self.dist_data else self.names[int(cls)]
bbox_color = colors(int(track_id)) if track_id in self.dist_data else (255, 0, 255)
self.annotator.box_label(box, speed_label, bbox_color)
-
cv2.polylines(self.im0, [self.trk_pts], isClosed=False, color=(0, 255, 0), thickness=1)
cv2.circle(self.im0, (int(track[-1][0]), int(track[-1][1])), 5, bbox_color, -1)
def calculate_speed(self, trk_id, track):
"""
- Calculation of object speed.
+ Calculates the speed of an object.
Args:
- trk_id (int): object track id.
- track (list): tracking history for tracks path drawing
+ trk_id (int): Object track id.
+ track (list): Tracking history for drawing tracks path.
"""
-
if not self.reg_pts[0][0] < track[-1][0] < self.reg_pts[1][0]:
return
if self.reg_pts[1][1] - self.spdl_dist_thresh < track[-1][1] < self.reg_pts[1][1] + self.spdl_dist_thresh:
direction = "known"
-
elif self.reg_pts[0][1] - self.spdl_dist_thresh < track[-1][1] < self.reg_pts[0][1] + self.spdl_dist_thresh:
direction = "known"
-
else:
direction = "unknown"
- if self.trk_previous_times[trk_id] != 0 and direction != "unknown" and trk_id not in self.trk_idslist:
+ if self.trk_previous_times.get(trk_id) != 0 and direction != "unknown" and trk_id not in self.trk_idslist:
self.trk_idslist.append(trk_id)
time_difference = time() - self.trk_previous_times[trk_id]
@@ -156,21 +134,24 @@ class SpeedEstimator:
def estimate_speed(self, im0, tracks, region_color=(255, 0, 0)):
"""
- Calculate object based on tracking data.
+ Estimates the speed of objects based on tracking data.
Args:
- im0 (nd array): Image
+ im0 (ndarray): Image.
tracks (list): List of tracks obtained from the object tracking process.
- region_color (tuple): Color to use when drawing regions.
+ region_color (tuple, optional): Color to use when drawing regions. Defaults to (255, 0, 0).
+
+ Returns:
+ (ndarray): The image with annotated boxes and tracks.
"""
self.im0 = im0
if tracks[0].boxes.id is None:
if self.view_img and self.env_check:
self.display_frames()
return im0
- self.extract_tracks(tracks)
- self.annotator = Annotator(self.im0, line_width=2)
+ self.extract_tracks(tracks)
+ self.annotator = Annotator(self.im0, line_width=self.line_thickness)
self.annotator.draw_region(reg_pts=self.reg_pts, color=region_color, thickness=self.region_thickness)
for box, trk_id, cls in zip(self.boxes, self.trk_ids, self.clss):
@@ -188,11 +169,12 @@ class SpeedEstimator:
return im0
def display_frames(self):
- """Display frame."""
+ """Displays the current frame."""
cv2.imshow("Ultralytics Speed Estimation", self.im0)
if cv2.waitKey(1) & 0xFF == ord("q"):
return
if __name__ == "__main__":
- SpeedEstimator()
+ names = {0: "person", 1: "car"} # example class names
+ speed_estimator = SpeedEstimator(names)
diff --git a/ultralytics/utils/plotting.py b/ultralytics/utils/plotting.py
index 32dee78c..1f1dab7c 100644
--- a/ultralytics/utils/plotting.py
+++ b/ultralytics/utils/plotting.py
@@ -378,7 +378,7 @@ class Annotator:
cv2.polylines(self.im, [points], isClosed=False, color=color, thickness=track_thickness)
cv2.circle(self.im, (int(track[-1][0]), int(track[-1][1])), track_thickness * 2, color, -1)
- def queue_counts_display(self, label, points=None, region_color=(255, 255, 255), txt_color=(0, 0, 0), fontsize=0.7):
+ def queue_counts_display(self, label, points=None, region_color=(255, 255, 255), txt_color=(0, 0, 0)):
"""
Displays queue counts on an image centered at the points with customizable font size and colors.
@@ -387,14 +387,14 @@ class Annotator:
points (tuple): region points for center point calculation to display text
region_color (RGB): queue region color
txt_color (RGB): text display color
- fontsize (float): text fontsize
"""
+
x_values = [point[0] for point in points]
y_values = [point[1] for point in points]
center_x = sum(x_values) // len(points)
center_y = sum(y_values) // len(points)
- text_size = cv2.getTextSize(label, 0, fontScale=fontsize, thickness=self.tf)[0]
+ text_size = cv2.getTextSize(label, 0, fontScale=self.sf, thickness=self.tf)[0]
text_width = text_size[0]
text_height = text_size[1]
@@ -413,13 +413,12 @@ class Annotator:
label,
(text_x, text_y),
0,
- fontScale=fontsize,
+ fontScale=self.sf,
color=txt_color,
thickness=self.tf,
lineType=cv2.LINE_AA,
)
- ### Parking management utils
def display_objects_labels(self, im0, text, txt_color, bg_color, x_center, y_center, margin):
"""
Display the bounding boxes labels in parking management app.
@@ -445,7 +444,6 @@ class Annotator:
cv2.rectangle(im0, (rect_x1, rect_y1), (rect_x2, rect_y2), bg_color, -1)
cv2.putText(im0, text, (text_x, text_y), 0, self.sf, txt_color, self.tf, lineType=cv2.LINE_AA)
- # Parking lot and object counting app
def display_analytics(self, im0, text, txt_color, bg_color, margin):
"""
Display the overall statistics for parking lots
@@ -459,12 +457,12 @@ class Annotator:
horizontal_gap = int(im0.shape[1] * 0.02)
vertical_gap = int(im0.shape[0] * 0.01)
-
text_y_offset = 0
-
for label, value in text.items():
txt = f"{label}: {value}"
- text_size = cv2.getTextSize(txt, 0, int(self.sf * 1.5), int(self.tf * 1.5))[0]
+ text_size = cv2.getTextSize(txt, 0, self.sf, self.tf)[0]
+ if text_size[0] < 5 or text_size[1] < 5:
+ text_size = (5, 5)
text_x = im0.shape[1] - text_size[0] - margin * 2 - horizontal_gap
text_y = text_y_offset + text_size[1] + margin * 2 + vertical_gap
rect_x1 = text_x - margin * 2
@@ -472,9 +470,7 @@ class Annotator:
rect_x2 = text_x + text_size[0] + margin * 2
rect_y2 = text_y + margin * 2
cv2.rectangle(im0, (rect_x1, rect_y1), (rect_x2, rect_y2), bg_color, -1)
- cv2.putText(
- im0, txt, (text_x, text_y), 0, int(self.sf * 1.5), txt_color, int(self.tf * 1.5), lineType=cv2.LINE_AA
- )
+ cv2.putText(im0, txt, (text_x, text_y), 0, self.sf, txt_color, self.tf, lineType=cv2.LINE_AA)
text_y_offset = rect_y2
@staticmethod
@@ -518,7 +514,9 @@ class Annotator:
cv2.circle(self.im, (int(x_coord), int(y_coord)), radius, (0, 255, 0), -1, lineType=cv2.LINE_AA)
return self.im
- def plot_angle_and_count_and_stage(self, angle_text, count_text, stage_text, center_kpt, line_thickness=2):
+ def plot_angle_and_count_and_stage(
+ self, angle_text, count_text, stage_text, center_kpt, color=(104, 31, 17), txt_color=(255, 255, 255)
+ ):
"""
Plot the pose angle, count value and step stage.
@@ -527,16 +525,17 @@ class Annotator:
count_text (str): counts value for workout monitoring
stage_text (str): stage decision for workout monitoring
center_kpt (int): centroid pose index for workout monitoring
- line_thickness (int): thickness for text display
+ color (tuple): text background color for workout monitoring
+ txt_color (tuple): text foreground color for workout monitoring
"""
+
angle_text, count_text, stage_text = (f" {angle_text:.2f}", f"Steps : {count_text}", f" {stage_text}")
- font_scale = 0.6 + (line_thickness / 10.0)
# Draw angle
- (angle_text_width, angle_text_height), _ = cv2.getTextSize(angle_text, 0, font_scale, line_thickness)
+ (angle_text_width, angle_text_height), _ = cv2.getTextSize(angle_text, 0, self.sf, self.tf)
angle_text_position = (int(center_kpt[0]), int(center_kpt[1]))
angle_background_position = (angle_text_position[0], angle_text_position[1] - angle_text_height - 5)
- angle_background_size = (angle_text_width + 2 * 5, angle_text_height + 2 * 5 + (line_thickness * 2))
+ angle_background_size = (angle_text_width + 2 * 5, angle_text_height + 2 * 5 + (self.tf * 2))
cv2.rectangle(
self.im,
angle_background_position,
@@ -544,19 +543,19 @@ class Annotator:
angle_background_position[0] + angle_background_size[0],
angle_background_position[1] + angle_background_size[1],
),
- (255, 255, 255),
+ color,
-1,
)
- cv2.putText(self.im, angle_text, angle_text_position, 0, font_scale, (0, 0, 0), line_thickness)
+ cv2.putText(self.im, angle_text, angle_text_position, 0, self.sf, txt_color, self.tf)
# Draw Counts
- (count_text_width, count_text_height), _ = cv2.getTextSize(count_text, 0, font_scale, line_thickness)
+ (count_text_width, count_text_height), _ = cv2.getTextSize(count_text, 0, self.sf, self.tf)
count_text_position = (angle_text_position[0], angle_text_position[1] + angle_text_height + 20)
count_background_position = (
angle_background_position[0],
angle_background_position[1] + angle_background_size[1] + 5,
)
- count_background_size = (count_text_width + 10, count_text_height + 10 + (line_thickness * 2))
+ count_background_size = (count_text_width + 10, count_text_height + 10 + self.tf)
cv2.rectangle(
self.im,
@@ -565,13 +564,13 @@ class Annotator:
count_background_position[0] + count_background_size[0],
count_background_position[1] + count_background_size[1],
),
- (255, 255, 255),
+ color,
-1,
)
- cv2.putText(self.im, count_text, count_text_position, 0, font_scale, (0, 0, 0), line_thickness)
+ cv2.putText(self.im, count_text, count_text_position, 0, self.sf, txt_color, self.tf)
# Draw Stage
- (stage_text_width, stage_text_height), _ = cv2.getTextSize(stage_text, 0, font_scale, line_thickness)
+ (stage_text_width, stage_text_height), _ = cv2.getTextSize(stage_text, 0, self.sf, self.tf)
stage_text_position = (int(center_kpt[0]), int(center_kpt[1]) + angle_text_height + count_text_height + 40)
stage_background_position = (stage_text_position[0], stage_text_position[1] - stage_text_height - 5)
stage_background_size = (stage_text_width + 10, stage_text_height + 10)
@@ -583,10 +582,10 @@ class Annotator:
stage_background_position[0] + stage_background_size[0],
stage_background_position[1] + stage_background_size[1],
),
- (255, 255, 255),
+ color,
-1,
)
- cv2.putText(self.im, stage_text, stage_text_position, 0, font_scale, (0, 0, 0), line_thickness)
+ cv2.putText(self.im, stage_text, stage_text_position, 0, self.sf, txt_color, self.tf)
def seg_bbox(self, mask, mask_color=(255, 0, 255), det_label=None, track_label=None):
"""
@@ -626,29 +625,30 @@ class Annotator:
line_color (RGB): Distance line color.
centroid_color (RGB): Bounding box centroid color.
"""
- (text_width_m, text_height_m), _ = cv2.getTextSize(f"Distance M: {distance_m:.2f}m", 0, 0.8, 2)
- cv2.rectangle(self.im, (15, 25), (15 + text_width_m + 10, 25 + text_height_m + 20), (255, 255, 255), -1)
+
+ (text_width_m, text_height_m), _ = cv2.getTextSize(f"Distance M: {distance_m:.2f}m", 0, self.sf, self.tf)
+ cv2.rectangle(self.im, (15, 25), (15 + text_width_m + 10, 25 + text_height_m + 20), line_color, -1)
cv2.putText(
self.im,
f"Distance M: {distance_m:.2f}m",
(20, 50),
0,
- 0.8,
- (0, 0, 0),
- 2,
+ self.sf,
+ centroid_color,
+ self.tf,
cv2.LINE_AA,
)
- (text_width_mm, text_height_mm), _ = cv2.getTextSize(f"Distance MM: {distance_mm:.2f}mm", 0, 0.8, 2)
- cv2.rectangle(self.im, (15, 75), (15 + text_width_mm + 10, 75 + text_height_mm + 20), (255, 255, 255), -1)
+ (text_width_mm, text_height_mm), _ = cv2.getTextSize(f"Distance MM: {distance_mm:.2f}mm", 0, self.sf, self.tf)
+ cv2.rectangle(self.im, (15, 75), (15 + text_width_mm + 10, 75 + text_height_mm + 20), line_color, -1)
cv2.putText(
self.im,
f"Distance MM: {distance_mm:.2f}mm",
(20, 100),
0,
- 0.8,
- (0, 0, 0),
- 2,
+ self.sf,
+ centroid_color,
+ self.tf,
cv2.LINE_AA,
)
@@ -656,7 +656,7 @@ class Annotator:
cv2.circle(self.im, centroids[0], 6, centroid_color, -1)
cv2.circle(self.im, centroids[1], 6, centroid_color, -1)
- def visioneye(self, box, center_point, color=(235, 219, 11), pin_color=(255, 0, 255), thickness=2, pins_radius=10):
+ def visioneye(self, box, center_point, color=(235, 219, 11), pin_color=(255, 0, 255)):
"""
Function for pinpoint human-vision eye mapping and plotting.
@@ -665,13 +665,11 @@ class Annotator:
center_point (tuple): center point for vision eye view
color (tuple): object centroid and line color value
pin_color (tuple): visioneye point color value
- thickness (int): int value for line thickness
- pins_radius (int): visioneye point radius value
"""
center_bbox = int((box[0] + box[2]) / 2), int((box[1] + box[3]) / 2)
- cv2.circle(self.im, center_point, pins_radius, pin_color, -1)
- cv2.circle(self.im, center_bbox, pins_radius, color, -1)
- cv2.line(self.im, center_point, center_bbox, color, thickness)
+ cv2.circle(self.im, center_point, self.tf * 2, pin_color, -1)
+ cv2.circle(self.im, center_bbox, self.tf * 2, color, -1)
+ cv2.line(self.im, center_point, center_bbox, color, self.tf)
@TryExcept() # known issue https://github.com/ultralytics/yolov5/issues/5395