From be71a4377307e4748a898b7cd9e03399f1fcfc33 Mon Sep 17 00:00:00 2001 From: Lakshantha Dissanayake Date: Mon, 9 Sep 2024 11:10:52 -0700 Subject: [PATCH 01/80] Add YOLOv10 to Raspberry Pi CI (#16087) --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b25f8979..55012832 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -260,6 +260,8 @@ jobs: run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-pose.pt' imgsz=160 verbose=0.179 - name: Benchmark OBBModel run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-obb.pt' imgsz=160 verbose=0.472 + - name: Benchmark YOLOv10Model + run: python -m ultralytics.cfg.__init__ benchmark model='yolov10n.pt' imgsz=160 verbose=0.178 - name: Benchmark Summary run: | cat benchmarks.log From fbc6bae5afe16fc06a8af6b3e2c5d7846649dc3f Mon Sep 17 00:00:00 2001 From: Lakshantha Dissanayake Date: Mon, 9 Sep 2024 11:11:58 -0700 Subject: [PATCH 02/80] Update NVIDIA Jetson TensorRT Benchmarks (#16156) Co-authored-by: Glenn Jocher --- docs/en/guides/nvidia-jetson.md | 132 +++++++++++++++++--------------- 1 file changed, 71 insertions(+), 61 deletions(-) diff --git a/docs/en/guides/nvidia-jetson.md b/docs/en/guides/nvidia-jetson.md index 9f5dbc9b..db1b9b79 100644 --- a/docs/en/guides/nvidia-jetson.md +++ b/docs/en/guides/nvidia-jetson.md @@ -287,7 +287,7 @@ YOLOv8 benchmarks were run by the Ultralytics team on 10 different model formats Even though all model exports are working with NVIDIA Jetson, we have only included **PyTorch, TorchScript, TensorRT** for the comparison chart below because, they make use of the GPU on the Jetson and are guaranteed to produce the best results. All the other exports only utilize the CPU and the performance is not as good as the above three. You can find benchmarks for all exports in the section after this chart.
- NVIDIA Jetson Ecosystem + NVIDIA Jetson Ecosystem
### Detailed Comparison Table @@ -298,78 +298,88 @@ The below table represents the benchmark results for five different models (YOLO === "YOLOv8n" - | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | - |---------------|--------|-----------|-------------|------------------------| - | PyTorch | ✅ | 6.2 | 0.6381 | 14.3 | - | TorchScript | ✅ | 12.4 | 0.6117 | 13.3 | - | ONNX | ✅ | 12.2 | 0.6092 | 70.6 | - | OpenVINO | ✅ | 12.3 | 0.6092 | 104.2 | - | TensorRT | ✅ | 13.6 | 0.6117 | 8.9 | - | TF SavedModel | ✅ | 30.6 | 0.6092 | 141.74 | - | TF GraphDef | ✅ | 12.3 | 0.6092 | 199.93 | - | TF Lite | ✅ | 12.3 | 0.6092 | 349.18 | - | PaddlePaddle | ✅ | 24.4 | 0.6030 | 555 | - | NCNN | ✅ | 12.2 | 0.6092 | 32 | + | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | + |-----------------|--------|-------------------|-------------|------------------------| + | PyTorch | ✅ | 6.2 | 0.6381 | 14.3 | + | TorchScript | ✅ | 12.4 | 0.6117 | 13.3 | + | ONNX | ✅ | 12.2 | 0.6092 | 70.6 | + | OpenVINO | ✅ | 12.3 | 0.6092 | 104.2 | + | TensorRT (FP32) | ✅ | 16.1 | 0.6091 | 8.01 | + | TensorRT (FP16) | ✅ | 9.2 | 0.6093 | 4.55 | + | TensorRT (INT8) | ✅ | 5.9 | 0.2759 | 4.09 | + | TF SavedModel | ✅ | 30.6 | 0.6092 | 141.74 | + | TF GraphDef | ✅ | 12.3 | 0.6092 | 199.93 | + | TF Lite | ✅ | 12.3 | 0.6092 | 349.18 | + | PaddlePaddle | ✅ | 24.4 | 0.6030 | 555 | + | NCNN | ✅ | 12.2 | 0.6092 | 32 | === "YOLOv8s" - | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | - |---------------|--------|-----------|-------------|------------------------| - | PyTorch | ✅ | 21.5 | 0.6967 | 18 | - | TorchScript | ✅ | 43.0 | 0.7136 | 23.81 | - | ONNX | ✅ | 42.8 | 0.7136 | 185.55 | - | OpenVINO | ✅ | 42.9 | 0.7136 | 243.97 | - | TensorRT | ✅ | 44.0 | 0.7136 | 14.82 | - | TF SavedModel | ✅ | 107 | 0.7136 | 260.03 | - | TF GraphDef | ✅ | 42.8 | 0.7136 | 423.4 | - | TF Lite | ✅ | 42.8 | 0.7136 | 1046.64 | - | PaddlePaddle | ✅ | 85.5 | 0.7140 | 1464 | - | NCNN | ✅ | 42.7 | 0.7200 | 63 | + | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | + |-----------------|--------|-------------------|-------------|------------------------| + | PyTorch | ✅ | 21.5 | 0.6967 | 18 | + | TorchScript | ✅ | 43.0 | 0.7136 | 23.81 | + | ONNX | ✅ | 42.8 | 0.7136 | 185.55 | + | OpenVINO | ✅ | 42.9 | 0.7136 | 243.97 | + | TensorRT (FP32) | ✅ | 46.4 | 0.7136 | 14.01 | + | TensorRT (FP16) | ✅ | 24.2 | 0.722 | 7.16 | + | TensorRT (INT8) | ✅ | 13.7 | 0.4233 | 5.49 | + | TF SavedModel | ✅ | 107 | 0.7136 | 260.03 | + | TF GraphDef | ✅ | 42.8 | 0.7136 | 423.4 | + | TF Lite | ✅ | 42.8 | 0.7136 | 1046.64 | + | PaddlePaddle | ✅ | 85.5 | 0.7140 | 1464 | + | NCNN | ✅ | 42.7 | 0.7200 | 63 | === "YOLOv8m" - | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | - |---------------|--------|-----------|-------------|------------------------| - | PyTorch | ✅ | 49.7 | 0.7370 | 36.4 | - | TorchScript | ✅ | 99.2 | 0.7285 | 53.58 | - | ONNX | ✅ | 99 | 0.7280 | 452.09 | - | OpenVINO | ✅ | 99.1 | 0.7280 | 544.36 | - | TensorRT | ✅ | 100.3 | 0.7285 | 33.21 | - | TF SavedModel | ✅ | 247.5 | 0.7280 | 543.65 | - | TF GraphDef | ✅ | 99 | 0.7280 | 906.63 | - | TF Lite | ✅ | 99 | 0.7280 | 2758.08 | - | PaddlePaddle | ✅ | 197.9 | 0.7280 | 3678 | - | NCNN | ✅ | 98.9 | 0.7260 | 135 | + | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | + |-----------------|--------|-------------------|-------------|------------------------| + | PyTorch | ✅ | 49.7 | 0.7370 | 36.4 | + | TorchScript | ✅ | 99.2 | 0.7285 | 53.58 | + | ONNX | ✅ | 99 | 0.7280 | 452.09 | + | OpenVINO | ✅ | 99.1 | 0.7280 | 544.36 | + | TensorRT (FP32) | ✅ | 102.4 | 0.7285 | 31.51 | + | TensorRT (FP16) | ✅ | 52.6 | 0.7324 | 14.88 | + | TensorRT (INT8) | ✅ | 28.6 | 0.3283 | 10.89 | + | TF SavedModel | ✅ | 247.5 | 0.7280 | 543.65 | + | TF GraphDef | ✅ | 99 | 0.7280 | 906.63 | + | TF Lite | ✅ | 99 | 0.7280 | 2758.08 | + | PaddlePaddle | ✅ | 197.9 | 0.7280 | 3678 | + | NCNN | ✅ | 98.9 | 0.7260 | 135 | === "YOLOv8l" - | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | - |---------------|--------|-----------|-------------|------------------------| - | PyTorch | ✅ | 83.7 | 0.7768 | 61.3 | - | TorchScript | ✅ | 167.2 | 0.7554 | 87.9 | - | ONNX | ✅ | 166.8 | 0.7551 | 852.29 | - | OpenVINO | ✅ | 167 | 0.7551 | 1012.6 | - | TensorRT | ✅ | 168.4 | 0.7554 | 51.23 | - | TF SavedModel | ✅ | 417.2 | 0.7551 | 990.45 | - | TF GraphDef | ✅ | 166.9 | 0.7551 | 1649.86 | - | TF Lite | ✅ | 166.9 | 0.7551 | 5652.37 | - | PaddlePaddle | ✅ | 333.6 | 0.7551 | 7114.67 | - | NCNN | ✅ | 166.8 | 0.7685 | 231.9 | + | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | + |-----------------|--------|-------------------|-------------|------------------------| + | PyTorch | ✅ | 83.7 | 0.7768 | 61.3 | + | TorchScript | ✅ | 167.2 | 0.7554 | 87.9 | + | ONNX | ✅ | 166.8 | 0.7551 | 852.29 | + | OpenVINO | ✅ | 167 | 0.7551 | 1012.6 | + | TensorRT (FP32) | ✅ | 170.5 | 0.7554 | 49.79 | + | TensorRT (FP16) | ✅ | 86.1 | 0.7535 | 22.89 | + | TensorRT (INT8) | ✅ | 46.4 | 0.4048 | 14.61 | + | TF SavedModel | ✅ | 417.2 | 0.7551 | 990.45 | + | TF GraphDef | ✅ | 166.9 | 0.7551 | 1649.86 | + | TF Lite | ✅ | 166.9 | 0.7551 | 5652.37 | + | PaddlePaddle | ✅ | 333.6 | 0.7551 | 7114.67 | + | NCNN | ✅ | 166.8 | 0.7685 | 231.9 | === "YOLOv8x" - | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | - |---------------|--------|-----------|-------------|------------------------| - | PyTorch | ✅ | 130.5 | 0.7759 | 93 | - | TorchScript | ✅ | 260.7 | 0.7472 | 135.1 | - | ONNX | ✅ | 260.4 | 0.7479 | 1296.13 | - | OpenVINO | ✅ | 260.6 | 0.7479 | 1502.15 | - | TensorRT | ✅ | 261.8 | 0.7469 | 84.53 | - | TF SavedModel | ✅ | 651.1 | 0.7479 | 1451.76 | - | TF GraphDef | ✅ | 260.5 | 0.7479 | 4029.36 | - | TF Lite | ✅ | 260.4 | 0.7479 | 8772.86 | - | PaddlePaddle | ✅ | 520.8 | 0.7479 | 10619.53 | - | NCNN | ✅ | 260.4 | 0.7646 | 376.38 | + | Format | Status | Size on disk (MB) | mAP50-95(B) | Inference time (ms/im) | + |-----------------|--------|-------------------|-------------|------------------------| + | PyTorch | ✅ | 130.5 | 0.7759 | 93 | + | TorchScript | ✅ | 260.7 | 0.7472 | 135.1 | + | ONNX | ✅ | 260.4 | 0.7479 | 1296.13 | + | OpenVINO | ✅ | 260.6 | 0.7479 | 1502.15 | + | TensorRT (FP32) | ✅ | 264.0 | 0.7469 | 80.01 | + | TensorRT (FP16) | ✅ | 133.3 | 0.7513 | 40.76 | + | TensorRT (INT8) | ✅ | 70.2 | 0.4277 | 22.08 | + | TF SavedModel | ✅ | 651.1 | 0.7479 | 1451.76 | + | TF GraphDef | ✅ | 260.5 | 0.7479 | 4029.36 | + | TF Lite | ✅ | 260.4 | 0.7479 | 8772.86 | + | PaddlePaddle | ✅ | 520.8 | 0.7479 | 10619.53 | + | NCNN | ✅ | 260.4 | 0.7646 | 376.38 | [Explore more benchmarking efforts by Seeed Studio](https://www.seeedstudio.com/blog/2023/03/30/yolov8-performance-benchmarks-on-nvidia-jetson-devices) running on different versions of NVIDIA Jetson hardware. From 090db8ac3f5e9c93a7fdfea3384809be58c08b41 Mon Sep 17 00:00:00 2001 From: MatthewNoyce <131261051+MatthewNoyce@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:49:44 +0100 Subject: [PATCH 03/80] updated the amount of macros available in the macros folder (#16086) Co-authored-by: UltralyticsAssistant Co-authored-by: Francesco Mattioli Co-authored-by: Glenn Jocher --- docs/en/guides/analytics.md | 10 +-- docs/en/guides/distance-calculation.md | 10 +-- docs/en/guides/heatmaps.md | 9 +- docs/en/guides/object-blurring.md | 18 +--- docs/en/guides/object-counting.md | 10 +-- docs/en/guides/object-cropping.md | 18 +--- docs/en/guides/parking-management.md | 10 +-- docs/en/guides/queue-management.md | 10 +-- docs/en/guides/speed-estimation.md | 10 +-- docs/en/guides/workouts-monitoring.md | 28 +----- docs/en/macros/augmentation-args.md | 19 ++++ docs/en/macros/predict-args.md | 17 ++++ docs/en/macros/track-args.md | 9 ++ docs/en/macros/train-args.md | 50 +++++++++++ docs/en/macros/validation-args.md | 16 ++++ docs/en/macros/visualization-args.md | 12 +++ docs/en/modes/predict.md | 31 +------ docs/en/modes/train.md | 71 +-------------- docs/en/modes/val.md | 17 +--- docs/en/usage/cfg.md | 119 ++----------------------- 20 files changed, 144 insertions(+), 350 deletions(-) create mode 100644 docs/en/macros/augmentation-args.md create mode 100644 docs/en/macros/predict-args.md create mode 100644 docs/en/macros/track-args.md create mode 100644 docs/en/macros/train-args.md create mode 100644 docs/en/macros/validation-args.md create mode 100644 docs/en/macros/visualization-args.md diff --git a/docs/en/guides/analytics.md b/docs/en/guides/analytics.md index d5e74038..8da149d3 100644 --- a/docs/en/guides/analytics.md +++ b/docs/en/guides/analytics.md @@ -311,15 +311,7 @@ Here's a table with the `Analytics` arguments: ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## Conclusion diff --git a/docs/en/guides/distance-calculation.md b/docs/en/guides/distance-calculation.md index 00af619b..656c7c96 100644 --- a/docs/en/guides/distance-calculation.md +++ b/docs/en/guides/distance-calculation.md @@ -94,15 +94,7 @@ Measuring the gap between two objects is known as distance calculation within a ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/guides/heatmaps.md b/docs/en/guides/heatmaps.md index 83972695..02f99c0d 100644 --- a/docs/en/guides/heatmaps.md +++ b/docs/en/guides/heatmaps.md @@ -293,14 +293,7 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | +{% include "macros/track-args.md" %} ### Heatmap COLORMAPs diff --git a/docs/en/guides/object-blurring.md b/docs/en/guides/object-blurring.md index 48a4a04f..e0fe9204 100644 --- a/docs/en/guides/object-blurring.md +++ b/docs/en/guides/object-blurring.md @@ -82,23 +82,7 @@ Object blurring 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 | +{% include "macros/predict-args.md" %} ## FAQ diff --git a/docs/en/guides/object-counting.md b/docs/en/guides/object-counting.md index d8376743..68aae4fb 100644 --- a/docs/en/guides/object-counting.md +++ b/docs/en/guides/object-counting.md @@ -236,15 +236,7 @@ Here's a table with the `ObjectCounter` arguments: ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/guides/object-cropping.md b/docs/en/guides/object-cropping.md index caf831fe..09adb625 100644 --- a/docs/en/guides/object-cropping.md +++ b/docs/en/guides/object-cropping.md @@ -94,23 +94,7 @@ Object cropping with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly ### Arguments `model.predict` -| 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. | +{% include "macros/predict-args.md" %} ## FAQ diff --git a/docs/en/guides/parking-management.md b/docs/en/guides/parking-management.md index bd5b0edd..84a88f57 100644 --- a/docs/en/guides/parking-management.md +++ b/docs/en/guides/parking-management.md @@ -122,15 +122,7 @@ Parking management with [Ultralytics YOLOv8](https://github.com/ultralytics/ultr ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/guides/queue-management.md b/docs/en/guides/queue-management.md index 7abc31d3..bf9beba4 100644 --- a/docs/en/guides/queue-management.md +++ b/docs/en/guides/queue-management.md @@ -142,15 +142,7 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/guides/speed-estimation.md b/docs/en/guides/speed-estimation.md index 4342d108..e9c9cb29 100644 --- a/docs/en/guides/speed-estimation.md +++ b/docs/en/guides/speed-estimation.md @@ -99,15 +99,7 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/guides/workouts-monitoring.md b/docs/en/guides/workouts-monitoring.md index 7134a566..e042acfa 100644 --- a/docs/en/guides/workouts-monitoring.md +++ b/docs/en/guides/workouts-monitoring.md @@ -123,35 +123,11 @@ Monitoring workouts through pose estimation with [Ultralytics YOLOv8](https://gi ### 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 | +{% include "macros/predict-args.md" %} ### Arguments `model.track` -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +{% include "macros/track-args.md" %} ## FAQ diff --git a/docs/en/macros/augmentation-args.md b/docs/en/macros/augmentation-args.md new file mode 100644 index 00000000..d8dbee85 --- /dev/null +++ b/docs/en/macros/augmentation-args.md @@ -0,0 +1,19 @@ +| Argument | Type | Default | Range | Description | +| --------------- | ------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. | +| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. | +| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. | +| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. | +| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. | +| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. | +| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. | +| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. | +| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. | +| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. | +| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. | +| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. | +| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. | +| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies objects from one image and pastes them onto another, useful for increasing object instances and learning object occlusion. | +| `auto_augment` | `str` | `randaugment` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. | +| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. | +| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. | diff --git a/docs/en/macros/predict-args.md b/docs/en/macros/predict-args.md new file mode 100644 index 00000000..0ad0c901 --- /dev/null +++ b/docs/en/macros/predict-args.md @@ -0,0 +1,17 @@ +| 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/macros/track-args.md b/docs/en/macros/track-args.md new file mode 100644 index 00000000..a6c220e1 --- /dev/null +++ b/docs/en/macros/track-args.md @@ -0,0 +1,9 @@ +| Name | Type | Default | Description | +| --------- | ------- | -------------- | ----------------------------------------------------------- | +| `source` | `im0` | `None` | source directory for images or videos | +| `persist` | `bool` | `False` | persisting tracks between frames | +| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | +| `conf` | `float` | `0.3` | Confidence Threshold | +| `iou` | `float` | `0.5` | IOU Threshold | +| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | +| `verbose` | `bool` | `True` | Display the object tracking results | diff --git a/docs/en/macros/train-args.md b/docs/en/macros/train-args.md new file mode 100644 index 00000000..d072003f --- /dev/null +++ b/docs/en/macros/train-args.md @@ -0,0 +1,50 @@ +| Argument | Default | Description | +| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model` | `None` | Specifies the model file for training. Accepts a path to either a `.pt` pretrained model or a `.yaml` configuration file. Essential for defining the model structure or initializing weights. | +| `data` | `None` | Path to the dataset configuration file (e.g., `coco8.yaml`). This file contains dataset-specific parameters, including paths to training and validation data, class names, and number of classes. | +| `epochs` | `100` | Total number of training epochs. Each epoch represents a full pass over the entire dataset. Adjusting this value can affect training duration and model performance. | +| `time` | `None` | Maximum training time in hours. If set, this overrides the `epochs` argument, allowing training to automatically stop after the specified duration. Useful for time-constrained training scenarios. | +| `patience` | `100` | Number of epochs to wait without improvement in validation metrics before early stopping the training. Helps prevent overfitting by stopping training when performance plateaus. | +| `batch` | `16` | Batch size, with three modes: set as an integer (e.g., `batch=16`), auto mode for 60% GPU memory utilization (`batch=-1`), or auto mode with specified utilization fraction (`batch=0.70`). | +| `imgsz` | `640` | Target image size for training. All images are resized to this dimension before being fed into the model. Affects model accuracy and computational complexity. | +| `save` | `True` | Enables saving of training checkpoints and final model weights. Useful for resuming training or model deployment. | +| `save_period` | `-1` | Frequency of saving model checkpoints, specified in epochs. A value of -1 disables this feature. Useful for saving interim models during long training sessions. | +| `cache` | `False` | Enables caching of dataset images in memory (`True`/`ram`), on disk (`disk`), or disables it (`False`). Improves training speed by reducing disk I/O at the cost of increased memory usage. | +| `device` | `None` | Specifies the computational device(s) for training: a single GPU (`device=0`), multiple GPUs (`device=0,1`), CPU (`device=cpu`), or MPS for Apple silicon (`device=mps`). | +| `workers` | `8` | Number of worker threads for data loading (per `RANK` if Multi-GPU training). Influences the speed of data preprocessing and feeding into the model, especially useful in multi-GPU setups. | +| `project` | `None` | Name of the project directory where training outputs are saved. Allows for organized storage of different experiments. | +| `name` | `None` | Name of the training run. Used for creating a subdirectory within the project folder, where training logs and outputs are stored. | +| `exist_ok` | `False` | If True, allows overwriting of an existing project/name directory. Useful for iterative experimentation without needing to manually clear previous outputs. | +| `pretrained` | `True` | Determines whether to start training from a pretrained model. Can be a boolean value or a string path to a specific model from which to load weights. Enhances training efficiency and model performance. | +| `optimizer` | `'auto'` | Choice of optimizer for training. Options include `SGD`, `Adam`, `AdamW`, `NAdam`, `RAdam`, `RMSProp` etc., or `auto` for automatic selection based on model configuration. Affects convergence speed and stability. | +| `verbose` | `False` | Enables verbose output during training, providing detailed logs and progress updates. Useful for debugging and closely monitoring the training process. | +| `seed` | `0` | Sets the random seed for training, ensuring reproducibility of results across runs with the same configurations. | +| `deterministic` | `True` | Forces deterministic algorithm use, ensuring reproducibility but may affect performance and speed due to the restriction on non-deterministic algorithms. | +| `single_cls` | `False` | Treats all classes in multi-class datasets as a single class during training. Useful for binary classification tasks or when focusing on object presence rather than classification. | +| `rect` | `False` | Enables rectangular training, optimizing batch composition for minimal padding. Can improve efficiency and speed but may affect model accuracy. | +| `cos_lr` | `False` | Utilizes a cosine learning rate scheduler, adjusting the learning rate following a cosine curve over epochs. Helps in managing learning rate for better convergence. | +| `close_mosaic` | `10` | Disables mosaic data augmentation in the last N epochs to stabilize training before completion. Setting to 0 disables this feature. | +| `resume` | `False` | Resumes training from the last saved checkpoint. Automatically loads model weights, optimizer state, and epoch count, continuing training seamlessly. | +| `amp` | `True` | Enables Automatic Mixed Precision (AMP) training, reducing memory usage and possibly speeding up training with minimal impact on accuracy. | +| `fraction` | `1.0` | Specifies the fraction of the dataset to use for training. Allows for training on a subset of the full dataset, useful for experiments or when resources are limited. | +| `profile` | `False` | Enables profiling of ONNX and TensorRT speeds during training, useful for optimizing model deployment. | +| `freeze` | `None` | Freezes the first N layers of the model or specified layers by index, reducing the number of trainable parameters. Useful for fine-tuning or transfer learning. | +| `lr0` | `0.01` | Initial learning rate (i.e. `SGD=1E-2`, `Adam=1E-3`) . Adjusting this value is crucial for the optimization process, influencing how rapidly model weights are updated. | +| `lrf` | `0.01` | Final learning rate as a fraction of the initial rate = (`lr0 * lrf`), used in conjunction with schedulers to adjust the learning rate over time. | +| `momentum` | `0.937` | Momentum factor for SGD or beta1 for Adam optimizers, influencing the incorporation of past gradients in the current update. | +| `weight_decay` | `0.0005` | L2 regularization term, penalizing large weights to prevent overfitting. | +| `warmup_epochs` | `3.0` | Number of epochs for learning rate warmup, gradually increasing the learning rate from a low value to the initial learning rate to stabilize training early on. | +| `warmup_momentum` | `0.8` | Initial momentum for warmup phase, gradually adjusting to the set momentum over the warmup period. | +| `warmup_bias_lr` | `0.1` | Learning rate for bias parameters during the warmup phase, helping stabilize model training in the initial epochs. | +| `box` | `7.5` | Weight of the box loss component in the loss function, influencing how much emphasis is placed on accurately predicting bounding box coordinates. | +| `cls` | `0.5` | Weight of the classification loss in the total loss function, affecting the importance of correct class prediction relative to other components. | +| `dfl` | `1.5` | Weight of the distribution focal loss, used in certain YOLO versions for fine-grained classification. | +| `pose` | `12.0` | Weight of the pose loss in models trained for pose estimation, influencing the emphasis on accurately predicting pose keypoints. | +| `kobj` | `2.0` | Weight of the keypoint objectness loss in pose estimation models, balancing detection confidence with pose accuracy. | +| `label_smoothing` | `0.0` | Applies label smoothing, softening hard labels to a mix of the target label and a uniform distribution over labels, can improve generalization. | +| `nbs` | `64` | Nominal batch size for normalization of loss. | +| `overlap_mask` | `True` | Determines whether segmentation masks should overlap during training, applicable in instance segmentation tasks. | +| `mask_ratio` | `4` | Downsample ratio for segmentation masks, affecting the resolution of masks used during training. | +| `dropout` | `0.0` | Dropout rate for regularization in classification tasks, preventing overfitting by randomly omitting units during training. | +| `val` | `True` | Enables validation during training, allowing for periodic evaluation of model performance on a separate dataset. | +| `plots` | `False` | Generates and saves plots of training and validation metrics, as well as prediction examples, providing visual insights into model performance and learning progression. | diff --git a/docs/en/macros/validation-args.md b/docs/en/macros/validation-args.md new file mode 100644 index 00000000..92bfa240 --- /dev/null +++ b/docs/en/macros/validation-args.md @@ -0,0 +1,16 @@ +| Argument | Type | Default | Description | +| ------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | `str` | `None` | Specifies the path to the dataset configuration file (e.g., `coco8.yaml`). This file includes paths to validation data, class names, and number of classes. | +| `imgsz` | `int` | `640` | Defines the size of input images. All images are resized to this dimension before processing. | +| `batch` | `int` | `16` | Sets the number of images per batch. Use `-1` for AutoBatch, which automatically adjusts based on GPU memory availability. | +| `save_json` | `bool` | `False` | If `True`, saves the results to a JSON file for further analysis or integration with other tools. | +| `save_hybrid` | `bool` | `False` | If `True`, saves a hybrid version of labels that combines original annotations with additional model predictions. | +| `conf` | `float` | `0.001` | Sets the minimum confidence threshold for detections. Detections with confidence below this threshold are discarded. | +| `iou` | `float` | `0.6` | Sets the Intersection Over Union (IoU) threshold for Non-Maximum Suppression (NMS). Helps in reducing duplicate detections. | +| `max_det` | `int` | `300` | Limits the maximum number of detections per image. Useful in dense scenes to prevent excessive detections. | +| `half` | `bool` | `True` | Enables half-precision (FP16) computation, reducing memory usage and potentially increasing speed with minimal impact on accuracy. | +| `device` | `str` | `None` | Specifies the device for validation (`cpu`, `cuda:0`, etc.). Allows flexibility in utilizing CPU or GPU resources. | +| `dnn` | `bool` | `False` | If `True`, uses the OpenCV DNN module for ONNX model inference, offering an alternative to PyTorch inference methods. | +| `plots` | `bool` | `False` | When set to `True`, generates and saves plots of predictions versus ground truth for visual evaluation of the model's performance. | +| `rect` | `bool` | `False` | If `True`, uses rectangular inference for batching, reducing padding and potentially increasing speed and efficiency. | +| `split` | `str` | `val` | Determines the dataset split to use for validation (`val`, `test`, or `train`). Allows flexibility in choosing the data segment for performance evaluation. | diff --git a/docs/en/macros/visualization-args.md b/docs/en/macros/visualization-args.md new file mode 100644 index 00000000..0cf879f3 --- /dev/null +++ b/docs/en/macros/visualization-args.md @@ -0,0 +1,12 @@ +| Argument | Type | Default | Description | +| ------------- | --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `show` | `bool` | `False` | If `True`, displays the annotated images or videos in a window. Useful for immediate visual feedback during development or testing. | +| `save` | `bool` | `False` or `True` | Enables saving of the annotated images or videos to file. Useful for documentation, further analysis, or sharing results. Defaults to True when using CLI & False when used in Python. | +| `save_frames` | `bool` | `False` | When processing videos, saves individual frames as images. Useful for extracting specific frames or for detailed frame-by-frame analysis. | +| `save_txt` | `bool` | `False` | Saves detection results in a text file, following the format `[class] [x_center] [y_center] [width] [height] [confidence]`. Useful for integration with other analysis tools. | +| `save_conf` | `bool` | `False` | Includes confidence scores in the saved text files. Enhances the detail available for post-processing and analysis. | +| `save_crop` | `bool` | `False` | Saves cropped images of detections. Useful for dataset augmentation, analysis, or creating focused datasets for specific objects. | +| `show_labels` | `bool` | `True` | Displays labels for each detection in the visual output. Provides immediate understanding of detected objects. | +| `show_conf` | `bool` | `True` | Displays the confidence score for each detection alongside the label. Gives insight into the model's certainty for each detection. | +| `show_boxes` | `bool` | `True` | Draws bounding boxes around detected objects. Essential for visual identification and location of objects in images or video frames. | +| `line_width` | `None` or `int` | `None` | Specifies the line width of bounding boxes. If `None`, the line width is automatically adjusted based on the image size. Provides visual customization for clarity. | diff --git a/docs/en/modes/predict.md b/docs/en/modes/predict.md index f89780f8..f9a832f3 100644 --- a/docs/en/modes/predict.md +++ b/docs/en/modes/predict.md @@ -365,38 +365,11 @@ Below are code examples for using each source type: Inference arguments: -| 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. | +{% include "macros/predict-args.md" %} Visualization arguments: -| Argument | Type | Default | Description | -| ------------- | --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `show` | `bool` | `False` | If `True`, displays the annotated images or videos in a window. Useful for immediate visual feedback during development or testing. | -| `save` | `bool` | `False` or `True` | Enables saving of the annotated images or videos to file. Useful for documentation, further analysis, or sharing results. Defaults to True when using CLI & False when used in Python. | -| `save_frames` | `bool` | `False` | When processing videos, saves individual frames as images. Useful for extracting specific frames or for detailed frame-by-frame analysis. | -| `save_txt` | `bool` | `False` | Saves detection results in a text file, following the format `[class] [x_center] [y_center] [width] [height] [confidence]`. Useful for integration with other analysis tools. | -| `save_conf` | `bool` | `False` | Includes confidence scores in the saved text files. Enhances the detail available for post-processing and analysis. | -| `save_crop` | `bool` | `False` | Saves cropped images of detections. Useful for dataset augmentation, analysis, or creating focused datasets for specific objects. | -| `show_labels` | `bool` | `True` | Displays labels for each detection in the visual output. Provides immediate understanding of detected objects. | -| `show_conf` | `bool` | `True` | Displays the confidence score for each detection alongside the label. Gives insight into the model's certainty for each detection. | -| `show_boxes` | `bool` | `True` | Draws bounding boxes around detected objects. Essential for visual identification and location of objects in images or video frames. | -| `line_width` | `None` or `int` | `None` | Specifies the line width of bounding boxes. If `None`, the line width is automatically adjusted based on the image size. Provides visual customization for clarity. | +{% include "macros/visualization-args.md" %} ## Image and Video Formats diff --git a/docs/en/modes/train.md b/docs/en/modes/train.md index 4e5fcb05..03348b6c 100644 --- a/docs/en/modes/train.md +++ b/docs/en/modes/train.md @@ -175,56 +175,7 @@ Remember that checkpoints are saved at the end of every epoch by default, or at The training settings for YOLO models encompass various hyperparameters and configurations used during the training process. These settings influence the model's performance, speed, and accuracy. Key training settings include batch size, learning rate, momentum, and weight decay. Additionally, the choice of optimizer, loss function, and training dataset composition can impact the training process. Careful tuning and experimentation with these settings are crucial for optimizing performance. -| Argument | Default | Description | -| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | `None` | Specifies the model file for training. Accepts a path to either a `.pt` pretrained model or a `.yaml` configuration file. Essential for defining the model structure or initializing weights. | -| `data` | `None` | Path to the dataset configuration file (e.g., `coco8.yaml`). This file contains dataset-specific parameters, including paths to training and validation data, class names, and number of classes. | -| `epochs` | `100` | Total number of training epochs. Each epoch represents a full pass over the entire dataset. Adjusting this value can affect training duration and model performance. | -| `time` | `None` | Maximum training time in hours. If set, this overrides the `epochs` argument, allowing training to automatically stop after the specified duration. Useful for time-constrained training scenarios. | -| `patience` | `100` | Number of epochs to wait without improvement in validation metrics before early stopping the training. Helps prevent overfitting by stopping training when performance plateaus. | -| `batch` | `16` | Batch size, with three modes: set as an integer (e.g., `batch=16`), auto mode for 60% GPU memory utilization (`batch=-1`), or auto mode with specified utilization fraction (`batch=0.70`). | -| `imgsz` | `640` | Target image size for training. All images are resized to this dimension before being fed into the model. Affects model accuracy and computational complexity. | -| `save` | `True` | Enables saving of training checkpoints and final model weights. Useful for resuming training or model deployment. | -| `save_period` | `-1` | Frequency of saving model checkpoints, specified in epochs. A value of -1 disables this feature. Useful for saving interim models during long training sessions. | -| `cache` | `False` | Enables caching of dataset images in memory (`True`/`ram`), on disk (`disk`), or disables it (`False`). Improves training speed by reducing disk I/O at the cost of increased memory usage. | -| `device` | `None` | Specifies the computational device(s) for training: a single GPU (`device=0`), multiple GPUs (`device=0,1`), CPU (`device=cpu`), or MPS for Apple silicon (`device=mps`). | -| `workers` | `8` | Number of worker threads for data loading (per `RANK` if Multi-GPU training). Influences the speed of data preprocessing and feeding into the model, especially useful in multi-GPU setups. | -| `project` | `None` | Name of the project directory where training outputs are saved. Allows for organized storage of different experiments. | -| `name` | `None` | Name of the training run. Used for creating a subdirectory within the project folder, where training logs and outputs are stored. | -| `exist_ok` | `False` | If True, allows overwriting of an existing project/name directory. Useful for iterative experimentation without needing to manually clear previous outputs. | -| `pretrained` | `True` | Determines whether to start training from a pretrained model. Can be a boolean value or a string path to a specific model from which to load weights. Enhances training efficiency and model performance. | -| `optimizer` | `'auto'` | Choice of optimizer for training. Options include `SGD`, `Adam`, `AdamW`, `NAdam`, `RAdam`, `RMSProp` etc., or `auto` for automatic selection based on model configuration. Affects convergence speed and stability. | -| `verbose` | `False` | Enables verbose output during training, providing detailed logs and progress updates. Useful for debugging and closely monitoring the training process. | -| `seed` | `0` | Sets the random seed for training, ensuring reproducibility of results across runs with the same configurations. | -| `deterministic` | `True` | Forces deterministic algorithm use, ensuring reproducibility but may affect performance and speed due to the restriction on non-deterministic algorithms. | -| `single_cls` | `False` | Treats all classes in multi-class datasets as a single class during training. Useful for binary classification tasks or when focusing on object presence rather than classification. | -| `rect` | `False` | Enables rectangular training, optimizing batch composition for minimal padding. Can improve efficiency and speed but may affect model accuracy. | -| `cos_lr` | `False` | Utilizes a cosine learning rate scheduler, adjusting the learning rate following a cosine curve over epochs. Helps in managing learning rate for better convergence. | -| `close_mosaic` | `10` | Disables mosaic data augmentation in the last N epochs to stabilize training before completion. Setting to 0 disables this feature. | -| `resume` | `False` | Resumes training from the last saved checkpoint. Automatically loads model weights, optimizer state, and epoch count, continuing training seamlessly. | -| `amp` | `True` | Enables Automatic Mixed Precision (AMP) training, reducing memory usage and possibly speeding up training with minimal impact on accuracy. | -| `fraction` | `1.0` | Specifies the fraction of the dataset to use for training. Allows for training on a subset of the full dataset, useful for experiments or when resources are limited. | -| `profile` | `False` | Enables profiling of ONNX and TensorRT speeds during training, useful for optimizing model deployment. | -| `freeze` | `None` | Freezes the first N layers of the model or specified layers by index, reducing the number of trainable parameters. Useful for fine-tuning or transfer learning. | -| `lr0` | `0.01` | Initial learning rate (i.e. `SGD=1E-2`, `Adam=1E-3`) . Adjusting this value is crucial for the optimization process, influencing how rapidly model weights are updated. | -| `lrf` | `0.01` | Final learning rate as a fraction of the initial rate = (`lr0 * lrf`), used in conjunction with schedulers to adjust the learning rate over time. | -| `momentum` | `0.937` | Momentum factor for SGD or beta1 for Adam optimizers, influencing the incorporation of past gradients in the current update. | -| `weight_decay` | `0.0005` | L2 regularization term, penalizing large weights to prevent overfitting. | -| `warmup_epochs` | `3.0` | Number of epochs for learning rate warmup, gradually increasing the learning rate from a low value to the initial learning rate to stabilize training early on. | -| `warmup_momentum` | `0.8` | Initial momentum for warmup phase, gradually adjusting to the set momentum over the warmup period. | -| `warmup_bias_lr` | `0.1` | Learning rate for bias parameters during the warmup phase, helping stabilize model training in the initial epochs. | -| `box` | `7.5` | Weight of the box loss component in the loss function, influencing how much emphasis is placed on accurately predicting bounding box coordinates. | -| `cls` | `0.5` | Weight of the classification loss in the total loss function, affecting the importance of correct class prediction relative to other components. | -| `dfl` | `1.5` | Weight of the distribution focal loss, used in certain YOLO versions for fine-grained classification. | -| `pose` | `12.0` | Weight of the pose loss in models trained for pose estimation, influencing the emphasis on accurately predicting pose keypoints. | -| `kobj` | `2.0` | Weight of the keypoint objectness loss in pose estimation models, balancing detection confidence with pose accuracy. | -| `label_smoothing` | `0.0` | Applies label smoothing, softening hard labels to a mix of the target label and a uniform distribution over labels, can improve generalization. | -| `nbs` | `64` | Nominal batch size for normalization of loss. | -| `overlap_mask` | `True` | Determines whether segmentation masks should overlap during training, applicable in instance segmentation tasks. | -| `mask_ratio` | `4` | Downsample ratio for segmentation masks, affecting the resolution of masks used during training. | -| `dropout` | `0.0` | Dropout rate for regularization in classification tasks, preventing overfitting by randomly omitting units during training. | -| `val` | `True` | Enables validation during training, allowing for periodic evaluation of model performance on a separate dataset. | -| `plots` | `False` | Generates and saves plots of training and validation metrics, as well as prediction examples, providing visual insights into model performance and learning progression. | +{% include "macros/train-args.md" %} !!! info "Note on Batch-size Settings" @@ -238,25 +189,7 @@ The training settings for YOLO models encompass various hyperparameters and conf Augmentation techniques are essential for improving the robustness and performance of YOLO models by introducing variability into the training data, helping the model generalize better to unseen data. The following table outlines the purpose and effect of each augmentation argument: -| Argument | Type | Default | Range | Description | -| --------------- | ------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. | -| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. | -| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. | -| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. | -| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. | -| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. | -| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. | -| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. | -| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. | -| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. | -| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. | -| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. | -| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. | -| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies objects from one image and pastes them onto another, useful for increasing object instances and learning object occlusion. | -| `auto_augment` | `str` | `randaugment` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. | -| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. | -| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. | +{% include "macros/augmentation-args.md" %} These settings can be adjusted to meet the specific requirements of the dataset and task at hand. Experimenting with different values can help find the optimal augmentation strategy that leads to the best model performance. diff --git a/docs/en/modes/val.md b/docs/en/modes/val.md index c5c496a6..58fdc906 100644 --- a/docs/en/modes/val.md +++ b/docs/en/modes/val.md @@ -79,22 +79,7 @@ Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need t When validating YOLO models, several arguments can be fine-tuned to optimize the evaluation process. These arguments control aspects such as input image size, batch processing, and performance thresholds. Below is a detailed breakdown of each argument to help you customize your validation settings effectively. -| Argument | Type | Default | Description | -| ------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | `str` | `None` | Specifies the path to the dataset configuration file (e.g., `coco8.yaml`). This file includes paths to validation data, class names, and number of classes. | -| `imgsz` | `int` | `640` | Defines the size of input images. All images are resized to this dimension before processing. | -| `batch` | `int` | `16` | Sets the number of images per batch. Use `-1` for AutoBatch, which automatically adjusts based on GPU memory availability. | -| `save_json` | `bool` | `False` | If `True`, saves the results to a JSON file for further analysis or integration with other tools. | -| `save_hybrid` | `bool` | `False` | If `True`, saves a hybrid version of labels that combines original annotations with additional model predictions. | -| `conf` | `float` | `0.001` | Sets the minimum confidence threshold for detections. Detections with confidence below this threshold are discarded. | -| `iou` | `float` | `0.6` | Sets the Intersection Over Union (IoU) threshold for Non-Maximum Suppression (NMS). Helps in reducing duplicate detections. | -| `max_det` | `int` | `300` | Limits the maximum number of detections per image. Useful in dense scenes to prevent excessive detections. | -| `half` | `bool` | `True` | Enables half-precision (FP16) computation, reducing memory usage and potentially increasing speed with minimal impact on accuracy. | -| `device` | `str` | `None` | Specifies the device for validation (`cpu`, `cuda:0`, etc.). Allows flexibility in utilizing CPU or GPU resources. | -| `dnn` | `bool` | `False` | If `True`, uses the OpenCV DNN module for ONNX model inference, offering an alternative to PyTorch inference methods. | -| `plots` | `bool` | `False` | When set to `True`, generates and saves plots of predictions versus ground truth for visual evaluation of the model's performance. | -| `rect` | `bool` | `False` | If `True`, uses rectangular inference for batching, reducing padding and potentially increasing speed and efficiency. | -| `split` | `str` | `val` | Determines the dataset split to use for validation (`val`, `test`, or `train`). Allows flexibility in choosing the data segment for performance evaluation. | +{% include "macros/validation-args.md" %} Each of these settings plays a vital role in the validation process, allowing for a customizable and efficient evaluation of YOLO models. Adjusting these parameters according to your specific needs and resources can help achieve the best balance between accuracy and performance. diff --git a/docs/en/usage/cfg.md b/docs/en/usage/cfg.md index f2eba126..2d0ce1dd 100644 --- a/docs/en/usage/cfg.md +++ b/docs/en/usage/cfg.md @@ -84,56 +84,7 @@ YOLO models can be used in different modes depending on the specific problem you The training settings for YOLO models encompass various hyperparameters and configurations used during the training process. These settings influence the model's performance, speed, and accuracy. Key training settings include batch size, learning rate, momentum, and weight decay. Additionally, the choice of optimizer, loss function, and training dataset composition can impact the training process. Careful tuning and experimentation with these settings are crucial for optimizing performance. -| Argument | Default | Description | -| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | `None` | Specifies the model file for training. Accepts a path to either a `.pt` pretrained model or a `.yaml` configuration file. Essential for defining the model structure or initializing weights. | -| `data` | `None` | Path to the dataset configuration file (e.g., `coco8.yaml`). This file contains dataset-specific parameters, including paths to training and validation data, class names, and number of classes. | -| `epochs` | `100` | Total number of training epochs. Each epoch represents a full pass over the entire dataset. Adjusting this value can affect training duration and model performance. | -| `time` | `None` | Maximum training time in hours. If set, this overrides the `epochs` argument, allowing training to automatically stop after the specified duration. Useful for time-constrained training scenarios. | -| `patience` | `100` | Number of epochs to wait without improvement in validation metrics before early stopping the training. Helps prevent overfitting by stopping training when performance plateaus. | -| `batch` | `16` | Batch size, with three modes: set as an integer (e.g., `batch=16`), auto mode for 60% GPU memory utilization (`batch=-1`), or auto mode with specified utilization fraction (`batch=0.70`). | -| `imgsz` | `640` | Target image size for training. All images are resized to this dimension before being fed into the model. Affects model accuracy and computational complexity. | -| `save` | `True` | Enables saving of training checkpoints and final model weights. Useful for resuming training or model deployment. | -| `save_period` | `-1` | Frequency of saving model checkpoints, specified in epochs. A value of -1 disables this feature. Useful for saving interim models during long training sessions. | -| `cache` | `False` | Enables caching of dataset images in memory (`True`/`ram`), on disk (`disk`), or disables it (`False`). Improves training speed by reducing disk I/O at the cost of increased memory usage. | -| `device` | `None` | Specifies the computational device(s) for training: a single GPU (`device=0`), multiple GPUs (`device=0,1`), CPU (`device=cpu`), or MPS for Apple silicon (`device=mps`). | -| `workers` | `8` | Number of worker threads for data loading (per `RANK` if Multi-GPU training). Influences the speed of data preprocessing and feeding into the model, especially useful in multi-GPU setups. | -| `project` | `None` | Name of the project directory where training outputs are saved. Allows for organized storage of different experiments. | -| `name` | `None` | Name of the training run. Used for creating a subdirectory within the project folder, where training logs and outputs are stored. | -| `exist_ok` | `False` | If True, allows overwriting of an existing project/name directory. Useful for iterative experimentation without needing to manually clear previous outputs. | -| `pretrained` | `True` | Determines whether to start training from a pretrained model. Can be a boolean value or a string path to a specific model from which to load weights. Enhances training efficiency and model performance. | -| `optimizer` | `'auto'` | Choice of optimizer for training. Options include `SGD`, `Adam`, `AdamW`, `NAdam`, `RAdam`, `RMSProp` etc., or `auto` for automatic selection based on model configuration. Affects convergence speed and stability. | -| `verbose` | `False` | Enables verbose output during training, providing detailed logs and progress updates. Useful for debugging and closely monitoring the training process. | -| `seed` | `0` | Sets the random seed for training, ensuring reproducibility of results across runs with the same configurations. | -| `deterministic` | `True` | Forces deterministic algorithm use, ensuring reproducibility but may affect performance and speed due to the restriction on non-deterministic algorithms. | -| `single_cls` | `False` | Treats all classes in multi-class datasets as a single class during training. Useful for binary classification tasks or when focusing on object presence rather than classification. | -| `rect` | `False` | Enables rectangular training, optimizing batch composition for minimal padding. Can improve efficiency and speed but may affect model accuracy. | -| `cos_lr` | `False` | Utilizes a cosine learning rate scheduler, adjusting the learning rate following a cosine curve over epochs. Helps in managing learning rate for better convergence. | -| `close_mosaic` | `10` | Disables mosaic data augmentation in the last N epochs to stabilize training before completion. Setting to 0 disables this feature. | -| `resume` | `False` | Resumes training from the last saved checkpoint. Automatically loads model weights, optimizer state, and epoch count, continuing training seamlessly. | -| `amp` | `True` | Enables Automatic Mixed Precision (AMP) training, reducing memory usage and possibly speeding up training with minimal impact on accuracy. | -| `fraction` | `1.0` | Specifies the fraction of the dataset to use for training. Allows for training on a subset of the full dataset, useful for experiments or when resources are limited. | -| `profile` | `False` | Enables profiling of ONNX and TensorRT speeds during training, useful for optimizing model deployment. | -| `freeze` | `None` | Freezes the first N layers of the model or specified layers by index, reducing the number of trainable parameters. Useful for fine-tuning or transfer learning. | -| `lr0` | `0.01` | Initial learning rate (i.e. `SGD=1E-2`, `Adam=1E-3`) . Adjusting this value is crucial for the optimization process, influencing how rapidly model weights are updated. | -| `lrf` | `0.01` | Final learning rate as a fraction of the initial rate = (`lr0 * lrf`), used in conjunction with schedulers to adjust the learning rate over time. | -| `momentum` | `0.937` | Momentum factor for SGD or beta1 for Adam optimizers, influencing the incorporation of past gradients in the current update. | -| `weight_decay` | `0.0005` | L2 regularization term, penalizing large weights to prevent overfitting. | -| `warmup_epochs` | `3.0` | Number of epochs for learning rate warmup, gradually increasing the learning rate from a low value to the initial learning rate to stabilize training early on. | -| `warmup_momentum` | `0.8` | Initial momentum for warmup phase, gradually adjusting to the set momentum over the warmup period. | -| `warmup_bias_lr` | `0.1` | Learning rate for bias parameters during the warmup phase, helping stabilize model training in the initial epochs. | -| `box` | `7.5` | Weight of the box loss component in the loss function, influencing how much emphasis is placed on accurately predicting bounding box coordinates. | -| `cls` | `0.5` | Weight of the classification loss in the total loss function, affecting the importance of correct class prediction relative to other components. | -| `dfl` | `1.5` | Weight of the distribution focal loss, used in certain YOLO versions for fine-grained classification. | -| `pose` | `12.0` | Weight of the pose loss in models trained for pose estimation, influencing the emphasis on accurately predicting pose keypoints. | -| `kobj` | `2.0` | Weight of the keypoint objectness loss in pose estimation models, balancing detection confidence with pose accuracy. | -| `label_smoothing` | `0.0` | Applies label smoothing, softening hard labels to a mix of the target label and a uniform distribution over labels, can improve generalization. | -| `nbs` | `64` | Nominal batch size for normalization of loss. | -| `overlap_mask` | `True` | Determines whether segmentation masks should overlap during training, applicable in instance segmentation tasks. | -| `mask_ratio` | `4` | Downsample ratio for segmentation masks, affecting the resolution of masks used during training. | -| `dropout` | `0.0` | Dropout rate for regularization in classification tasks, preventing overfitting by randomly omitting units during training. | -| `val` | `True` | Enables validation during training, allowing for periodic evaluation of model performance on a separate dataset. | -| `plots` | `False` | Generates and saves plots of training and validation metrics, as well as prediction examples, providing visual insights into model performance and learning progression. | +{% include "macros/train-args.md" %} !!! info "Note on Batch-size Settings" @@ -151,38 +102,11 @@ The prediction settings for YOLO models encompass a range of hyperparameters and Inference arguments: -| 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. | +{% include "macros/predict-args.md" %} Visualization arguments: -| Argument | Type | Default | Description | -| ------------- | --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `show` | `bool` | `False` | If `True`, displays the annotated images or videos in a window. Useful for immediate visual feedback during development or testing. | -| `save` | `bool` | `False` or `True` | Enables saving of the annotated images or videos to file. Useful for documentation, further analysis, or sharing results. Defaults to True when using CLI & False when used in Python. | -| `save_frames` | `bool` | `False` | When processing videos, saves individual frames as images. Useful for extracting specific frames or for detailed frame-by-frame analysis. | -| `save_txt` | `bool` | `False` | Saves detection results in a text file, following the format `[class] [x_center] [y_center] [width] [height] [confidence]`. Useful for integration with other analysis tools. | -| `save_conf` | `bool` | `False` | Includes confidence scores in the saved text files. Enhances the detail available for post-processing and analysis. | -| `save_crop` | `bool` | `False` | Saves cropped images of detections. Useful for dataset augmentation, analysis, or creating focused datasets for specific objects. | -| `show_labels` | `bool` | `True` | Displays labels for each detection in the visual output. Provides immediate understanding of detected objects. | -| `show_conf` | `bool` | `True` | Displays the confidence score for each detection alongside the label. Gives insight into the model's certainty for each detection. | -| `show_boxes` | `bool` | `True` | Draws bounding boxes around detected objects. Essential for visual identification and location of objects in images or video frames. | -| `line_width` | `None` or `int` | `None` | Specifies the line width of bounding boxes. If `None`, the line width is automatically adjusted based on the image size. Provides visual customization for clarity. | +{% include "macros/visualization-args.md" %} [Predict Guide](../modes/predict.md){ .md-button } @@ -190,22 +114,7 @@ Visualization arguments: The val (validation) settings for YOLO models involve various hyperparameters and configurations used to evaluate the model's performance on a validation dataset. These settings influence the model's performance, speed, and accuracy. Common YOLO validation settings include batch size, validation frequency during training, and performance evaluation metrics. Other factors affecting the validation process include the validation dataset's size and composition, as well as the specific task the model is employed for. -| Argument | Type | Default | Description | -| ------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | `str` | `None` | Specifies the path to the dataset configuration file (e.g., `coco8.yaml`). This file includes paths to validation data, class names, and number of classes. | -| `imgsz` | `int` | `640` | Defines the size of input images. All images are resized to this dimension before processing. | -| `batch` | `int` | `16` | Sets the number of images per batch. Use `-1` for AutoBatch, which automatically adjusts based on GPU memory availability. | -| `save_json` | `bool` | `False` | If `True`, saves the results to a JSON file for further analysis or integration with other tools. | -| `save_hybrid` | `bool` | `False` | If `True`, saves a hybrid version of labels that combines original annotations with additional model predictions. | -| `conf` | `float` | `0.001` | Sets the minimum confidence threshold for detections. Detections with confidence below this threshold are discarded. | -| `iou` | `float` | `0.6` | Sets the Intersection Over Union (IoU) threshold for Non-Maximum Suppression (NMS). Helps in reducing duplicate detections. | -| `max_det` | `int` | `300` | Limits the maximum number of detections per image. Useful in dense scenes to prevent excessive detections. | -| `half` | `bool` | `True` | Enables half-precision (FP16) computation, reducing memory usage and potentially increasing speed with minimal impact on accuracy. | -| `device` | `str` | `None` | Specifies the device for validation (`cpu`, `cuda:0`, etc.). Allows flexibility in utilizing CPU or GPU resources. | -| `dnn` | `bool` | `False` | If `True`, uses the OpenCV DNN module for ONNX model inference, offering an alternative to PyTorch inference methods. | -| `plots` | `bool` | `False` | When set to `True`, generates and saves plots of predictions versus ground truth for visual evaluation of the model's performance. | -| `rect` | `bool` | `False` | If `True`, uses rectangular inference for batching, reducing padding and potentially increasing speed and efficiency. | -| `split` | `str` | `val` | Determines the dataset split to use for validation (`val`, `test`, or `train`). Allows flexibility in choosing the data segment for performance evaluation. | +{% include "macros/validation-args.md" %} Careful tuning and experimentation with these settings are crucial to ensure optimal performance on the validation dataset and detect and prevent overfitting. @@ -225,25 +134,7 @@ It is crucial to thoughtfully configure these settings to ensure the exported mo Augmentation techniques are essential for improving the robustness and performance of YOLO models by introducing variability into the training data, helping the model generalize better to unseen data. The following table outlines the purpose and effect of each augmentation argument: -| Argument | Type | Default | Range | Description | -| --------------- | ------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. | -| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. | -| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. | -| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. | -| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. | -| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. | -| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. | -| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. | -| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. | -| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. | -| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. | -| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. | -| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. | -| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies objects from one image and pastes them onto another, useful for increasing object instances and learning object occlusion. | -| `auto_augment` | `str` | `randaugment` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. | -| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. | -| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. | +{% include "macros/augmentation-args.md" %} These settings can be adjusted to meet the specific requirements of the dataset and task at hand. Experimenting with different values can help find the optimal augmentation strategy that leads to the best model performance. From e97782943b7b707ea2c9ddd65e1e80654ee77823 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Tue, 10 Sep 2024 05:52:57 +0800 Subject: [PATCH 04/80] `ultralytics 8.2.91` fix `v10DetectLoss` module rename for YOLOv10 (#16148) Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/nn/tasks.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index b45d97ce..5db85856 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.90" +__version__ = "8.2.91" import os diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py index 07a040d9..46974620 100644 --- a/ultralytics/nn/tasks.py +++ b/ultralytics/nn/tasks.py @@ -776,6 +776,7 @@ def torch_safe_load(weight): attributes={ "ultralytics.nn.modules.block.Silence": "torch.nn.Identity", # YOLOv9e "ultralytics.nn.tasks.YOLOv10DetectionModel": "ultralytics.nn.tasks.DetectionModel", # YOLOv10 + "ultralytics.utils.loss.v10DetectLoss": "ultralytics.utils.loss.E2EDetectLoss", # YOLOv10 }, ): ckpt = torch.load(file, map_location="cpu") From 1210b49cd2cb21bb70ed92b04f872317c18d1fbb Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 11 Sep 2024 00:32:58 +0200 Subject: [PATCH 05/80] Update merge-main-into-prs.yml (#16199) --- .github/workflows/docs.yml | 9 +++------ .github/workflows/merge-main-into-prs.yml | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d1c9810c..29012253 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ name: Publish Docs on: push: branches: [main] - pull_request_target: + pull_request: branches: [main] workflow_dispatch: @@ -81,21 +81,18 @@ jobs: fi - name: Publish Docs to https://docs.ultralytics.com if: github.event_name == 'push' - env: - PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - INDEXNOW_KEY: ${{ secrets.INDEXNOW_KEY_DOCS }} run: | git clone https://github.com/ultralytics/docs.git docs-repo cd docs-repo git checkout gh-pages || git checkout -b gh-pages rm -rf * cp -R ../site/* . - echo "$INDEXNOW_KEY" > "$INDEXNOW_KEY.txt" + echo "${{ secrets.INDEXNOW_KEY_DOCS }}" > "${{ secrets.INDEXNOW_KEY_DOCS }}.txt" git add . if git diff --staged --quiet; then echo "No changes to commit" else LATEST_HASH=$(git rev-parse --short=7 HEAD) git commit -m "Update Docs for 'ultralytics ${{ steps.check_pypi.outputs.version }} - $LATEST_HASH'" - git push https://$PERSONAL_ACCESS_TOKEN@github.com/ultralytics/docs.git gh-pages + git push https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/ultralytics/docs.git gh-pages fi diff --git a/.github/workflows/merge-main-into-prs.yml b/.github/workflows/merge-main-into-prs.yml index 438967a9..cb4cfbb6 100644 --- a/.github/workflows/merge-main-into-prs.yml +++ b/.github/workflows/merge-main-into-prs.yml @@ -33,8 +33,8 @@ jobs: import os import time - g = Github(os.getenv('GITHUB_TOKEN')) - repo = g.get_repo(os.getenv('GITHUB_REPOSITORY')) + g = Github("${{ secrets.PERSONAL_ACCESS_TOKEN }}") + repo = g.get_repo("${{ github.repository }}") # Fetch the default branch name default_branch_name = repo.default_branch @@ -86,6 +86,3 @@ jobs: print(f"Branches already up-to-date: {up_to_date_branches}") print(f"Total errors: {errors}") - env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} From 6b95967e080dcba832a7f505c7925d9137f51733 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 11 Sep 2024 21:27:32 +0500 Subject: [PATCH 06/80] Distance calculation docs fix (#16220) Co-authored-by: UltralyticsAssistant --- docs/en/guides/distance-calculation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/guides/distance-calculation.md b/docs/en/guides/distance-calculation.md index 656c7c96..905051a0 100644 --- a/docs/en/guides/distance-calculation.md +++ b/docs/en/guides/distance-calculation.md @@ -23,9 +23,9 @@ Measuring the gap between two objects is known as distance calculation within a ## Visuals -| Distance Calculation using Ultralytics YOLOv8 | -| :----------------------------------------------------------------------------------------------------------------------------------------------: | -| ![Ultralytics YOLOv8 Distance Calculation](https://github.com/ultralytics/docs/releases/download/0/ultralytics-yolov8-distance-calculation.avif) | +| Distance Calculation using Ultralytics YOLOv8 | +| :---------------------------------------------------------------------------------------------------------------------------: | +| ![Ultralytics YOLOv8 Distance Calculation](https://github.com/ultralytics/docs/releases/download/0/distance-calculation.avif) | ## Advantages of Distance Calculation? From b9f0983e8289f3359700dd7555b815078dc0d5f4 Mon Sep 17 00:00:00 2001 From: Jan Knobloch <116908874+jk4e@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:30:13 +0200 Subject: [PATCH 07/80] Update more/missing type qualifiers to lowercase MkDocs admonitions (#16215) Co-authored-by: Glenn Jocher --- docs/build_reference.py | 2 +- docs/en/datasets/classify/imagewoof.md | 2 +- docs/en/datasets/explorer/dashboard.md | 2 +- docs/en/datasets/explorer/index.md | 2 +- docs/en/datasets/segment/index.md | 2 +- .../guides/coral-edge-tpu-on-raspberry-pi.md | 8 ++-- docs/en/guides/distance-calculation.md | 2 +- .../guides/isolating-segmentation-objects.md | 2 +- docs/en/guides/ros-quickstart.md | 6 +-- docs/en/guides/security-alarm-system.md | 2 +- docs/en/hub/cloud-training.md | 12 +++--- docs/en/hub/datasets.md | 20 +++++----- docs/en/hub/inference-api.md | 8 ++-- docs/en/hub/integrations.md | 8 ++-- docs/en/hub/models.md | 38 +++++++++---------- docs/en/hub/pro.md | 4 +- docs/en/hub/projects.md | 28 +++++++------- docs/en/hub/quickstart.md | 8 ++-- docs/en/hub/teams.md | 18 ++++----- docs/en/models/yolo-world.md | 2 +- docs/en/modes/benchmark.md | 2 +- docs/en/modes/export.md | 2 +- docs/en/modes/predict.md | 2 +- docs/en/modes/train.md | 2 +- docs/en/modes/val.md | 2 +- docs/en/quickstart.md | 4 +- docs/en/reference/cfg/__init__.md | 2 +- docs/en/reference/data/annotator.md | 2 +- docs/en/reference/data/augment.md | 2 +- docs/en/reference/data/base.md | 2 +- docs/en/reference/data/build.md | 2 +- docs/en/reference/data/converter.md | 2 +- docs/en/reference/data/dataset.md | 2 +- docs/en/reference/data/explorer/explorer.md | 2 +- docs/en/reference/data/explorer/gui/dash.md | 2 +- docs/en/reference/data/explorer/utils.md | 2 +- docs/en/reference/data/loaders.md | 2 +- docs/en/reference/data/split_dota.md | 2 +- docs/en/reference/data/utils.md | 2 +- docs/en/reference/engine/exporter.md | 2 +- docs/en/reference/engine/model.md | 2 +- docs/en/reference/engine/predictor.md | 2 +- docs/en/reference/engine/results.md | 2 +- docs/en/reference/engine/trainer.md | 2 +- docs/en/reference/engine/tuner.md | 2 +- docs/en/reference/engine/validator.md | 2 +- docs/en/reference/hub/__init__.md | 2 +- docs/en/reference/hub/auth.md | 2 +- docs/en/reference/hub/google/__init__.md | 2 +- docs/en/reference/hub/session.md | 2 +- docs/en/reference/hub/utils.md | 2 +- docs/en/reference/models/fastsam/model.md | 2 +- docs/en/reference/models/fastsam/predict.md | 2 +- docs/en/reference/models/fastsam/utils.md | 2 +- docs/en/reference/models/fastsam/val.md | 2 +- docs/en/reference/models/nas/model.md | 2 +- docs/en/reference/models/nas/predict.md | 2 +- docs/en/reference/models/nas/val.md | 2 +- docs/en/reference/models/rtdetr/model.md | 2 +- docs/en/reference/models/rtdetr/predict.md | 2 +- docs/en/reference/models/rtdetr/train.md | 2 +- docs/en/reference/models/rtdetr/val.md | 2 +- docs/en/reference/models/sam/amg.md | 2 +- docs/en/reference/models/sam/build.md | 2 +- docs/en/reference/models/sam/model.md | 2 +- .../en/reference/models/sam/modules/blocks.md | 2 +- .../reference/models/sam/modules/decoders.md | 2 +- .../reference/models/sam/modules/encoders.md | 2 +- .../models/sam/modules/memory_attention.md | 2 +- docs/en/reference/models/sam/modules/sam.md | 2 +- .../models/sam/modules/tiny_encoder.md | 2 +- .../models/sam/modules/transformer.md | 2 +- docs/en/reference/models/sam/modules/utils.md | 2 +- docs/en/reference/models/sam/predict.md | 2 +- docs/en/reference/models/utils/loss.md | 2 +- docs/en/reference/models/utils/ops.md | 2 +- .../reference/models/yolo/classify/predict.md | 2 +- .../reference/models/yolo/classify/train.md | 2 +- docs/en/reference/models/yolo/classify/val.md | 2 +- .../reference/models/yolo/detect/predict.md | 2 +- docs/en/reference/models/yolo/detect/train.md | 2 +- docs/en/reference/models/yolo/detect/val.md | 2 +- docs/en/reference/models/yolo/model.md | 2 +- docs/en/reference/models/yolo/obb/predict.md | 2 +- docs/en/reference/models/yolo/obb/train.md | 2 +- docs/en/reference/models/yolo/obb/val.md | 2 +- docs/en/reference/models/yolo/pose/predict.md | 2 +- docs/en/reference/models/yolo/pose/train.md | 2 +- docs/en/reference/models/yolo/pose/val.md | 2 +- .../reference/models/yolo/segment/predict.md | 2 +- .../en/reference/models/yolo/segment/train.md | 2 +- docs/en/reference/models/yolo/segment/val.md | 2 +- docs/en/reference/models/yolo/world/train.md | 2 +- .../models/yolo/world/train_world.md | 2 +- docs/en/reference/nn/autobackend.md | 2 +- docs/en/reference/nn/modules/activation.md | 2 +- docs/en/reference/nn/modules/block.md | 2 +- docs/en/reference/nn/modules/conv.md | 2 +- docs/en/reference/nn/modules/head.md | 2 +- docs/en/reference/nn/modules/transformer.md | 2 +- docs/en/reference/nn/modules/utils.md | 2 +- docs/en/reference/nn/tasks.md | 2 +- docs/en/reference/solutions/ai_gym.md | 2 +- docs/en/reference/solutions/analytics.md | 2 +- .../solutions/distance_calculation.md | 2 +- docs/en/reference/solutions/heatmap.md | 2 +- docs/en/reference/solutions/object_counter.md | 2 +- .../reference/solutions/parking_management.md | 2 +- .../reference/solutions/queue_management.md | 2 +- .../reference/solutions/speed_estimation.md | 2 +- .../solutions/streamlit_inference.md | 2 +- docs/en/reference/trackers/basetrack.md | 2 +- docs/en/reference/trackers/bot_sort.md | 2 +- docs/en/reference/trackers/byte_tracker.md | 2 +- docs/en/reference/trackers/track.md | 2 +- docs/en/reference/trackers/utils/gmc.md | 2 +- .../reference/trackers/utils/kalman_filter.md | 2 +- docs/en/reference/trackers/utils/matching.md | 2 +- docs/en/reference/utils/__init__.md | 2 +- docs/en/reference/utils/autobatch.md | 2 +- docs/en/reference/utils/benchmarks.md | 2 +- docs/en/reference/utils/callbacks/base.md | 2 +- docs/en/reference/utils/callbacks/clearml.md | 2 +- docs/en/reference/utils/callbacks/comet.md | 2 +- docs/en/reference/utils/callbacks/dvc.md | 2 +- docs/en/reference/utils/callbacks/hub.md | 2 +- docs/en/reference/utils/callbacks/mlflow.md | 2 +- docs/en/reference/utils/callbacks/neptune.md | 2 +- docs/en/reference/utils/callbacks/raytune.md | 2 +- .../reference/utils/callbacks/tensorboard.md | 2 +- docs/en/reference/utils/callbacks/wb.md | 2 +- docs/en/reference/utils/checks.md | 2 +- docs/en/reference/utils/dist.md | 2 +- docs/en/reference/utils/downloads.md | 2 +- docs/en/reference/utils/errors.md | 2 +- docs/en/reference/utils/files.md | 2 +- docs/en/reference/utils/instance.md | 2 +- docs/en/reference/utils/loss.md | 2 +- docs/en/reference/utils/metrics.md | 2 +- docs/en/reference/utils/ops.md | 2 +- docs/en/reference/utils/patches.md | 2 +- docs/en/reference/utils/plotting.md | 2 +- docs/en/reference/utils/tal.md | 2 +- docs/en/reference/utils/torch_utils.md | 2 +- docs/en/reference/utils/triton.md | 2 +- docs/en/reference/utils/tuner.md | 2 +- docs/en/usage/cli.md | 12 +++--- docs/en/yolov5/tutorials/train_custom_data.md | 4 +- 148 files changed, 223 insertions(+), 223 deletions(-) diff --git a/docs/build_reference.py b/docs/build_reference.py index 77f9e7ba..104135bf 100644 --- a/docs/build_reference.py +++ b/docs/build_reference.py @@ -59,7 +59,7 @@ def create_markdown(py_filepath: Path, module_path: str, classes: list, function pretty = url.replace("__init__.py", "\\_\\_init\\_\\_.py") # properly display __init__.py filenames title_content = ( f"# Reference for `{module_path}.py`\n\n" - f"!!! Note\n\n" + f"!!! note\n\n" f" This file is available at [{pretty}]({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" ) diff --git a/docs/en/datasets/classify/imagewoof.md b/docs/en/datasets/classify/imagewoof.md index 3abb512a..54361abc 100644 --- a/docs/en/datasets/classify/imagewoof.md +++ b/docs/en/datasets/classify/imagewoof.md @@ -59,7 +59,7 @@ ImageWoof dataset comes in three different sizes to accommodate various research To use these variants in your training, simply replace 'imagewoof' in the dataset argument with 'imagewoof320' or 'imagewoof160'. For example: -!!! example "Example" +!!! example === "Python" diff --git a/docs/en/datasets/explorer/dashboard.md b/docs/en/datasets/explorer/dashboard.md index ed5760be..160d2b7a 100644 --- a/docs/en/datasets/explorer/dashboard.md +++ b/docs/en/datasets/explorer/dashboard.md @@ -29,7 +29,7 @@ Explorer GUI is like a playground build using [Ultralytics Explorer API](api.md) pip install ultralytics[explorer] ``` -!!! note "Note" +!!! note Ask AI feature works using OpenAI, so you'll be prompted to set the api key for OpenAI when you first run the GUI. You can set it like this - `yolo settings openai_api_key="..."` diff --git a/docs/en/datasets/explorer/index.md b/docs/en/datasets/explorer/index.md index c709aa2a..d1092a76 100644 --- a/docs/en/datasets/explorer/index.md +++ b/docs/en/datasets/explorer/index.md @@ -50,7 +50,7 @@ The GUI demo runs in your browser allowing you to create embeddings for your dat yolo explorer ``` -!!! note "Note" +!!! note Ask AI feature works using OpenAI, so you'll be prompted to set the api key for OpenAI when you first run the GUI. You can set it like this - `yolo settings openai_api_key="..."` diff --git a/docs/en/datasets/segment/index.md b/docs/en/datasets/segment/index.md index 838dda2c..4d39fc12 100644 --- a/docs/en/datasets/segment/index.md +++ b/docs/en/datasets/segment/index.md @@ -33,7 +33,7 @@ Here is an example of the YOLO dataset format for a single image with two object 1 0.504 0.000 0.501 0.004 0.498 0.004 0.493 0.010 0.492 0.0104 ``` -!!! tip "Tip" +!!! tip - The length of each row does **not** have to be equal. - Each segmentation label must have a **minimum of 3 xy points**: ` ` diff --git a/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md b/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md index ca091690..8f8f0767 100644 --- a/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md +++ b/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md @@ -85,7 +85,7 @@ After installing the runtime, you need to plug in your Coral Edge TPU into a USB To use the Edge TPU, you need to convert your model into a compatible format. It is recommended that you run export on Google Colab, x86_64 Linux machine, using the official [Ultralytics Docker container](docker-quickstart.md), or using [Ultralytics HUB](../hub/quickstart.md), since the Edge TPU compiler is not available on ARM. See the [Export Mode](../modes/export.md) for the available arguments. -!!! exporting the model +!!! note "Exporting the model" === "Python" @@ -111,7 +111,7 @@ The exported model will be saved in the `_saved_model/` folder with After exporting your model, you can run inference with it using the following code: -!!! running the model +!!! note "Running the model" === "Python" @@ -170,7 +170,7 @@ Make sure to uninstall any previous Coral Edge TPU runtime versions by following Yes, you can export your Ultralytics YOLOv8 model to be compatible with the Coral Edge TPU. It is recommended to perform the export on Google Colab, an x86_64 Linux machine, or using the [Ultralytics Docker container](docker-quickstart.md). You can also use Ultralytics HUB for exporting. Here is how you can export your model using Python and CLI: -!!! exporting the model +!!! note "Exporting the model" === "Python" @@ -212,7 +212,7 @@ For a specific wheel, such as TensorFlow 2.15.0 `tflite-runtime`, you can downlo After exporting your YOLOv8 model to an Edge TPU-compatible format, you can run inference using the following code snippets: -!!! running the model +!!! note "Running the model" === "Python" diff --git a/docs/en/guides/distance-calculation.md b/docs/en/guides/distance-calculation.md index 905051a0..a805b95e 100644 --- a/docs/en/guides/distance-calculation.md +++ b/docs/en/guides/distance-calculation.md @@ -73,7 +73,7 @@ Measuring the gap between two objects is known as distance calculation within a cv2.destroyAllWindows() ``` -???+ tip "Note" +???+ note - Mouse Right Click will delete all drawn points - Mouse Left Click can be used to draw points diff --git a/docs/en/guides/isolating-segmentation-objects.md b/docs/en/guides/isolating-segmentation-objects.md index 9f099c8c..0954dc19 100644 --- a/docs/en/guides/isolating-segmentation-objects.md +++ b/docs/en/guides/isolating-segmentation-objects.md @@ -137,7 +137,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab ### Object Isolation Options - !!! example "" + !!! example === "Black Background Pixels" diff --git a/docs/en/guides/ros-quickstart.md b/docs/en/guides/ros-quickstart.md index c0691ffa..227286de 100644 --- a/docs/en/guides/ros-quickstart.md +++ b/docs/en/guides/ros-quickstart.md @@ -129,7 +129,7 @@ while True: rospy.spin() ``` -??? Example "Complete code" +??? example "Complete code" ```python import time @@ -297,7 +297,7 @@ while True: rospy.spin() ``` -??? Example "Complete code" +??? example "Complete code" ```python import time @@ -448,7 +448,7 @@ for index, class_id in enumerate(classes): o3d.visualization.draw_geometries([pcd]) ``` -??? Example "Complete code" +??? example "Complete code" ```python import sys diff --git a/docs/en/guides/security-alarm-system.md b/docs/en/guides/security-alarm-system.md index 78bc2a9c..7e7051b6 100644 --- a/docs/en/guides/security-alarm-system.md +++ b/docs/en/guides/security-alarm-system.md @@ -29,7 +29,7 @@ The Security Alarm System Project utilizing Ultralytics YOLOv8 integrates advanc #### Set up the parameters of the message -???+ tip "Note" +???+ note App Password Generation is necessary diff --git a/docs/en/hub/cloud-training.md b/docs/en/hub/cloud-training.md index 42dd6810..557e2847 100644 --- a/docs/en/hub/cloud-training.md +++ b/docs/en/hub/cloud-training.md @@ -28,7 +28,7 @@ Follow the [Train Model](./models.md#train-model) instructions from the [Models] ![Ultralytics HUB screenshot of the Train Model dialog with arrows pointing to the Cloud Training options and the Start Training button](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-dialog.avif) -??? note "Note" +??? note When you are on this step, you have the option to close the **Train Model** dialog and start training your model from the Model page later. @@ -36,13 +36,13 @@ Follow the [Train Model](./models.md#train-model) instructions from the [Models] Most of the times, you will use the Epochs training. The number of epochs can be adjusted on this step (if the training didn't start yet) and represents the number of times your dataset needs to go through the cycle of train, label, and test. The exact pricing based on the number of epochs is hard to determine, reason why we only allow the [Account Balance](./pro.md#account-balance) payment method. -!!! note "Note" +!!! note When using the Epochs training, your [account balance](./pro.md#account-balance) needs to be at least US$5.00 to start training. In case you have a low balance, you can top-up directly from this step. ![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Top-Up button](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-dialog-top-up.avif) -!!! note "Note" +!!! note When using the Epochs training, the [account balance](./pro.md#account-balance) is deducted after every epoch. @@ -64,7 +64,7 @@ Before the training session starts, the initialization process spins up a dedica ![Ultralytics HUB screenshot of the Model page during the initialization process](https://github.com/ultralytics/docs/releases/download/0/model-page-initialization-process.avif) -!!! note "Note" +!!! note The account balance is not deducted during the initialization process (before the training session starts). @@ -74,7 +74,7 @@ If needed, you can stop the training by clicking on the **Stop Training** button ![Ultralytics HUB screenshot of the Model page of a model that is currently training with an arrow pointing to the Stop Training button](https://github.com/ultralytics/docs/releases/download/0/model-page-training-stop-button.avif) -!!! note "Note" +!!! note You can resume training your model from the last checkpoint saved. @@ -90,7 +90,7 @@ If needed, you can stop the training by clicking on the **Stop Training** button Watch: Pause and Resume Model Training Using Ultralytics HUB

-!!! note "Note" +!!! note Unfortunately, at the moment, you can only train one model at a time using Ultralytics Cloud. diff --git a/docs/en/hub/datasets.md b/docs/en/hub/datasets.md index a323508b..40d76f54 100644 --- a/docs/en/hub/datasets.md +++ b/docs/en/hub/datasets.md @@ -58,7 +58,7 @@ Once your dataset ZIP is ready, navigate to the [Datasets](https://hub.ultralyti ![Ultralytics HUB screenshot of the Datasets page with an arrow pointing to the Datasets button in the sidebar and one to the Upload Dataset button](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-datasets-upload.avif) -??? tip "Tip" +??? tip You can upload a dataset directly from the [Home](https://hub.ultralytics.com/home) page. @@ -82,7 +82,7 @@ You can view the images in your dataset grouped by splits (Train, Validation, Te ![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Images tab](https://github.com/ultralytics/docs/releases/download/0/hub-dataset-page-images-tab.avif) -??? tip "Tip" +??? tip Each image can be enlarged for better visualization. @@ -104,7 +104,7 @@ Navigate to the Dataset page of the dataset you want to download, open the datas ![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Download option](https://github.com/ultralytics/docs/releases/download/0/hub-download-dataset-1.avif) -??? tip "Tip" +??? tip You can download a dataset directly from the [Datasets](https://hub.ultralytics.com/datasets) page. @@ -112,11 +112,11 @@ Navigate to the Dataset page of the dataset you want to download, open the datas ## Share Dataset -!!! info "Info" +!!! info [Ultralytics HUB](https://www.ultralytics.com/hub)'s sharing functionality provides a convenient way to share datasets with others. This feature is designed to accommodate both existing [Ultralytics HUB](https://www.ultralytics.com/hub) users and those who have yet to create an account. -!!! note "Note" +!!! note You have control over the general access of your datasets. @@ -126,7 +126,7 @@ Navigate to the Dataset page of the dataset you want to share, open the dataset ![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Share option](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-share-dataset.avif) -??? tip "Tip" +??? tip You can share a dataset directly from the [Datasets](https://hub.ultralytics.com/datasets) page. @@ -138,7 +138,7 @@ Set the general access to "Unlisted" and click **Save**. Now, anyone who has the direct link to your dataset can view it. -??? tip "Tip" +??? tip You can easily click on the dataset's link shown in the **Share Dataset** dialog to copy it. @@ -150,7 +150,7 @@ Navigate to the Dataset page of the dataset you want to edit, open the dataset a ![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Edit option](https://github.com/ultralytics/docs/releases/download/0/hub-edit-dataset-1.avif) -??? tip "Tip" +??? tip You can edit a dataset directly from the [Datasets](https://hub.ultralytics.com/datasets) page. @@ -166,13 +166,13 @@ Navigate to the Dataset page of the dataset you want to delete, open the dataset ![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Delete option](https://github.com/ultralytics/docs/releases/download/0/hub-delete-dataset-option.avif) -??? tip "Tip" +??? tip You can delete a dataset directly from the [Datasets](https://hub.ultralytics.com/datasets) page. ![Ultralytics HUB screenshot of the Datasets page with an arrow pointing to the Delete option of one of the datasets](https://github.com/ultralytics/docs/releases/download/0/hub-delete-dataset-page.avif) -!!! note "Note" +!!! note If you change your mind, you can restore the dataset from the [Trash](https://hub.ultralytics.com/trash) page. diff --git a/docs/en/hub/inference-api.md b/docs/en/hub/inference-api.md index 845802a8..4146599f 100644 --- a/docs/en/hub/inference-api.md +++ b/docs/en/hub/inference-api.md @@ -24,7 +24,7 @@ After you [train a model](./models.md#train-model), you can use the [Shared Infe In response to high demand and widespread interest, we are thrilled to unveil the [Ultralytics HUB](https://www.ultralytics.com/hub) Dedicated Inference API, offering single-click deployment in a dedicated environment for our [Pro](./pro.md) users! -!!! note "Note" +!!! note We are excited to offer this feature FREE during our public beta as part of the [Pro Plan](./pro.md), with paid tiers possible in the future. @@ -37,7 +37,7 @@ To use the [Ultralytics HUB](https://www.ultralytics.com/hub) Dedicated Inferenc ![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Start Endpoint button in Dedicated Inference API card](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-dedicated-inference-api.avif) -!!! tip "Tip" +!!! tip Choose the region with the lowest latency for the best performance as described in the [documentation](https://docs.ultralytics.com/reference/hub/google/__init__). @@ -83,7 +83,7 @@ with open("path/to/image.jpg", "rb") as image_file: print(response.json()) ``` -!!! note "Note" +!!! note Replace `MODEL_ID` with the desired model ID, `API_KEY` with your actual API key, and `path/to/image.jpg` with the path to the image you want to run inference on. @@ -102,7 +102,7 @@ curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ -F "iou=0.45" ``` -!!! note "Note" +!!! note Replace `MODEL_ID` with the desired model ID, `API_KEY` with your actual API key, and `path/to/image.jpg` with the path to the image you want to run inference on. diff --git a/docs/en/hub/integrations.md b/docs/en/hub/integrations.md index 2e8a8ef4..6885f076 100644 --- a/docs/en/hub/integrations.md +++ b/docs/en/hub/integrations.md @@ -44,7 +44,7 @@ Navigate to the Dataset page of the [Roboflow](https://roboflow.com/?ref=ultraly ![Ultralytics HUB screenshot of the Dataset page of a Roboflow Universe dataset with an arrow pointing to the Remove option](https://github.com/ultralytics/docs/releases/download/0/hub-roboflow-universe-remove.avif) -??? tip "Tip" +??? tip You can remove an imported [Roboflow](https://roboflow.com/?ref=ultralytics) dataset directly from the [Datasets](https://hub.ultralytics.com/datasets) page. @@ -60,7 +60,7 @@ Navigate to the [Integrations](https://hub.ultralytics.com/settings?tab=integrat Type your [Roboflow](https://roboflow.com/?ref=ultralytics) Workspace private API key and click on the **Add** button. -??? tip "Tip" +??? tip You can click on the **Get my API key** button which will redirect you to the settings of your [Roboflow](https://roboflow.com/?ref=ultralytics) Workspace from where you can obtain your private API key. @@ -80,13 +80,13 @@ Navigate to the [Integrations](https://hub.ultralytics.com/settings?tab=integrat ![Ultralytics HUB screenshot of the Integrations page with an arrow pointing to the Integrations button in the sidebar and one to the Unlink button of one of the connected workspaces](https://github.com/ultralytics/docs/releases/download/0/hub-roboflow-workspace-remove-1.avif) -??? tip "Tip" +??? tip You can remove a connected [Roboflow](https://roboflow.com/?ref=ultralytics) Workspace directly from the Dataset page of one of the datasets from your [Roboflow](https://roboflow.com/?ref=ultralytics) Workspace. ![Ultralytics HUB screenshot of the Dataset page of a Roboflow Workspace dataset with an arrow pointing to the remove option](https://github.com/ultralytics/docs/releases/download/0/hub-roboflow-workspace-remove-2.avif) -??? tip "Tip" +??? tip You can remove a connected [Roboflow](https://roboflow.com/?ref=ultralytics) Workspace directly from the [Datasets](https://hub.ultralytics.com/datasets) page. diff --git a/docs/en/hub/models.md b/docs/en/hub/models.md index 60b02342..90dfc792 100644 --- a/docs/en/hub/models.md +++ b/docs/en/hub/models.md @@ -26,7 +26,7 @@ Navigate to the [Models](https://hub.ultralytics.com/models) page by clicking on ![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Models button in the sidebar and one to the Train Model button](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-page.avif) -??? tip "Tip" +??? tip You can train a model directly from the [Home](https://hub.ultralytics.com/home) page. @@ -40,7 +40,7 @@ In this step, you have to select the dataset you want to train your model on. Af ![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to a dataset and one to the Continue button](https://github.com/ultralytics/docs/releases/download/0/hub-train-model-dialog-dataset-step.avif) -??? tip "Tip" +??? tip You can skip this step if you train a model directly from the Dataset page. @@ -52,7 +52,7 @@ In this step, you have to choose the project in which you want to create your mo ![Ultralytics HUB screenshot of the Train Model dialog with arrows pointing to the project dropdown, model name and Continue button](https://github.com/ultralytics/docs/releases/download/0/hub-train-model-dialog.avif) -??? note "Note" +??? note Ultralytics HUB will try to pre-select the project. @@ -64,7 +64,7 @@ In this step, you have to choose the project in which you want to create your mo In case you don't have a project created yet, you can set the name of your project in this step and it will be created together with your model. -!!! info "Info" +!!! info You can read more about the available [YOLOv8](https://docs.ultralytics.com/models/yolov8) (and [YOLOv5](https://docs.ultralytics.com/models/yolov5)) architectures in our documentation. @@ -72,7 +72,7 @@ By default, your model will use a pre-trained model (trained on the [COCO](https ![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Advanced Model Configuration accordion](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-dialog-2.avif) -!!! note "Note" +!!! note You can easily change the most common model configuration options (such as the number of epochs) but you can also use the **Custom** option to access all [Train Settings](https://docs.ultralytics.com/modes/train/#train-settings) relevant to [Ultralytics HUB](https://www.ultralytics.com/hub). @@ -97,7 +97,7 @@ When you're happy with your model configuration, click **Continue**. In this step, you will start training you model. -??? note "Note" +??? note When you are on this step, you have the option to close the **Train Model** dialog and start training your model from the Model page later. @@ -133,7 +133,7 @@ When the training starts, you can click **Done** and monitor the training progre ![Ultralytics HUB screenshot of the Model page of a model that is currently training](https://github.com/ultralytics/docs/releases/download/0/hub-train-model-progress.avif) -!!! note "Note" +!!! note In case the training stops and a checkpoint was saved, you can resume training your model from the Model page. @@ -169,7 +169,7 @@ When the training starts, you can click **Done** and monitor the training progre ![Ultralytics HUB screenshot of the Model page of a model that is currently training](https://github.com/ultralytics/docs/releases/download/0/model-training-progress.avif) -!!! note "Note" +!!! note In case the training stops and a checkpoint was saved, you can resume training your model from the Model page. @@ -187,7 +187,7 @@ To access all model metrics, click on the **Charts** tab. ![Ultralytics HUB screenshot of the Preview tab inside the Model page with an arrow pointing to the Charts tab](https://github.com/ultralytics/docs/releases/download/0/hub-analyze-model-2.avif) -??? tip "Tip" +??? tip Each chart can be enlarged for better visualization. @@ -207,7 +207,7 @@ In the **Test** card, you can select a preview image from the dataset used durin ![Ultralytics HUB screenshot of the Preview tab inside the Model page with an arrow pointing to Charts tab and one to the Test card](https://github.com/ultralytics/docs/releases/download/0/hub-preview-model-charts-test-card.avif) -!!! note "Note" +!!! note You can also use your camera to take a picture and run inference on it directly. @@ -223,13 +223,13 @@ After you [train a model](#train-model), you can export it to 13 different forma ![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Export card and all formats exported](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-deploy-export-formats.avif) -??? tip "Tip" +??? tip You can customize the export options of each format if you open the export actions dropdown and click on the **Advanced** option. ![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Advanced option of one of the formats](https://github.com/ultralytics/docs/releases/download/0/hub-deploy-model-advanced-option.avif) -!!! note "Note" +!!! note You can re-export each format if you open the export actions dropdown and click on the **Advanced** option. @@ -241,11 +241,11 @@ Read the [Ultralytics Inference API](./inference-api.md) documentation for more ## Share Model -!!! info "Info" +!!! info [Ultralytics HUB](https://www.ultralytics.com/hub)'s sharing functionality provides a convenient way to share models with others. This feature is designed to accommodate both existing [Ultralytics HUB](https://www.ultralytics.com/hub) users and those who have yet to create an account. -??? note "Note" +??? note You have control over the general access of your models. @@ -255,7 +255,7 @@ Navigate to the Model page of the model you want to share, open the model action ![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Share option](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-share-model.avif) -??? tip "Tip" +??? tip You can also share a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located. @@ -267,7 +267,7 @@ Set the general access to "Unlisted" and click **Save**. Now, anyone who has the direct link to your model can view it. -??? tip "Tip" +??? tip You can easily click on the model's link shown in the **Share Model** dialog to copy it. @@ -279,7 +279,7 @@ Navigate to the Model page of the model you want to edit, open the model actions ![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Edit option](https://github.com/ultralytics/docs/releases/download/0/hub-edit-model-1.avif) -??? tip "Tip" +??? tip You can also edit a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located. @@ -295,13 +295,13 @@ Navigate to the Model page of the model you want to delete, open the model actio ![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Delete option](https://github.com/ultralytics/docs/releases/download/0/hub-delete-model-1.avif) -??? tip "Tip" +??? tip You can also delete a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located. ![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Delete option of one of the models](https://github.com/ultralytics/docs/releases/download/0/hub-delete-model-2.avif) -!!! note "Note" +!!! note If you change your mind, you can restore the model from the [Trash](https://hub.ultralytics.com/trash) page. diff --git a/docs/en/hub/pro.md b/docs/en/hub/pro.md index c20e8802..207ec1c6 100644 --- a/docs/en/hub/pro.md +++ b/docs/en/hub/pro.md @@ -26,7 +26,7 @@ Next, select the Pro Plan. ![Ultralytics HUB screenshot of the Upgrade dialog with an arrow pointing to the Select Plan button](https://github.com/ultralytics/docs/releases/download/0/hub-pro-upgrade-select-plan.avif) -!!! tip "Tip" +!!! tip You can save 20% if you choose the annual Pro Plan. @@ -36,7 +36,7 @@ Fill in your details during the checkout. ![Ultralytics HUB screenshot of the Checkout with an arrow pointing to the checkbox for saving the payment information for future purchases](https://github.com/ultralytics/docs/releases/download/0/hub-pro-upgrade-save-payment-info.avif) -!!! tip "Tip" +!!! tip We recommend ticking the checkbox to save your payment information for future purchases, facilitating easier top-ups to your account balance. diff --git a/docs/en/hub/projects.md b/docs/en/hub/projects.md index 253f64bc..a07abb0b 100644 --- a/docs/en/hub/projects.md +++ b/docs/en/hub/projects.md @@ -26,7 +26,7 @@ Navigate to the [Projects](https://hub.ultralytics.com/projects) page by clickin ![Ultralytics HUB screenshot of the Projects page with an arrow pointing to the Projects button in the sidebar and one to the Create Project button](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-create-project-page.avif) -??? tip "Tip" +??? tip You can create a project directly from the [Home](https://hub.ultralytics.com/home) page. @@ -52,11 +52,11 @@ Next, [train a model](./models.md#train-model) inside your project. ## Share Project -!!! info "Info" +!!! info [Ultralytics HUB](https://www.ultralytics.com/hub)'s sharing functionality provides a convenient way to share projects with others. This feature is designed to accommodate both existing [Ultralytics HUB](https://www.ultralytics.com/hub) users and those who have yet to create an account. -??? note "Note" +??? note You have control over the general access of your projects. @@ -66,7 +66,7 @@ Navigate to the Project page of the project you want to share, open the project ![Ultralytics HUB screenshot of the Project page with an arrow pointing to the Share option](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-share-project-dialog.avif) -??? tip "Tip" +??? tip You can share a project directly from the [Projects](https://hub.ultralytics.com/projects) page. @@ -76,13 +76,13 @@ Set the general access to "Unlisted" and click **Save**. ![Ultralytics HUB screenshot of the Share Project dialog with an arrow pointing to the dropdown and one to the Save button](https://github.com/ultralytics/docs/releases/download/0/hub-share-project-dialog.avif) -!!! warning "Warning" +!!! warning When changing the general access of a project, the general access of the models inside the project will be changed as well. Now, anyone who has the direct link to your project can view it. -??? tip "Tip" +??? tip You can easily click on the project's link shown in the **Share Project** dialog to copy it. @@ -94,7 +94,7 @@ Navigate to the Project page of the project you want to edit, open the project a ![Ultralytics HUB screenshot of the Project page with an arrow pointing to the Edit option](https://github.com/ultralytics/docs/releases/download/0/hub-edit-project-1.avif) -??? tip "Tip" +??? tip You can edit a project directly from the [Projects](https://hub.ultralytics.com/projects) page. @@ -110,17 +110,17 @@ Navigate to the Project page of the project you want to delete, open the project ![Ultralytics HUB screenshot of the Project page with an arrow pointing to the Delete option](https://github.com/ultralytics/docs/releases/download/0/hub-delete-project-option.avif) -??? tip "Tip" +??? tip You can delete a project directly from the [Projects](https://hub.ultralytics.com/projects) page. ![Ultralytics HUB screenshot of the Projects page with an arrow pointing to the Delete option of one of the projects](https://github.com/ultralytics/docs/releases/download/0/hub-delete-project-option-1.avif) -!!! warning "Warning" +!!! warning When deleting a project, the models inside the project will be deleted as well. -!!! note "Note" +!!! note If you change your mind, you can restore the project from the [Trash](https://hub.ultralytics.com/trash) page. @@ -136,7 +136,7 @@ This will display all the relevant charts. Each chart corresponds to a different ![Ultralytics HUB screenshot of the Charts tab inside the Project page](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-charts-tab.avif) -??? tip "Tip" +??? tip Each chart can be enlarged for better visualization. @@ -148,7 +148,7 @@ This will display all the relevant charts. Each chart corresponds to a different ![Ultralytics HUB screenshot of the Charts tab inside the Project page with one of the charts expanded and zoomed](https://github.com/ultralytics/docs/releases/download/0/hub-charts-tab-expanded-zoomed.avif) -??? tip "Tip" +??? tip You have the flexibility to customize your view by selectively hiding certain models. This feature allows you to concentrate on the models of interest. @@ -156,7 +156,7 @@ This will display all the relevant charts. Each chart corresponds to a different ## Reorder Models -??? note "Note" +??? note Ultralytics HUB's reordering functionality works only inside projects you own. @@ -170,7 +170,7 @@ Navigate to the Project page of the project where the model you want to mode is ![Ultralytics HUB screenshot of the Project page with an arrow pointing to the Transfer option of one of the models](https://github.com/ultralytics/docs/releases/download/0/hub-transfer-models-1.avif) -??? tip "Tip" +??? tip You can also transfer a model directly from the [Models](https://hub.ultralytics.com/models) page. diff --git a/docs/en/hub/quickstart.md b/docs/en/hub/quickstart.md index 3fb3c877..e73105d5 100644 --- a/docs/en/hub/quickstart.md +++ b/docs/en/hub/quickstart.md @@ -28,7 +28,7 @@ During the signup, you will be asked to complete your profile. ![Ultralytics HUB screenshot of the Signup page profile form](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-signup-profile-form.avif) -??? tip "Tip" +??? tip You can update your profile from the [Account](https://hub.ultralytics.com/settings?tab=account) tab on the [Settings](https://hub.ultralytics.com/settings) page. @@ -80,7 +80,7 @@ We value your feedback! Feel free to leave a review at any time. ![Ultralytics HUB screenshot of the Feedback dialog](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-feedback-dialog.avif) -??? info "Info" +??? info Only our team will see your feedback, and we will use it to improve our platform. @@ -90,12 +90,12 @@ If you encounter any issues or have questions, we're here to assist you. You can report a bug, request a feature, or ask a question on GitHub. -!!! note "Note" +!!! note When reporting a bug, please include your Environment Details from the [Support](https://hub.ultralytics.com/support) page. ![Ultralytics HUB screenshot of the Support page with an arrow pointing to Support button in the sidebar and one to the Copy Environment Details button](https://github.com/ultralytics/docs/releases/download/0/hub-support-page.avif) -??? tip "Tip" +??? tip You can join our Discord community for questions and discussions! diff --git a/docs/en/hub/teams.md b/docs/en/hub/teams.md index 1fee1cf5..f7bbf459 100644 --- a/docs/en/hub/teams.md +++ b/docs/en/hub/teams.md @@ -10,13 +10,13 @@ We're excited to introduce you to the new Teams feature within [Ultralytics HUB] Here, you'll learn how to manage team members, share resources seamlessly, and collaborate efficiently on various projects. -!!! note "Note" +!!! note As this is a new feature, we're still in the process of developing and refining it to ensure it meets your needs. ## Create Team -!!! note "Note" +!!! note You need to [upgrade](./pro.md#upgrade) to the [Pro Plan](./pro.md) in order to create a team. @@ -56,7 +56,7 @@ Navigate to the [Teams](https://hub.ultralytics.com/settings?tab=teams) page, op ![Ultralytics HUB screenshot of the Teams page with an arrow pointing to the Delete option of one of the teams](https://github.com/ultralytics/docs/releases/download/0/hub-delete-team-option.avif) -!!! warning "Warning" +!!! warning When deleting a team, the team can't be restored. @@ -72,7 +72,7 @@ Type the email and select the role of the new member and click **Invite**. ![Ultralytics HUB screenshot of the Team page with a new member invited](https://github.com/ultralytics/docs/releases/download/0/hub-invite-member-3.avif) -??? tip "Tip" +??? tip You can cancel the invite before the new member accepts it. @@ -82,7 +82,7 @@ The **Pending** status disappears after the new member accepts the invite. ![Ultralytics HUB screenshot of the Team page with two members](https://github.com/ultralytics/docs/releases/download/0/team-page-two-members.avif) -??? tip "Tip" +??? tip You can update a member's role at any time. @@ -132,7 +132,7 @@ If you don't want to join the team, click on the **Reject Invitation** button. ![Ultralytics HUB screenshot of the Team page with an arrow pointing to the Reject Invitation button](https://github.com/ultralytics/docs/releases/download/0/hub-join-team-reject-invitation.avif) -??? tip "Tip" +??? tip You can join the team directly from the [Teams](https://hub.ultralytics.com/settings?tab=teams) page. @@ -158,7 +158,7 @@ That's it! Your team now has access to your dataset. ![Ultralytics HUB screenshot of the Team page with a dataset shared](https://github.com/ultralytics/docs/releases/download/0/hub-share-dataset-team-page.avif) -??? tip "Tip" +??? tip As a team owner or team admin, you can remove a shared dataset. @@ -178,13 +178,13 @@ That's it! Your team now has access to your project. ![Ultralytics HUB screenshot of the Team page with a project shared](https://github.com/ultralytics/docs/releases/download/0/team-page-project-shared.avif) -??? tip "Tip" +??? tip As a team owner or team admin, you can remove a shared project. ![Ultralytics HUB screenshot of the Team page with an arrow pointing to the Remove option of one of the projects shared](https://github.com/ultralytics/docs/releases/download/0/hub-share-project-remove-option.avif) -!!! note "Note" +!!! note When you share a project with your team, all models inside the project are shared as well. diff --git a/docs/en/models/yolo-world.md b/docs/en/models/yolo-world.md index 06b69798..f5dcd0b7 100644 --- a/docs/en/models/yolo-world.md +++ b/docs/en/models/yolo-world.md @@ -77,7 +77,7 @@ The YOLO-World models are easy to integrate into your Python applications. Ultra ### Train Usage -!!! tip "Tip" +!!! tip We strongly recommend to use `yolov8-worldv2` model for custom training, because it supports deterministic training and also easy to export other formats i.e onnx/tensorrt. diff --git a/docs/en/modes/benchmark.md b/docs/en/modes/benchmark.md index 8e24c0a0..bdce015e 100644 --- a/docs/en/modes/benchmark.md +++ b/docs/en/modes/benchmark.md @@ -43,7 +43,7 @@ Once your model is trained and validated, the next logical step is to evaluate i - **OpenVINO:** For Intel hardware optimization - **CoreML, TensorFlow SavedModel, and More:** For diverse deployment needs. -!!! tip "Tip" +!!! tip * Export to ONNX or OpenVINO for up to 3x CPU speedup. * Export to TensorRT for up to 5x GPU speedup. diff --git a/docs/en/modes/export.md b/docs/en/modes/export.md index bd14bfd9..44334394 100644 --- a/docs/en/modes/export.md +++ b/docs/en/modes/export.md @@ -39,7 +39,7 @@ Here are some of the standout functionalities: - **Optimized Inference:** Exported models are optimized for quicker inference times. - **Tutorial Videos:** In-depth guides and tutorials for a smooth exporting experience. -!!! tip "Tip" +!!! tip * Export to [ONNX](../integrations/onnx.md) or [OpenVINO](../integrations/openvino.md) for up to 3x CPU speedup. * Export to [TensorRT](../integrations/tensorrt.md) for up to 5x GPU speedup. diff --git a/docs/en/modes/predict.md b/docs/en/modes/predict.md index f9a832f3..3bda0c07 100644 --- a/docs/en/modes/predict.md +++ b/docs/en/modes/predict.md @@ -100,7 +100,7 @@ Ultralytics YOLO models return either a Python list of `Results` objects, or a m YOLOv8 can process different types of input sources for inference, as shown in the table below. The sources include static images, video streams, and various data formats. The table also indicates whether each source can be used in streaming mode with the argument `stream=True` ✅. Streaming mode is beneficial for processing videos or live streams as it creates a generator of results instead of loading all frames into memory. -!!! tip "Tip" +!!! tip Use `stream=True` for processing long videos or large datasets to efficiently manage memory. When `stream=False`, the results for all frames or data points are stored in memory, which can quickly add up and cause out-of-memory errors for large inputs. In contrast, `stream=True` utilizes a generator, which only keeps the results of the current frame or data point in memory, significantly reducing memory consumption and preventing out-of-memory issues. diff --git a/docs/en/modes/train.md b/docs/en/modes/train.md index 03348b6c..7ac428d6 100644 --- a/docs/en/modes/train.md +++ b/docs/en/modes/train.md @@ -41,7 +41,7 @@ The following are some notable features of YOLOv8's Train mode: - **Hyperparameter Configuration:** The option to modify hyperparameters through YAML configuration files or CLI arguments. - **Visualization and Monitoring:** Real-time tracking of training metrics and visualization of the learning process for better insights. -!!! tip "Tip" +!!! tip * YOLOv8 datasets like COCO, VOC, ImageNet and many others automatically download on first use, i.e. `yolo train data=coco.yaml` diff --git a/docs/en/modes/val.md b/docs/en/modes/val.md index 58fdc906..1cbd900d 100644 --- a/docs/en/modes/val.md +++ b/docs/en/modes/val.md @@ -41,7 +41,7 @@ These are the notable functionalities offered by YOLOv8's Val mode: - **CLI and Python API:** Choose from command-line interface or Python API based on your preference for validation. - **Data Compatibility:** Works seamlessly with datasets used during the training phase as well as custom datasets. -!!! tip "Tip" +!!! tip * YOLOv8 models automatically remember their training settings, so you can validate a model at the same image size and on the original dataset easily with just `yolo val model=yolov8n.pt` or `model('yolov8n.pt').val()` diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md index f8d3a7cf..a844dbbe 100644 --- a/docs/en/quickstart.md +++ b/docs/en/quickstart.md @@ -141,7 +141,7 @@ Ultralytics provides various installation methods including pip, conda, and Dock See the `ultralytics` [pyproject.toml](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) file for a list of dependencies. Note that all examples above install all required dependencies. -!!! tip "Tip" +!!! tip PyTorch requirements vary by operating system and CUDA requirements, so it's recommended to install PyTorch first following instructions at [https://pytorch.org/get-started/locally](https://pytorch.org/get-started/locally/). @@ -208,7 +208,7 @@ The Ultralytics command line interface (CLI) allows for simple single-line comma yolo cfg ``` -!!! warning "Warning" +!!! warning Arguments must be passed as `arg=val` pairs, split by an equals `=` sign and delimited by spaces between pairs. Do not use `--` argument prefixes or commas `,` between arguments. diff --git a/docs/en/reference/cfg/__init__.md b/docs/en/reference/cfg/__init__.md index 48ed75ca..5997b37f 100644 --- a/docs/en/reference/cfg/__init__.md +++ b/docs/en/reference/cfg/__init__.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, configuration, cfg2dict, get_cfg, check_cfg, save_d # Reference for `ultralytics/cfg/__init__.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 02ef04e0..f76eb9a4 100644 --- a/docs/en/reference/data/annotator.md +++ b/docs/en/reference/data/annotator.md @@ -5,7 +5,7 @@ keywords: Ultralytics, image annotation, YOLO, SAM, Python script, GitHub, objec # Reference for `ultralytics/data/annotator.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 951141b9..cee9f149 100644 --- a/docs/en/reference/data/augment.md +++ b/docs/en/reference/data/augment.md @@ -5,7 +5,7 @@ keywords: Ultralytics, image augmentation, MixUp, Mosaic, Random Perspective, de # Reference for `ultralytics/data/augment.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ddb9eb70..46700118 100644 --- a/docs/en/reference/data/base.md +++ b/docs/en/reference/data/base.md @@ -5,7 +5,7 @@ keywords: Ultralytics, BaseDataset, image processing, data augmentation, YOLO, d # Reference for `ultralytics/data/base.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 bae38c9e..cb179dad 100644 --- a/docs/en/reference/data/build.md +++ b/docs/en/reference/data/build.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Data Builders, InfiniteDataLoader, YOLO dataset, build.py # Reference for `ultralytics/data/build.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2854e7d2..d4ba3d58 100644 --- a/docs/en/reference/data/converter.md +++ b/docs/en/reference/data/converter.md @@ -5,7 +5,7 @@ keywords: Ultralytics, data conversion, YOLO models, COCO, DOTA, YOLO bbox2segme # Reference for `ultralytics/data/converter.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 8038780b..2793935f 100644 --- a/docs/en/reference/data/dataset.md +++ b/docs/en/reference/data/dataset.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLODataset, object detection, segmentation, dataset load # Reference for `ultralytics/data/dataset.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 65e64261..22aa6d06 100644 --- a/docs/en/reference/data/explorer/explorer.md +++ b/docs/en/reference/data/explorer/explorer.md @@ -6,7 +6,7 @@ keywords: Ultralytics, YOLO, data explorer, image querying, embeddings, similari # Reference for `ultralytics/data/explorer/explorer.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 68a2fa46..b2e51203 100644 --- a/docs/en/reference/data/explorer/gui/dash.md +++ b/docs/en/reference/data/explorer/gui/dash.md @@ -6,7 +6,7 @@ keywords: Ultralytics, Explorer, GUI, dash, documentation, data explorer, AI que # Reference for `ultralytics/data/explorer/gui/dash.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 e8f56c01..9a953a06 100644 --- a/docs/en/reference/data/explorer/utils.md +++ b/docs/en/reference/data/explorer/utils.md @@ -6,7 +6,7 @@ keywords: Ultralytics, data explorer, utils, schema, sanitize batch, plot query # Reference for `ultralytics/data/explorer/utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2925a883..9cf42cd7 100644 --- a/docs/en/reference/data/loaders.md +++ b/docs/en/reference/data/loaders.md @@ -5,7 +5,7 @@ keywords: Ultralytics, data loaders, SourceTypes, LoadStreams, LoadScreenshots, # Reference for `ultralytics/data/loaders.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 27d44841..8ba1862c 100644 --- a/docs/en/reference/data/split_dota.md +++ b/docs/en/reference/data/split_dota.md @@ -5,7 +5,7 @@ keywords: Ultralytics, DOTA dataset, data splitting, YOLO, Python, bbox_iof, loa # Reference for `ultralytics/data/split_dota.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 07474265..c5aba5e7 100644 --- a/docs/en/reference/data/utils.md +++ b/docs/en/reference/data/utils.md @@ -5,7 +5,7 @@ keywords: Ultralytics, dataset utils, data handling, image verification, Python, # Reference for `ultralytics/data/utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 b6354dec..98e81a8a 100644 --- a/docs/en/reference/engine/exporter.md +++ b/docs/en/reference/engine/exporter.md @@ -5,7 +5,7 @@ keywords: YOLOv8, export formats, ONNX, TensorRT, CoreML, machine learning model # Reference for `ultralytics/engine/exporter.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d8001a63..0177e5ec 100644 --- a/docs/en/reference/engine/model.md +++ b/docs/en/reference/engine/model.md @@ -5,7 +5,7 @@ keywords: YOLO model, Ultralytics, machine learning, deep learning, PyTorch mode # Reference for `ultralytics/engine/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 12e6bb7c..8601d8af 100644 --- a/docs/en/reference/engine/predictor.md +++ b/docs/en/reference/engine/predictor.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, Base Predictor, image inference, video inference, m # Reference for `ultralytics/engine/predictor.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 1dab8064..c3474006 100644 --- a/docs/en/reference/engine/results.md +++ b/docs/en/reference/engine/results.md @@ -5,7 +5,7 @@ keywords: Ultralytics, engine results, BaseTensor, Results class, Boxes, Masks, # Reference for `ultralytics/engine/results.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d8d69f69..4bcf2fc2 100644 --- a/docs/en/reference/engine/trainer.md +++ b/docs/en/reference/engine/trainer.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, BaseTrainer, model training, configuration, dataset # Reference for `ultralytics/engine/trainer.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 bc88c8eb..edf10208 100644 --- a/docs/en/reference/engine/tuner.md +++ b/docs/en/reference/engine/tuner.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, hyperparameter tuning, machine learning, deep learn # Reference for `ultralytics/engine/tuner.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 aebcaf86..f94653be 100644 --- a/docs/en/reference/engine/validator.md +++ b/docs/en/reference/engine/validator.md @@ -5,7 +5,7 @@ keywords: Ultralytics, BaseValidator, model validation, PyTorch, TensorFlow, ONN # Reference for `ultralytics/engine/validator.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 697bb050..106b2e9d 100644 --- a/docs/en/reference/hub/__init__.md +++ b/docs/en/reference/hub/__init__.md @@ -5,7 +5,7 @@ keywords: Ultralytics HUB API, login, logout, reset model, export model, check d # Reference for `ultralytics/hub/__init__.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 dac368c0..0e280f9c 100644 --- a/docs/en/reference/hub/auth.md +++ b/docs/en/reference/hub/auth.md @@ -5,7 +5,7 @@ keywords: Ultralytics, authentication, API key, cookies, Auth class, YOLO, API, # Reference for `ultralytics/hub/auth.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/auth.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/hub/google/__init__.md b/docs/en/reference/hub/google/__init__.md index ac8c0441..16ede65e 100644 --- a/docs/en/reference/hub/google/__init__.md +++ b/docs/en/reference/hub/google/__init__.md @@ -5,7 +5,7 @@ keywords: Ultralytics, GCP, Google Cloud Platform, regions, latency testing, clo # Reference for `ultralytics/hub/google/__init__.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/google/\_\_init\_\_.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/google/__init__.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/google/__init__.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/hub/session.md b/docs/en/reference/hub/session.md index d9cadf4e..cc0b20f2 100644 --- a/docs/en/reference/hub/session.md +++ b/docs/en/reference/hub/session.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, HUBTrainingSession, model training, heartbeats, che # Reference for `ultralytics/hub/session.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d7e439a9..59079ad4 100644 --- a/docs/en/reference/hub/utils.md +++ b/docs/en/reference/hub/utils.md @@ -5,7 +5,7 @@ keywords: Ultralytics, HUB, Utilities, YOLO, smart_request, request_with_credent # Reference for `ultralytics/hub/utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 86d43933..c74235e8 100644 --- a/docs/en/reference/models/fastsam/model.md +++ b/docs/en/reference/models/fastsam/model.md @@ -5,7 +5,7 @@ keywords: FastSAM, Ultralytics, model interface, YOLO, deep learning, machine le # Reference for `ultralytics/models/fastsam/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ba7cd482..4a5f58d2 100644 --- a/docs/en/reference/models/fastsam/predict.md +++ b/docs/en/reference/models/fastsam/predict.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Fast SAM Predictor, YOLO, segmentation, prediction, AI mo # Reference for `ultralytics/models/fastsam/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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/utils.md b/docs/en/reference/models/fastsam/utils.md index 14695908..a847086b 100644 --- a/docs/en/reference/models/fastsam/utils.md +++ b/docs/en/reference/models/fastsam/utils.md @@ -5,7 +5,7 @@ keywords: FastSAM, bounding boxes, IoU, Ultralytics, image processing, computer # Reference for `ultralytics/models/fastsam/utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 e37aa744..00bd9032 100644 --- a/docs/en/reference/models/fastsam/val.md +++ b/docs/en/reference/models/fastsam/val.md @@ -5,7 +5,7 @@ keywords: FastSAM Validator, Ultralytics, YOLO, segmentation, validation, metric # Reference for `ultralytics/models/fastsam/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a7f71960..ecc658d9 100644 --- a/docs/en/reference/models/nas/model.md +++ b/docs/en/reference/models/nas/model.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, YOLO-NAS, object detection, pre-trained models, mac # Reference for `ultralytics/models/nas/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 47640252..2f183631 100644 --- a/docs/en/reference/models/nas/predict.md +++ b/docs/en/reference/models/nas/predict.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, NASPredictor, object detection, machine learning, A # Reference for `ultralytics/models/nas/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 1a3b7da3..b9806965 100644 --- a/docs/en/reference/models/nas/val.md +++ b/docs/en/reference/models/nas/val.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, NASValidator, object detection, non-maximum suppres # Reference for `ultralytics/models/nas/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 620eaf7f..26295019 100644 --- a/docs/en/reference/models/rtdetr/model.md +++ b/docs/en/reference/models/rtdetr/model.md @@ -5,7 +5,7 @@ keywords: RT-DETR, real-time object detection, Vision Transformer, Ultralytics, # Reference for `ultralytics/models/rtdetr/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 8786346e..39f0c671 100644 --- a/docs/en/reference/models/rtdetr/predict.md +++ b/docs/en/reference/models/rtdetr/predict.md @@ -5,7 +5,7 @@ keywords: RTDETRPredictor, Ultralytics, Real-Time Detection Transformer, object # Reference for `ultralytics/models/rtdetr/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 52dbb174..91c1b390 100644 --- a/docs/en/reference/models/rtdetr/train.md +++ b/docs/en/reference/models/rtdetr/train.md @@ -5,7 +5,7 @@ keywords: RTDETRTrainer, real-time object detection, Vision Transformers, YOLO, # Reference for `ultralytics/models/rtdetr/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 525b300d..64bae616 100644 --- a/docs/en/reference/models/rtdetr/val.md +++ b/docs/en/reference/models/rtdetr/val.md @@ -5,7 +5,7 @@ keywords: RTDETR, Ultralytics, object detection, tracking, YOLO, RTDETRDataset, # Reference for `ultralytics/models/rtdetr/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 8c168504..832f74a2 100644 --- a/docs/en/reference/models/sam/amg.md +++ b/docs/en/reference/models/sam/amg.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM, AMG, API Reference, models, mask stability, crop box # Reference for `ultralytics/models/sam/amg.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 5b608c7e..53c221ff 100644 --- a/docs/en/reference/models/sam/build.md +++ b/docs/en/reference/models/sam/build.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM model, Segment Anything Model, SAM 2 model, Segment A # Reference for `ultralytics/models/sam/build.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 9c0f9301..9e50360c 100644 --- a/docs/en/reference/models/sam/model.md +++ b/docs/en/reference/models/sam/model.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM, Segment Anything Model, SAM 2, Segment Anything Mode # Reference for `ultralytics/models/sam/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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/blocks.md b/docs/en/reference/models/sam/modules/blocks.md index 5303a852..a79c75d0 100644 --- a/docs/en/reference/models/sam/modules/blocks.md +++ b/docs/en/reference/models/sam/modules/blocks.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM encoder, SAM 2 encoder, DropPath, MaskDownSampler, CX # Reference for `ultralytics/models/sam/modules/blocks.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/blocks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/blocks.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/blocks.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/models/sam/modules/decoders.md b/docs/en/reference/models/sam/modules/decoders.md index df2fc528..fb95f574 100644 --- a/docs/en/reference/models/sam/modules/decoders.md +++ b/docs/en/reference/models/sam/modules/decoders.md @@ -5,7 +5,7 @@ keywords: Ultralytics, MaskDecoder, MLP, machine learning, transformer architect # Reference for `ultralytics/models/sam/modules/decoders.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a2ff493f..bbafacb2 100644 --- a/docs/en/reference/models/sam/modules/encoders.md +++ b/docs/en/reference/models/sam/modules/encoders.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM encoder, ImageEncoderViT, PromptEncoder, PositionEmbe # Reference for `ultralytics/models/sam/modules/encoders.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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/memory_attention.md b/docs/en/reference/models/sam/modules/memory_attention.md index a341d6fe..8e07a36f 100644 --- a/docs/en/reference/models/sam/modules/memory_attention.md +++ b/docs/en/reference/models/sam/modules/memory_attention.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM 2 encoder, MemoryAttentionLayer, MemoryAttention # Reference for `ultralytics/models/sam/modules/memory_attention.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/memory_attention.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/memory_attention.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/memory_attention.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/models/sam/modules/sam.md b/docs/en/reference/models/sam/modules/sam.md index d66508bb..d0c4d240 100644 --- a/docs/en/reference/models/sam/modules/sam.md +++ b/docs/en/reference/models/sam/modules/sam.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM Module, SAM 2 Module, object segmentation, image enco # Reference for `ultralytics/models/sam/modules/sam.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 fa5e0988..2dc1e1f4 100644 --- a/docs/en/reference/models/sam/modules/tiny_encoder.md +++ b/docs/en/reference/models/sam/modules/tiny_encoder.md @@ -5,7 +5,7 @@ keywords: Ultralytics, TinyViT, Conv2d_BN, PatchEmbed, MBConv, Attention, PyTorc # Reference for `ultralytics/models/sam/modules/tiny_encoder.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ba190a43..65eb83cc 100644 --- a/docs/en/reference/models/sam/modules/transformer.md +++ b/docs/en/reference/models/sam/modules/transformer.md @@ -5,7 +5,7 @@ keywords: Ultralytics, TwoWayTransformer, module, deep learning, transformer, ob # Reference for `ultralytics/models/sam/modules/transformer.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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/modules/utils.md b/docs/en/reference/models/sam/modules/utils.md index 5611d156..19db24a5 100644 --- a/docs/en/reference/models/sam/modules/utils.md +++ b/docs/en/reference/models/sam/modules/utils.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM, SAM 2, API Reference, models, window partition, data # Reference for `ultralytics/models/sam/modules/utils.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/utils.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/utils.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/models/sam/predict.md b/docs/en/reference/models/sam/predict.md index 76bdce18..e715225c 100644 --- a/docs/en/reference/models/sam/predict.md +++ b/docs/en/reference/models/sam/predict.md @@ -5,7 +5,7 @@ keywords: Ultralytics, SAM, Segment Anything Model, SAM 2, Segment Anything Mode # Reference for `ultralytics/models/sam/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 8092d71a..424bab20 100644 --- a/docs/en/reference/models/utils/loss.md +++ b/docs/en/reference/models/utils/loss.md @@ -5,7 +5,7 @@ keywords: ultralytics, YOLO, DETR, RT-DETR, loss functions, object detection, de # Reference for `ultralytics/models/utils/loss.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2aa12614..5e322bb0 100644 --- a/docs/en/reference/models/utils/ops.md +++ b/docs/en/reference/models/utils/ops.md @@ -5,7 +5,7 @@ keywords: Ultralytics, models, utils, operations, HungarianMatcher, get_cdn_grou # Reference for `ultralytics/models/utils/ops.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2f53cfcb..1dd53008 100644 --- a/docs/en/reference/models/yolo/classify/predict.md +++ b/docs/en/reference/models/yolo/classify/predict.md @@ -5,7 +5,7 @@ keywords: YOLO, ClassificationPredictor, Ultralytics, model prediction, preproce # Reference for `ultralytics/models/yolo/classify/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 c2da7eec..c8e46f0a 100644 --- a/docs/en/reference/models/yolo/classify/train.md +++ b/docs/en/reference/models/yolo/classify/train.md @@ -5,7 +5,7 @@ keywords: YOLO, Ultralytics, classification, training, machine learning, deep le # Reference for `ultralytics/models/yolo/classify/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 5afd20fb..70681627 100644 --- a/docs/en/reference/models/yolo/classify/val.md +++ b/docs/en/reference/models/yolo/classify/val.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, classification, validation, ClassifyMetrics, Confus # Reference for `ultralytics/models/yolo/classify/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 3ad1182b..a7368c4a 100644 --- a/docs/en/reference/models/yolo/detect/predict.md +++ b/docs/en/reference/models/yolo/detect/predict.md @@ -5,7 +5,7 @@ keywords: YOLO, Ultralytics, DetectionPredictor, object detection, Python, machi # Reference for `ultralytics/models/yolo/detect/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 906449b2..e1ca067f 100644 --- a/docs/en/reference/models/yolo/detect/train.md +++ b/docs/en/reference/models/yolo/detect/train.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, DetectionTrainer, training, object detection, machi # Reference for `ultralytics/models/yolo/detect/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 38a23551..b23e474b 100644 --- a/docs/en/reference/models/yolo/detect/val.md +++ b/docs/en/reference/models/yolo/detect/val.md @@ -5,7 +5,7 @@ keywords: YOLO validation, detection validation, YOLO metrics, Ultralytics, obje # Reference for `ultralytics/models/yolo/detect/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 712a86e5..d04761f9 100644 --- a/docs/en/reference/models/yolo/model.md +++ b/docs/en/reference/models/yolo/model.md @@ -5,7 +5,7 @@ keywords: YOLO, object detection, Ultralytics, YOLO model, machine learning, Pyt # Reference for `ultralytics/models/yolo/model.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 350d12e0..150ed3f7 100644 --- a/docs/en/reference/models/yolo/obb/predict.md +++ b/docs/en/reference/models/yolo/obb/predict.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, OBBPredictor, oriented bounding box, object detecti # Reference for `ultralytics/models/yolo/obb/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 f0f30fa0..c6317c93 100644 --- a/docs/en/reference/models/yolo/obb/train.md +++ b/docs/en/reference/models/yolo/obb/train.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, OBB Trainer, Oriented Bounding Box, Machine Learnin # Reference for `ultralytics/models/yolo/obb/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 6be5bd95..67f167cc 100644 --- a/docs/en/reference/models/yolo/obb/val.md +++ b/docs/en/reference/models/yolo/obb/val.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, OBBValidator, Oriented Bounding Boxes, DetectionVal # Reference for `ultralytics/models/yolo/obb/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 961f03fd..8bee767c 100644 --- a/docs/en/reference/models/yolo/pose/predict.md +++ b/docs/en/reference/models/yolo/pose/predict.md @@ -5,7 +5,7 @@ keywords: YOLO, Pose Prediction, Ultralytics, PosePredictor, YOLOv8, Machine Lea # Reference for `ultralytics/models/yolo/pose/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 1aed5d02..b66c13a5 100644 --- a/docs/en/reference/models/yolo/pose/train.md +++ b/docs/en/reference/models/yolo/pose/train.md @@ -5,7 +5,7 @@ keywords: PoseTrainer, YOLO, Ultralytics, pose models, training, model configura # Reference for `ultralytics/models/yolo/pose/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 fd4166d9..c0578436 100644 --- a/docs/en/reference/models/yolo/pose/val.md +++ b/docs/en/reference/models/yolo/pose/val.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, PoseValidator, pose validation, machine learning, o # Reference for `ultralytics/models/yolo/pose/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 f075b89d..873156bb 100644 --- a/docs/en/reference/models/yolo/segment/predict.md +++ b/docs/en/reference/models/yolo/segment/predict.md @@ -5,7 +5,7 @@ keywords: YOLO, SegmentationPredictor, machine learning, computer vision, object # Reference for `ultralytics/models/yolo/segment/predict.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 844b19ca..e9f2f9e0 100644 --- a/docs/en/reference/models/yolo/segment/train.md +++ b/docs/en/reference/models/yolo/segment/train.md @@ -5,7 +5,7 @@ keywords: YOLO, segmentation, train, Ultralytics, SegmentationTrainer, Python, m # Reference for `ultralytics/models/yolo/segment/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 37c76725..2f94ac94 100644 --- a/docs/en/reference/models/yolo/segment/val.md +++ b/docs/en/reference/models/yolo/segment/val.md @@ -5,7 +5,7 @@ keywords: YOLO, segmentation, validator, Ultralytics, model validation, machine # Reference for `ultralytics/models/yolo/segment/val.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d92cb60b..b890308a 100644 --- a/docs/en/reference/models/yolo/world/train.md +++ b/docs/en/reference/models/yolo/world/train.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, World Model, training, deep learning, computer visi # Reference for `ultralytics/models/yolo/world/train.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 06dd6235..c84a2b3f 100644 --- a/docs/en/reference/models/yolo/world/train_world.md +++ b/docs/en/reference/models/yolo/world/train_world.md @@ -5,7 +5,7 @@ keywords: YOLO, WorldTrainer, open-set datasets, training, evaluation, build dat # Reference for `ultralytics/models/yolo/world/train_world.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 b24fb595..4ba04366 100644 --- a/docs/en/reference/nn/autobackend.md +++ b/docs/en/reference/nn/autobackend.md @@ -5,7 +5,7 @@ keywords: Ultralytics, AutoBackend, check_class_names, YOLO, YOLO models, optimi # Reference for `ultralytics/nn/autobackend.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/autobackend.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/nn/modules/activation.md b/docs/en/reference/nn/modules/activation.md index 09dd92ed..6ca31c7b 100644 --- a/docs/en/reference/nn/modules/activation.md +++ b/docs/en/reference/nn/modules/activation.md @@ -5,7 +5,7 @@ keywords: ultralytics, activation functions, neural networks, Unified activation # Reference for `ultralytics/nn/modules/activation.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/activation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/activation.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/activation.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/nn/modules/block.md b/docs/en/reference/nn/modules/block.md index 16035571..ed7a94ac 100644 --- a/docs/en/reference/nn/modules/block.md +++ b/docs/en/reference/nn/modules/block.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, neural networks, block modules, DFL, Proto, HGStem, # Reference for `ultralytics/nn/modules/block.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 59126147..6c68fa7f 100644 --- a/docs/en/reference/nn/modules/conv.md +++ b/docs/en/reference/nn/modules/conv.md @@ -5,7 +5,7 @@ keywords: Ultralytics, convolution modules, Conv, LightConv, GhostConv, YOLO, de # Reference for `ultralytics/nn/modules/conv.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 310f8b91..efbdfc9b 100644 --- a/docs/en/reference/nn/modules/head.md +++ b/docs/en/reference/nn/modules/head.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, Detection, Pose, RTDETRDecoder, nn modules, guides # Reference for `ultralytics/nn/modules/head.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 6e38675b..5bd2d293 100644 --- a/docs/en/reference/nn/modules/transformer.md +++ b/docs/en/reference/nn/modules/transformer.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Ultralytics documentation, TransformerEncoderLayer, Trans # Reference for `ultralytics/nn/modules/transformer.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 3c747359..1b8754ba 100644 --- a/docs/en/reference/nn/modules/utils.md +++ b/docs/en/reference/nn/modules/utils.md @@ -5,7 +5,7 @@ keywords: Ultralytics, PyTorch, utils, initialization, inverse sigmoid, multisca # Reference for `ultralytics/nn/modules/utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 e528a09f..8e608885 100644 --- a/docs/en/reference/nn/tasks.md +++ b/docs/en/reference/nn/tasks.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, nn tasks, DetectionModel, PoseModel, RTDETRDetectio # Reference for `ultralytics/nn/tasks.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 e8126ae4..5bce60ca 100644 --- a/docs/en/reference/solutions/ai_gym.md +++ b/docs/en/reference/solutions/ai_gym.md @@ -5,7 +5,7 @@ keywords: Ultralytics, AI Gym, YOLO, pose detection, gym step counting, real-tim # Reference for `ultralytics/solutions/ai_gym.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/ai_gym.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/solutions/analytics.md b/docs/en/reference/solutions/analytics.md index b6ab9b99..1a446b78 100644 --- a/docs/en/reference/solutions/analytics.md +++ b/docs/en/reference/solutions/analytics.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Analytics, Python, visual analytics, line chart, bar char # Reference for `ultralytics/solutions/analytics.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/analytics.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/analytics.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/analytics.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/solutions/distance_calculation.md b/docs/en/reference/solutions/distance_calculation.md index ec104e6c..43606d6a 100644 --- a/docs/en/reference/solutions/distance_calculation.md +++ b/docs/en/reference/solutions/distance_calculation.md @@ -5,7 +5,7 @@ keywords: Ultralytics, distance calculation, object tracking, real-time video, c # Reference for `ultralytics/solutions/distance_calculation.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ae3ec539..5795df28 100644 --- a/docs/en/reference/solutions/heatmap.md +++ b/docs/en/reference/solutions/heatmap.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Heatmap, Python, Real-time Video, Object Tracking, cv2, S # Reference for `ultralytics/solutions/heatmap.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ff7c81d3..1e217f31 100644 --- a/docs/en/reference/solutions/object_counter.md +++ b/docs/en/reference/solutions/object_counter.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Object Counter, Real-time Tracking, Video Stream, Python, # Reference for `ultralytics/solutions/object_counter.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 112b46aa..9d6c34e0 100644 --- a/docs/en/reference/solutions/parking_management.md +++ b/docs/en/reference/solutions/parking_management.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, parking management, computer vision, parking monito # Reference for `ultralytics/solutions/parking_management.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 3214ef21..6ad313db 100644 --- a/docs/en/reference/solutions/queue_management.md +++ b/docs/en/reference/solutions/queue_management.md @@ -5,7 +5,7 @@ keywords: Ultralytics, queue management, object tracking, real-time video, Pytho # Reference for `ultralytics/solutions/queue_management.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d21b13be..8ed0634a 100644 --- a/docs/en/reference/solutions/speed_estimation.md +++ b/docs/en/reference/solutions/speed_estimation.md @@ -5,7 +5,7 @@ keywords: Ultralytics, speed estimation, YOLO, real-time tracking, object tracki # Reference for `ultralytics/solutions/speed_estimation.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/speed_estimation.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/solutions/streamlit_inference.md b/docs/en/reference/solutions/streamlit_inference.md index a89d7095..368d69e3 100644 --- a/docs/en/reference/solutions/streamlit_inference.md +++ b/docs/en/reference/solutions/streamlit_inference.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLOv8, live inference, real-time object detection, Strea # Reference for `ultralytics/solutions/streamlit_inference.py` -!!! Note +!!! note This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/streamlit_inference.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/streamlit_inference.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/streamlit_inference.py) 🛠️. Thank you 🙏! diff --git a/docs/en/reference/trackers/basetrack.md b/docs/en/reference/trackers/basetrack.md index aa5966bd..9b1e0667 100644 --- a/docs/en/reference/trackers/basetrack.md +++ b/docs/en/reference/trackers/basetrack.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, object tracking, BaseTrack, TrackState, tracking me # Reference for `ultralytics/trackers/basetrack.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 f817afef..f67edd94 100644 --- a/docs/en/reference/trackers/bot_sort.md +++ b/docs/en/reference/trackers/bot_sort.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Bot SORT, BOTrack, BOTSORT, YOLOv8, object tracking, Kalm # Reference for `ultralytics/trackers/bot_sort.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 85eebe3d..a7034f5f 100644 --- a/docs/en/reference/trackers/byte_tracker.md +++ b/docs/en/reference/trackers/byte_tracker.md @@ -5,7 +5,7 @@ keywords: Ultralytics, BYTETracker, object tracking, Kalman filter, YOLOv8, docu # Reference for `ultralytics/trackers/byte_tracker.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a98f04e0..2db8f321 100644 --- a/docs/en/reference/trackers/track.md +++ b/docs/en/reference/trackers/track.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, object tracking, track.py, on_predict_start, on_pre # Reference for `ultralytics/trackers/track.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 382c5423..79dc8ff9 100644 --- a/docs/en/reference/trackers/utils/gmc.md +++ b/docs/en/reference/trackers/utils/gmc.md @@ -5,7 +5,7 @@ keywords: GMC, Generalized Motion Compensation, Ultralytics, tracking, object de # Reference for `ultralytics/trackers/utils/gmc.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 b45351c4..c1aa84be 100644 --- a/docs/en/reference/trackers/utils/kalman_filter.md +++ b/docs/en/reference/trackers/utils/kalman_filter.md @@ -5,7 +5,7 @@ keywords: Kalman Filter, Object Tracking, Python, Ultralytics, YOLO, Bounding Bo # Reference for `ultralytics/trackers/utils/kalman_filter.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 d929ae4b..d4acfa86 100644 --- a/docs/en/reference/trackers/utils/matching.md +++ b/docs/en/reference/trackers/utils/matching.md @@ -5,7 +5,7 @@ keywords: Ultralytics, matching utils, linear assignment, IoU distance, embeddin # Reference for `ultralytics/trackers/utils/matching.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 380daaec..b8147dac 100644 --- a/docs/en/reference/utils/__init__.md +++ b/docs/en/reference/utils/__init__.md @@ -5,7 +5,7 @@ keywords: Ultralytics, utils, TQDM, Python, ML, Machine Learning utilities, YOLO # Reference for `ultralytics/utils/__init__.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 df9ecbf7..9a5c3f3b 100644 --- a/docs/en/reference/utils/autobatch.md +++ b/docs/en/reference/utils/autobatch.md @@ -5,7 +5,7 @@ keywords: YOLO batch size, CUDA memory, PyTorch autobatch, Ultralytics, machine # Reference for `ultralytics/utils/autobatch.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 0833a9bd..2feba85c 100644 --- a/docs/en/reference/utils/benchmarks.md +++ b/docs/en/reference/utils/benchmarks.md @@ -5,7 +5,7 @@ keywords: YOLO, model benchmarking, ONNX, TensorRT, PyTorch, TensorFlow, CoreML, # Reference for `ultralytics/utils/benchmarks.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 53e1b089..a8978203 100644 --- a/docs/en/reference/utils/callbacks/base.md +++ b/docs/en/reference/utils/callbacks/base.md @@ -5,7 +5,7 @@ keywords: Ultralytics, base callbacks, training, validation, prediction, model e # Reference for `ultralytics/utils/callbacks/base.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a1fe2a31..b6cb10c5 100644 --- a/docs/en/reference/utils/callbacks/clearml.md +++ b/docs/en/reference/utils/callbacks/clearml.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, ClearML, integration, callbacks, pretraining, train # Reference for `ultralytics/utils/callbacks/clearml.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 b73eb8d5..83c63b37 100644 --- a/docs/en/reference/utils/callbacks/comet.md +++ b/docs/en/reference/utils/callbacks/comet.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, Comet, callbacks, logging, machine learning, monito # Reference for `ultralytics/utils/callbacks/comet.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 6d4083e4..068ce1a8 100644 --- a/docs/en/reference/utils/callbacks/dvc.md +++ b/docs/en/reference/utils/callbacks/dvc.md @@ -5,7 +5,7 @@ keywords: Ultralytics, DVC, DVCLive, machine learning, logging, training, callba # Reference for `ultralytics/utils/callbacks/dvc.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 799384f4..abe28e7c 100644 --- a/docs/en/reference/utils/callbacks/hub.md +++ b/docs/en/reference/utils/callbacks/hub.md @@ -5,7 +5,7 @@ keywords: Ultralytics, callbacks, pretrain, model save, train start, train end, # Reference for `ultralytics/utils/callbacks/hub.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 897520a6..6acd3821 100644 --- a/docs/en/reference/utils/callbacks/mlflow.md +++ b/docs/en/reference/utils/callbacks/mlflow.md @@ -5,7 +5,7 @@ keywords: MLflow, Ultralytics YOLO, logging, metrics, parameters, model artifact # Reference for `ultralytics/utils/callbacks/mlflow.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 caeba558..92c7e3b8 100644 --- a/docs/en/reference/utils/callbacks/neptune.md +++ b/docs/en/reference/utils/callbacks/neptune.md @@ -5,7 +5,7 @@ keywords: Ultralytics, NeptuneAI, YOLO, experiment logging, machine learning, AI # Reference for `ultralytics/utils/callbacks/neptune.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 7e26df01..d9a90cad 100644 --- a/docs/en/reference/utils/callbacks/raytune.md +++ b/docs/en/reference/utils/callbacks/raytune.md @@ -5,7 +5,7 @@ keywords: Ultralytics, Ray Tune, hyperparameter tuning, YOLO, machine learning, # Reference for `ultralytics/utils/callbacks/raytune.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 ba6cb64b..a86fb7ad 100644 --- a/docs/en/reference/utils/callbacks/tensorboard.md +++ b/docs/en/reference/utils/callbacks/tensorboard.md @@ -5,7 +5,7 @@ keywords: Ultralytics, TensorBoard, callbacks, machine learning, training visual # Reference for `ultralytics/utils/callbacks/tensorboard.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 11b5547a..fd1d531d 100644 --- a/docs/en/reference/utils/callbacks/wb.md +++ b/docs/en/reference/utils/callbacks/wb.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, WandB, callbacks, logging, metrics, visualizations, # Reference for `ultralytics/utils/callbacks/wb.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 f37f5890..378af7e8 100644 --- a/docs/en/reference/utils/checks.md +++ b/docs/en/reference/utils/checks.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, utility functions, version checks, requirements, im # Reference for `ultralytics/utils/checks.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 18930484..f5dff1c5 100644 --- a/docs/en/reference/utils/dist.md +++ b/docs/en/reference/utils/dist.md @@ -5,7 +5,7 @@ keywords: Ultralytics, distributed training, DDP, multi-node training, network p # Reference for `ultralytics/utils/dist.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 e04abd14..0b6689c1 100644 --- a/docs/en/reference/utils/downloads.md +++ b/docs/en/reference/utils/downloads.md @@ -5,7 +5,7 @@ keywords: Ultralytics, download utilities, URL validation, zip directory, unzip # Reference for `ultralytics/utils/downloads.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 87b02cc5..74eaf9b8 100644 --- a/docs/en/reference/utils/errors.md +++ b/docs/en/reference/utils/errors.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, error handling, HUBModelError, model fetching, cust # Reference for `ultralytics/utils/errors.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 19712454..6d61ea3e 100644 --- a/docs/en/reference/utils/files.md +++ b/docs/en/reference/utils/files.md @@ -5,7 +5,7 @@ keywords: Ultralytics, file utilities, Python, WorkingDirectory, increment_path, # Reference for `ultralytics/utils/files.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 12909cfd..5be15c07 100644 --- a/docs/en/reference/utils/instance.md +++ b/docs/en/reference/utils/instance.md @@ -5,7 +5,7 @@ keywords: Ultralytics, bounding boxes, Instances, bbox formats, conversions, AI, # Reference for `ultralytics/utils/instance.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a2f6ece7..5c260123 100644 --- a/docs/en/reference/utils/loss.md +++ b/docs/en/reference/utils/loss.md @@ -5,7 +5,7 @@ keywords: Ultralytics, loss functions, Varifocal Loss, Focal Loss, Bbox Loss, Ro # Reference for `ultralytics/utils/loss.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 63463647..13bc1320 100644 --- a/docs/en/reference/utils/metrics.md +++ b/docs/en/reference/utils/metrics.md @@ -5,7 +5,7 @@ keywords: Ultralytics, metrics, model validation, performance analysis, IoU, con # Reference for `ultralytics/utils/metrics.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2992ce8d..b62ba7b4 100644 --- a/docs/en/reference/utils/ops.md +++ b/docs/en/reference/utils/ops.md @@ -5,7 +5,7 @@ keywords: Ultralytics, utility operations, non-max suppression, bounding box tra # Reference for `ultralytics/utils/ops.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 50422d8c..89e8fd3c 100644 --- a/docs/en/reference/utils/patches.md +++ b/docs/en/reference/utils/patches.md @@ -5,7 +5,7 @@ keywords: Ultralytics, utils, patches, imread, imwrite, imshow, torch_save, Open # Reference for `ultralytics/utils/patches.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 239ec4d5..65985a33 100644 --- a/docs/en/reference/utils/plotting.md +++ b/docs/en/reference/utils/plotting.md @@ -5,7 +5,7 @@ keywords: ultralytics, plotting, utilities, documentation, data visualization, a # Reference for `ultralytics/utils/plotting.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 588182a2..5f425242 100644 --- a/docs/en/reference/utils/tal.md +++ b/docs/en/reference/utils/tal.md @@ -5,7 +5,7 @@ keywords: Ultralytics, YOLO, TaskAlignedAssigner, object detection, machine lear # Reference for `ultralytics/utils/tal.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 1a196831..4f8f3d1b 100644 --- a/docs/en/reference/utils/torch_utils.md +++ b/docs/en/reference/utils/torch_utils.md @@ -5,7 +5,7 @@ keywords: Ultralytics, torch utils, model optimization, device selection, infere # Reference for `ultralytics/utils/torch_utils.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 2dcd749c..460edbbe 100644 --- a/docs/en/reference/utils/triton.md +++ b/docs/en/reference/utils/triton.md @@ -5,7 +5,7 @@ keywords: Ultralytics, TritonRemoteModel, Triton Inference Server, model client, # Reference for `ultralytics/utils/triton.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) 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 a58eba00..f2cc7800 100644 --- a/docs/en/reference/utils/tuner.md +++ b/docs/en/reference/utils/tuner.md @@ -5,7 +5,7 @@ keywords: Ultralytics, tuner, hyperparameter tuning, Ray Tune, YOLO, machine lea # Reference for `ultralytics/utils/tuner.py` -!!! Note +!!! 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](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tuner.py) 🛠️. Thank you 🙏! diff --git a/docs/en/usage/cli.md b/docs/en/usage/cli.md index d2ba4927..f22e3eb4 100644 --- a/docs/en/usage/cli.md +++ b/docs/en/usage/cli.md @@ -79,7 +79,7 @@ Where: - `MODE` (required) is one of `[train, val, predict, export, track, benchmark]` - `ARGS` (optional) are any number of custom `arg=value` pairs like `imgsz=320` that override defaults. For a full list of available `ARGS` see the [Configuration](cfg.md) page and `defaults.yaml` -!!! warning "Warning" +!!! warning Arguments must be passed as `arg=val` pairs, split by an equals `=` sign and delimited by spaces ` ` between pairs. Do not use `--` argument prefixes or commas `,` between arguments. @@ -91,7 +91,7 @@ Where: Train YOLOv8n on the COCO8 dataset for 100 epochs at image size 640. For a full list of available arguments see the [Configuration](cfg.md) page. -!!! example "Example" +!!! example === "Train" @@ -111,7 +111,7 @@ Train YOLOv8n on the COCO8 dataset for 100 epochs at image size 640. For a full Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need to passed as the `model` retains its training `data` and arguments as model attributes. -!!! example "Example" +!!! example === "Official" @@ -131,7 +131,7 @@ Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need t Use a trained YOLOv8n model to run predictions on images. -!!! example "Example" +!!! example === "Official" @@ -151,7 +151,7 @@ Use a trained YOLOv8n model to run predictions on images. Export a YOLOv8n model to a different format like ONNX, CoreML, etc. -!!! example "Example" +!!! example === "Official" @@ -177,7 +177,7 @@ See full `export` details in the [Export](../modes/export.md) page. Default arguments can be overridden by simply passing them as arguments in the CLI in `arg=value` pairs. -!!! tip "" +!!! tip === "Train" diff --git a/docs/en/yolov5/tutorials/train_custom_data.md b/docs/en/yolov5/tutorials/train_custom_data.md index f7cc6f09..dbe62fc2 100644 --- a/docs/en/yolov5/tutorials/train_custom_data.md +++ b/docs/en/yolov5/tutorials/train_custom_data.md @@ -137,11 +137,11 @@ Train a YOLOv5s model on COCO128 by specifying dataset, batch-size, image size a python train.py --img 640 --epochs 3 --data coco128.yaml --weights yolov5s.pt ``` -!!! tip "Tip" +!!! tip 💡 Add `--cache ram` or `--cache disk` to speed up training (requires significant RAM/disk resources). -!!! tip "Tip" +!!! tip 💡 Always train from a local dataset. Mounted or network drives like Google Drive will be very slow. From 985017270778cd2c7cf23c4330db71721d4e304c Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 11 Sep 2024 21:33:09 +0500 Subject: [PATCH 08/80] Add https://youtu.be/Tt_35YnQ9uk to docs (#16214) --- docs/en/guides/model-deployment-practices.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/guides/model-deployment-practices.md b/docs/en/guides/model-deployment-practices.md index 60d95963..df485abd 100644 --- a/docs/en/guides/model-deployment-practices.md +++ b/docs/en/guides/model-deployment-practices.md @@ -10,6 +10,17 @@ keywords: Model Deployment, Machine Learning Model Deployment, ML Model Deployme Model deployment is the [step in a computer vision project](./steps-of-a-cv-project.md) that brings a model from the development phase into a real-world application. There are various [model deployment options](./model-deployment-options.md): cloud deployment offers scalability and ease of access, edge deployment reduces latency by bringing the model closer to the data source, and local deployment ensures privacy and control. Choosing the right strategy depends on your application's needs, balancing speed, security, and scalability. +

+
+ +
+ Watch: How to Optimize and Deploy AI Models: Best Practices, Troubleshooting, and Security Considerations +

+ It's also important to follow best practices when deploying a model because deployment can significantly impact the effectiveness and reliability of the model's performance. In this guide, we'll focus on how to make sure that your model deployment is smooth, efficient, and secure. ## Model Deployment Options From 463ca1a804adbb722178cb7879ece73674101b1b Mon Sep 17 00:00:00 2001 From: Jason Guo <131695330+JasonG98@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:37:40 +0800 Subject: [PATCH 09/80] Update TwoWayTransformer Docs. (#16161) Co-authored-by: Glenn Jocher Co-authored-by: UltralyticsAssistant Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> --- ultralytics/models/sam/modules/transformer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ultralytics/models/sam/modules/transformer.py b/ultralytics/models/sam/modules/transformer.py index df0b3ce2..5cc0b02f 100644 --- a/ultralytics/models/sam/modules/transformer.py +++ b/ultralytics/models/sam/modules/transformer.py @@ -61,7 +61,6 @@ def __init__( Attributes: depth (int): Number of layers in the transformer. embedding_dim (int): Channel dimension for input embeddings. - embedding_dim (int): Channel dimension for input embeddings. num_heads (int): Number of heads for multihead attention. mlp_dim (int): Internal channel dimension for the MLP block. layers (nn.ModuleList): List of TwoWayAttentionBlock layers. From 9b8f0d925d8c791d87d2367ec51627836f00c7c2 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Wed, 11 Sep 2024 18:57:37 +0200 Subject: [PATCH 10/80] Fixed failing greetings CI (#16223) Co-authored-by: Glenn Jocher --- .github/workflows/greetings.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 19b099eb..d6fcc9f4 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -3,11 +3,17 @@ name: Greetings on: - pull_request_target: + pull_request: types: [opened] issues: types: [opened] +permissions: + id-token: write + contents: read + issues: write + pull-requests: write + jobs: greeting: runs-on: ubuntu-latest From 7c61569630c032c78529da01a0934defbb815a17 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 11 Sep 2024 22:00:25 +0500 Subject: [PATCH 11/80] `bbox` and `masks` coloring based on `track-ids` (#16073) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> --- ultralytics/engine/results.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ultralytics/engine/results.py b/ultralytics/engine/results.py index 1c7ffb91..89b2d5c8 100644 --- a/ultralytics/engine/results.py +++ b/ultralytics/engine/results.py @@ -522,7 +522,13 @@ def plot( .contiguous() / 255 ) - idx = pred_boxes.cls if pred_boxes and color_mode == "class" else reversed(range(len(pred_masks))) + idx = ( + pred_boxes.id + if pred_boxes.id is not None and color_mode == "instance" + else pred_boxes.cls + if pred_boxes and color_mode == "class" + else reversed(range(len(pred_masks))) + ) annotator.masks(pred_masks.data, colors=[colors(x, True) for x in idx], im_gpu=im_gpu) # Plot Detect results @@ -535,7 +541,16 @@ def plot( annotator.box_label( box, label, - color=colors(i if color_mode == "instance" else c, True), + color=colors( + c + if color_mode == "class" + else id + if id is not None + else i + if color_mode == "instance" + else None, + True, + ), rotated=is_obb, ) From ec9f4a7b1a3d3580bdea40107f54bb3a43e361f5 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Wed, 11 Sep 2024 19:03:41 +0200 Subject: [PATCH 12/80] Non-Deterministic Training Despite deterministic=True (#15961) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> --- ultralytics/data/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ultralytics/data/base.py b/ultralytics/data/base.py index 703fbae7..f18c2d54 100644 --- a/ultralytics/data/base.py +++ b/ultralytics/data/base.py @@ -91,6 +91,11 @@ def __init__( self.npy_files = [Path(f).with_suffix(".npy") for f in self.im_files] self.cache = cache.lower() if isinstance(cache, str) else "ram" if cache is True else None if (self.cache == "ram" and self.check_cache_ram()) or self.cache == "disk": + if self.cache == "ram" and hyp.deterministic: + LOGGER.warning( + "WARNING ⚠️ cache='ram' may produce non-deterministic training results. " + "Consider cache='disk' as a deterministic alternative if your disk space allows." + ) self.cache_images() # Transforms From 17477066ec2fd61d08652a22897e23d2040ff3e6 Mon Sep 17 00:00:00 2001 From: Charan K Date: Wed, 11 Sep 2024 23:10:40 +0530 Subject: [PATCH 13/80] `ultralytics 8.2.92` vertical `line` counter fix (#16163) Co-authored-by: UltralyticsAssistant Co-authored-by: RizwanMunawar Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/solutions/object_counter.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 5db85856..1968fbaa 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.91" +__version__ = "8.2.92" import os diff --git a/ultralytics/solutions/object_counter.py b/ultralytics/solutions/object_counter.py index 24cbd488..ce6c1cb5 100644 --- a/ultralytics/solutions/object_counter.py +++ b/ultralytics/solutions/object_counter.py @@ -60,7 +60,6 @@ def __init__( self.out_counts = 0 self.count_ids = [] self.class_wise_count = {} - self.count_txt_thickness = 0 # Tracks info self.track_history = defaultdict(list) @@ -136,7 +135,7 @@ def extract_and_process_tracks(self, tracks): # Extract tracks for box, track_id, cls in zip(boxes, track_ids, clss): # Draw bounding box - annotator.box_label(box, label=f"{self.names[cls]}#{track_id}", color=colors(int(track_id), True)) + annotator.box_label(box, label=self.names[cls], color=colors(int(track_id), True)) # Store class info if self.names[cls] not in self.class_wise_count: @@ -182,10 +181,9 @@ def extract_and_process_tracks(self, tracks): self.count_ids.append(track_id) # Determine the direction of movement (IN or OUT) - direction = (box[0] - prev_position[0]) * ( - self.counting_region.centroid.x - prev_position[0] - ) - if direction > 0: + dx = (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) + dy = (box[1] - prev_position[1]) * (self.counting_region.centroid.y - prev_position[1]) + if dx > 0 and dy > 0: self.in_counts += 1 self.class_wise_count[self.names[cls]]["IN"] += 1 else: From 5022c4bb508cce701f692e8d9c8eb8a9039799cd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 12 Sep 2024 15:04:50 +0200 Subject: [PATCH 14/80] Deprecate .github/workflows/greetings.yml (#16245) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- .github/workflows/format.yml | 40 +++++++++++++++++++++ .github/workflows/greetings.yml | 64 --------------------------------- 2 files changed, 40 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 67651715..151b54a9 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -27,3 +27,43 @@ jobs: summary: true # print PR summary with GPT4o (requires 'openai_api_key') openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }} openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }} + first_interaction_pr_instructions: | + 👋 Hello @${{ github.actor }}, thank you for submitting an Ultralytics 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to: + + - ✅ Verify your PR is **up-to-date** with `ultralytics/ultralytics` `main` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge main` locally. + - ✅ Verify all Ultralytics Continuous Integration (CI) **checks are passing**. + - ✅ Update Ultralytics [Docs](https://docs.ultralytics.com) for any new or updated features. + - ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee + + See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for details and let us know if you have any questions! + first_interaction_issue_instructions: | + 👋 Hello @${{ github.actor }}, thank you for your interest in Ultralytics 🚀! We recommend a visit to the [Docs](https://docs.ultralytics.com) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered. + + If this is a 🐛 Bug Report, please provide a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/) to help us debug it. + + If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our [Tips for Best Training Results](https://docs.ultralytics.com/guides/model-training-tips/). + + Join the Ultralytics community where it suits you best. For real-time chat, head to [Discord](https://ultralytics.com/discord) 🎧. Prefer in-depth discussions? Check out [Discourse](https://community.ultralytics.com). Or dive into threads on our [Subreddit](https://reddit.com/r/ultralytics) to share knowledge with the community. + + ## Install + + Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). + + ```bash + pip install ultralytics + ``` + + ## Environments + + YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including [CUDA](https://developer.nvidia.com/cuda)/[CUDNN](https://developer.nvidia.com/cudnn), [Python](https://www.python.org/) and [PyTorch](https://pytorch.org/) preinstalled): + + - **Notebooks** with free GPU: Run on Gradient Open In Colab Open In Kaggle + - **Google Cloud** Deep Learning VM. See [GCP Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/) + - **Amazon** Deep Learning AMI. See [AWS Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/) + - **Docker Image**. See [Docker Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/docker_image_quickstart_tutorial/) Docker Pulls + + ## Status + + Ultralytics CI + + If this badge is green, all [Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule) tests are currently passing. CI tests verify correct operation of all YOLOv8 [Modes](https://docs.ultralytics.com/modes/) and [Tasks](https://docs.ultralytics.com/tasks/) on macOS, Windows, and Ubuntu every 24 hours and on every commit. diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index d6fcc9f4..00000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,64 +0,0 @@ -# Ultralytics YOLO 🚀, AGPL-3.0 license - -name: Greetings - -on: - pull_request: - types: [opened] - issues: - types: [opened] - -permissions: - id-token: write - contents: read - issues: write - pull-requests: write - -jobs: - greeting: - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: | - 👋 Hello @${{ github.actor }}, thank you for submitting an Ultralytics 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to: - - - ✅ Verify your PR is **up-to-date** with `ultralytics/ultralytics` `main` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge main` locally. - - ✅ Verify all Ultralytics Continuous Integration (CI) **checks are passing**. - - ✅ Update Ultralytics [Docs](https://docs.ultralytics.com) for any new or updated features. - - ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee - - See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for details and let us know if you have any questions! - - issue-message: | - 👋 Hello @${{ github.actor }}, thank you for your interest in Ultralytics 🚀! We recommend a visit to the [Docs](https://docs.ultralytics.com) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered. - - If this is a 🐛 Bug Report, please provide a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/) to help us debug it. - - If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our [Tips for Best Training Results](https://docs.ultralytics.com/guides/model-training-tips/). - - Join the Ultralytics community where it suits you best. For real-time chat, head to [Discord](https://ultralytics.com/discord) 🎧. Prefer in-depth discussions? Check out [Discourse](https://community.ultralytics.com). Or dive into threads on our [Subreddit](https://reddit.com/r/ultralytics) to share knowledge with the community. - - ## Install - - Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). - - ```bash - pip install ultralytics - ``` - - ## Environments - - YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including [CUDA](https://developer.nvidia.com/cuda)/[CUDNN](https://developer.nvidia.com/cudnn), [Python](https://www.python.org/) and [PyTorch](https://pytorch.org/) preinstalled): - - - **Notebooks** with free GPU: Run on Gradient Open In Colab Open In Kaggle - - **Google Cloud** Deep Learning VM. See [GCP Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/) - - **Amazon** Deep Learning AMI. See [AWS Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/) - - **Docker Image**. See [Docker Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/docker_image_quickstart_tutorial/) Docker Pulls - - ## Status - - Ultralytics CI - - If this badge is green, all [Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule) tests are currently passing. CI tests verify correct operation of all YOLOv8 [Modes](https://docs.ultralytics.com/modes/) and [Tasks](https://docs.ultralytics.com/tasks/) on macOS, Windows, and Ubuntu every 24 hours and on every commit. From 7dd9d2562f030afa5e31588727de7e51eea34e53 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 12 Sep 2024 20:06:35 +0200 Subject: [PATCH 15/80] Update format.yml (#16255) --- .github/workflows/format.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 151b54a9..9d6fc3cb 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -27,16 +27,7 @@ jobs: summary: true # print PR summary with GPT4o (requires 'openai_api_key') openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }} openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }} - first_interaction_pr_instructions: | - 👋 Hello @${{ github.actor }}, thank you for submitting an Ultralytics 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to: - - - ✅ Verify your PR is **up-to-date** with `ultralytics/ultralytics` `main` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge main` locally. - - ✅ Verify all Ultralytics Continuous Integration (CI) **checks are passing**. - - ✅ Update Ultralytics [Docs](https://docs.ultralytics.com) for any new or updated features. - - ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee - - See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for details and let us know if you have any questions! - first_interaction_issue_instructions: | + first_issue_response: | 👋 Hello @${{ github.actor }}, thank you for your interest in Ultralytics 🚀! We recommend a visit to the [Docs](https://docs.ultralytics.com) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/) to help us debug it. From cc5643e81c390c2f3f314a67b9debf4bbd2ac0da Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 13 Sep 2024 02:31:10 +0200 Subject: [PATCH 16/80] Add discussions to format.yml (#16257) --- .github/workflows/format.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 9d6fc3cb..fd4faaad 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -7,6 +7,8 @@ name: Ultralytics Actions on: issues: types: [opened, edited] + discussion: + types: [created] pull_request_target: branches: [main] types: [opened, closed, synchronize, review_requested] From 9307df797470c56c695c17ac4612e7ac013bba8c Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:34:23 +0800 Subject: [PATCH 17/80] Fix inaccuracies in OBB docs (#16253) Co-authored-by: Glenn Jocher --- docs/en/datasets/obb/dota-v2.md | 12 ++++++------ docs/en/datasets/obb/index.md | 12 ++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/en/datasets/obb/dota-v2.md b/docs/en/datasets/obb/dota-v2.md index 70cac23c..66b3ac5f 100644 --- a/docs/en/datasets/obb/dota-v2.md +++ b/docs/en/datasets/obb/dota-v2.md @@ -111,15 +111,15 @@ To train a model on the DOTA v1 dataset, you can utilize the following code snip # Create a new YOLOv8n-OBB model from scratch model = YOLO("yolov8n-obb.yaml") - # Train the model on the DOTAv2 dataset - results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640) + # Train the model on the DOTAv1 dataset + results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=1024) ``` === "CLI" ```bash - # Train a new YOLOv8n-OBB model on the DOTAv2 dataset - yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 + # Train a new YOLOv8n-OBB model on the DOTAv1 dataset + yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=1024 ``` ## Sample Data and Annotations @@ -180,14 +180,14 @@ To train a model on the DOTA dataset, you can use the following example with Ult model = YOLO("yolov8n-obb.yaml") # Train the model on the DOTAv1 dataset - results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640) + results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=1024) ``` === "CLI" ```bash # Train a new YOLOv8n-OBB model on the DOTAv1 dataset - yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 + yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=1024 ``` For more details on how to split and preprocess the DOTA images, refer to the [split DOTA images section](#split-dota-images). diff --git a/docs/en/datasets/obb/index.md b/docs/en/datasets/obb/index.md index 02cd08e3..4ca53497 100644 --- a/docs/en/datasets/obb/index.md +++ b/docs/en/datasets/obb/index.md @@ -42,21 +42,23 @@ To train a model using these OBB formats: # Create a new YOLOv8n-OBB model from scratch model = YOLO("yolov8n-obb.yaml") - # Train the model on the DOTAv2 dataset - results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640) + # Train the model on the DOTAv1 dataset + results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=1024) ``` === "CLI" ```bash - # Train a new YOLOv8n-OBB model on the DOTAv2 dataset - yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 + # Train a new YOLOv8n-OBB model on the DOTAv1 dataset + yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=1024 ``` ## Supported Datasets Currently, the following datasets with Oriented Bounding Boxes are supported: +- [DOTA-v1](dota-v2.md): The first version of the DOTA dataset, providing a comprehensive set of aerial images with oriented bounding boxes for object detection. +- [DOTA-v1.5](dota-v2.md): An intermediate version of the DOTA dataset, offering additional annotations and improvements over DOTA-v1 for enhanced object detection tasks. - [DOTA-v2](dota-v2.md): DOTA (A Large-scale Dataset for Object Detection in Aerial Images) version 2, emphasizes detection from aerial perspectives and contains oriented bounding boxes with 1.7 million instances and 11,268 images. - [DOTA8](dota8.md): A small, 8-image subset of the full DOTA dataset suitable for testing workflows and Continuous Integration (CI) checks of OBB training in the `ultralytics` repository. @@ -133,6 +135,8 @@ This ensures your model leverages the detailed OBB annotations for improved dete Currently, Ultralytics supports the following datasets for OBB training: +- [DOTA-v1](dota-v2.md): The first version of the DOTA dataset, providing a comprehensive set of aerial images with oriented bounding boxes for object detection. +- [DOTA-v1.5](dota-v2.md): An intermediate version of the DOTA dataset, offering additional annotations and improvements over DOTA-v1 for enhanced object detection tasks. - [DOTA-v2](dota-v2.md): This dataset includes 1.7 million instances with oriented bounding boxes and 11,268 images, primarily focusing on aerial object detection. - [DOTA8](dota8.md): A smaller, 8-image subset of the DOTA dataset used for testing and continuous integration (CI) checks. From 8162fd33f09ff56da9eacdc4de2c6f7341f4d739 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 13 Sep 2024 11:56:42 +0200 Subject: [PATCH 18/80] Update Tracker Docs (#16262) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/macros/track-args.md | 18 +++++++++--------- docs/mkdocs_github_authors.yaml | 3 +++ mkdocs.yml | 17 +++++++++++++++-- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/docs/en/macros/track-args.md b/docs/en/macros/track-args.md index a6c220e1..2d3a7c8a 100644 --- a/docs/en/macros/track-args.md +++ b/docs/en/macros/track-args.md @@ -1,9 +1,9 @@ -| Name | Type | Default | Description | -| --------- | ------- | -------------- | ----------------------------------------------------------- | -| `source` | `im0` | `None` | source directory for images or videos | -| `persist` | `bool` | `False` | persisting tracks between frames | -| `tracker` | `str` | `botsort.yaml` | Tracking method 'bytetrack' or 'botsort' | -| `conf` | `float` | `0.3` | Confidence Threshold | -| `iou` | `float` | `0.5` | IOU Threshold | -| `classes` | `list` | `None` | filter results by class, i.e. classes=0, or classes=[0,2,3] | -| `verbose` | `bool` | `True` | Display the object tracking results | +| Argument | Type | Default | Description | +| --------- | ------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `source` | `str` | `None` | Specifies the source directory for images or videos. Supports file paths and URLs. | +| `persist` | `bool` | `False` | Enables persistent tracking of objects between frames, maintaining IDs across video sequences. | +| `tracker` | `str` | `botsort.yaml` | Specifies the tracking algorithm to use, e.g., `bytetrack.yaml` or `botsort.yaml`. | +| `conf` | `float` | `0.3` | Sets the confidence threshold for detections; lower values allow more objects to be tracked but may include false positives. | +| `iou` | `float` | `0.5` | Sets the Intersection over Union (IoU) threshold for filtering overlapping detections. | +| `classes` | `list` | `None` | Filters results by class index. For example, `classes=[0, 2, 3]` only tracks the specified classes. | +| `verbose` | `bool` | `True` | Controls the display of tracking results, providing a visual output of tracked objects. | diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml index a40aa79a..16075679 100644 --- a/docs/mkdocs_github_authors.yaml +++ b/docs/mkdocs_github_authors.yaml @@ -19,6 +19,9 @@ 17316848+maianumerosky@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/17316848?v=4 username: maianumerosky +32206511+Y-T-G@users.noreply.github.com: + avatar: https://avatars.githubusercontent.com/u/32206511?v=4 + username: Y-T-G 34196005+fcakyon@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/34196005?v=4 username: fcakyon diff --git a/mkdocs.yml b/mkdocs.yml index e97b3fc1..1ec7c9c2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -211,8 +211,6 @@ nav: - solutions/index.md - Guides: - guides/index.md - - Explorer: - - datasets/explorer/index.md - Modes: - modes/index.md - Train: modes/train.md @@ -221,6 +219,13 @@ nav: - Export: modes/export.md - Track: modes/track.md - Benchmark: modes/benchmark.md + - Tasks: + - tasks/index.md + - Detect: tasks/detect.md + - Segment: tasks/segment.md + - Classify: tasks/classify.md + - Pose: tasks/pose.md + - OBB: tasks/obb.md - Tasks: - tasks/index.md - Detect: tasks/detect.md @@ -228,6 +233,14 @@ nav: - Classify: tasks/classify.md - Pose: tasks/pose.md - OBB: tasks/obb.md + - Modes: + - modes/index.md + - Train: modes/train.md + - Val: modes/val.md + - Predict: modes/predict.md + - Export: modes/export.md + - Track: modes/track.md + - Benchmark: modes/benchmark.md - Models: - models/index.md - YOLOv3: models/yolov3.md From d8baebc95235a35e9e4666b1fed3218e0b15ecd0 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Fri, 13 Sep 2024 21:51:32 +0500 Subject: [PATCH 19/80] Add https://youtu.be/GIrFEoR5PoU to docs (#16264) --- docs/en/guides/model-training-tips.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/guides/model-training-tips.md b/docs/en/guides/model-training-tips.md index 2efa53e7..932a412f 100644 --- a/docs/en/guides/model-training-tips.md +++ b/docs/en/guides/model-training-tips.md @@ -10,6 +10,17 @@ keywords: Model Training Machine Learning, AI Model Training, Number of Epochs, One of the most important steps when working on a [computer vision project](./steps-of-a-cv-project.md) is model training. Before reaching this step, you need to [define your goals](./defining-project-goals.md) and [collect and annotate your data](./data-collection-and-annotation.md). After [preprocessing the data](./preprocessing_annotated_data.md) to make sure it is clean and consistent, you can move on to training your model. +

+
+ +
+ Watch: Model Training Tips | How to Handle Large Datasets | Batch Size, GPU Utilization and Mixed Precision +

+ So, what is [model training](../modes/train.md)? Model training is the process of teaching your model to recognize visual patterns and make predictions based on your data. It directly impacts the performance and accuracy of your application. In this guide, we'll cover best practices, optimization techniques, and troubleshooting tips to help you train your computer vision models effectively. ## How to Train a Machine Learning Model From 684519fe524e6319eeccd1b458ab73cf15428814 Mon Sep 17 00:00:00 2001 From: inisis <46103969+inisis@users.noreply.github.com> Date: Sat, 14 Sep 2024 01:33:42 +0800 Subject: [PATCH 20/80] Update `onnxslim==0.1.34` (#16265) Co-authored-by: Glenn Jocher --- ultralytics/engine/exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index 01855333..df90e838 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -391,7 +391,7 @@ def export_onnx(self, prefix=colorstr("ONNX:")): """YOLOv8 ONNX export.""" requirements = ["onnx>=1.12.0"] if self.args.simplify: - requirements += ["onnxslim==0.1.32", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")] + requirements += ["onnxslim==0.1.34", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")] check_requirements(requirements) import onnx # noqa From bf2b221d11444d11f872afdcf4b04419c79984e1 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Fri, 13 Sep 2024 22:34:35 +0500 Subject: [PATCH 21/80] Optimize `speed estimation` solution (#16254) Co-authored-by: UltralyticsAssistant --- docs/en/guides/speed-estimation.md | 3 +- ultralytics/solutions/speed_estimation.py | 172 +++++++--------------- 2 files changed, 55 insertions(+), 120 deletions(-) diff --git a/docs/en/guides/speed-estimation.md b/docs/en/guides/speed-estimation.md index e9c9cb29..9b76d0a3 100644 --- a/docs/en/guides/speed-estimation.md +++ b/docs/en/guides/speed-estimation.md @@ -72,7 +72,7 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision 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) im0 = speed_obj.estimate_speed(im0, tracks) video_writer.write(im0) @@ -94,7 +94,6 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision | `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/ultralytics/solutions/speed_estimation.py b/ultralytics/solutions/speed_estimation.py index b2b88fbb..70964241 100644 --- a/ultralytics/solutions/speed_estimation.py +++ b/ultralytics/solutions/speed_estimation.py @@ -13,7 +13,7 @@ class SpeedEstimator: """A class to estimate the speed of objects in a real-time video stream based on their tracks.""" - def __init__(self, names, reg_pts=None, view_img=False, line_thickness=2, region_thickness=5, spdl_dist_thresh=10): + def __init__(self, names, reg_pts=None, view_img=False, line_thickness=2, spdl_dist_thresh=10): """ Initializes the SpeedEstimator with the given parameters. @@ -22,158 +22,94 @@ def __init__(self, names, reg_pts=None, view_img=False, line_thickness=2, region 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 = view_img - # Region information self.reg_pts = reg_pts if reg_pts is not None else [(20, 400), (1260, 400)] - self.region_thickness = region_thickness + + self.names = names # Classes names # Tracking information - self.clss = None - self.names = names - self.boxes = None - self.trk_ids = None - self.trk_pts = None - self.line_thickness = line_thickness self.trk_history = defaultdict(list) - # Speed estimation information - self.current_time = 0 - self.dist_data = {} - self.trk_idslist = [] - self.spdl_dist_thresh = spdl_dist_thresh - self.trk_previous_times = {} - self.trk_previous_points = {} + self.view_img = view_img # bool for displaying inference + self.tf = line_thickness # line thickness for annotator + self.spd = {} # set for speed data + self.trkd_ids = [] # list for already speed_estimated and tracked ID's + self.spdl = spdl_dist_thresh # Speed line distance threshold + self.trk_pt = {} # set for tracks previous time + self.trk_pp = {} # set for tracks previous point # Check if the environment supports imshow self.env_check = check_imshow(warn=True) - def extract_tracks(self, tracks): + def estimate_speed(self, im0, tracks): """ - Extracts results from the provided tracking data. + Estimates the speed of objects based on tracking data. Args: + im0 (ndarray): Image. tracks (list): List of tracks obtained from the object tracking process. - """ - self.boxes = tracks[0].boxes.xyxy.cpu() - self.clss = tracks[0].boxes.cls.cpu().tolist() - self.trk_ids = tracks[0].boxes.id.int().cpu().tolist() - - def store_track_info(self, track_id, box): - """ - Stores track data. - - Args: - track_id (int): Object track id. - box (list): Object bounding box data. Returns: - (list): Updated tracking history for the given track_id. + (ndarray): The image with annotated boxes and tracks. """ - track = self.trk_history[track_id] - bbox_center = (float((box[0] + box[2]) / 2), float((box[1] + box[3]) / 2)) - track.append(bbox_center) + if tracks[0].boxes.id is None: + return im0 - if len(track) > 30: - track.pop(0) + boxes = tracks[0].boxes.xyxy.cpu() + clss = tracks[0].boxes.cls.cpu().tolist() + t_ids = tracks[0].boxes.id.int().cpu().tolist() + annotator = Annotator(im0, line_width=self.tf) + annotator.draw_region(reg_pts=self.reg_pts, color=(255, 0, 255), thickness=self.tf * 2) - self.trk_pts = np.hstack(track).astype(np.int32).reshape((-1, 1, 2)) - return track + for box, t_id, cls in zip(boxes, t_ids, clss): + track = self.trk_history[t_id] + bbox_center = (float((box[0] + box[2]) / 2), float((box[1] + box[3]) / 2)) + track.append(bbox_center) - def plot_box_and_track(self, track_id, box, cls, track): - """ - Plots track and bounding box. + if len(track) > 30: + track.pop(0) - Args: - 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/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) + trk_pts = np.hstack(track).astype(np.int32).reshape((-1, 1, 2)) - 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) + if t_id not in self.trk_pt: + self.trk_pt[t_id] = 0 - def calculate_speed(self, trk_id, track): - """ - Calculates the speed of an object. + speed_label = f"{int(self.spd[t_id])} km/h" if t_id in self.spd else self.names[int(cls)] + bbox_color = colors(int(t_id), True) - Args: - 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.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] - if time_difference > 0: - dist_difference = np.abs(track[-1][1] - self.trk_previous_points[trk_id][1]) - speed = dist_difference / time_difference - self.dist_data[trk_id] = speed - - self.trk_previous_times[trk_id] = time() - self.trk_previous_points[trk_id] = track[-1] - - def estimate_speed(self, im0, tracks, region_color=(255, 0, 0)): - """ - Estimates the speed of objects based on tracking data. + annotator.box_label(box, speed_label, bbox_color) + cv2.polylines(im0, [trk_pts], isClosed=False, color=bbox_color, thickness=self.tf) + cv2.circle(im0, (int(track[-1][0]), int(track[-1][1])), self.tf * 2, bbox_color, -1) - Args: - im0 (ndarray): Image. - tracks (list): List of tracks obtained from the object tracking process. - region_color (tuple, optional): Color to use when drawing regions. Defaults to (255, 0, 0). + # Calculation of object speed + if not self.reg_pts[0][0] < track[-1][0] < self.reg_pts[1][0]: + return + if self.reg_pts[1][1] - self.spdl < track[-1][1] < self.reg_pts[1][1] + self.spdl: + direction = "known" + elif self.reg_pts[0][1] - self.spdl < track[-1][1] < self.reg_pts[0][1] + self.spdl: + direction = "known" + else: + direction = "unknown" - 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 + if self.trk_pt.get(t_id) != 0 and direction != "unknown" and t_id not in self.trkd_ids: + self.trkd_ids.append(t_id) - 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) + time_difference = time() - self.trk_pt[t_id] + if time_difference > 0: + self.spd[t_id] = np.abs(track[-1][1] - self.trk_pp[t_id][1]) / time_difference - for box, trk_id, cls in zip(self.boxes, self.trk_ids, self.clss): - track = self.store_track_info(trk_id, box) - - if trk_id not in self.trk_previous_times: - self.trk_previous_times[trk_id] = 0 - - self.plot_box_and_track(trk_id, box, cls, track) - self.calculate_speed(trk_id, track) + self.trk_pt[t_id] = time() + self.trk_pp[t_id] = track[-1] if self.view_img and self.env_check: - self.display_frames() + cv2.imshow("Ultralytics Speed Estimation", im0) + if cv2.waitKey(1) & 0xFF == ord("q"): + return return im0 - def display_frames(self): - """Displays the current frame.""" - cv2.imshow("Ultralytics Speed Estimation", self.im0) - if cv2.waitKey(1) & 0xFF == ord("q"): - return - if __name__ == "__main__": names = {0: "person", 1: "car"} # example class names From 6c3297623bb2974234dbd44ae4925c8d6d927adc Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Sat, 14 Sep 2024 01:35:33 +0800 Subject: [PATCH 22/80] Allow agnostic NMS in validation for OBB, Pose, Segment and NAS (#16251) --- ultralytics/models/nas/val.py | 2 +- ultralytics/models/yolo/obb/val.py | 2 +- ultralytics/models/yolo/pose/val.py | 2 +- ultralytics/models/yolo/segment/val.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ultralytics/models/nas/val.py b/ultralytics/models/nas/val.py index 7de446d4..c4fb73b6 100644 --- a/ultralytics/models/nas/val.py +++ b/ultralytics/models/nas/val.py @@ -44,7 +44,7 @@ def postprocess(self, preds_in): self.args.iou, labels=self.lb, multi_label=False, - agnostic=self.args.single_cls, + agnostic=self.args.single_cls or self.args.agnostic_nms, max_det=self.args.max_det, max_time_img=0.5, ) diff --git a/ultralytics/models/yolo/obb/val.py b/ultralytics/models/yolo/obb/val.py index b4048af4..93bb2bfa 100644 --- a/ultralytics/models/yolo/obb/val.py +++ b/ultralytics/models/yolo/obb/val.py @@ -45,7 +45,7 @@ def postprocess(self, preds): labels=self.lb, nc=self.nc, multi_label=True, - agnostic=self.args.single_cls, + agnostic=self.args.single_cls or self.args.agnostic_nms, max_det=self.args.max_det, rotated=True, ) diff --git a/ultralytics/models/yolo/pose/val.py b/ultralytics/models/yolo/pose/val.py index cba42a6e..bdf17328 100644 --- a/ultralytics/models/yolo/pose/val.py +++ b/ultralytics/models/yolo/pose/val.py @@ -69,7 +69,7 @@ def postprocess(self, preds): self.args.iou, labels=self.lb, multi_label=True, - agnostic=self.args.single_cls, + agnostic=self.args.single_cls or self.args.agnostic_nms, max_det=self.args.max_det, nc=self.nc, ) diff --git a/ultralytics/models/yolo/segment/val.py b/ultralytics/models/yolo/segment/val.py index 36ccd9c2..30b63f97 100644 --- a/ultralytics/models/yolo/segment/val.py +++ b/ultralytics/models/yolo/segment/val.py @@ -76,7 +76,7 @@ def postprocess(self, preds): self.args.iou, labels=self.lb, multi_label=True, - agnostic=self.args.single_cls, + agnostic=self.args.single_cls or self.args.agnostic_nms, max_det=self.args.max_det, nc=self.nc, ) From e309b6efabe2b868cbedef2de8c89efac365b3ce Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Fri, 13 Sep 2024 22:36:23 +0500 Subject: [PATCH 23/80] Optimize `queue` solution (#16246) Co-authored-by: UltralyticsAssistant --- docs/en/guides/queue-management.md | 33 ++++-------- ultralytics/solutions/queue_management.py | 66 +++++------------------ 2 files changed, 23 insertions(+), 76 deletions(-) diff --git a/docs/en/guides/queue-management.md b/docs/en/guides/queue-management.md index bf9beba4..993d4141 100644 --- a/docs/en/guides/queue-management.md +++ b/docs/en/guides/queue-management.md @@ -56,15 +56,13 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra 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() if success: - tracks = model.track(im0, show=False, persist=True, verbose=False) + tracks = model.track(im0, persist=True) out = queue.process_queue(im0, tracks) video_writer.write(im0) @@ -100,15 +98,13 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra 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() if success: - tracks = model.track(im0, show=False, persist=True, verbose=False, classes=0) # Only person class + tracks = model.track(im0, persist=True, classes=0) # Only person class out = queue.process_queue(im0, tracks) video_writer.write(im0) @@ -125,20 +121,13 @@ Queue management using [Ultralytics YOLOv8](https://github.com/ultralytics/ultra ### Arguments `QueueManager` -| Name | Type | Default | Description | -| ------------------- | ---------------- | -------------------------- | ----------------------------------------------------------------------------------- | -| `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. | +| Name | Type | Default | Description | +| ---------------- | ---------------- | -------------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `view_img` | `bool` | `False` | Whether to display the image frames. | +| `draw_tracks` | `bool` | `False` | Whether to draw tracks of the objects. | ### Arguments `model.track` @@ -170,8 +159,6 @@ queue = solutions.QueueManager( names=model.names, reg_pts=queue_region, line_thickness=3, - fontsize=1.0, - region_color=(255, 144, 31), ) while cap.isOpened(): @@ -223,8 +210,6 @@ queue_airport = solutions.QueueManager( names=model.names, reg_pts=queue_region_airport, line_thickness=3, - fontsize=1.0, - region_color=(0, 255, 0), ) ``` diff --git a/ultralytics/solutions/queue_management.py b/ultralytics/solutions/queue_management.py index 16df28b1..ef601503 100644 --- a/ultralytics/solutions/queue_management.py +++ b/ultralytics/solutions/queue_management.py @@ -20,15 +20,8 @@ def __init__( names, reg_pts=None, line_thickness=2, - track_thickness=2, view_img=False, - region_color=(255, 0, 255), - view_queue_counts=True, draw_tracks=False, - count_txt_color=(255, 255, 255), - track_color=None, - region_thickness=5, - fontsize=0.7, ): """ Initializes the QueueManager with specified parameters for tracking and counting objects. @@ -38,57 +31,35 @@ def __init__( 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 + # annotation Information self.tf = line_thickness self.view_img = view_img - self.view_queue_counts = view_queue_counts - self.fontsize = fontsize self.names = 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.track_color = track_color # Check if environment supports imshow self.env_check = check_imshow(warn=True) - def extract_and_process_tracks(self, tracks): + def extract_and_process_tracks(self, tracks, im0): """Extracts and processes tracks for queue management in a video stream.""" # Initialize annotator and draw the queue region - self.annotator = Annotator(self.im0, self.tf, self.names) + annotator = Annotator(im0, self.tf, self.names) self.counts = 0 # Reset counts every frame if tracks[0].boxes.id is not None: boxes = tracks[0].boxes.xyxy.cpu() @@ -98,7 +69,7 @@ def extract_and_process_tracks(self, tracks): # Extract tracks for box, track_id, cls in zip(boxes, track_ids, clss): # Draw bounding box - self.annotator.box_label(box, label=f"{self.names[cls]}#{track_id}", color=colors(int(track_id), True)) + annotator.box_label(box, label=self.names[cls], color=colors(int(track_id), True)) # Update track history track_line = self.track_history[track_id] @@ -108,10 +79,10 @@ def extract_and_process_tracks(self, tracks): # Draw track trails if enabled if self.draw_tracks: - self.annotator.draw_centroid_and_tracks( + annotator.draw_centroid_and_tracks( track_line, - color=self.track_color or colors(int(track_id), True), - track_thickness=self.track_thickness, + color=colors(int(track_id), True), + track_thickness=self.line_thickness, ) prev_position = self.track_history[track_id][-2] if len(self.track_history[track_id]) > 1 else None @@ -125,21 +96,16 @@ def extract_and_process_tracks(self, tracks): # Display queue counts label = f"Queue Counts : {str(self.counts)}" if label is not None: - self.annotator.queue_counts_display( + annotator.queue_counts_display( label, points=self.reg_pts, - region_color=self.region_color, - txt_color=self.count_txt_color, + region_color=(255, 0, 255), + txt_color=(104, 31, 17), ) - self.display_frames() - - def display_frames(self): - """Displays the current frame with annotations.""" if self.env_check and self.view_img: - 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) + annotator.draw_region(reg_pts=self.reg_pts, thickness=self.tf * 2, color=(255, 0, 255)) + cv2.imshow("Ultralytics YOLOv8 Queue Manager", im0) # Close window on 'q' key press if cv2.waitKey(1) & 0xFF == ord("q"): return @@ -152,12 +118,8 @@ def process_queue(self, im0, tracks): im0 (ndarray): Current frame from the video stream. tracks (list): List of tracks obtained from the object tracking process. """ - self.im0 = im0 # Store the current frame - self.extract_and_process_tracks(tracks) # Extract and process tracks - - if self.view_img: - self.display_frames() # Display the frame if enabled - return self.im0 + self.extract_and_process_tracks(tracks, im0) # Extract and process tracks + return im0 if __name__ == "__main__": From c2068df9d981c5ae27fedee550bdaedddcec3c53 Mon Sep 17 00:00:00 2001 From: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:56:59 +0200 Subject: [PATCH 24/80] `ultralytics 8.2.93` new SafeClass and SafeUnpickler classes (#16269) Signed-off-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/nn/tasks.py | 55 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 1968fbaa..979bc037 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.92" +__version__ = "8.2.93" import os diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py index 46974620..274f56d5 100644 --- a/ultralytics/nn/tasks.py +++ b/ultralytics/nn/tasks.py @@ -1,6 +1,8 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license import contextlib +import pickle +import types from copy import deepcopy from pathlib import Path @@ -750,7 +752,35 @@ def temporary_modules(modules=None, attributes=None): del sys.modules[old] -def torch_safe_load(weight): +class SafeClass: + """A placeholder class to replace unknown classes during unpickling.""" + + def __init__(self, *args, **kwargs): + """Initialize SafeClass instance, ignoring all arguments.""" + pass + + +class SafeUnpickler(pickle.Unpickler): + """Custom Unpickler that replaces unknown classes with SafeClass.""" + + def find_class(self, module, name): + """Attempt to find a class, returning SafeClass if not among safe modules.""" + safe_modules = ( + "torch", + "collections", + "collections.abc", + "builtins", + "math", + "numpy", + # Add other modules considered safe + ) + if module in safe_modules: + return super().find_class(module, name) + else: + return SafeClass + + +def torch_safe_load(weight, safe_only=False): """ Attempts to load a PyTorch model with the torch.load() function. If a ModuleNotFoundError is raised, it catches the error, logs a warning message, and attempts to install the missing module via the check_requirements() function. @@ -758,9 +788,18 @@ def torch_safe_load(weight): Args: weight (str): The file path of the PyTorch model. + safe_only (bool): If True, replace unknown classes with SafeClass during loading. + + Example: + ```python + from ultralytics.nn.tasks import torch_safe_load + + ckpt, file = torch_safe_load("path/to/best.pt", safe_only=True) + ``` Returns: - (dict): The loaded PyTorch model. + ckpt (dict): The loaded model checkpoint. + file (str): The loaded filename """ from ultralytics.utils.downloads import attempt_download_asset @@ -779,7 +818,15 @@ def torch_safe_load(weight): "ultralytics.utils.loss.v10DetectLoss": "ultralytics.utils.loss.E2EDetectLoss", # YOLOv10 }, ): - ckpt = torch.load(file, map_location="cpu") + if safe_only: + # Load via custom pickle module + safe_pickle = types.ModuleType("safe_pickle") + safe_pickle.Unpickler = SafeUnpickler + safe_pickle.load = lambda file_obj: SafeUnpickler(file_obj).load() + with open(file, "rb") as f: + ckpt = torch.load(f, pickle_module=safe_pickle) + else: + ckpt = torch.load(file, map_location="cpu") except ModuleNotFoundError as e: # e.name is missing module name if e.name == "models": @@ -809,7 +856,7 @@ def torch_safe_load(weight): ) ckpt = {"model": ckpt.model} - return ckpt, file # load + return ckpt, file def attempt_load_weights(weights, device=None, inplace=True, fuse=False): From 02e995383de4ee3754ceb96a993f91b070c71e77 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Sat, 14 Sep 2024 18:11:46 +0800 Subject: [PATCH 25/80] Return boxes for SAM prompts inference (#16276) Co-authored-by: UltralyticsAssistant --- tests/test_cli.py | 2 +- ultralytics/models/sam/predict.py | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 9582dde8..3eadf3c2 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -101,7 +101,7 @@ def test_mobilesam(): model.predict(source, points=[900, 370], labels=[1]) # Predict a segment based on a box prompt - model.predict(source, bboxes=[439, 437, 524, 709]) + model.predict(source, bboxes=[439, 437, 524, 709], save=True) # Predict all # model(source) diff --git a/ultralytics/models/sam/predict.py b/ultralytics/models/sam/predict.py index 8ecb069e..686ef70c 100644 --- a/ultralytics/models/sam/predict.py +++ b/ultralytics/models/sam/predict.py @@ -450,16 +450,18 @@ def postprocess(self, preds, img, orig_imgs): results = [] for masks, orig_img, img_path in zip([pred_masks], orig_imgs, self.batch[0]): - if pred_bboxes is not None: - pred_bboxes = ops.scale_boxes(img.shape[2:], pred_bboxes.float(), orig_img.shape, padding=False) - cls = torch.arange(len(pred_masks), dtype=torch.int32, device=pred_masks.device) - pred_bboxes = torch.cat([pred_bboxes, pred_scores[:, None], cls[:, None]], dim=-1) - if len(masks) == 0: masks = None else: masks = ops.scale_masks(masks[None].float(), orig_img.shape[:2], padding=False)[0] masks = masks > self.model.mask_threshold # to bool + if pred_bboxes is not None: + pred_bboxes = ops.scale_boxes(img.shape[2:], pred_bboxes.float(), orig_img.shape, padding=False) + else: + pred_bboxes = batched_mask_to_box(masks) + # NOTE: SAM models do not return cls info. This `cls` here is just a placeholder for consistency. + cls = torch.arange(len(pred_masks), dtype=torch.int32, device=pred_masks.device) + pred_bboxes = torch.cat([pred_bboxes, pred_scores[:, None], cls[:, None]], dim=-1) results.append(Results(orig_img, path=img_path, names=names, masks=masks, boxes=pred_bboxes)) # Reset segment-all mode. self.segment_all = False From 887b46216cb5b987a178e2c0e010d58fa4f15461 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 15 Sep 2024 00:27:46 +0200 Subject: [PATCH 26/80] Docs improvements and redirect fixes (#16287) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- CONTRIBUTING.md | 10 +++++----- README.md | 14 +++++++------- README.zh-CN.md | 14 +++++++------- docs/README.md | 4 ++-- docs/coming_soon_template.md | 2 +- docs/en/datasets/index.md | 4 ++-- docs/en/datasets/segment/coco8-seg.md | 2 +- docs/en/datasets/segment/package-seg.md | 2 +- docs/en/guides/object-blurring.md | 4 ++-- docs/en/guides/object-counting.md | 2 +- ...imizing-openvino-latency-vs-throughput-modes.md | 8 ++++---- docs/en/guides/raspberry-pi.md | 4 ++-- docs/en/guides/security-alarm-system.md | 2 +- docs/en/guides/streamlit-live-inference.md | 4 ++-- docs/en/guides/triton-inference-server.md | 4 ++-- docs/en/help/contributing.md | 10 +++++----- docs/en/hub/datasets.md | 2 +- docs/en/hub/index.md | 4 ++-- docs/en/hub/inference-api.md | 2 +- docs/en/hub/integrations.md | 2 +- docs/en/hub/models.md | 4 ++-- docs/en/hub/quickstart.md | 6 +++--- docs/en/integrations/edge-tpu.md | 2 +- docs/en/modes/export.md | 10 +++++----- docs/en/modes/index.md | 2 +- docs/en/modes/train.md | 6 +++--- docs/en/modes/val.md | 4 ++-- docs/en/tasks/classify.md | 2 +- docs/en/tasks/detect.md | 2 +- docs/en/tasks/obb.md | 3 +-- docs/en/tasks/pose.md | 3 +-- docs/en/tasks/segment.md | 3 +-- docs/en/usage/cli.md | 2 +- docs/en/yolov5/tutorials/train_custom_data.md | 2 +- examples/README.md | 2 +- pyproject.toml | 4 ++-- ultralytics/cfg/models/README.md | 8 ++++---- ultralytics/trackers/README.md | 2 +- 38 files changed, 82 insertions(+), 85 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d884e43b..b3dbfe16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Welcome! We're thrilled that you're considering contributing to our [Ultralytics ## Code of Conduct -To ensure a welcoming and inclusive environment for everyone, all contributors must adhere to our [Code of Conduct](https://docs.ultralytics.com/help/code_of_conduct). Respect, kindness, and professionalism are at the heart of our community. +To ensure a welcoming and inclusive environment for everyone, all contributors must adhere to our [Code of Conduct](https://docs.ultralytics.com/help/code_of_conduct/). Respect, kindness, and professionalism are at the heart of our community. ## Contributing via Pull Requests @@ -45,7 +45,7 @@ We greatly appreciate contributions in the form of pull requests. To make the re ### CLA Signing -Before we can merge your pull request, you must sign our [Contributor License Agreement (CLA)](https://docs.ultralytics.com/help/CLA). This legal agreement ensures that your contributions are properly licensed, allowing the project to continue being distributed under the AGPL-3.0 license. +Before we can merge your pull request, you must sign our [Contributor License Agreement (CLA)](https://docs.ultralytics.com/help/CLA/). This legal agreement ensures that your contributions are properly licensed, allowing the project to continue being distributed under the AGPL-3.0 license. After submitting your pull request, the CLA bot will guide you through the signing process. To sign the CLA, simply add a comment in your PR stating: @@ -117,11 +117,11 @@ def example_small_function(arg1: int, arg2: int = 4) -> bool: ### GitHub Actions CI Tests -All pull requests must pass the GitHub Actions [Continuous Integration](https://docs.ultralytics.com/help/CI) (CI) tests before they can be merged. These tests include linting, unit tests, and other checks to ensure that your changes meet the project's quality standards. Review the CI output and address any issues that arise. +All pull requests must pass the GitHub Actions [Continuous Integration](https://docs.ultralytics.com/help/CI/) (CI) tests before they can be merged. These tests include linting, unit tests, and other checks to ensure that your changes meet the project's quality standards. Review the CI output and address any issues that arise. ## Reporting Bugs -We highly value bug reports as they help us maintain the quality of our projects. When reporting a bug, please provide a [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example)—a simple, clear code example that consistently reproduces the issue. This allows us to quickly identify and resolve the problem. +We highly value bug reports as they help us maintain the quality of our projects. When reporting a bug, please provide a [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example/)—a simple, clear code example that consistently reproduces the issue. This allows us to quickly identify and resolve the problem. ## License @@ -163,4 +163,4 @@ the project's quality standards. Review the CI output and fix any issues. For de ### How do I report a bug in Ultralytics YOLO repositories? -To report a bug, provide a clear and concise [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example) along with your bug report. This helps developers quickly identify and fix the issue. Ensure your example is minimal yet sufficient to replicate the problem. For more detailed steps on reporting bugs, refer to the [Reporting Bugs](#reporting-bugs) section. +To report a bug, provide a clear and concise [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example/) along with your bug report. This helps developers quickly identify and fix the issue. Ensure your example is minimal yet sufficient to replicate the problem. For more detailed steps on reporting bugs, refer to the [Reporting Bugs](#reporting-bugs) section. diff --git a/README.md b/README.md index 1cc1686e..e13ef564 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ To request an Enterprise License please complete the form at [Ultralytics Licens ##
Documentation
-See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com) for full documentation on training, validation, prediction and deployment. +See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com/) for full documentation on training, validation, prediction and deployment.
Install @@ -60,7 +60,7 @@ Pip install the ultralytics package including all [requirements](https://github. pip install ultralytics ``` -For alternative installation methods including [Conda](https://anaconda.org/conda-forge/ultralytics), [Docker](https://hub.docker.com/r/ultralytics/ultralytics), and Git, please refer to the [Quickstart Guide](https://docs.ultralytics.com/quickstart). +For alternative installation methods including [Conda](https://anaconda.org/conda-forge/ultralytics), [Docker](https://hub.docker.com/r/ultralytics/ultralytics), and Git, please refer to the [Quickstart Guide](https://docs.ultralytics.com/quickstart/). [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ultralytics?logo=condaforge)](https://anaconda.org/conda-forge/ultralytics) [![Docker Image Version](https://img.shields.io/docker/v/ultralytics/ultralytics?sort=semver&logo=docker)](https://hub.docker.com/r/ultralytics/ultralytics) @@ -77,7 +77,7 @@ YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` co yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' ``` -`yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See the YOLOv8 [CLI Docs](https://docs.ultralytics.com/usage/cli) for examples. +`yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See the YOLOv8 [CLI Docs](https://docs.ultralytics.com/usage/cli/) for examples. ### Python @@ -97,7 +97,7 @@ results = model("https://ultralytics.com/images/bus.jpg") # predict on an image path = model.export(format="onnx") # export the model to ONNX format ``` -See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python) for more examples. +See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python/) for more examples.
@@ -116,7 +116,7 @@ Ultralytics provides interactive notebooks for YOLOv8, covering training, valida ##
Models
-YOLOv8 [Detect](https://docs.ultralytics.com/tasks/detect), [Segment](https://docs.ultralytics.com/tasks/segment) and [Pose](https://docs.ultralytics.com/tasks/pose) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset are available here, as well as YOLOv8 [Classify](https://docs.ultralytics.com/tasks/classify) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) dataset. [Track](https://docs.ultralytics.com/modes/track) mode is available for all Detect, Segment and Pose models. +YOLOv8 [Detect](https://docs.ultralytics.com/tasks/detect/), [Segment](https://docs.ultralytics.com/tasks/segment/) and [Pose](https://docs.ultralytics.com/tasks/pose/) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco/) dataset are available here, as well as YOLOv8 [Classify](https://docs.ultralytics.com/tasks/classify/) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) dataset. [Track](https://docs.ultralytics.com/modes/track/) mode is available for all Detect, Segment and Pose models. Ultralytics YOLO supported tasks @@ -227,7 +227,7 @@ See [Classification Docs](https://docs.ultralytics.com/tasks/classify/) for usag ##
Integrations
-Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino), can optimize your AI workflow. +Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino/), can optimize your AI workflow.
@@ -262,7 +262,7 @@ Experience seamless AI with [Ultralytics HUB](https://www.ultralytics.com/hub) ##
Contribute
-We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started, and fill out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you 🙏 to all our contributors! +We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started, and fill out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you 🙏 to all our contributors! diff --git a/README.zh-CN.md b/README.zh-CN.md index 79de5de2..4319c0df 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -49,7 +49,7 @@ ##
文档
-请参阅下面的快速安装和使用示例,以及 [YOLOv8 文档](https://docs.ultralytics.com) 上有关训练、验证、预测和部署的完整文档。 +请参阅下面的快速安装和使用示例,以及 [YOLOv8 文档](https://docs.ultralytics.com/) 上有关训练、验证、预测和部署的完整文档。
安装 @@ -62,7 +62,7 @@ pip install ultralytics ``` -如需使用包括[Conda](https://anaconda.org/conda-forge/ultralytics),[Docker](https://hub.docker.com/r/ultralytics/ultralytics)和Git在内的其他安装方法,请参考[快速入门指南](https://docs.ultralytics.com/quickstart)。 +如需使用包括[Conda](https://anaconda.org/conda-forge/ultralytics),[Docker](https://hub.docker.com/r/ultralytics/ultralytics)和Git在内的其他安装方法,请参考[快速入门指南](https://docs.ultralytics.com/quickstart/)。 [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ultralytics?logo=condaforge)](https://anaconda.org/conda-forge/ultralytics) [![Docker Image Version](https://img.shields.io/docker/v/ultralytics/ultralytics?sort=semver&logo=docker)](https://hub.docker.com/r/ultralytics/ultralytics) @@ -79,7 +79,7 @@ YOLOv8 可以在命令行界面(CLI)中直接使用,只需输入 `yolo` yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' ``` -`yolo` 可用于各种任务和模式,并接受其他参数,例如 `imgsz=640`。查看 YOLOv8 [CLI 文档](https://docs.ultralytics.com/usage/cli)以获取示例。 +`yolo` 可用于各种任务和模式,并接受其他参数,例如 `imgsz=640`。查看 YOLOv8 [CLI 文档](https://docs.ultralytics.com/usage/cli/)以获取示例。 ### Python @@ -99,7 +99,7 @@ results = model("https://ultralytics.com/images/bus.jpg") # 对图像进行预 success = model.export(format="onnx") # 将模型导出为 ONNX 格式 ``` -查看 YOLOv8 [Python 文档](https://docs.ultralytics.com/usage/python)以获取更多示例。 +查看 YOLOv8 [Python 文档](https://docs.ultralytics.com/usage/python/)以获取更多示例。
@@ -118,7 +118,7 @@ Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟 ##
模型
-在[COCO](https://docs.ultralytics.com/datasets/detect/coco)数据集上预训练的YOLOv8 [检测](https://docs.ultralytics.com/tasks/detect),[分割](https://docs.ultralytics.com/tasks/segment)和[姿态](https://docs.ultralytics.com/tasks/pose)模型可以在这里找到,以及在[ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet)数据集上预训练的YOLOv8 [分类](https://docs.ultralytics.com/tasks/classify)模型。所有的检测,分割和姿态模型都支持[追踪](https://docs.ultralytics.com/modes/track)模式。 +在[COCO](https://docs.ultralytics.com/datasets/detect/coco/)数据集上预训练的YOLOv8 [检测](https://docs.ultralytics.com/tasks/detect/),[分割](https://docs.ultralytics.com/tasks/segment/)和[姿态](https://docs.ultralytics.com/tasks/pose/)模型可以在这里找到,以及在[ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/)数据集上预训练的YOLOv8 [分类](https://docs.ultralytics.com/tasks/classify/)模型。所有的检测,分割和姿态模型都支持[追踪](https://docs.ultralytics.com/modes/track/)模式。 Ultralytics YOLO supported tasks @@ -229,7 +229,7 @@ Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟 ##
集成
-我们与领先的AI平台的关键整合扩展了Ultralytics产品的功能,增强了数据集标签化、训练、可视化和模型管理等任务。探索Ultralytics如何与[Roboflow](https://roboflow.com/?ref=ultralytics)、ClearML、[Comet](https://bit.ly/yolov8-readme-comet)、Neural Magic以及[OpenVINO](https://docs.ultralytics.com/integrations/openvino)合作,优化您的AI工作流程。 +我们与领先的AI平台的关键整合扩展了Ultralytics产品的功能,增强了数据集标签化、训练、可视化和模型管理等任务。探索Ultralytics如何与[Roboflow](https://roboflow.com/?ref=ultralytics)、ClearML、[Comet](https://bit.ly/yolov8-readme-comet)、Neural Magic以及[OpenVINO](https://docs.ultralytics.com/integrations/openvino/)合作,优化您的AI工作流程。
@@ -264,7 +264,7 @@ Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟 ##
贡献
-我们喜欢您的参与!没有社区的帮助,YOLOv5 和 YOLOv8 将无法实现。请参阅我们的[贡献指南](https://docs.ultralytics.com/help/contributing)以开始使用,并填写我们的[调查问卷](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey)向我们提供您的使用体验反馈。感谢所有贡献者的支持!🙏 +我们喜欢您的参与!没有社区的帮助,YOLOv5 和 YOLOv8 将无法实现。请参阅我们的[贡献指南](https://docs.ultralytics.com/help/contributing/)以开始使用,并填写我们的[调查问卷](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey)向我们提供您的使用体验反馈。感谢所有贡献者的支持!🙏 diff --git a/docs/README.md b/docs/README.md index 296b5d5a..03285c41 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,7 +3,7 @@ # 📚 Ultralytics Docs -[Ultralytics](https://www.ultralytics.com/) Docs are the gateway to understanding and utilizing our cutting-edge machine learning tools. These documents are deployed to [https://docs.ultralytics.com](https://docs.ultralytics.com) for your convenience. +[Ultralytics](https://www.ultralytics.com/) Docs are the gateway to understanding and utilizing our cutting-edge machine learning tools. These documents are deployed to [https://docs.ultralytics.com](https://docs.ultralytics.com/) for your convenience. [![pages-build-deployment](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment) [![Check Broken links](https://github.com/ultralytics/docs/actions/workflows/links.yml/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/links.yml) @@ -113,7 +113,7 @@ Choose a hosting provider and deployment method for your MkDocs documentation: ## 💡 Contribute -We cherish the community's input as it drives Ultralytics open-source initiatives. Dive into the [Contributing Guide](https://docs.ultralytics.com/help/contributing) and share your thoughts via our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A heartfelt thank you 🙏 to each contributor! +We cherish the community's input as it drives Ultralytics open-source initiatives. Dive into the [Contributing Guide](https://docs.ultralytics.com/help/contributing/) and share your thoughts via our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A heartfelt thank you 🙏 to each contributor! ![Ultralytics open-source contributors](https://github.com/ultralytics/docs/releases/download/0/ultralytics-open-source-contributors.avif) diff --git a/docs/coming_soon_template.md b/docs/coming_soon_template.md index 3f0840d4..5265d15c 100644 --- a/docs/coming_soon_template.md +++ b/docs/coming_soon_template.md @@ -27,7 +27,7 @@ Your feedback shapes our future releases. Share your thoughts and suggestions [h ## Thank You, Community! 🌍 -Your [contributions](https://docs.ultralytics.com/help/contributing) inspire our continuous [innovation](https://github.com/ultralytics/ultralytics). Stay tuned for the big reveal of what's next in AI and ML at Ultralytics! +Your [contributions](https://docs.ultralytics.com/help/contributing/) inspire our continuous [innovation](https://github.com/ultralytics/ultralytics). Stay tuned for the big reveal of what's next in AI and ML at Ultralytics! --- diff --git a/docs/en/datasets/index.md b/docs/en/datasets/index.md index f1e154ef..0a85ce15 100644 --- a/docs/en/datasets/index.md +++ b/docs/en/datasets/index.md @@ -123,7 +123,7 @@ Contributing a new dataset involves several steps to ensure that it aligns well 5. **Create a `data.yaml` File**: In your dataset's root directory, create a `data.yaml` file that describes the dataset, classes, and other necessary information. 6. **Optimize Images (Optional)**: If you want to reduce the size of the dataset for more efficient processing, you can optimize the images using the code below. This is not required, but recommended for smaller dataset sizes and faster download speeds. 7. **Zip Dataset**: Compress the entire dataset folder into a zip file. -8. **Document and PR**: Create a documentation page describing your dataset and how it fits into the existing framework. After that, submit a Pull Request (PR). Refer to [Ultralytics Contribution Guidelines](https://docs.ultralytics.com/help/contributing) for more details on how to submit a PR. +8. **Document and PR**: Create a documentation page describing your dataset and how it fits into the existing framework. After that, submit a Pull Request (PR). Refer to [Ultralytics Contribution Guidelines](https://docs.ultralytics.com/help/contributing/) for more details on how to submit a PR. ### Example Code to Optimize and Zip a Dataset @@ -175,7 +175,7 @@ Contributing a new dataset involves several steps: 5. **Create a `data.yaml` File**: Include dataset descriptions, classes, and other relevant information. 6. **Optimize Images (Optional)**: Reduce dataset size for efficiency. 7. **Zip Dataset**: Compress the dataset into a zip file. -8. **Document and PR**: Describe your dataset and submit a Pull Request following [Ultralytics Contribution Guidelines](https://docs.ultralytics.com/help/contributing). +8. **Document and PR**: Describe your dataset and submit a Pull Request following [Ultralytics Contribution Guidelines](https://docs.ultralytics.com/help/contributing/). Visit [Contribute New Datasets](#contribute-new-datasets) for a comprehensive guide. diff --git a/docs/en/datasets/segment/coco8-seg.md b/docs/en/datasets/segment/coco8-seg.md index fb505a56..50a7f41a 100644 --- a/docs/en/datasets/segment/coco8-seg.md +++ b/docs/en/datasets/segment/coco8-seg.md @@ -113,7 +113,7 @@ For a thorough explanation of available arguments and configuration options, you ### Why is the COCO8-Seg dataset important for model development and debugging? -The **COCO8-Seg dataset** is ideal for its manageability and diversity within a small size. It consists of only 8 images, providing a quick way to test and debug segmentation models or new detection approaches without the overhead of larger datasets. This makes it an efficient tool for sanity checks and pipeline error identification before committing to extensive training on large datasets. Learn more about dataset formats [here](https://docs.ultralytics.com/datasets/segment). +The **COCO8-Seg dataset** is ideal for its manageability and diversity within a small size. It consists of only 8 images, providing a quick way to test and debug segmentation models or new detection approaches without the overhead of larger datasets. This makes it an efficient tool for sanity checks and pipeline error identification before committing to extensive training on large datasets. Learn more about dataset formats [here](https://docs.ultralytics.com/datasets/segment/). ### Where can I find the YAML configuration file for the COCO8-Seg dataset? diff --git a/docs/en/datasets/segment/package-seg.md b/docs/en/datasets/segment/package-seg.md index ebdf4e6d..db5f62be 100644 --- a/docs/en/datasets/segment/package-seg.md +++ b/docs/en/datasets/segment/package-seg.md @@ -136,7 +136,7 @@ This structure ensures a balanced dataset for thorough model training, validatio ### Why should I use Ultralytics YOLOv8 with the Package Segmentation Dataset? -Ultralytics YOLOv8 provides state-of-the-art accuracy and speed for real-time object detection and segmentation tasks. Using it with the Package Segmentation Dataset allows you to leverage YOLOv8's capabilities for precise package segmentation. This combination is especially beneficial for industries like logistics and warehouse automation, where accurate package identification is critical. For more information, check out our [page on YOLOv8 segmentation](https://docs.ultralytics.com/models/yolov8). +Ultralytics YOLOv8 provides state-of-the-art accuracy and speed for real-time object detection and segmentation tasks. Using it with the Package Segmentation Dataset allows you to leverage YOLOv8's capabilities for precise package segmentation. This combination is especially beneficial for industries like logistics and warehouse automation, where accurate package identification is critical. For more information, check out our [page on YOLOv8 segmentation](https://docs.ultralytics.com/models/yolov8/). ### How can I access and use the package-seg.yaml file for the Package Segmentation Dataset? diff --git a/docs/en/guides/object-blurring.md b/docs/en/guides/object-blurring.md index e0fe9204..709ca1bd 100644 --- a/docs/en/guides/object-blurring.md +++ b/docs/en/guides/object-blurring.md @@ -132,8 +132,8 @@ For more detailed applications, check the [advantages of object blurring section ### Can I use Ultralytics YOLOv8 to blur faces in a video for privacy reasons? -Yes, Ultralytics YOLOv8 can be configured to detect and blur faces in videos to protect privacy. By training or using a pre-trained model to specifically recognize faces, the detection results can be processed with OpenCV to apply a blur effect. Refer to our guide on [object detection with YOLOv8](https://docs.ultralytics.com/models/yolov8) and modify the code to target face detection. +Yes, Ultralytics YOLOv8 can be configured to detect and blur faces in videos to protect privacy. By training or using a pre-trained model to specifically recognize faces, the detection results can be processed with OpenCV to apply a blur effect. Refer to our guide on [object detection with YOLOv8](https://docs.ultralytics.com/models/yolov8/) and modify the code to target face detection. ### How does YOLOv8 compare to other object detection models like Faster R-CNN for object blurring? -Ultralytics YOLOv8 typically outperforms models like Faster R-CNN in terms of speed, making it more suitable for real-time applications. While both models offer accurate detection, YOLOv8's architecture is optimized for rapid inference, which is critical for tasks like real-time object blurring. Learn more about the technical differences and performance metrics in our [YOLOv8 documentation](https://docs.ultralytics.com/models/yolov8). +Ultralytics YOLOv8 typically outperforms models like Faster R-CNN in terms of speed, making it more suitable for real-time applications. While both models offer accurate detection, YOLOv8's architecture is optimized for rapid inference, which is critical for tasks like real-time object blurring. Learn more about the technical differences and performance metrics in our [YOLOv8 documentation](https://docs.ultralytics.com/models/yolov8/). diff --git a/docs/en/guides/object-counting.md b/docs/en/guides/object-counting.md index 68aae4fb..749ffbe8 100644 --- a/docs/en/guides/object-counting.md +++ b/docs/en/guides/object-counting.md @@ -349,7 +349,7 @@ Ultralytics YOLOv8 provides several advantages over other object detection model 3. **Ease of Integration:** YOLOv8 offers seamless integration with various platforms and devices, including mobile and edge devices, which is crucial for modern AI applications. 4. **Flexibility:** Supports various tasks like object detection, segmentation, and tracking with configurable models to meet specific use-case requirements. -Check out Ultralytics [YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8) for a deeper dive into its features and performance comparisons. +Check out Ultralytics [YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8/) for a deeper dive into its features and performance comparisons. ### Can I use YOLOv8 for advanced applications like crowd analysis and traffic management? diff --git a/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md b/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md index 92c840f3..63fbb7a9 100644 --- a/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md +++ b/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md @@ -121,8 +121,8 @@ Using OpenVINO's high-level performance hints and multi-device modes can help st Yes, Ultralytics YOLO models are highly versatile and can be integrated with various AI frameworks. Options include: -- **TensorRT:** For NVIDIA GPU optimization, follow the [TensorRT integration guide](https://docs.ultralytics.com/integrations/tensorrt). -- **CoreML:** For Apple devices, refer to our [CoreML export instructions](https://docs.ultralytics.com/integrations/coreml). -- **TensorFlow.js:** For web and Node.js apps, see the [TF.js conversion guide](https://docs.ultralytics.com/integrations/tfjs). +- **TensorRT:** For NVIDIA GPU optimization, follow the [TensorRT integration guide](https://docs.ultralytics.com/integrations/tensorrt/). +- **CoreML:** For Apple devices, refer to our [CoreML export instructions](https://docs.ultralytics.com/integrations/coreml/). +- **TensorFlow.js:** For web and Node.js apps, see the [TF.js conversion guide](https://docs.ultralytics.com/integrations/tfjs/). -Explore more integrations on the [Ultralytics Integrations page](https://docs.ultralytics.com/integrations). +Explore more integrations on the [Ultralytics Integrations page](https://docs.ultralytics.com/integrations/). diff --git a/docs/en/guides/raspberry-pi.md b/docs/en/guides/raspberry-pi.md index 674bc847..25d45068 100644 --- a/docs/en/guides/raspberry-pi.md +++ b/docs/en/guides/raspberry-pi.md @@ -94,7 +94,7 @@ Here we will install Ultralytics package on the Raspberry Pi with optional depen ## Use NCNN on Raspberry Pi -Out of all the model export formats supported by Ultralytics, [NCNN](https://docs.ultralytics.com/integrations/ncnn) delivers the best inference performance when working with Raspberry Pi devices because NCNN is highly optimized for mobile/ embedded platforms (such as ARM architecture). Therefor our recommendation is to use NCNN with Raspberry Pi. +Out of all the model export formats supported by Ultralytics, [NCNN](https://docs.ultralytics.com/integrations/ncnn/) delivers the best inference performance when working with Raspberry Pi devices because NCNN is highly optimized for mobile/ embedded platforms (such as ARM architecture). Therefor our recommendation is to use NCNN with Raspberry Pi. ## Convert Model to NCNN and Run Inference @@ -132,7 +132,7 @@ The YOLOv8n model in PyTorch format is converted to NCNN to run inference with t !!! tip - For more details about supported export options, visit the [Ultralytics documentation page on deployment options](https://docs.ultralytics.com/guides/model-deployment-options). + For more details about supported export options, visit the [Ultralytics documentation page on deployment options](https://docs.ultralytics.com/guides/model-deployment-options/). ## Raspberry Pi 5 vs Raspberry Pi 4 YOLOv8 Benchmarks diff --git a/docs/en/guides/security-alarm-system.md b/docs/en/guides/security-alarm-system.md index 7e7051b6..4b5cdeeb 100644 --- a/docs/en/guides/security-alarm-system.md +++ b/docs/en/guides/security-alarm-system.md @@ -193,7 +193,7 @@ Running Ultralytics YOLOv8 on a standard setup typically requires around 5GB of ### What makes Ultralytics YOLOv8 different from other object detection models like Faster R-CNN or SSD? -Ultralytics YOLOv8 provides an edge over models like Faster R-CNN or SSD with its real-time detection capabilities and higher accuracy. Its unique architecture allows it to process images much faster without compromising on precision, making it ideal for time-sensitive applications like security alarm systems. For a comprehensive comparison of object detection models, you can explore our [guide](https://docs.ultralytics.com/models). +Ultralytics YOLOv8 provides an edge over models like Faster R-CNN or SSD with its real-time detection capabilities and higher accuracy. Its unique architecture allows it to process images much faster without compromising on precision, making it ideal for time-sensitive applications like security alarm systems. For a comprehensive comparison of object detection models, you can explore our [guide](https://docs.ultralytics.com/models/). ### How can I reduce the frequency of false positives in my security system using Ultralytics YOLOv8? diff --git a/docs/en/guides/streamlit-live-inference.md b/docs/en/guides/streamlit-live-inference.md index 3a89f123..84e1bce8 100644 --- a/docs/en/guides/streamlit-live-inference.md +++ b/docs/en/guides/streamlit-live-inference.md @@ -152,7 +152,7 @@ Real-time object detection using Streamlit and Ultralytics YOLOv8 can be applied - **Retail**: Customer counting, shelf management, and more. - **Wildlife and Agriculture**: Monitoring animals and crop conditions. -For more in-depth use cases and examples, explore [Ultralytics Solutions](https://docs.ultralytics.com/solutions). +For more in-depth use cases and examples, explore [Ultralytics Solutions](https://docs.ultralytics.com/solutions/). ### How does Ultralytics YOLOv8 compare to other object detection models like YOLOv5 and RCNNs? @@ -162,4 +162,4 @@ Ultralytics YOLOv8 provides several enhancements over prior models like YOLOv5 a - **Ease of Use**: Simplified interfaces and deployment. - **Resource Efficiency**: Optimized for better speed with minimal computational requirements. -For a comprehensive comparison, check [Ultralytics YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8) and related blog posts discussing model performance. +For a comprehensive comparison, check [Ultralytics YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8/) and related blog posts discussing model performance. diff --git a/docs/en/guides/triton-inference-server.md b/docs/en/guides/triton-inference-server.md index 1879bf78..05edf54f 100644 --- a/docs/en/guides/triton-inference-server.md +++ b/docs/en/guides/triton-inference-server.md @@ -147,7 +147,7 @@ By following the above steps, you can deploy and run Ultralytics YOLOv8 models e ### How do I set up Ultralytics YOLOv8 with NVIDIA Triton Inference Server? -Setting up [Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8) with [NVIDIA Triton Inference Server](https://developer.nvidia.com/triton-inference-server) involves a few key steps: +Setting up [Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8/) with [NVIDIA Triton Inference Server](https://developer.nvidia.com/triton-inference-server) involves a few key steps: 1. **Export YOLOv8 to ONNX format**: @@ -258,7 +258,7 @@ For an in-depth guide on setting up and running Triton Server with YOLOv8, refer ### How does Ultralytics YOLOv8 compare to TensorFlow and PyTorch models for deployment? -[Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8) offers several unique advantages compared to TensorFlow and PyTorch models for deployment: +[Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8/) offers several unique advantages compared to TensorFlow and PyTorch models for deployment: - **Real-time Performance**: Optimized for real-time object detection tasks, YOLOv8 provides state-of-the-art accuracy and speed, making it ideal for applications requiring live video analytics. - **Ease of Use**: YOLOv8 integrates seamlessly with Triton Inference Server and supports diverse export formats (ONNX, TensorRT, CoreML), making it flexible for various deployment scenarios. diff --git a/docs/en/help/contributing.md b/docs/en/help/contributing.md index 1d02ba23..4078a6ce 100644 --- a/docs/en/help/contributing.md +++ b/docs/en/help/contributing.md @@ -25,7 +25,7 @@ Welcome! We're thrilled that you're considering contributing to our [Ultralytics ## Code of Conduct -To ensure a welcoming and inclusive environment for everyone, all contributors must adhere to our [Code of Conduct](https://docs.ultralytics.com/help/code_of_conduct). Respect, kindness, and professionalism are at the heart of our community. +To ensure a welcoming and inclusive environment for everyone, all contributors must adhere to our [Code of Conduct](https://docs.ultralytics.com/help/code_of_conduct/). Respect, kindness, and professionalism are at the heart of our community. ## Contributing via Pull Requests @@ -45,7 +45,7 @@ We greatly appreciate contributions in the form of pull requests. To make the re ### CLA Signing -Before we can merge your pull request, you must sign our [Contributor License Agreement (CLA)](https://docs.ultralytics.com/help/CLA). This legal agreement ensures that your contributions are properly licensed, allowing the project to continue being distributed under the AGPL-3.0 license. +Before we can merge your pull request, you must sign our [Contributor License Agreement (CLA)](https://docs.ultralytics.com/help/CLA/). This legal agreement ensures that your contributions are properly licensed, allowing the project to continue being distributed under the AGPL-3.0 license. After submitting your pull request, the CLA bot will guide you through the signing process. To sign the CLA, simply add a comment in your PR stating: @@ -119,11 +119,11 @@ When adding new functions or classes, please include [Google-style docstrings](h ### GitHub Actions CI Tests -All pull requests must pass the GitHub Actions [Continuous Integration](https://docs.ultralytics.com/help/CI) (CI) tests before they can be merged. These tests include linting, unit tests, and other checks to ensure that your changes meet the project's quality standards. Review the CI output and address any issues that arise. +All pull requests must pass the GitHub Actions [Continuous Integration](https://docs.ultralytics.com/help/CI/) (CI) tests before they can be merged. These tests include linting, unit tests, and other checks to ensure that your changes meet the project's quality standards. Review the CI output and address any issues that arise. ## Reporting Bugs -We highly value bug reports as they help us maintain the quality of our projects. When reporting a bug, please provide a [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example)—a simple, clear code example that consistently reproduces the issue. This allows us to quickly identify and resolve the problem. +We highly value bug reports as they help us maintain the quality of our projects. When reporting a bug, please provide a [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example/)—a simple, clear code example that consistently reproduces the issue. This allows us to quickly identify and resolve the problem. ## License @@ -165,4 +165,4 @@ the project's quality standards. Review the CI output and fix any issues. For de ### How do I report a bug in Ultralytics YOLO repositories? -To report a bug, provide a clear and concise [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example) along with your bug report. This helps developers quickly identify and fix the issue. Ensure your example is minimal yet sufficient to replicate the problem. For more detailed steps on reporting bugs, refer to the [Reporting Bugs](#reporting-bugs) section. +To report a bug, provide a clear and concise [Minimum Reproducible Example](https://docs.ultralytics.com/help/minimum_reproducible_example/) along with your bug report. This helps developers quickly identify and fix the issue. Ensure your example is minimal yet sufficient to replicate the problem. For more detailed steps on reporting bugs, refer to the [Reporting Bugs](#reporting-bugs) section. diff --git a/docs/en/hub/datasets.md b/docs/en/hub/datasets.md index 40d76f54..5e6f3c4c 100644 --- a/docs/en/hub/datasets.md +++ b/docs/en/hub/datasets.md @@ -26,7 +26,7 @@ Once uploaded, datasets can be immediately utilized for model training. This int Before you upload a dataset to [Ultralytics HUB](https://www.ultralytics.com/hub), make sure to **place your dataset YAML file inside the dataset root directory** and that **your dataset YAML, directory and ZIP have the same name**, as shown in the example below, and then zip the dataset directory. -For example, if your dataset is called "coco8", as our [COCO8](https://docs.ultralytics.com/datasets/detect/coco8) example dataset, then you should have a `coco8.yaml` inside your `coco8/` directory, which will create a `coco8.zip` when zipped: +For example, if your dataset is called "coco8", as our [COCO8](https://docs.ultralytics.com/datasets/detect/coco8/) example dataset, then you should have a `coco8.yaml` inside your `coco8/` directory, which will create a `coco8.zip` when zipped: ```bash zip -r coco8.zip coco8 diff --git a/docs/en/hub/index.md b/docs/en/hub/index.md index bd3a4b62..77b98b61 100644 --- a/docs/en/hub/index.md +++ b/docs/en/hub/index.md @@ -120,7 +120,7 @@ Ultralytics HUB allows you to manage and organize your projects efficiently. You Ultralytics HUB offers seamless integrations with various platforms to enhance your machine learning workflows. Some key integrations include: - **Roboflow:** For dataset management and model training. Learn more on the [Integrations](integrations.md) page. -- **Google Colab:** Efficiently train models using Google Colab's cloud-based environment. Detailed steps are available in the [Google Colab](https://docs.ultralytics.com/integrations/google-colab) section. -- **Weights & Biases:** For enhanced experiment tracking and visualization. Explore the [Weights & Biases](https://docs.ultralytics.com/integrations/weights-biases) integration. +- **Google Colab:** Efficiently train models using Google Colab's cloud-based environment. Detailed steps are available in the [Google Colab](https://docs.ultralytics.com/integrations/google-colab/) section. +- **Weights & Biases:** For enhanced experiment tracking and visualization. Explore the [Weights & Biases](https://docs.ultralytics.com/integrations/weights-biases/) integration. For a complete list of integrations, refer to the [Integrations](integrations.md) page. diff --git a/docs/en/hub/inference-api.md b/docs/en/hub/inference-api.md index 4146599f..cd98347e 100644 --- a/docs/en/hub/inference-api.md +++ b/docs/en/hub/inference-api.md @@ -39,7 +39,7 @@ To use the [Ultralytics HUB](https://www.ultralytics.com/hub) Dedicated Inferenc !!! tip - Choose the region with the lowest latency for the best performance as described in the [documentation](https://docs.ultralytics.com/reference/hub/google/__init__). + Choose the region with the lowest latency for the best performance as described in the [documentation](https://docs.ultralytics.com/reference/hub/google/__init__/). To shut down the dedicated endpoint, click on the **Stop Endpoint** button. diff --git a/docs/en/hub/integrations.md b/docs/en/hub/integrations.md index 6885f076..a86eeed9 100644 --- a/docs/en/hub/integrations.md +++ b/docs/en/hub/integrations.md @@ -124,4 +124,4 @@ Your feedback shapes our future releases. Share your thoughts and suggestions [h ## Thank You, Community! 🌍 -Your [contributions](https://docs.ultralytics.com/help/contributing) inspire our continuous [innovation](https://github.com/ultralytics/ultralytics). Stay tuned for the big reveal of what's next in AI and ML at Ultralytics! +Your [contributions](https://docs.ultralytics.com/help/contributing/) inspire our continuous [innovation](https://github.com/ultralytics/ultralytics). Stay tuned for the big reveal of what's next in AI and ML at Ultralytics! diff --git a/docs/en/hub/models.md b/docs/en/hub/models.md index 90dfc792..eae66126 100644 --- a/docs/en/hub/models.md +++ b/docs/en/hub/models.md @@ -66,9 +66,9 @@ In this step, you have to choose the project in which you want to create your mo !!! info - You can read more about the available [YOLOv8](https://docs.ultralytics.com/models/yolov8) (and [YOLOv5](https://docs.ultralytics.com/models/yolov5)) architectures in our documentation. + You can read more about the available [YOLOv8](https://docs.ultralytics.com/models/yolov8/) (and [YOLOv5](https://docs.ultralytics.com/models/yolov5/)) architectures in our documentation. -By default, your model will use a pre-trained model (trained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset) to reduce training time. You can change this behavior and tweak your model's configuration by opening the **Advanced Model Configuration** accordion. +By default, your model will use a pre-trained model (trained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco/) dataset) to reduce training time. You can change this behavior and tweak your model's configuration by opening the **Advanced Model Configuration** accordion. ![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Advanced Model Configuration accordion](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-dialog-2.avif) diff --git a/docs/en/hub/quickstart.md b/docs/en/hub/quickstart.md index e73105d5..f951e97d 100644 --- a/docs/en/hub/quickstart.md +++ b/docs/en/hub/quickstart.md @@ -54,7 +54,7 @@ You can upload a dataset directly from the [Home](https://hub.ultralytics.com/ho ![Ultralytics HUB screenshot of the Home page with an arrow pointing to the Upload Dataset card](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-upload-dataset-card.avif) -Read more about [datasets](https://docs.ultralytics.com/hub/datasets). +Read more about [datasets](https://docs.ultralytics.com/hub/datasets/). ### Create Project @@ -62,7 +62,7 @@ You can create a project directly from the [Home](https://hub.ultralytics.com/ho ![Ultralytics HUB screenshot of the Home page with an arrow pointing to the Create Project card](https://github.com/ultralytics/docs/releases/download/0/hub-create-project-card.avif) -Read more about [projects](https://docs.ultralytics.com/hub/projects). +Read more about [projects](https://docs.ultralytics.com/hub/projects/). ### Train Model @@ -70,7 +70,7 @@ You can train a model directly from the [Home](https://hub.ultralytics.com/home) ![Ultralytics HUB screenshot of the Home page with an arrow pointing to the Train Model card](https://github.com/ultralytics/docs/releases/download/0/ultralytics-hub-train-model-card.avif) -Read more about [models](https://docs.ultralytics.com/hub/models). +Read more about [models](https://docs.ultralytics.com/hub/models/). ## Feedback diff --git a/docs/en/integrations/edge-tpu.md b/docs/en/integrations/edge-tpu.md index d1caf90f..df63049b 100644 --- a/docs/en/integrations/edge-tpu.md +++ b/docs/en/integrations/edge-tpu.md @@ -113,7 +113,7 @@ However, for in-depth instructions on deploying your TFLite Edge TPU models, tak In this guide, we've learned how to export Ultralytics YOLOv8 models to TFLite Edge TPU format. By following the steps mentioned above, you can increase the speed and power of your computer vision applications. -For further details on usage, visit the [Edge TPU official website](https://cloud.google.com/edge-tpu). +For further details on usage, visit the [Edge TPU official website](https://cloud.google.com/tpu). Also, for more information on other Ultralytics YOLOv8 integrations, please visit our [integration guide page](index.md). There, you'll discover valuable resources and insights. diff --git a/docs/en/modes/export.md b/docs/en/modes/export.md index 44334394..a29c4c70 100644 --- a/docs/en/modes/export.md +++ b/docs/en/modes/export.md @@ -46,7 +46,7 @@ Here are some of the standout functionalities: ## Usage Examples -Export a YOLOv8n model to a different format like ONNX or TensorRT. See Arguments section below for a full list of export arguments. +Export a YOLOv8n model to a different format like ONNX or TensorRT. See the Arguments section below for a full list of export arguments. !!! example @@ -112,7 +112,7 @@ Exporting a YOLOv8 model to ONNX format is straightforward with Ultralytics. It yolo export model=path/to/best.pt format=onnx # export custom trained model ``` -For more details on the process, including advanced options like handling different input sizes, refer to the [ONNX](../integrations/onnx.md) section. +For more details on the process, including advanced options like handling different input sizes, refer to the [ONNX section](../integrations/onnx.md). ### What are the benefits of using TensorRT for model export? @@ -122,7 +122,7 @@ Using TensorRT for model export offers significant performance improvements. YOL - **Speed:** Achieve faster inference through advanced optimizations. - **Compatibility:** Integrate smoothly with NVIDIA hardware. -To learn more about integrating TensorRT, see the [TensorRT](../integrations/tensorrt.md) integration guide. +To learn more about integrating TensorRT, see the [TensorRT integration guide](../integrations/tensorrt.md). ### How do I enable INT8 quantization when exporting my YOLOv8 model? @@ -145,7 +145,7 @@ INT8 quantization is an excellent way to compress the model and speed up inferen yolo export model=yolov8n.pt format=onnx int8=True # export model with INT8 quantization ``` -INT8 quantization can be applied to various formats, such as TensorRT and CoreML. More details can be found in the [Export](../modes/export.md) section. +INT8 quantization can be applied to various formats, such as TensorRT and CoreML. More details can be found in the [Export section](../modes/export.md). ### Why is dynamic input size important when exporting models? @@ -182,4 +182,4 @@ Understanding and configuring export arguments is crucial for optimizing model p - **`optimize:`** Applies specific optimizations for mobile or constrained environments. - **`int8:`** Enables INT8 quantization, highly beneficial for edge deployments. -For a detailed list and explanations of all the export arguments, visit the [Export Arguments](#arguments) section. +For a detailed list and explanations of all the export arguments, visit the [Export Arguments section](#arguments). diff --git a/docs/en/modes/index.md b/docs/en/modes/index.md index 270ce4a8..6797ac19 100644 --- a/docs/en/modes/index.md +++ b/docs/en/modes/index.md @@ -68,7 +68,7 @@ Track mode is used for tracking objects in real-time using a YOLOv8 model. In th ## [Benchmark](benchmark.md) -Benchmark mode is used to profile the speed and accuracy of various export formats for YOLOv8. The benchmarks provide information on the size of the exported format, its `mAP50-95` metrics (for object detection, segmentation and pose) or `accuracy_top5` metrics (for classification), and the inference time in milliseconds per image across various export formats like ONNX, OpenVINO, TensorRT and others. This information can help users choose the optimal export format for their specific use case based on their requirements for speed and accuracy. +Benchmark mode is used to profile the speed and accuracy of various export formats for YOLOv8. The benchmarks provide information on the size of the exported format, its `mAP50-95` metrics (for object detection, segmentation, and pose) or `accuracy_top5` metrics (for classification), and the inference time in milliseconds per image across various formats like ONNX, OpenVINO, TensorRT, and others. This information can help users choose the optimal export format for their specific use case based on their requirements for speed and accuracy. [Benchmark Examples](benchmark.md){ .md-button } diff --git a/docs/en/modes/train.md b/docs/en/modes/train.md index 7ac428d6..03e3be22 100644 --- a/docs/en/modes/train.md +++ b/docs/en/modes/train.md @@ -123,14 +123,14 @@ To enable training on Apple M1 and M2 chips, you should specify 'mps' as your de # Load a model model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training) - # Train the model with 2 GPUs + # Train the model with MPS results = model.train(data="coco8.yaml", epochs=100, imgsz=640, device="mps") ``` === "CLI" ```bash - # Start training from a pretrained *.pt model using GPUs 0 and 1 + # Start training from a pretrained *.pt model using MPS yolo detect train data=coco8.yaml model=yolov8n.pt epochs=100 imgsz=640 device=mps ``` @@ -169,7 +169,7 @@ Below is an example of how to resume an interrupted training using Python and vi By setting `resume=True`, the `train` function will continue training from where it left off, using the state stored in the 'path/to/last.pt' file. If the `resume` argument is omitted or set to `False`, the `train` function will start a new training session. -Remember that checkpoints are saved at the end of every epoch by default, or at fixed interval using the `save_period` argument, so you must complete at least 1 epoch to resume a training run. +Remember that checkpoints are saved at the end of every epoch by default, or at fixed intervals using the `save_period` argument, so you must complete at least 1 epoch to resume a training run. ## Train Settings diff --git a/docs/en/modes/val.md b/docs/en/modes/val.md index 1cbd900d..85b15f51 100644 --- a/docs/en/modes/val.md +++ b/docs/en/modes/val.md @@ -47,7 +47,7 @@ These are the notable functionalities offered by YOLOv8's Val mode: ## Usage Examples -Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need to passed as the `model` retains its training `data` and arguments as model attributes. See Arguments section below for a full list of export arguments. +Validate trained YOLOv8n model accuracy on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. See Arguments section below for a full list of export arguments. !!! example @@ -165,7 +165,7 @@ These benefits ensure that your models are evaluated thoroughly and can be optim ### Can I validate my YOLOv8 model using a custom dataset? -Yes, you can validate your YOLOv8 model using a custom dataset. Specify the `data` argument with the path to your dataset configuration file. This file should include paths to the validation data, class names, and other relevant details. +Yes, you can validate your YOLOv8 model using a [custom dataset](https://docs.ultralytics.com/datasets/). Specify the `data` argument with the path to your dataset configuration file. This file should include paths to the validation data, class names, and other relevant details. Example in Python: diff --git a/docs/en/tasks/classify.md b/docs/en/tasks/classify.md index 07a9cc4e..7df4b2f7 100644 --- a/docs/en/tasks/classify.md +++ b/docs/en/tasks/classify.md @@ -84,7 +84,7 @@ YOLO classification dataset format can be found in detail in the [Dataset Guide] ## Val -Validate trained YOLOv8n-cls model accuracy on the MNIST160 dataset. No argument need to passed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-cls model accuracy on the MNIST160 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/detect.md b/docs/en/tasks/detect.md index d3542f18..a46956a8 100644 --- a/docs/en/tasks/detect.md +++ b/docs/en/tasks/detect.md @@ -83,7 +83,7 @@ YOLO detection dataset format can be found in detail in the [Dataset Guide](../d ## Val -Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need to passed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n model accuracy on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/obb.md b/docs/en/tasks/obb.md index a603ab1a..2fc2b9da 100644 --- a/docs/en/tasks/obb.md +++ b/docs/en/tasks/obb.md @@ -104,8 +104,7 @@ OBB dataset format can be found in detail in the [Dataset Guide](../datasets/obb ## Val -Validate trained YOLOv8n-obb model accuracy on the DOTA8 dataset. No argument need to passed as the `model` -retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-obb model accuracy on the DOTA8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/pose.md b/docs/en/tasks/pose.md index 81384cc9..ead809d4 100644 --- a/docs/en/tasks/pose.md +++ b/docs/en/tasks/pose.md @@ -117,8 +117,7 @@ YOLO pose dataset format can be found in detail in the [Dataset Guide](../datase ## Val -Validate trained YOLOv8n-pose model accuracy on the COCO128-pose dataset. No argument need to passed as the `model` -retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-pose model accuracy on the COCO128-pose dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/segment.md b/docs/en/tasks/segment.md index 56a3b3ba..e1c43eea 100644 --- a/docs/en/tasks/segment.md +++ b/docs/en/tasks/segment.md @@ -84,8 +84,7 @@ YOLO segmentation dataset format can be found in detail in the [Dataset Guide](. ## Val -Validate trained YOLOv8n-seg model accuracy on the COCO128-seg dataset. No argument need to passed as the `model` -retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-seg model accuracy on the COCO128-seg dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/usage/cli.md b/docs/en/usage/cli.md index f22e3eb4..3e6c4b37 100644 --- a/docs/en/usage/cli.md +++ b/docs/en/usage/cli.md @@ -109,7 +109,7 @@ Train YOLOv8n on the COCO8 dataset for 100 epochs at image size 640. For a full ## Val -Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need to passed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n model accuracy on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/yolov5/tutorials/train_custom_data.md b/docs/en/yolov5/tutorials/train_custom_data.md index dbe62fc2..6119bc3a 100644 --- a/docs/en/yolov5/tutorials/train_custom_data.md +++ b/docs/en/yolov5/tutorials/train_custom_data.md @@ -42,7 +42,7 @@ YOLOv5 models must be trained on labelled data in order to learn classes of obje Your model will learn by example. Training on images similar to the ones it will see in the wild is of the utmost importance. Ideally, you will collect a wide variety of images from the same configuration (camera, angle, lighting, etc.) as you will ultimately deploy your project. -If this is not possible, you can start from [a public dataset](https://universe.roboflow.com/?ref=ultralytics) to train your initial model and then [sample images from the wild during inference](https://blog.roboflow.com/computer-vision-active-learning-tips/?ref=ultralytics) to improve your dataset and model iteratively. +If this is not possible, you can start from [a public dataset](https://universe.roboflow.com/?ref=ultralytics) to train your initial model and then [sample images from the wild during inference](https://blog.roboflow.com/what-is-active-learning/?ref=ultralytics) to improve your dataset and model iteratively. ### 1.2 Create Labels diff --git a/examples/README.md b/examples/README.md index 3e3a9423..931bdc63 100644 --- a/examples/README.md +++ b/examples/README.md @@ -32,6 +32,6 @@ We greatly appreciate contributions from the community, including examples, appl - Avoids adding large files or dependencies unless they are absolutely necessary for the example. - Contributors should be willing to provide support for their examples and address related issues. -For more detailed information and guidance on contributing, please visit our [contribution documentation](https://docs.ultralytics.com/help/contributing). +For more detailed information and guidance on contributing, please visit our [contribution documentation](https://docs.ultralytics.com/help/contributing/). If you encounter any questions or concerns regarding these guidelines, feel free to open a PR or an issue in the repository, and we will assist you in the contribution process. diff --git a/pyproject.toml b/pyproject.toml index 03e557e9..8c915c0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,11 +26,11 @@ build-backend = "setuptools.build_meta" [project] name = "ultralytics" dynamic = ["version"] -description = "Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification." +description = "Ultralytics YOLO for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification." readme = "README.md" requires-python = ">=3.8" license = { "text" = "AGPL-3.0" } -keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "HUB", "Ultralytics"] +keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "YOLOv9", "YOLOv10", "HUB", "Ultralytics"] authors = [ { name = "Glenn Jocher" }, { name = "Ayush Chaurasia" }, diff --git a/ultralytics/cfg/models/README.md b/ultralytics/cfg/models/README.md index 274a594e..bcaf8ded 100644 --- a/ultralytics/cfg/models/README.md +++ b/ultralytics/cfg/models/README.md @@ -4,11 +4,11 @@ Welcome to the [Ultralytics](https://www.ultralytics.com/) Models directory! Her These model configurations cover a wide range of scenarios, from simple object detection to more complex tasks like instance segmentation and object tracking. They are also designed to run efficiently on a variety of hardware platforms, from CPUs to GPUs. Whether you are a seasoned machine learning practitioner or just getting started with YOLO, this directory provides a great starting point for your custom model development needs. -To get started, simply browse through the models in this directory and find one that best suits your needs. Once you've selected a model, you can use the provided `*.yaml` file to train and deploy your custom YOLO model with ease. See full details at the Ultralytics [Docs](https://docs.ultralytics.com/models), and if you need help or have any questions, feel free to reach out to the Ultralytics team for support. So, don't wait, start creating your custom YOLO model now! +To get started, simply browse through the models in this directory and find one that best suits your needs. Once you've selected a model, you can use the provided `*.yaml` file to train and deploy your custom YOLO model with ease. See full details at the Ultralytics [Docs](https://docs.ultralytics.com/models/), and if you need help or have any questions, feel free to reach out to the Ultralytics team for support. So, don't wait, start creating your custom YOLO model now! ### Usage -Model `*.yaml` files may be used directly in the [Command Line Interface (CLI)](https://docs.ultralytics.com/usage/cli) with a `yolo` command: +Model `*.yaml` files may be used directly in the [Command Line Interface (CLI)](https://docs.ultralytics.com/usage/cli/) with a `yolo` command: ```bash # Train a YOLOv8n model using the coco8 dataset for 100 epochs @@ -35,7 +35,7 @@ model.train(data="coco8.yaml", epochs=100) ## Pre-trained Model Architectures -Ultralytics supports many model architectures. Visit [Ultralytics Models](https://docs.ultralytics.com/models) to view detailed information and usage. Any of these models can be used by loading their configurations or pretrained checkpoints if available. +Ultralytics supports many model architectures. Visit [Ultralytics Models](https://docs.ultralytics.com/models/) to view detailed information and usage. Any of these models can be used by loading their configurations or pretrained checkpoints if available. ## Contribute New Models @@ -43,6 +43,6 @@ Have you trained a new YOLO variant or achieved state-of-the-art performance wit By contributing to this section, you're helping us offer a wider array of model choices and configurations to the community. It's a fantastic way to share your knowledge and expertise while making the Ultralytics YOLO ecosystem even more versatile. -To get started, please consult our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for step-by-step instructions on how to submit a Pull Request (PR) 🛠️. Your contributions are eagerly awaited! +To get started, please consult our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for step-by-step instructions on how to submit a Pull Request (PR) 🛠️. Your contributions are eagerly awaited! Let's join hands to extend the range and capabilities of the Ultralytics YOLO models 🙏! diff --git a/ultralytics/trackers/README.md b/ultralytics/trackers/README.md index 1675519c..d7bc8558 100644 --- a/ultralytics/trackers/README.md +++ b/ultralytics/trackers/README.md @@ -309,6 +309,6 @@ Are you proficient in multi-object tracking and have successfully implemented or By contributing to this section, you help expand the scope of tracking solutions available within the Ultralytics YOLO framework, adding another layer of functionality and utility for the community. -To initiate your contribution, please refer to our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for comprehensive instructions on submitting a Pull Request (PR) 🛠️. We are excited to see what you bring to the table! +To initiate your contribution, please refer to our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for comprehensive instructions on submitting a Pull Request (PR) 🛠️. We are excited to see what you bring to the table! Together, let's enhance the tracking capabilities of the Ultralytics YOLO ecosystem 🙏! From e0cbbf409d808b7dbfe2b03e015524acb6605fa6 Mon Sep 17 00:00:00 2001 From: Skillnoob <78843978+Skillnoob@users.noreply.github.com> Date: Sun, 15 Sep 2024 16:59:30 +0200 Subject: [PATCH 27/80] Fix `mps.empty_cache()` for macOS without MPS (#16280) Co-authored-by: Glenn Jocher --- ultralytics/engine/trainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ultralytics/engine/trainer.py b/ultralytics/engine/trainer.py index 03965a72..1b104681 100644 --- a/ultralytics/engine/trainer.py +++ b/ultralytics/engine/trainer.py @@ -454,7 +454,7 @@ def _do_train(self, world_size=1): self.stop |= epoch >= self.epochs # stop if exceeded epochs self.run_callbacks("on_fit_epoch_end") gc.collect() - if MACOS: + if MACOS and self.device.type == "mps": torch.mps.empty_cache() # clear unified memory at end of epoch, may help MPS' management of 'unlimited' virtual memoy else: torch.cuda.empty_cache() # clear GPU memory at end of epoch, may help reduce CUDA out of memory errors @@ -479,7 +479,7 @@ def _do_train(self, world_size=1): self.plot_metrics() self.run_callbacks("on_train_end") gc.collect() - if MACOS: + if MACOS and self.device.type == "mps": torch.mps.empty_cache() else: torch.cuda.empty_cache() From cea6ead1efdfc801da0ea8c67ce3bf37b557bdd9 Mon Sep 17 00:00:00 2001 From: Jan Knobloch <116908874+jk4e@users.noreply.github.com> Date: Sun, 15 Sep 2024 17:46:00 +0200 Subject: [PATCH 28/80] Add color palette tables to docs (#16242) Co-authored-by: UltralyticsAssistant Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Glenn Jocher --- ultralytics/utils/plotting.py | 56 ++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/ultralytics/utils/plotting.py b/ultralytics/utils/plotting.py index d30a4780..3626e778 100644 --- a/ultralytics/utils/plotting.py +++ b/ultralytics/utils/plotting.py @@ -20,7 +20,7 @@ class Colors: """ - Ultralytics default color palette https://ultralytics.com/. + Ultralytics color palette https://docs.ultralytics.com/reference/utils/plotting/#ultralytics.utils.plotting.Colors. This class provides methods to work with the Ultralytics color palette, including converting hex color codes to RGB values. @@ -29,6 +29,60 @@ class Colors: palette (list of tuple): List of RGB color values. n (int): The number of colors in the palette. pose_palette (np.ndarray): A specific color palette array with dtype np.uint8. + + ## Ultralytics Color Palette + + | Index | Color | HEX | RGB | + |-------|-------------------------------------------------------------------|-----------|-------------------| + | 0 | | `#042aff` | (4, 42, 255) | + | 1 | | `#0bdbeb` | (11, 219, 235) | + | 2 | | `#f3f3f3` | (243, 243, 243) | + | 3 | | `#00dfb7` | (0, 223, 183) | + | 4 | | `#111f68` | (17, 31, 104) | + | 5 | | `#ff6fdd` | (255, 111, 221) | + | 6 | | `#ff444f` | (255, 68, 79) | + | 7 | | `#cced00` | (204, 237, 0) | + | 8 | | `#00f344` | (0, 243, 68) | + | 9 | | `#bd00ff` | (189, 0, 255) | + | 10 | | `#00b4ff` | (0, 180, 255) | + | 11 | | `#dd00ba` | (221, 0, 186) | + | 12 | | `#00ffff` | (0, 255, 255) | + | 13 | | `#26c000` | (38, 192, 0) | + | 14 | | `#01ffb3` | (1, 255, 179) | + | 15 | | `#7d24ff` | (125, 36, 255) | + | 16 | | `#7b0068` | (123, 0, 104) | + | 17 | | `#ff1b6c` | (255, 27, 108) | + | 18 | | `#fc6d2f` | (252, 109, 47) | + | 19 | | `#a2ff0b` | (162, 255, 11) | + + ## Pose Color Palette + + | Index | Color | HEX | RGB | + |-------|-------------------------------------------------------------------|-----------|-------------------| + | 0 | | `#ff8000` | (255, 128, 0) | + | 1 | | `#ff9933` | (255, 153, 51) | + | 2 | | `#ffb266` | (255, 178, 102) | + | 3 | | `#e6e600` | (230, 230, 0) | + | 4 | | `#ff99ff` | (255, 153, 255) | + | 5 | | `#99ccff` | (153, 204, 255) | + | 6 | | `#ff66ff` | (255, 102, 255) | + | 7 | | `#ff33ff` | (255, 51, 255) | + | 8 | | `#66b2ff` | (102, 178, 255) | + | 9 | | `#3399ff` | (51, 153, 255) | + | 10 | | `#ff9999` | (255, 153, 153) | + | 11 | | `#ff6666` | (255, 102, 102) | + | 12 | | `#ff3333` | (255, 51, 51) | + | 13 | | `#99ff99` | (153, 255, 153) | + | 14 | | `#66ff66` | (102, 255, 102) | + | 15 | | `#33ff33` | (51, 255, 51) | + | 16 | | `#00ff00` | (0, 255, 0) | + | 17 | | `#0000ff` | (0, 0, 255) | + | 18 | | `#ff0000` | (255, 0, 0) | + | 19 | | `#ffffff` | (255, 255, 255) | + + !!! note "Ultralytics Brand Colors" + + For Ultralytics brand colors see [https://www.ultralytics.com/brand](https://www.ultralytics.com/brand). Please use the official Ultralytics colors for all marketing materials. """ def __init__(self): From 87296e9e7584c4cd0276abc5d2e206df93c53700 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Sun, 15 Sep 2024 18:47:20 +0200 Subject: [PATCH 29/80] Intel Core Ultra benchmarks (#15895) Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Burhan <62214284+Burhan-Q@users.noreply.github.com> Co-authored-by: Glenn Jocher --- docs/en/integrations/openvino.md | 86 ++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/docs/en/integrations/openvino.md b/docs/en/integrations/openvino.md index 1278091f..f277ff94 100644 --- a/docs/en/integrations/openvino.md +++ b/docs/en/integrations/openvino.md @@ -251,6 +251,92 @@ Benchmarks below run on 13th Gen Intel® Core® i7-13700H CPU at FP32 precision. | YOLOv8x | ONNX | ✅ | 260.4 | 0.6650 | 526.66 | | YOLOv8x | OpenVINO | ✅ | 260.6 | 0.6619 | 158.73 | +### Intel Ultra 7 155H Meteor Lake CPU + +The Intel® Ultra™ 7 155H represents a new benchmark in high-performance computing, designed to cater to the most demanding users, from gamers to content creators. The Ultra™ 7 155H is not just a CPU; it integrates a powerful GPU and an advanced NPU (Neural Processing Unit) within a single chip, offering a comprehensive solution for diverse computing needs. + +This hybrid architecture allows the Ultra™ 7 155H to excel in both traditional CPU tasks and GPU-accelerated workloads, while the NPU enhances AI-driven processes, enabling faster and more efficient machine learning operations. This makes the Ultra™ 7 155H a versatile choice for applications requiring high-performance graphics, complex computations, and AI inference. + +The Ultra™ 7 series includes multiple models, each offering different levels of performance, with the 'H' designation indicating a high-power variant suitable for laptops and compact devices. Early benchmarks have highlighted the exceptional performance of the Ultra™ 7 155H, particularly in multitasking environments, where the combined power of the CPU, GPU, and NPU leads to remarkable efficiency and speed. + +As part of Intel's commitment to cutting-edge technology, the Ultra™ 7 155H is designed to meet the needs of future computing, with more models expected to be released. The availability of the Ultra™ 7 155H varies by region, and it continues to receive praise for its integration of three powerful processing units in a single chip, setting new standards in computing performance. + +Benchmarks below run on Intel® Ultra™ 7 155H at FP32 and INT8 precision. + +!!! tip "Benchmarks" + + === "Integrated Intel® Arc™ GPU" + + | Model | Format | Precision | Status | Size (MB) | metrics/mAP50-95(B) | Inference time (ms/im) | + | ------- | ----------- | --------- | ------ | --------- | ------------------- | ---------------------- | + | YOLOv8n | PyTorch | FP32 | ✅ | 6.2 | 0.6381 | 35.95 | + | YOLOv8n | OpenVINO | FP32 | ✅ | 12.3 | 0.6117 | 8.32 | + | YOLOv8n | OpenVINO | INT8 | ✅ | 3.6 | 0.5791 | 9.88 | + | YOLOv8s | PyTorch | FP32 | ✅ | 21.5 | 0.6967 | 79.72 | + | YOLOv8s | OpenVINO | FP32 | ✅ | 42.9 | 0.7136 | 13.37 | + | YOLOv8s | OpenVINO | INT8 | ✅ | 11.2 | 0.7086 | 9.96 | + | YOLOv8m | PyTorch | FP32 | ✅ | 49.7 | 0.737 | 202.05 | + | YOLOv8m | OpenVINO | FP32 | ✅ | 99.1 | 0.7331 | 28.07 | + | YOLOv8m | OpenVINO | INT8 | ✅ | 25.5 | 0.7259 | 21.11 | + | YOLOv8l | PyTorch | FP32 | ✅ | 83.7 | 0.7769 | 393.37 | + | YOLOv8l | OpenVINO | FP32 | ✅ | 167.0 | 0.0 | 52.73 | + | YOLOv8l | OpenVINO | INT8 | ✅ | 42.6 | 0.7861 | 28.11 | + | YOLOv8x | PyTorch | FP32 | ✅ | 130.5 | 0.7759 | 610.71 | + | YOLOv8x | OpenVINO | FP32 | ✅ | 260.6 | 0.748 | 73.51 | + | YOLOv8x | OpenVINO | INT8 | ✅ | 66.0 | 0.8085 | 51.71 | + +
+ Intel Core Ultra GPU benchmarks +
+ + === "Intel® Meteor Lake CPU" + + | Model | Format | Precision | Status | Size (MB) | metrics/mAP50-95(B) | Inference time (ms/im) | + | ------- | ----------- | --------- | ------ | --------- | ------------------- | ---------------------- | + | YOLOv8n | PyTorch | FP32 | ✅ | 6.2 | 0.6381 | 34.69 | + | YOLOv8n | OpenVINO | FP32 | ✅ | 12.3 | 0.6092 | 39.06 | + | YOLOv8n | OpenVINO | INT8 | ✅ | 3.6 | 0.5968 | 18.37 | + | YOLOv8s | PyTorch | FP32 | ✅ | 21.5 | 0.6967 | 79.9 | + | YOLOv8s | OpenVINO | FP32 | ✅ | 42.9 | 0.7136 | 82.6 | + | YOLOv8s | OpenVINO | INT8 | ✅ | 11.2 | 0.7083 | 29.51 | + | YOLOv8m | PyTorch | FP32 | ✅ | 49.7 | 0.737 | 202.43 | + | YOLOv8m | OpenVINO | FP32 | ✅ | 99.1 | 0.728 | 181.27 | + | YOLOv8m | OpenVINO | INT8 | ✅ | 25.5 | 0.7285 | 51.25 | + | YOLOv8l | PyTorch | FP32 | ✅ | 83.7 | 0.7769 | 385.87 | + | YOLOv8l | OpenVINO | FP32 | ✅ | 167.0 | 0.7551 | 347.75 | + | YOLOv8l | OpenVINO | INT8 | ✅ | 42.6 | 0.7675 | 91.66 | + | YOLOv8x | PyTorch | FP32 | ✅ | 130.5 | 0.7759 | 603.63 | + | YOLOv8x | OpenVINO | FP32 | ✅ | 260.6 | 0.7479 | 516.39 | + | YOLOv8x | OpenVINO | INT8 | ✅ | 66.0 | 0.8119 | 142.42 | + +
+ Intel Core Ultra CPU benchmarks +
+ + === "Integrated Intel® AI Boost NPU" + + | Model | Format | Precision | Status | Size (MB) | metrics/mAP50-95(B) | Inference time (ms/im) | + | ------- | ----------- | --------- | ------ | --------- | ------------------- | ---------------------- | + | YOLOv8n | PyTorch | FP32 | ✅ | 6.2 | 0.6381 | 36.98 | + | YOLOv8n | OpenVINO | FP32 | ✅ | 12.3 | 0.6103 | 16.68 | + | YOLOv8n | OpenVINO | INT8 | ✅ | 3.6 | 0.5941 | 14.6 | + | YOLOv8s | PyTorch | FP32 | ✅ | 21.5 | 0.6967 | 79.76 | + | YOLOv8s | OpenVINO | FP32 | ✅ | 42.9 | 0.7144 | 32.89 | + | YOLOv8s | OpenVINO | INT8 | ✅ | 11.2 | 0.7062 | 26.13 | + | YOLOv8m | PyTorch | FP32 | ✅ | 49.7 | 0.737 | 201.44 | + | YOLOv8m | OpenVINO | FP32 | ✅ | 99.1 | 0.7284 | 54.4 | + | YOLOv8m | OpenVINO | INT8 | ✅ | 25.5 | 0.7268 | 30.76 | + | YOLOv8l | PyTorch | FP32 | ✅ | 83.7 | 0.7769 | 385.46 | + | YOLOv8l | OpenVINO | FP32 | ✅ | 167.0 | 0.7539 | 80.1 | + | YOLOv8l | OpenVINO | INT8 | ✅ | 42.6 | 0.7508 | 52.25 | + | YOLOv8x | PyTorch | FP32 | ✅ | 130.5 | 0.7759 | 609.4 | + | YOLOv8x | OpenVINO | FP32 | ✅ | 260.6 | 0.7637 | 104.79 | + | YOLOv8x | OpenVINO | INT8 | ✅ | 66.0 | 0.8077 | 64.96 | + +
+ Intel Core Ultra NPU benchmarks +
+ ## Reproduce Our Results To reproduce the Ultralytics benchmarks above on all export [formats](../modes/export.md) run this code: From fa6362a6f5eaa8dfdcc6f91765e8a8e1173c6c20 Mon Sep 17 00:00:00 2001 From: Quet Almahdi Morris Date: Sun, 15 Sep 2024 12:34:31 -0500 Subject: [PATCH 30/80] `ultralytics 8.2.94` Apple MPS train memory display (#16272) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- .github/workflows/format.yml | 6 ++--- .github/workflows/publish.yml | 14 +++++------- ultralytics/__init__.py | 2 +- ultralytics/engine/trainer.py | 42 +++++++++++++++++++++++------------ 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index fd4faaad..9befe5c9 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -38,12 +38,12 @@ jobs: Join the Ultralytics community where it suits you best. For real-time chat, head to [Discord](https://ultralytics.com/discord) 🎧. Prefer in-depth discussions? Check out [Discourse](https://community.ultralytics.com). Or dive into threads on our [Subreddit](https://reddit.com/r/ultralytics) to share knowledge with the community. - ## Install + ## Upgrade - Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). + Upgrade to the latest `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/) to verify your issue is not already resolved in the latest version: ```bash - pip install ultralytics + pip install -U ultralytics ``` ## Environments diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3cb83f27..8276a769 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -85,6 +85,12 @@ jobs: if publish: print('Ready to publish new version to PyPI ✅.') id: check_pypi + - name: Publish to PyPI + continue-on-error: true + if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True' + run: | + python -m build + python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} - name: Publish new tag if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True' run: | @@ -100,14 +106,6 @@ jobs: run: | curl -s "https://raw.githubusercontent.com/ultralytics/actions/main/utils/summarize_release.py" | python - shell: bash - - name: Publish to PyPI - continue-on-error: true - if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True' - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: | - python -m build - python -m twine upload dist/* -u __token__ -p $PYPI_TOKEN - name: Extract PR Details env: GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 979bc037..3ff10e1c 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.93" +__version__ = "8.2.94" import os diff --git a/ultralytics/engine/trainer.py b/ultralytics/engine/trainer.py index 1b104681..2c26ea21 100644 --- a/ultralytics/engine/trainer.py +++ b/ultralytics/engine/trainer.py @@ -28,7 +28,6 @@ DEFAULT_CFG, LOCAL_RANK, LOGGER, - MACOS, RANK, TQDM, __version__, @@ -409,13 +408,17 @@ def _do_train(self, world_size=1): break # Log - mem = f"{torch.cuda.memory_reserved() / 1E9 if torch.cuda.is_available() else 0:.3g}G" # (GB) - loss_len = self.tloss.shape[0] if len(self.tloss.shape) else 1 - losses = self.tloss if loss_len > 1 else torch.unsqueeze(self.tloss, 0) if RANK in {-1, 0}: + loss_length = self.tloss.shape[0] if len(self.tloss.shape) else 1 pbar.set_description( - ("%11s" * 2 + "%11.4g" * (2 + loss_len)) - % (f"{epoch + 1}/{self.epochs}", mem, *losses, batch["cls"].shape[0], batch["img"].shape[-1]) + ("%11s" * 2 + "%11.4g" * (2 + loss_length)) + % ( + f"{epoch + 1}/{self.epochs}", + f"{self._get_memory():.3g}G", # (GB) GPU memory util + *(self.tloss if loss_length > 1 else torch.unsqueeze(self.tloss, 0)), # losses + batch["cls"].shape[0], # batch size, i.e. 8 + batch["img"].shape[-1], # imgsz, i.e 640 + ) ) self.run_callbacks("on_batch_end") if self.args.plots and ni in self.plot_idx: @@ -453,11 +456,7 @@ def _do_train(self, world_size=1): self.scheduler.last_epoch = self.epoch # do not move self.stop |= epoch >= self.epochs # stop if exceeded epochs self.run_callbacks("on_fit_epoch_end") - gc.collect() - if MACOS and self.device.type == "mps": - torch.mps.empty_cache() # clear unified memory at end of epoch, may help MPS' management of 'unlimited' virtual memoy - else: - torch.cuda.empty_cache() # clear GPU memory at end of epoch, may help reduce CUDA out of memory errors + self._clear_memory() # Early Stopping if RANK != -1: # if DDP training @@ -478,14 +477,29 @@ def _do_train(self, world_size=1): if self.args.plots: self.plot_metrics() self.run_callbacks("on_train_end") + self._clear_memory() + self.run_callbacks("teardown") + + def _get_memory(self): + """Get accelerator memory utilization in GB.""" + if self.device.type == "mps": + memory = torch.mps.driver_allocated_memory() + elif self.device.type == "cpu": + memory = 0 + else: + memory = torch.cuda.memory_reserved() + return memory / 1e9 + + def _clear_memory(self): + """Clear accelerator memory on different platforms.""" gc.collect() - if MACOS and self.device.type == "mps": + if self.device.type == "mps": torch.mps.empty_cache() + elif self.device.type == "cpu": + return else: torch.cuda.empty_cache() - self.run_callbacks("teardown") - def read_results_csv(self): """Read results.csv into a dict using pandas.""" import pandas as pd # scope for faster 'import ultralytics' From 2a17462367f59307cc4dd5477bfac68c7bb3352c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 15 Sep 2024 21:55:58 +0200 Subject: [PATCH 31/80] Fix `IS_TMP_WRITEABLE` order of operations (#16294) Co-authored-by: UltralyticsAssistant --- tests/__init__.py | 5 +++-- tests/test_python.py | 42 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 3356f1ca..ea6b3982 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,13 +1,13 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks, is_dir_writeable +from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks # Constants used in tests MODEL = WEIGHTS_DIR / "path with spaces" / "yolov8n.pt" # test spaces in path CFG = "yolov8n.yaml" SOURCE = ASSETS / "bus.jpg" +SOURCES_LIST = [ASSETS / "bus.jpg", ASSETS, ASSETS / "*", ASSETS / "**/*.jpg"] TMP = (ROOT / "../tests/tmp").resolve() # temp directory for test files -IS_TMP_WRITEABLE = is_dir_writeable(TMP) CUDA_IS_AVAILABLE = checks.cuda_is_available() CUDA_DEVICE_COUNT = checks.cuda_device_count() @@ -15,6 +15,7 @@ "MODEL", "CFG", "SOURCE", + "SOURCES_LIST", "TMP", "IS_TMP_WRITEABLE", "CUDA_IS_AVAILABLE", diff --git a/tests/test_python.py b/tests/test_python.py index aa18029d..b5dd0c88 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -1,6 +1,7 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license import contextlib +import csv import urllib from copy import copy from pathlib import Path @@ -12,7 +13,7 @@ import yaml from PIL import Image -from tests import CFG, IS_TMP_WRITEABLE, MODEL, SOURCE, TMP +from tests import CFG, MODEL, SOURCE, SOURCES_LIST, TMP from ultralytics import RTDETR, YOLO from ultralytics.cfg import MODELS, TASK2DATA, TASKS from ultralytics.data.build import load_inference_source @@ -26,11 +27,14 @@ WEIGHTS_DIR, WINDOWS, checks, + is_dir_writeable, is_github_action_running, ) from ultralytics.utils.downloads import download from ultralytics.utils.torch_utils import TORCH_1_9 +IS_TMP_WRITEABLE = is_dir_writeable(TMP) # WARNING: must be run once tests start as TMP does not exist on tests/init + def test_model_forward(): """Test the forward pass of the YOLO model.""" @@ -70,11 +74,37 @@ def test_model_profile(): @pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable") def test_predict_txt(): """Tests YOLO predictions with file, directory, and pattern sources listed in a text file.""" - txt_file = TMP / "sources.txt" - with open(txt_file, "w") as f: - for x in [ASSETS / "bus.jpg", ASSETS, ASSETS / "*", ASSETS / "**/*.jpg"]: - f.write(f"{x}\n") - _ = YOLO(MODEL)(source=txt_file, imgsz=32) + file = TMP / "sources_multi_row.txt" + with open(file, "w") as f: + for src in SOURCES_LIST: + f.write(f"{src}\n") + results = YOLO(MODEL)(source=file, imgsz=32) + assert len(results) == 7 # 1 + 2 + 2 + 2 = 7 images + + +@pytest.mark.skipif(True, reason="disabled for testing") +@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable") +def test_predict_csv_multi_row(): + """Tests YOLO predictions with sources listed in multiple rows of a CSV file.""" + file = TMP / "sources_multi_row.csv" + with open(file, "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["source"]) + writer.writerows([[src] for src in SOURCES_LIST]) + results = YOLO(MODEL)(source=file, imgsz=32) + assert len(results) == 7 # 1 + 2 + 2 + 2 = 7 images + + +@pytest.mark.skipif(True, reason="disabled for testing") +@pytest.mark.skipif(not IS_TMP_WRITEABLE, reason="directory is not writeable") +def test_predict_csv_single_row(): + """Tests YOLO predictions with sources listed in a single row of a CSV file.""" + file = TMP / "sources_single_row.csv" + with open(file, "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(SOURCES_LIST) + results = YOLO(MODEL)(source=file, imgsz=32) + assert len(results) == 7 # 1 + 2 + 2 + 2 = 7 images @pytest.mark.parametrize("model_name", MODELS) From 617d58d430357f7ffb72a5f55911a90b00d5fd2f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 16 Sep 2024 17:03:31 +0200 Subject: [PATCH 32/80] Fix dependabot in mkdocs_github_authors.yaml (#16312) --- docs/mkdocs_github_authors.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml index 16075679..bcf9cdb0 100644 --- a/docs/mkdocs_github_authors.yaml +++ b/docs/mkdocs_github_authors.yaml @@ -42,7 +42,7 @@ username: zhixuwei 49699333+dependabot[bot]@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/27347476?v=4 - username: dependabot[bot] + username: dependabot 53246858+hasanghaffari93@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/53246858?v=4 username: hasanghaffari93 From 7b19e0daa0a5cd4596c0e9b9de5edc18d456b487 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 16 Sep 2024 20:47:37 +0200 Subject: [PATCH 33/80] Threaded inference docs improvements (#16313) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- README.md | 44 +++++++++----------- README.zh-CN.md | 44 +++++++++----------- docs/en/modes/predict.md | 18 ++++---- docs/en/modes/track.md | 59 +++++++++++---------------- docs/en/yolov5/quickstart_tutorial.md | 4 +- 5 files changed, 72 insertions(+), 97 deletions(-) diff --git a/README.md b/README.md index e13ef564..704c04b7 100644 --- a/README.md +++ b/README.md @@ -87,14 +87,25 @@ YOLOv8 may also be used directly in a Python environment, and accepts the same [ from ultralytics import YOLO # Load a model -model = YOLO("yolov8n.yaml") # build a new model from scratch -model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training) - -# Use the model -model.train(data="coco8.yaml", epochs=3) # train the model -metrics = model.val() # evaluate model performance on the validation set -results = model("https://ultralytics.com/images/bus.jpg") # predict on an image -path = model.export(format="onnx") # export the model to ONNX format +model = YOLO("yolov8n.pt") + +# Train the model +train_results = model.train( + data="coco8.yaml", # path to dataset YAML + epochs=100, # number of training epochs + imgsz=640, # training image size + device="cpu", # device to run on, i.e. device=0 or device=0,1,2,3 or device=cpu +) + +# Evaluate model performance on the validation set +metrics = model.val() + +# Perform object detection on an image +results = model("path/to/image.jpg") +results[0].show() + +# Export the model to ONNX format +path = model.export(format="onnx") # return path to exported model ``` See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python/) for more examples. @@ -139,23 +150,6 @@ See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examp -
Detection (Open Image V7) - -See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examples with these models trained on [Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/), which include 600 pre-trained classes. - -| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| ----------------------------------------------------------------------------------------- | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | -| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-oiv7.pt) | 640 | 18.4 | 142.4 | 1.21 | 3.5 | 10.5 | -| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-oiv7.pt) | 640 | 27.7 | 183.1 | 1.40 | 11.4 | 29.7 | -| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-oiv7.pt) | 640 | 33.6 | 408.5 | 2.26 | 26.2 | 80.6 | -| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-oiv7.pt) | 640 | 34.9 | 596.9 | 2.43 | 44.1 | 167.4 | -| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-oiv7.pt) | 640 | 36.3 | 860.6 | 3.56 | 68.7 | 260.6 | - -- **mAPval** values are for single-model single-scale on [Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/) dataset.
Reproduce by `yolo val detect data=open-images-v7.yaml device=0` -- **Speed** averaged over Open Image V7 val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val detect data=open-images-v7.yaml batch=1 device=0|cpu` - -
-
Segmentation (COCO) See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage examples with these models trained on [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/), which include 80 pre-trained classes. diff --git a/README.zh-CN.md b/README.zh-CN.md index 4319c0df..1e7b9727 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -89,14 +89,25 @@ YOLOv8 也可以在 Python 环境中直接使用,并接受与上述 CLI 示例 from ultralytics import YOLO # 加载模型 -model = YOLO("yolov8n.yaml") # 从头开始构建新模型 -model = YOLO("yolov8n.pt") # 加载预训练模型(建议用于训练) - -# 使用模型 -model.train(data="coco8.yaml", epochs=3) # 训练模型 -metrics = model.val() # 在验证集上评估模型性能 -results = model("https://ultralytics.com/images/bus.jpg") # 对图像进行预测 -success = model.export(format="onnx") # 将模型导出为 ONNX 格式 +model = YOLO("yolov8n.pt") + +# 训练模型 +train_results = model.train( + data="coco8.yaml", # 数据配置文件的路径 + epochs=100, # 训练的轮数 + imgsz=640, # 训练图像大小 + device="cpu", # 运行的设备,例如 device=0 或 device=0,1,2,3 或 device=cpu +) + +# 在验证集上评估模型性能 +metrics = model.val() + +# 对图像进行目标检测 +results = model("path/to/image.jpg") +results[0].show() + +# 将模型导出为 ONNX 格式 +path = model.export(format="onnx") # 返回导出的模型路径 ``` 查看 YOLOv8 [Python 文档](https://docs.ultralytics.com/usage/python/)以获取更多示例。 @@ -141,23 +152,6 @@ Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟
-
检测(Open Image V7) - -查看[检测文档](https://docs.ultralytics.com/tasks/detect/)以获取这些在[Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/)上训练的模型的使用示例,其中包括600个预训练类别。 - -| 模型 | 尺寸
(像素) | mAP验证
50-95 | 速度
CPU ONNX
(毫秒) | 速度
A100 TensorRT
(毫秒) | 参数
(M) | 浮点运算
(B) | -| ----------------------------------------------------------------------------------------- | ------------------- | --------------------- | ------------------------------- | ------------------------------------ | ---------------- | -------------------- | -| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-oiv7.pt) | 640 | 18.4 | 142.4 | 1.21 | 3.5 | 10.5 | -| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-oiv7.pt) | 640 | 27.7 | 183.1 | 1.40 | 11.4 | 29.7 | -| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-oiv7.pt) | 640 | 33.6 | 408.5 | 2.26 | 26.2 | 80.6 | -| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-oiv7.pt) | 640 | 34.9 | 596.9 | 2.43 | 44.1 | 167.4 | -| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-oiv7.pt) | 640 | 36.3 | 860.6 | 3.56 | 68.7 | 260.6 | - -- **mAP验证** 值适用于在[Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/)数据集上的单模型单尺度。
通过 `yolo val detect data=open-images-v7.yaml device=0` 以复现。 -- **速度** 在使用[Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/)实例对Open Image V7验证图像进行平均测算。
通过 `yolo val detect data=open-images-v7.yaml batch=1 device=0|cpu` 以复现。 - -
-
分割 (COCO) 查看[分割文档](https://docs.ultralytics.com/tasks/segment/)以获取这些在[COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/)上训练的模型的使用示例,其中包括80个预训练类别。 diff --git a/docs/en/modes/predict.md b/docs/en/modes/predict.md index 3bda0c07..5ca5dab9 100644 --- a/docs/en/modes/predict.md +++ b/docs/en/modes/predict.md @@ -61,7 +61,7 @@ Ultralytics YOLO models return either a Python list of `Results` objects, or a m model = YOLO("yolov8n.pt") # pretrained YOLOv8n model # Run batched inference on a list of images - results = model(["im1.jpg", "im2.jpg"]) # return a list of Results objects + results = model(["image1.jpg", "image2.jpg"]) # return a list of Results objects # Process results list for result in results: @@ -83,7 +83,7 @@ Ultralytics YOLO models return either a Python list of `Results` objects, or a m model = YOLO("yolov8n.pt") # pretrained YOLOv8n model # Run batched inference on a list of images - results = model(["im1.jpg", "im2.jpg"], stream=True) # return a generator of Results objects + results = model(["image1.jpg", "image2.jpg"], stream=True) # return a generator of Results objects # Process results generator for result in results: @@ -109,8 +109,8 @@ YOLOv8 can process different types of input sources for inference, as shown in t | image | `'image.jpg'` | `str` or `Path` | Single image file. | | URL | `'https://ultralytics.com/images/bus.jpg'` | `str` | URL to an image. | | screenshot | `'screen'` | `str` | Capture a screenshot. | -| PIL | `Image.open('im.jpg')` | `PIL.Image` | HWC format with RGB channels. | -| OpenCV | `cv2.imread('im.jpg')` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. | +| PIL | `Image.open('image.jpg')` | `PIL.Image` | HWC format with RGB channels. | +| OpenCV | `cv2.imread('image.jpg')` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. | | numpy | `np.zeros((640,1280,3))` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. | | torch | `torch.zeros(16,3,320,640)` | `torch.Tensor` | BCHW format with RGB channels `float32 (0.0-1.0)`. | | CSV | `'sources.csv'` | `str` or `Path` | CSV file containing paths to images, videos, or directories. | @@ -710,16 +710,16 @@ When using YOLO models in a multi-threaded application, it's important to instan from ultralytics import YOLO - def thread_safe_predict(image_path): + def thread_safe_predict(model, image_path): """Performs thread-safe prediction on an image using a locally instantiated YOLO model.""" - local_model = YOLO("yolov8n.pt") - results = local_model.predict(image_path) + model = YOLO(model) + results = model.predict(image_path) # Process results # Starting threads that each have their own model instance - Thread(target=thread_safe_predict, args=("image1.jpg",)).start() - Thread(target=thread_safe_predict, args=("image2.jpg",)).start() + Thread(target=thread_safe_predict, args=("yolov8n.pt", "image1.jpg")).start() + Thread(target=thread_safe_predict, args=("yolov8n.pt", "image2.jpg")).start() ``` For an in-depth look at thread-safe inference with YOLO models and step-by-step instructions, please refer to our [YOLO Thread-Safe Inference Guide](../guides/yolo-thread-safe-inference.md). This guide will provide you with all the necessary information to avoid common pitfalls and ensure that your multi-threaded inference runs smoothly. diff --git a/docs/en/modes/track.md b/docs/en/modes/track.md index cfeb8c90..c222e592 100644 --- a/docs/en/modes/track.md +++ b/docs/en/modes/track.md @@ -290,63 +290,50 @@ Finally, after all threads have completed their task, the windows displaying the from ultralytics import YOLO + # Define model names and video sources + MODEL_NAMES = ["yolov8n.pt", "yolov8n-seg.pt"] + SOURCES = ["path/to/video1.mp4", 0] # local video, 0 for webcam - def run_tracker_in_thread(filename, model, file_index): - """ - Runs a video file or webcam stream concurrently with the YOLOv8 model using threading. - This function captures video frames from a given file or camera source and utilizes the YOLOv8 model for object - tracking. The function runs in its own thread for concurrent processing. + def run_tracker_in_thread(model_name, filename, index): + """ + Runs a video file or webcam stream concurrently with the YOLOv8 model using threading. This function captures video + frames from a given file or camera source and utilizes the YOLOv8 model for object tracking. The function runs in + its own thread for concurrent processing. Args: filename (str): The path to the video file or the identifier for the webcam/external camera source. model (obj): The YOLOv8 model object. - file_index (int): An index to uniquely identify the file being processed, used for display purposes. - - Note: - Press 'q' to quit the video display window. + index (int): An index to uniquely identify the file being processed, used for display purposes. """ - video = cv2.VideoCapture(filename) # Read the video file + model = YOLO(model_name) + video = cv2.VideoCapture(filename) while True: - ret, frame = video.read() # Read the video frames - - # Exit the loop if no more frames in either video + ret, frame = video.read() if not ret: break - # Track objects in frames if available results = model.track(frame, persist=True) res_plotted = results[0].plot() - cv2.imshow(f"Tracking_Stream_{file_index}", res_plotted) + cv2.imshow(f"Tracking_Stream_{index}", res_plotted) - key = cv2.waitKey(1) - if key == ord("q"): + if cv2.waitKey(1) == ord("q"): break - # Release video sources video.release() - # Load the models - model1 = YOLO("yolov8n.pt") - model2 = YOLO("yolov8n-seg.pt") + # Create and start tracker threads using a for loop + tracker_threads = [] + for i, (video_file, model_name) in enumerate(zip(SOURCES, MODEL_NAMES), start=1): + thread = threading.Thread(target=run_tracker_in_thread, args=(model_name, video_file, i), daemon=True) + tracker_threads.append(thread) + thread.start() - # Define the video files for the trackers - video_file1 = "path/to/video1.mp4" # Path to video file, 0 for webcam - video_file2 = 0 # Path to video file, 0 for webcam, 1 for external camera - - # Create the tracker threads - tracker_thread1 = threading.Thread(target=run_tracker_in_thread, args=(video_file1, model1, 1), daemon=True) - tracker_thread2 = threading.Thread(target=run_tracker_in_thread, args=(video_file2, model2, 2), daemon=True) - - # Start the tracker threads - tracker_thread1.start() - tracker_thread2.start() - - # Wait for the tracker threads to finish - tracker_thread1.join() - tracker_thread2.join() + # Wait for all tracker threads to finish + for thread in tracker_threads: + thread.join() # Clean up and close windows cv2.destroyAllWindows() diff --git a/docs/en/yolov5/quickstart_tutorial.md b/docs/en/yolov5/quickstart_tutorial.md index f8cabb9f..582dfcbd 100644 --- a/docs/en/yolov5/quickstart_tutorial.md +++ b/docs/en/yolov5/quickstart_tutorial.md @@ -44,8 +44,8 @@ Harness `detect.py` for versatile inference on various sources. It automatically ```bash python detect.py --weights yolov5s.pt --source 0 # webcam - img.jpg # image - vid.mp4 # video + image.jpg # image + video.mp4 # video screen # screenshot path/ # directory list.txt # list of images From ba438aea5ae4d0e7c28d59ed8408955d16ca71ec Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 16 Sep 2024 21:37:14 +0200 Subject: [PATCH 34/80] `ultralytics 8.2.95` faster checkpoint saving (#16311) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/modes/track.md | 79 +++++++++++++------------------- ultralytics/__init__.py | 2 +- ultralytics/engine/trainer.py | 11 +++-- ultralytics/nn/tasks.py | 4 ++ ultralytics/utils/torch_utils.py | 13 ++++-- 5 files changed, 52 insertions(+), 57 deletions(-) diff --git a/docs/en/modes/track.md b/docs/en/modes/track.md index c222e592..7ed84189 100644 --- a/docs/en/modes/track.md +++ b/docs/en/modes/track.md @@ -292,42 +292,27 @@ Finally, after all threads have completed their task, the windows displaying the # Define model names and video sources MODEL_NAMES = ["yolov8n.pt", "yolov8n-seg.pt"] - SOURCES = ["path/to/video1.mp4", 0] # local video, 0 for webcam + SOURCES = ["path/to/video.mp4", "0"] # local video, 0 for webcam - def run_tracker_in_thread(model_name, filename, index): + def run_tracker_in_thread(model_name, filename): """ - Runs a video file or webcam stream concurrently with the YOLOv8 model using threading. This function captures video - frames from a given file or camera source and utilizes the YOLOv8 model for object tracking. The function runs in - its own thread for concurrent processing. + Run YOLO tracker in its own thread for concurrent processing. Args: + model_name (str): The YOLOv8 model object. filename (str): The path to the video file or the identifier for the webcam/external camera source. - model (obj): The YOLOv8 model object. - index (int): An index to uniquely identify the file being processed, used for display purposes. """ model = YOLO(model_name) - video = cv2.VideoCapture(filename) - - while True: - ret, frame = video.read() - if not ret: - break - - results = model.track(frame, persist=True) - res_plotted = results[0].plot() - cv2.imshow(f"Tracking_Stream_{index}", res_plotted) - - if cv2.waitKey(1) == ord("q"): - break - - video.release() + results = model.track(filename, save=True, stream=True) + for r in results: + pass # Create and start tracker threads using a for loop tracker_threads = [] - for i, (video_file, model_name) in enumerate(zip(SOURCES, MODEL_NAMES), start=1): - thread = threading.Thread(target=run_tracker_in_thread, args=(model_name, video_file, i), daemon=True) + for video_file, model_name in zip(SOURCES, MODEL_NAMES): + thread = threading.Thread(target=run_tracker_in_thread, args=(model_name, video_file), daemon=True) tracker_threads.append(thread) thread.start() @@ -395,35 +380,37 @@ To run object tracking on multiple video streams simultaneously, you can use Pyt from ultralytics import YOLO + # Define model names and video sources + MODEL_NAMES = ["yolov8n.pt", "yolov8n-seg.pt"] + SOURCES = ["path/to/video.mp4", "0"] # local video, 0 for webcam - def run_tracker_in_thread(filename, model, file_index): - video = cv2.VideoCapture(filename) - while True: - ret, frame = video.read() - if not ret: - break - results = model.track(frame, persist=True) - res_plotted = results[0].plot() - cv2.imshow(f"Tracking_Stream_{file_index}", res_plotted) - if cv2.waitKey(1) & 0xFF == ord("q"): - break - video.release() + def run_tracker_in_thread(model_name, filename): + """ + Run YOLO tracker in its own thread for concurrent processing. - model1 = YOLO("yolov8n.pt") - model2 = YOLO("yolov8n-seg.pt") - video_file1 = "path/to/video1.mp4" - video_file2 = 0 # Path to a second video file, or 0 for a webcam + Args: + model_name (str): The YOLOv8 model object. + filename (str): The path to the video file or the identifier for the webcam/external camera source. + """ + model = YOLO(model_name) + results = model.track(filename, save=True, stream=True) + for r in results: + pass - tracker_thread1 = threading.Thread(target=run_tracker_in_thread, args=(video_file1, model1, 1), daemon=True) - tracker_thread2 = threading.Thread(target=run_tracker_in_thread, args=(video_file2, model2, 2), daemon=True) - tracker_thread1.start() - tracker_thread2.start() + # Create and start tracker threads using a for loop + tracker_threads = [] + for video_file, model_name in zip(SOURCES, MODEL_NAMES): + thread = threading.Thread(target=run_tracker_in_thread, args=(model_name, video_file), daemon=True) + tracker_threads.append(thread) + thread.start() - tracker_thread1.join() - tracker_thread2.join() + # Wait for all tracker threads to finish + for thread in tracker_threads: + thread.join() + # Clean up and close windows cv2.destroyAllWindows() ``` diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 3ff10e1c..9f660777 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.94" +__version__ = "8.2.95" import os diff --git a/ultralytics/engine/trainer.py b/ultralytics/engine/trainer.py index 2c26ea21..ae98540b 100644 --- a/ultralytics/engine/trainer.py +++ b/ultralytics/engine/trainer.py @@ -668,13 +668,14 @@ def on_plot(self, name, data=None): def final_eval(self): """Performs final evaluation and validation for object detection YOLO model.""" + ckpt = {} for f in self.last, self.best: if f.exists(): - strip_optimizer(f) # strip optimizers - if f is self.best: - if self.last.is_file(): # update best.pt train_metrics from last.pt - k = "train_results" - torch.save({**torch.load(self.best), **{k: torch.load(self.last)[k]}}, self.best) + if f is self.last: + ckpt = strip_optimizer(f) + elif f is self.best: + k = "train_results" # update best.pt train_metrics from last.pt + strip_optimizer(f, updates={k: ckpt[k]} if k in ckpt else None) LOGGER.info(f"\nValidating {f}...") self.validator.args.plots = self.args.plots self.metrics = self.validator(model=f) diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py index 274f56d5..ad860e93 100644 --- a/ultralytics/nn/tasks.py +++ b/ultralytics/nn/tasks.py @@ -759,6 +759,10 @@ def __init__(self, *args, **kwargs): """Initialize SafeClass instance, ignoring all arguments.""" pass + def __call__(self, *args, **kwargs): + """Run SafeClass instance, ignoring all arguments.""" + pass + class SafeUnpickler(pickle.Unpickler): """Custom Unpickler that replaces unknown classes with SafeClass.""" diff --git a/ultralytics/utils/torch_utils.py b/ultralytics/utils/torch_utils.py index 7cde9dc7..758a4e11 100644 --- a/ultralytics/utils/torch_utils.py +++ b/ultralytics/utils/torch_utils.py @@ -533,16 +533,17 @@ def update_attr(self, model, include=(), exclude=("process_group", "reducer")): copy_attr(self.ema, model, include, exclude) -def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "") -> None: +def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "", updates: dict = None) -> dict: """ Strip optimizer from 'f' to finalize training, optionally save as 's'. Args: f (str): file path to model to strip the optimizer from. Default is 'best.pt'. s (str): file path to save the model with stripped optimizer to. If not provided, 'f' will be overwritten. + updates (dict): a dictionary of updates to overlay onto the checkpoint before saving. Returns: - None + (dict): The combined checkpoint dictionary. Example: ```python @@ -562,9 +563,9 @@ def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "") -> None: assert "model" in x, "'model' missing from checkpoint" except Exception as e: LOGGER.warning(f"WARNING ⚠️ Skipping {f}, not a valid Ultralytics model: {e}") - return + return {} - updates = { + metadata = { "date": datetime.now().isoformat(), "version": __version__, "license": "AGPL-3.0 License (https://ultralytics.com/license)", @@ -591,9 +592,11 @@ def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "") -> None: # x['model'].args = x['train_args'] # Save - torch.save({**updates, **x}, s or f, use_dill=False) # combine dicts (prefer to the right) + combined = {**metadata, **x, **(updates or {})} + torch.save(combined, s or f, use_dill=False) # combine dicts (prefer to the right) mb = os.path.getsize(s or f) / 1e6 # file size LOGGER.info(f"Optimizer stripped from {f},{f' saved as {s},' if s else ''} {mb:.1f}MB") + return combined def convert_optimizer_state_dict_to_fp16(state_dict): From 6f2bb65953b27c931b6dce0e92a31c2f2783d45e Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 18 Sep 2024 00:44:56 +0800 Subject: [PATCH 35/80] Disable FP16 val on AMP fail and improve AMP checks (#16306) Co-authored-by: UltralyticsAssistant Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> --- ultralytics/engine/validator.py | 3 ++- ultralytics/utils/checks.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ultralytics/engine/validator.py b/ultralytics/engine/validator.py index 655f2455..160a549d 100644 --- a/ultralytics/engine/validator.py +++ b/ultralytics/engine/validator.py @@ -110,7 +110,8 @@ def __call__(self, trainer=None, model=None): if self.training: self.device = trainer.device self.data = trainer.data - self.args.half = self.device.type != "cpu" # force FP16 val during training + # force FP16 val during training + self.args.half = self.device.type != "cpu" and self.args.amp model = trainer.ema.ema or trainer.model model = model.half() if self.args.half else model.float() # self.model = model diff --git a/ultralytics/utils/checks.py b/ultralytics/utils/checks.py index 6b308bc1..70d3d088 100644 --- a/ultralytics/utils/checks.py +++ b/ultralytics/utils/checks.py @@ -656,9 +656,10 @@ def check_amp(model): def amp_allclose(m, im): """All close FP32 vs AMP results.""" - a = m(im, device=device, verbose=False)[0].boxes.data # FP32 inference + batch = [im] * 8 + a = m(batch, imgsz=128, device=device, verbose=False)[0].boxes.data # FP32 inference with autocast(enabled=True): - b = m(im, device=device, verbose=False)[0].boxes.data # AMP inference + b = m(batch, imgsz=128, device=device, verbose=False)[0].boxes.data # AMP inference del m return a.shape == b.shape and torch.allclose(a, b.float(), atol=0.5) # close to 0.5 absolute tolerance From 6e3b7dc2f622c44b07dc70e7ed0d99b4a99c186f Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Tue, 17 Sep 2024 23:27:03 +0500 Subject: [PATCH 36/80] Optimize `parking management` solution (#16288) Co-authored-by: UltralyticsAssistant Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> --- docs/en/guides/parking-management.md | 33 ++-- ultralytics/solutions/parking_management.py | 192 +++++++++----------- 2 files changed, 92 insertions(+), 133 deletions(-) diff --git a/docs/en/guides/parking-management.md b/docs/en/guides/parking-management.md index 84a88f57..78686bd0 100644 --- a/docs/en/guides/parking-management.md +++ b/docs/en/guides/parking-management.md @@ -74,9 +74,6 @@ Parking management with [Ultralytics YOLOv8](https://github.com/ultralytics/ultr from ultralytics import solutions - # Path to json file, that created with above point selection app - polygon_json_path = "bounding_boxes.json" - # Video capture cap = cv2.VideoCapture("Path/to/video/file.mp4") assert cap.isOpened(), "Error reading video file" @@ -86,22 +83,16 @@ Parking management with [Ultralytics YOLOv8](https://github.com/ultralytics/ultr video_writer = cv2.VideoWriter("parking management.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h)) # Initialize parking management object - management = solutions.ParkingManagement(model_path="yolov8n.pt") + parking_manager = solutions.ParkingManagement( + model="yolov8n.pt", # path to model file + json_file="bounding_boxes.json", # path to parking annotations file + ) while cap.isOpened(): ret, im0 = cap.read() if not ret: break - - json_data = management.parking_regions_extraction(polygon_json_path) - results = management.model.track(im0, persist=True, show=False) - - if results[0].boxes.id is not None: - boxes = results[0].boxes.xyxy.cpu().tolist() - clss = results[0].boxes.cls.cpu().tolist() - management.process_data(json_data, im0, boxes, clss) - - management.display_frames(im0) + im0 = parking_manager.process_data(im0) video_writer.write(im0) cap.release() @@ -111,14 +102,12 @@ Parking management with [Ultralytics YOLOv8](https://github.com/ultralytics/ultr ### 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. | +| Name | Type | Default | Description | +| ------------------------ | ------- | ------------- | -------------------------------------------------------------- | +| `model` | `str` | `None` | Path to the YOLOv8 model. | +| `json_file` | `str` | `None` | Path to the JSON file, that have all parking coordinates data. | +| `occupied_region_color` | `tuple` | `(0, 0, 255)` | RGB color for occupied regions. | +| `available_region_color` | `tuple` | `(0, 255, 0)` | RGB color for available regions. | ### Arguments `model.track` diff --git a/ultralytics/solutions/parking_management.py b/ultralytics/solutions/parking_management.py index 19a8ef16..61284933 100644 --- a/ultralytics/solutions/parking_management.py +++ b/ultralytics/solutions/parking_management.py @@ -42,10 +42,10 @@ def __init__(self): self.image_path = None self.image = None self.canvas_image = None - self.bounding_boxes = [] + self.rg_data = [] # region coordinates self.current_box = [] - self.img_width = 0 - self.img_height = 0 + self.imgw = 0 # image width + self.imgh = 0 # image height # Constants self.canvas_max_width = 1280 @@ -64,17 +64,17 @@ def upload_image(self): return self.image = Image.open(self.image_path) - self.img_width, self.img_height = self.image.size + self.imgw, self.imgh = self.image.size # Calculate the aspect ratio and resize image - aspect_ratio = self.img_width / self.img_height + aspect_ratio = self.imgw / self.imgh if aspect_ratio > 1: # Landscape orientation - canvas_width = min(self.canvas_max_width, self.img_width) + canvas_width = min(self.canvas_max_width, self.imgw) canvas_height = int(canvas_width / aspect_ratio) else: # Portrait orientation - canvas_height = min(self.canvas_max_height, self.img_height) + canvas_height = min(self.canvas_max_height, self.imgh) canvas_width = int(canvas_height * aspect_ratio) # Check if canvas is already initialized @@ -90,46 +90,34 @@ def upload_image(self): self.canvas.bind("", self.on_canvas_click) # Reset bounding boxes and current box - self.bounding_boxes = [] + self.rg_data = [] self.current_box = [] def on_canvas_click(self, event): """Handle mouse clicks on canvas to create points for bounding boxes.""" self.current_box.append((event.x, event.y)) - x0, y0 = event.x - 3, event.y - 3 - x1, y1 = event.x + 3, event.y + 3 - self.canvas.create_oval(x0, y0, x1, y1, fill="red") + self.canvas.create_oval(event.x - 3, event.y - 3, event.x + 3, event.y + 3, fill="red") if len(self.current_box) == 4: - self.bounding_boxes.append(self.current_box) - self.draw_bounding_box(self.current_box) + self.rg_data.append(self.current_box) + [ + self.canvas.create_line(self.current_box[i], self.current_box[(i + 1) % 4], fill="blue", width=2) + for i in range(4) + ] self.current_box = [] - def draw_bounding_box(self, box): - """ - Draw bounding box on canvas. - - Args: - box (list): Bounding box data - """ - for i in range(4): - x1, y1 = box[i] - x2, y2 = box[(i + 1) % 4] - self.canvas.create_line(x1, y1, x2, y2, fill="blue", width=2) - def remove_last_bounding_box(self): """Remove the last drawn bounding box from canvas.""" from tkinter import messagebox # scope for multi-environment compatibility - if self.bounding_boxes: - self.bounding_boxes.pop() # Remove the last bounding box + if self.rg_data: + self.rg_data.pop() # Remove the last bounding box self.canvas.delete("all") # Clear the canvas self.canvas.create_image(0, 0, anchor=self.tk.NW, image=self.canvas_image) # Redraw the image # Redraw all bounding boxes - for box in self.bounding_boxes: - self.draw_bounding_box(box) - + for box in self.rg_data: + [self.canvas.create_line(box[i], box[(i + 1) % 4], fill="blue", width=2) for i in range(4)] messagebox.showinfo("Success", "Last bounding box removed.") else: messagebox.showwarning("Warning", "No bounding boxes to remove.") @@ -138,19 +126,19 @@ def save_to_json(self): """Saves rescaled bounding boxes to 'bounding_boxes.json' based on image-to-canvas size ratio.""" from tkinter import messagebox # scope for multi-environment compatibility - canvas_width, canvas_height = self.canvas.winfo_width(), self.canvas.winfo_height() - width_scaling_factor = self.img_width / canvas_width - height_scaling_factor = self.img_height / canvas_height - bounding_boxes_data = [] - for box in self.bounding_boxes: - rescaled_box = [] + rg_data = [] # regions data + for box in self.rg_data: + rs_box = [] # rescaled box list for x, y in box: - rescaled_x = int(x * width_scaling_factor) - rescaled_y = int(y * height_scaling_factor) - rescaled_box.append((rescaled_x, rescaled_y)) - bounding_boxes_data.append({"points": rescaled_box}) + rs_box.append( + ( + int(x * self.imgw / self.canvas.winfo_width()), # width scaling + int(y * self.imgh / self.canvas.winfo_height()), + ) + ) # height scaling + rg_data.append({"points": rs_box}) with open("bounding_boxes.json", "w") as f: - json.dump(bounding_boxes_data, f, indent=4) + json.dump(rg_data, f, indent=4) messagebox.showinfo("Success", "Bounding boxes saved to bounding_boxes.json") @@ -160,102 +148,85 @@ class ParkingManagement: def __init__( self, - model_path, - txt_color=(0, 0, 0), - bg_color=(255, 255, 255), - occupied_region_color=(0, 255, 0), - available_region_color=(0, 0, 255), - margin=10, + model, # Ultralytics YOLO model file path + json_file, # Parking management annotation file created from Parking Annotator + occupied_region_color=(0, 0, 255), # occupied region color + available_region_color=(0, 255, 0), # available region color ): """ 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. + model (str): Path to the YOLOv8 model. + json_file (str): file that have all parking slot points data 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() - - # Labels dictionary - self.labels_dict = {"Occupancy": 0, "Available": 0} - - # Visualization details - self.margin = margin - self.bg_color = bg_color - self.txt_color = txt_color - self.occupied_region_color = occupied_region_color - self.available_region_color = available_region_color - - self.window_name = "Ultralytics YOLOv8 Parking Management System" - # Check if environment supports imshow - self.env_check = check_imshow(warn=True) - - def load_model(self): - """Load the Ultralytics YOLO model for inference and analytics.""" + # Model initialization from ultralytics import YOLO - return YOLO(self.model_path) - - @staticmethod - def parking_regions_extraction(json_file): - """ - Extract parking regions from json file. + self.model = YOLO(model) - Args: - json_file (str): file that have all parking slot points - """ + # Load JSON data with open(json_file) as f: - return json.load(f) + self.json_data = json.load(f) - def process_data(self, json_data, im0, boxes, clss): + self.pr_info = {"Occupancy": 0, "Available": 0} # dictionary for parking information + + self.occ = occupied_region_color + self.arc = available_region_color + + self.env_check = check_imshow(warn=True) # check if environment supports imshow + + def process_data(self, im0): """ Process the model data for parking lot management. Args: - json_data (str): json data for parking lot management im0 (ndarray): inference image - boxes (list): bounding boxes data - clss (list): bounding boxes classes list - - Returns: - filled_slots (int): total slots that are filled in parking lot - empty_slots (int): total slots that are available in parking lot """ - annotator = Annotator(im0) - empty_slots, filled_slots = len(json_data), 0 - for region in json_data: - points_array = np.array(region["points"], dtype=np.int32).reshape((-1, 1, 2)) - region_occupied = False + results = self.model.track(im0, persist=True, show=False) # object tracking - for box, cls in zip(boxes, clss): - x_center = int((box[0] + box[2]) / 2) - y_center = int((box[1] + box[3]) / 2) - text = f"{self.model.names[int(cls)]}" + es, fs = len(self.json_data), 0 # empty slots, filled slots + annotator = Annotator(im0) # init annotator + # extract tracks data + if results[0].boxes.id is None: + self.display_frames(im0) + return im0 + + boxes = results[0].boxes.xyxy.cpu().tolist() + clss = results[0].boxes.cls.cpu().tolist() + + for region in self.json_data: + # Convert points to a NumPy array with the correct dtype and reshape properly + pts_array = np.array(region["points"], dtype=np.int32).reshape((-1, 1, 2)) + rg_occupied = False # occupied region initialization + for box, cls in zip(boxes, clss): + xc = int((box[0] + box[2]) / 2) + yc = int((box[1] + box[3]) / 2) annotator.display_objects_labels( - im0, text, self.txt_color, self.bg_color, x_center, y_center, self.margin + im0, self.model.names[int(cls)], (104, 31, 17), (255, 255, 255), xc, yc, 10 ) - dist = cv2.pointPolygonTest(points_array, (x_center, y_center), False) + dist = cv2.pointPolygonTest(pts_array, (xc, yc), False) if dist >= 0: - region_occupied = True + rg_occupied = True break + if rg_occupied: + fs += 1 + es -= 1 + + # Plotting regions + color = self.occ if rg_occupied else self.arc + cv2.polylines(im0, [pts_array], isClosed=True, color=color, thickness=2) - color = self.occupied_region_color if region_occupied else self.available_region_color - cv2.polylines(im0, [points_array], isClosed=True, color=color, thickness=2) - if region_occupied: - filled_slots += 1 - empty_slots -= 1 + self.pr_info["Occupancy"] = fs + self.pr_info["Available"] = es - self.labels_dict["Occupancy"] = filled_slots - self.labels_dict["Available"] = empty_slots + annotator.display_analytics(im0, self.pr_info, (104, 31, 17), (255, 255, 255), 10) - annotator.display_analytics(im0, self.labels_dict, self.txt_color, self.bg_color, self.margin) + self.display_frames(im0) + return im0 def display_frames(self, im0): """ @@ -265,8 +236,7 @@ def display_frames(self, im0): im0 (ndarray): inference image """ if self.env_check: - cv2.namedWindow(self.window_name) - cv2.imshow(self.window_name, im0) + cv2.imshow("Ultralytics Parking Manager", im0) # Break Window if cv2.waitKey(1) & 0xFF == ord("q"): return From c5bee7545cb5fe26e201c593f3920b4b462c73c1 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 17 Sep 2024 21:06:31 +0200 Subject: [PATCH 37/80] Enable Docs auto-fixes on repo branches (#16326) Co-authored-by: UltralyticsAssistant --- .github/workflows/docs.yml | 4 ++-- docs/en/reference/nn/tasks.md | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 29012253..02bc506a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,7 +48,7 @@ jobs: continue-on-error: true run: ruff check --fix --unsafe-fixes --select D --ignore=D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 . - name: Update Docs Reference Section and Push Changes - if: github.event_name == 'pull_request_target' + continue-on-error: true run: | python docs/build_reference.py git pull origin ${{ github.head_ref || github.ref }} @@ -68,7 +68,7 @@ jobs: python docs/build_docs.py - name: Commit and Push Docs changes continue-on-error: true - if: always() && github.event_name == 'pull_request_target' + if: always() run: | git pull origin ${{ github.head_ref || github.ref }} git add --update # only add updated files diff --git a/docs/en/reference/nn/tasks.md b/docs/en/reference/nn/tasks.md index 8e608885..ebfe8032 100644 --- a/docs/en/reference/nn/tasks.md +++ b/docs/en/reference/nn/tasks.md @@ -47,6 +47,14 @@ keywords: Ultralytics, YOLO, nn tasks, DetectionModel, PoseModel, RTDETRDetectio



+## ::: ultralytics.nn.tasks.SafeClass + +



+ +## ::: ultralytics.nn.tasks.SafeUnpickler + +



+ ## ::: ultralytics.nn.tasks.temporary_modules



From 80c286736b8516783e5f5794ed08f90e76672336 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 18 Sep 2024 10:09:22 +0200 Subject: [PATCH 38/80] Update Multi-Stream predict docs (#16334) Co-authored-by: UltralyticsAssistant --- docs/en/modes/predict.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/docs/en/modes/predict.md b/docs/en/modes/predict.md index 5ca5dab9..6638c8db 100644 --- a/docs/en/modes/predict.md +++ b/docs/en/modes/predict.md @@ -328,9 +328,10 @@ Below are code examples for using each source type: results = model(source, stream=True) # generator of Results objects ``` - === "Streams" + === "Stream" + + Use the stream mode to run inference on live video streams using RTSP, RTMP, TCP, or IP address protocols. If a single stream is provided, the model runs inference with a batch size of 1. For multiple streams, a `.streams` text file can be used to perform batched inference, where the batch size is determined by the number of streams provided (e.g., batch-size 8 for 8 streams). - Run inference on remote streaming sources using RTSP, RTMP, TCP and IP address protocols. If multiple streams are provided in a `*.streams` text file then batched inference will run, i.e. 8 streams will run at batch-size 8, otherwise single streams will run at batch-size 1. ```python from ultralytics import YOLO @@ -338,15 +339,43 @@ Below are code examples for using each source type: model = YOLO("yolov8n.pt") # Single stream with batch-size 1 inference - source = "rtsp://example.com/media.mp4" # RTSP, RTMP, TCP or IP streaming address + source = "rtsp://example.com/media.mp4" # RTSP, RTMP, TCP, or IP streaming address + + # Run inference on the source + results = model(source, stream=True) # generator of Results objects + ``` + + For single stream usage, the batch size is set to 1 by default, allowing efficient real-time processing of the video feed. + + === "Multi-Stream" + + To handle multiple video streams simultaneously, use a `.streams` text file containing the streaming sources. The model will run batched inference where the batch size equals the number of streams. This setup enables efficient processing of multiple feeds concurrently. + + ```python + from ultralytics import YOLO + + # Load a pretrained YOLOv8n model + model = YOLO("yolov8n.pt") - # Multiple streams with batched inference (i.e. batch-size 8 for 8 streams) - source = "path/to/list.streams" # *.streams text file with one streaming address per row + # Multiple streams with batched inference (e.g., batch-size 8 for 8 streams) + source = "path/to/list.streams" # *.streams text file with one streaming address per line # Run inference on the source results = model(source, stream=True) # generator of Results objects ``` + Example `.streams` text file: + + ```txt + rtsp://example.com/media1.mp4 + rtsp://example.com/media2.mp4 + rtmp://example2.com/live + tcp://192.168.1.100:554 + ... + ``` + + Each row in the file represents a streaming source, allowing you to monitor and perform inference on several video streams at once. + ## Inference Arguments `model.predict()` accepts multiple arguments that can be passed at inference time to override defaults: From 225e6e2b25adf597a0a74bac8b4b92f449025d70 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:09:56 +0800 Subject: [PATCH 39/80] Use `trainer.amp` to determine FP16 validation (#16333) Co-authored-by: Glenn Jocher --- ultralytics/engine/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/engine/validator.py b/ultralytics/engine/validator.py index 160a549d..5e0f0988 100644 --- a/ultralytics/engine/validator.py +++ b/ultralytics/engine/validator.py @@ -111,7 +111,7 @@ def __call__(self, trainer=None, model=None): self.device = trainer.device self.data = trainer.data # force FP16 val during training - self.args.half = self.device.type != "cpu" and self.args.amp + self.args.half = self.device.type != "cpu" and trainer.amp model = trainer.ema.ema or trainer.model model = model.half() if self.args.half else model.float() # self.model = model From 2173c37238d632a6f6dcd202c212d749f767263c Mon Sep 17 00:00:00 2001 From: MatthewNoyce <131261051+MatthewNoyce@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:53:33 +0100 Subject: [PATCH 40/80] `ultralytics 8.2.96` new `results[0].to_df` Pandas, XML and CSV methods (#16267) Co-authored-by: UltralyticsAssistant Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Glenn Jocher --- docs/en/hub/inference-api.md | 4 +- tests/test_python.py | 5 +- ultralytics/__init__.py | 2 +- ultralytics/engine/results.py | 86 ++++++++++++++++++++++++++++++++++- 4 files changed, 92 insertions(+), 5 deletions(-) diff --git a/docs/en/hub/inference-api.md b/docs/en/hub/inference-api.md index cd98347e..bc569ac7 100644 --- a/docs/en/hub/inference-api.md +++ b/docs/en/hub/inference-api.md @@ -139,7 +139,7 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J results = model("image.jpg") # Print image.jpg results in JSON format - print(results[0].tojson()) + print(results[0].to_json()) ``` === "cURL" @@ -219,7 +219,7 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J results = model("image.jpg") # Print image.jpg results in JSON format - print(results[0].tojson()) + print(results[0].to_json()) ``` === "cURL" diff --git a/tests/test_python.py b/tests/test_python.py index b5dd0c88..55f087f0 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -269,7 +269,10 @@ def test_results(model): r = r.to(device="cpu", dtype=torch.float32) r.save_txt(txt_file=TMP / "runs/tests/label.txt", save_conf=True) r.save_crop(save_dir=TMP / "runs/tests/crops/") - r.tojson(normalize=True) + r.to_json(normalize=True) + r.to_df(decimals=3) + r.to_csv() + r.to_xml() r.plot(pil=True) r.plot(conf=True, boxes=True) print(r, len(r), r.path) # print after methods diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 9f660777..d5140b15 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.95" +__version__ = "8.2.96" import os diff --git a/ultralytics/engine/results.py b/ultralytics/engine/results.py index 89b2d5c8..57cc4b04 100644 --- a/ultralytics/engine/results.py +++ b/ultralytics/engine/results.py @@ -14,6 +14,7 @@ from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER, SimpleClass, ops +from ultralytics.utils.checks import check_requirements from ultralytics.utils.plotting import Annotator, colors, save_one_box from ultralytics.utils.torch_utils import smart_inference_mode @@ -818,7 +819,90 @@ def summary(self, normalize=False, decimals=5): return results + def to_df(self, normalize=False, decimals=5): + """ + Converts detection results to a Pandas Dataframe. + + This method converts the detection results into Pandas Dataframe format. It includes information + about detected objects such as bounding boxes, class names, confidence scores, and optionally + segmentation masks and keypoints. + + Args: + normalize (bool): Whether to normalize the bounding box coordinates by the image dimensions. + If True, coordinates will be returned as float values between 0 and 1. Defaults to False. + decimals (int): Number of decimal places to round the output values to. Defaults to 5. + + Returns: + (DataFrame): A Pandas Dataframe containing all the information in results in an organized way. + + Examples: + >>> results = model("path/to/image.jpg") + >>> df_result = results[0].to_df() + >>> print(df_result) + """ + import pandas as pd + + return pd.DataFrame(self.summary(normalize=normalize, decimals=decimals)) + + def to_csv(self, normalize=False, decimals=5, *args, **kwargs): + """ + Converts detection results to a CSV format. + + This method serializes the detection results into a CSV format. It includes information + about detected objects such as bounding boxes, class names, confidence scores, and optionally + segmentation masks and keypoints. + + Args: + normalize (bool): Whether to normalize the bounding box coordinates by the image dimensions. + If True, coordinates will be returned as float values between 0 and 1. Defaults to False. + decimals (int): Number of decimal places to round the output values to. Defaults to 5. + *args (Any): Variable length argument list to be passed to pandas.DataFrame.to_csv(). + **kwargs (Any): Arbitrary keyword arguments to be passed to pandas.DataFrame.to_csv(). + + + Returns: + (str): CSV containing all the information in results in an organized way. + + Examples: + >>> results = model("path/to/image.jpg") + >>> csv_result = results[0].to_csv() + >>> print(csv_result) + """ + return self.to_df(normalize=normalize, decimals=decimals).to_csv(*args, **kwargs) + + def to_xml(self, normalize=False, decimals=5, *args, **kwargs): + """ + Converts detection results to XML format. + + This method serializes the detection results into an XML format. It includes information + about detected objects such as bounding boxes, class names, confidence scores, and optionally + segmentation masks and keypoints. + + Args: + normalize (bool): Whether to normalize the bounding box coordinates by the image dimensions. + If True, coordinates will be returned as float values between 0 and 1. Defaults to False. + decimals (int): Number of decimal places to round the output values to. Defaults to 5. + *args (Any): Variable length argument list to be passed to pandas.DataFrame.to_xml(). + **kwargs (Any): Arbitrary keyword arguments to be passed to pandas.DataFrame.to_xml(). + + Returns: + (str): An XML string containing all the information in results in an organized way. + + Examples: + >>> results = model("path/to/image.jpg") + >>> xml_result = results[0].to_xml() + >>> print(xml_result) + """ + check_requirements("lxml") + df = self.to_df(normalize=normalize, decimals=decimals) + return '\n' if df.empty else df.to_xml(*args, **kwargs) + def tojson(self, normalize=False, decimals=5): + """Deprecated version of to_json().""" + LOGGER.warning("WARNING ⚠️ 'result.tojson()' is deprecated, replace with 'result.to_json()'.") + return self.to_json(normalize, decimals) + + def to_json(self, normalize=False, decimals=5): """ Converts detection results to JSON format. @@ -836,7 +920,7 @@ def tojson(self, normalize=False, decimals=5): Examples: >>> results = model("path/to/image.jpg") - >>> json_result = results[0].tojson() + >>> json_result = results[0].to_json() >>> print(json_result) Notes: From e2e6eb4fb017b721e57ad2756cf1ad92b38afbca Mon Sep 17 00:00:00 2001 From: Sergiu Waxmann <47978446+sergiuwaxmann@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:42:25 +0300 Subject: [PATCH 41/80] Docs banner for https://ultralytics.com/yolo-vision (#16338) Co-authored-by: Muhammad Rizwan Munawar --- docs/overrides/main.html | 62 ++++++++------- docs/overrides/stylesheets/style.css | 109 +++++++++++++++++++++------ 2 files changed, 122 insertions(+), 49 deletions(-) diff --git a/docs/overrides/main.html b/docs/overrides/main.html index 48827689..18305746 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -1,30 +1,38 @@ -{% extends "base.html" %} - -{% block announce %} -
+{% extends "base.html" %} {% block announce %} + {% endblock %} diff --git a/docs/overrides/stylesheets/style.css b/docs/overrides/stylesheets/style.css index 352ab3d5..a9a89d90 100644 --- a/docs/overrides/stylesheets/style.css +++ b/docs/overrides/stylesheets/style.css @@ -51,7 +51,7 @@ div.highlight { /* Banner (same as the one on the Ultralytics website) -------------------------------------------------------------- */ .md-banner { - background-image: url(https://assets-global.website-files.com/646dd1f1a3703e451ba81ecc/6627a0cab2de939ad35939ed_banner_82.webp); + background-image: url(https://assets-global.website-files.com/646dd1f1a3703e451ba81ecc/66e9a211bf6831d112fd6ce3_banner_yv24.avif); background-size: cover; background-position: center; } @@ -61,44 +61,109 @@ div.highlight { margin-bottom: 0 !important; } -.banner-wrapper { +.banner-wrapper, +.banner-wrapper > .banner-content-wrapper, +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper { display: flex; - justify-content: center; align-items: center; +} + +.banner-wrapper, +.banner-wrapper > .banner-content-wrapper { + flex-direction: column; +} + +.banner-wrapper { + justify-content: space-between; + gap: 16px; + + padding: 16px; +} + +.banner-wrapper > .banner-content-wrapper, +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper { + justify-content: center; +} + +.banner-wrapper > .banner-content-wrapper { + gap: 8px; +} + +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper { + gap: 4px; +} - height: 64px; +.banner-wrapper > .banner-content-wrapper > p, +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper > p { + margin: 0; +} + +.banner-wrapper > .banner-content-wrapper > p { + font-size: 20px; + font-weight: 500; +} + +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper > p, +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper > button { + font-size: 14px; +} + +.banner-wrapper > .banner-content-wrapper > .banner-info-wrapper > p { + color: #f3f3f3; +} - overflow: hidden; +.banner-wrapper > .banner-button-wrapper, +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper, +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper > button { + border-radius: 100px; } -.banner-content { - max-height: 64px; +.banner-wrapper > .banner-button-wrapper, +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper { + padding: 2px; + + background-color: rgba(222, 255, 56, 0.2); } -.banner-content.desktop { - display: none; +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper.large { + padding: 4px; } -.banner-arrow { - display: none; - max-height: 80px; - margin-left: -16px; - transition: transform ease-in-out 0.5s; +.banner-wrapper > .banner-button-wrapper > .banner-button-wrapper > button { + cursor: pointer; + + min-width: 132px; + padding: 10px; + + font-weight: 500; + color: #111f68; + + background-color: rgb(222, 255, 56); } -.banner-wrapper:hover > .banner-arrow { - transform: translateX(8px); +.banner-wrapper + > .banner-button-wrapper + > .banner-button-wrapper + > button:hover { + background-color: rgba(222, 255, 56, 0.85); } @media screen and (min-width: 768px) { - .banner-content.mobile { - display: none; + .banner-wrapper, + .banner-wrapper > .banner-content-wrapper { + flex-direction: row; } - .banner-content.desktop { - display: revert; + + .banner-wrapper { + gap: 32px; + + padding: 12px; } - .banner-arrow { - display: revert; + + .banner-wrapper > .banner-content-wrapper { + gap: 24px; + + margin: 0 auto; } } /* Banner (same as the one on the Ultralytics website) -------------------------------------------------------------- */ From 7834d19776440dd71645d8c72003eb01883f2092 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Thu, 19 Sep 2024 00:08:05 +0500 Subject: [PATCH 42/80] Add https://youtu.be/c5eFrt2KuzY to docs (#16341) --- docs/en/integrations/paddlepaddle.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/integrations/paddlepaddle.md b/docs/en/integrations/paddlepaddle.md index 700c24f6..2d5972e1 100644 --- a/docs/en/integrations/paddlepaddle.md +++ b/docs/en/integrations/paddlepaddle.md @@ -8,6 +8,17 @@ keywords: YOLOv8, PaddlePaddle, export models, computer vision, deep learning, m Bridging the gap between developing and deploying computer vision models in real-world scenarios with varying conditions can be difficult. PaddlePaddle makes this process easier with its focus on flexibility, performance, and its capability for parallel processing in distributed environments. This means you can use your YOLOv8 computer vision models on a wide variety of devices and platforms, from smartphones to cloud-based servers. +

+
+ +
+ Watch: How to Export Ultralytics YOLOv8 Models to PaddlePaddle Format | Key Features of PaddlePaddle Format +

+ The ability to export to PaddlePaddle model format allows you to optimize your [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) models for use within the PaddlePaddle framework. PaddlePaddle is known for facilitating industrial deployments and is a good choice for deploying computer vision applications in real-world settings across various domains. ## Why should you export to PaddlePaddle? From 6dcc4a0610bf445212253fb51b24e29429a2bcc3 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2024 01:19:22 +0200 Subject: [PATCH 43/80] `ultralytics 8.2.97` robust HUB model downloads (#16347) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- ultralytics/__init__.py | 2 +- ultralytics/cfg/__init__.py | 1 + ultralytics/engine/model.py | 22 ++++------------ ultralytics/hub/session.py | 50 ++++++++++++++++--------------------- 4 files changed, 29 insertions(+), 46 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index d5140b15..34c099b7 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.96" +__version__ = "8.2.97" import os diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py index 6b8edff2..9ae1214e 100644 --- a/ultralytics/cfg/__init__.py +++ b/ultralytics/cfg/__init__.py @@ -712,6 +712,7 @@ def entrypoint(debug=""): "cfg": lambda: yaml_print(DEFAULT_CFG_PATH), "hub": lambda: handle_yolo_hub(args[1:]), "login": lambda: handle_yolo_hub(args), + "logout": lambda: handle_yolo_hub(args), "copy-cfg": copy_default_cfg, "explorer": lambda: handle_explorer(args[1:]), "streamlit-predict": lambda: handle_streamlit_inference(), diff --git a/ultralytics/engine/model.py b/ultralytics/engine/model.py index 47a7f07a..67751889 100644 --- a/ultralytics/engine/model.py +++ b/ultralytics/engine/model.py @@ -206,33 +206,21 @@ def is_hub_model(model: str) -> bool: Check if the provided model is an Ultralytics HUB model. This static method determines whether the given model string represents a valid Ultralytics HUB model - identifier. It checks for three possible formats: a full HUB URL, an API key and model ID combination, - or a standalone model ID. + identifier. Args: - model (str): The model identifier to check. This can be a URL, an API key and model ID - combination, or a standalone model ID. + model (str): The model string to check. Returns: (bool): True if the model is a valid Ultralytics HUB model, False otherwise. Examples: - >>> Model.is_hub_model("https://hub.ultralytics.com/models/example_model") + >>> Model.is_hub_model("https://hub.ultralytics.com/models/MODEL") True - >>> Model.is_hub_model("api_key_example_model_id") - True - >>> Model.is_hub_model("example_model_id") - True - >>> Model.is_hub_model("not_a_hub_model.pt") + >>> Model.is_hub_model("yolov8n.pt") False """ - return any( - ( - model.startswith(f"{HUB_WEB_ROOT}/models/"), # i.e. https://hub.ultralytics.com/models/MODEL_ID - [len(x) for x in model.split("_")] == [42, 20], # APIKEY_MODEL - len(model) == 20 and not Path(model).exists() and all(x not in model for x in "./\\"), # MODEL - ) - ) + return model.startswith(f"{HUB_WEB_ROOT}/models/") def _new(self, cfg: str, task=None, model=None, verbose=False) -> None: """ diff --git a/ultralytics/hub/session.py b/ultralytics/hub/session.py index b112d29f..3732d198 100644 --- a/ultralytics/hub/session.py +++ b/ultralytics/hub/session.py @@ -5,6 +5,7 @@ import time from http import HTTPStatus from pathlib import Path +from urllib.parse import parse_qs, urlparse import requests @@ -77,7 +78,6 @@ def create_session(cls, identifier, args=None): if not session.client.authenticated: if identifier.startswith(f"{HUB_WEB_ROOT}/models/"): LOGGER.warning(f"{PREFIX}WARNING ⚠️ Login to Ultralytics HUB with 'yolo hub login API_KEY'.") - exit() return None if args and not identifier.startswith(f"{HUB_WEB_ROOT}/models/"): # not a HUB model URL session.create_model(args) @@ -96,7 +96,8 @@ def load_model(self, model_id): self.model_url = f"{HUB_WEB_ROOT}/models/{self.model.id}" if self.model.is_trained(): print(emojis(f"Loading trained HUB model {self.model_url} 🚀")) - self.model_file = self.model.get_weights_url("best") + url = self.model.get_weights_url("best") # download URL with auth + self.model_file = checks.check_file(url, download_dir=Path(SETTINGS["weights_dir"]) / "hub" / self.model.id) return # Set training args and start heartbeats for HUB to monitor agent @@ -146,9 +147,8 @@ def _parse_identifier(identifier): Parses the given identifier to determine the type of identifier and extract relevant components. The method supports different identifier formats: - - A HUB URL, which starts with HUB_WEB_ROOT followed by '/models/' - - An identifier containing an API key and a model ID separated by an underscore - - An identifier that is solely a model ID of a fixed length + - A HUB model URL https://hub.ultralytics.com/models/MODEL + - A HUB model URL with API Key https://hub.ultralytics.com/models/MODEL?api_key=APIKEY - A local filename that ends with '.pt' or '.yaml' Args: @@ -160,32 +160,26 @@ def _parse_identifier(identifier): Raises: HUBModelError: If the identifier format is not recognized. """ - # Initialize variables api_key, model_id, filename = None, None, None - # Check if identifier is a HUB URL - if identifier.startswith(f"{HUB_WEB_ROOT}/models/"): - # Extract the model_id after the HUB_WEB_ROOT URL - model_id = identifier.split(f"{HUB_WEB_ROOT}/models/")[-1] + # path = identifier.split(f"{HUB_WEB_ROOT}/models/")[-1] + # parts = path.split("_") + # if Path(path).suffix in {".pt", ".yaml"}: + # filename = path + # elif len(parts) == 2 and len(parts[0]) == 42 and len(parts[1]) == 20: + # api_key, model_id = parts + # elif len(path) == 20: + # model_id = path + + if Path(identifier).suffix in {".pt", ".yaml"}: + filename = identifier + elif identifier.startswith(f"{HUB_WEB_ROOT}/models/"): + parsed_url = urlparse(identifier) + model_id = Path(parsed_url.path).stem # handle possible final backslash robustly + query_params = parse_qs(parsed_url.query) # dictionary, i.e. {"api_key": ["API_KEY_HERE"]} + api_key = query_params.get("api_key", [None])[0] else: - # Split the identifier based on underscores only if it's not a HUB URL - parts = identifier.split("_") - - # Check if identifier is in the format of API key and model ID - if len(parts) == 2 and len(parts[0]) == 42 and len(parts[1]) == 20: - api_key, model_id = parts - # Check if identifier is a single model ID - elif len(parts) == 1 and len(parts[0]) == 20: - model_id = parts[0] - # Check if identifier is a local filename - elif identifier.endswith(".pt") or identifier.endswith(".yaml"): - filename = identifier - else: - raise HUBModelError( - f"model='{identifier}' could not be parsed. Check format is correct. " - f"Supported formats are Ultralytics HUB URL, apiKey_modelId, modelId, local pt or yaml file." - ) - + raise HUBModelError(f"model='{identifier} invalid, correct format is {HUB_WEB_ROOT}/models/MODEL_ID") return api_key, model_id, filename def _set_train_args(self): From ff2d268bdb9c1072e664f574b4c9f78e3985b9f4 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Thu, 19 Sep 2024 16:49:58 +0200 Subject: [PATCH 44/80] Dynamic pose line thickness (#16362) Co-authored-by: UltralyticsAssistant --- ultralytics/utils/plotting.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ultralytics/utils/plotting.py b/ultralytics/utils/plotting.py index 3626e778..f3edf781 100644 --- a/ultralytics/utils/plotting.py +++ b/ultralytics/utils/plotting.py @@ -419,7 +419,7 @@ def masks(self, masks, colors, im_gpu, alpha=0.5, retina_masks=False): # Convert im back to PIL and update draw self.fromarray(self.im) - def kpts(self, kpts, shape=(640, 640), radius=5, kpt_line=True, conf_thres=0.25, kpt_color=None): + def kpts(self, kpts, shape=(640, 640), radius=None, kpt_line=True, conf_thres=0.25, kpt_color=None): """ Plot keypoints on the image. @@ -436,6 +436,7 @@ def kpts(self, kpts, shape=(640, 640), radius=5, kpt_line=True, conf_thres=0.25, - Modifies self.im in-place. - If self.pil is True, converts image to numpy array and back to PIL. """ + radius = radius if radius is not None else self.lw if self.pil: # Convert to numpy first self.im = np.asarray(self.im).copy() @@ -471,7 +472,7 @@ def kpts(self, kpts, shape=(640, 640), radius=5, kpt_line=True, conf_thres=0.25, pos1, pos2, kpt_color or self.limb_color[i].tolist(), - thickness=2, + thickness=int(np.ceil(self.lw / 2)), lineType=cv2.LINE_AA, ) if self.pil: From e24a6f3b0529f62325ba23adfb20d8fc923322f9 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2024 16:50:59 +0200 Subject: [PATCH 45/80] Cleanup session.py (#16352) --- ultralytics/hub/session.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ultralytics/hub/session.py b/ultralytics/hub/session.py index 3732d198..170bb82b 100644 --- a/ultralytics/hub/session.py +++ b/ultralytics/hub/session.py @@ -161,16 +161,6 @@ def _parse_identifier(identifier): HUBModelError: If the identifier format is not recognized. """ api_key, model_id, filename = None, None, None - - # path = identifier.split(f"{HUB_WEB_ROOT}/models/")[-1] - # parts = path.split("_") - # if Path(path).suffix in {".pt", ".yaml"}: - # filename = path - # elif len(parts) == 2 and len(parts[0]) == 42 and len(parts[1]) == 20: - # api_key, model_id = parts - # elif len(path) == 20: - # model_id = path - if Path(identifier).suffix in {".pt", ".yaml"}: filename = identifier elif identifier.startswith(f"{HUB_WEB_ROOT}/models/"): From 5024bcac9de24fd6a80ce19ddfef453c09ac3d08 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2024 20:05:32 +0200 Subject: [PATCH 46/80] Remove pandas from exports table (#16371) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- ultralytics/engine/exporter.py | 6 ++---- ultralytics/nn/autobackend.py | 6 +++--- ultralytics/utils/benchmarks.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index df90e838..d4987f90 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -95,9 +95,7 @@ def export_formats(): - """YOLOv8 export formats.""" - import pandas # scope for faster 'import ultralytics' - + """Ultralytics YOLO export formats.""" x = [ ["PyTorch", "-", ".pt", True, True], ["TorchScript", "torchscript", ".torchscript", True, True], @@ -113,7 +111,7 @@ def export_formats(): ["PaddlePaddle", "paddle", "_paddle_model", True, True], ["NCNN", "ncnn", "_ncnn_model", True, True], ] - return pandas.DataFrame(x, columns=["Format", "Argument", "Suffix", "CPU", "GPU"]) + return dict(zip(["Format", "Argument", "Suffix", "CPU", "GPU"], zip(*x))) def gd_outputs(gd): diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index e5ef51c0..a0e2e43b 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -398,8 +398,8 @@ def wrap_frozen_graph(gd, inputs, outputs): from ultralytics.engine.exporter import export_formats raise TypeError( - f"model='{w}' is not a supported model format. " - f"See https://docs.ultralytics.com/modes/predict for help.\n\n{export_formats()}" + f"model='{w}' is not a supported model format. Ultralytics supports: {export_formats()['Format']}\n" + f"See https://docs.ultralytics.com/modes/predict for help." ) # Load external metadata YAML @@ -653,7 +653,7 @@ def _model_type(p="path/to/model.pt"): """ from ultralytics.engine.exporter import export_formats - sf = list(export_formats().Suffix) # export suffixes + sf = export_formats()["Suffix"] # export suffixes if not is_url(p) and not isinstance(p, str): check_suffix(p, sf) # checks name = Path(p).name diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index 212c2f7b..89bcc66a 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -85,7 +85,7 @@ def benchmark( y = [] t0 = time.time() - for i, (name, format, suffix, cpu, gpu) in export_formats().iterrows(): # index, (name, format, suffix, CPU, GPU) + for i, (name, format, suffix, cpu, gpu) in enumerate(zip(*export_formats().values())): emoji, filename = "❌", None # export defaults try: # Checks From 641d09164c52265dd29a31232d57b22616a93f26 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2024 21:06:57 +0200 Subject: [PATCH 47/80] New `PERSISTENT_CACHE` (#16373) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/reference/utils/__init__.md | 4 ++ ultralytics/utils/__init__.py | 58 +++++++++++++++++++++++++++++ ultralytics/utils/torch_utils.py | 16 +++++--- 3 files changed, 72 insertions(+), 6 deletions(-) diff --git a/docs/en/reference/utils/__init__.md b/docs/en/reference/utils/__init__.md index b8147dac..9c5f2b44 100644 --- a/docs/en/reference/utils/__init__.md +++ b/docs/en/reference/utils/__init__.md @@ -39,6 +39,10 @@ keywords: Ultralytics, utils, TQDM, Python, ML, Machine Learning utilities, YOLO



+## ::: ultralytics.utils.PersistentCacheDict + +



+ ## ::: ultralytics.utils.plt_settings



diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index 7328a5fd..5ba58d08 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -3,6 +3,7 @@ import contextlib import importlib.metadata import inspect +import json import logging.config import os import platform @@ -14,6 +15,7 @@ import urllib import uuid from pathlib import Path +from threading import Lock from types import SimpleNamespace from typing import Union @@ -1136,6 +1138,61 @@ def reset(self): self.save() +class PersistentCacheDict(dict): + """A thread-safe dictionary that persists data to a JSON file for caching purposes.""" + + def __init__(self, file_path=USER_CONFIG_DIR / "persistent_cache.json"): + """Initializes a thread-safe persistent cache dictionary with a specified file path for storage.""" + super().__init__() + self.file_path = Path(file_path) + self.lock = Lock() + self._load() + + def _load(self): + """Load the persistent cache from a JSON file into the dictionary, handling errors gracefully.""" + try: + if self.file_path.exists(): + with open(self.file_path) as f: + self.update(json.load(f)) + except json.JSONDecodeError: + print(f"Error decoding JSON from {self.file_path}. Starting with an empty cache.") + except Exception as e: + print(f"Error reading from {self.file_path}: {e}") + + def _save(self): + """Save the current state of the cache dictionary to a JSON file, ensuring thread safety.""" + try: + self.file_path.parent.mkdir(parents=True, exist_ok=True) + with open(self.file_path, "w") as f: + json.dump(dict(self), f, indent=2) + except Exception as e: + print(f"Error writing to {self.file_path}: {e}") + + def __setitem__(self, key, value): + """Store a key-value pair in the cache and persist the updated cache to disk.""" + with self.lock: + super().__setitem__(key, value) + self._save() + + def __delitem__(self, key): + """Remove an item from the PersistentCacheDict and update the persistent storage.""" + with self.lock: + super().__delitem__(key) + self._save() + + def update(self, *args, **kwargs): + """Update the dictionary with key-value pairs from other mappings or iterables, ensuring thread safety.""" + with self.lock: + super().update(*args, **kwargs) + self._save() + + def clear(self): + """Clears all entries from the persistent cache dictionary, ensuring thread safety.""" + with self.lock: + super().clear() + self._save() + + def deprecation_warn(arg, new_arg): """Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument.""" LOGGER.warning( @@ -1171,6 +1228,7 @@ def vscode_msg(ext="ultralytics.ultralytics-snippets") -> str: # Check first-install steps PREFIX = colorstr("Ultralytics: ") SETTINGS = SettingsManager() # initialize settings +PERSISTENT_CACHE = PersistentCacheDict() # initialize persistent cache DATASETS_DIR = Path(SETTINGS["datasets_dir"]) # global datasets directory WEIGHTS_DIR = Path(SETTINGS["weights_dir"]) # global weights directory RUNS_DIR = Path(SETTINGS["runs_dir"]) # global runs directory diff --git a/ultralytics/utils/torch_utils.py b/ultralytics/utils/torch_utils.py index 758a4e11..75a90b76 100644 --- a/ultralytics/utils/torch_utils.py +++ b/ultralytics/utils/torch_utils.py @@ -110,13 +110,17 @@ def autocast(enabled: bool, device: str = "cuda"): def get_cpu_info(): """Return a string with system CPU information, i.e. 'Apple M2'.""" - with contextlib.suppress(Exception): - import cpuinfo # pip install py-cpuinfo + from ultralytics.utils import PERSISTENT_CACHE # avoid circular import error - k = "brand_raw", "hardware_raw", "arch_string_raw" # keys sorted by preference (not all keys always available) - info = cpuinfo.get_cpu_info() # info dict - string = info.get(k[0] if k[0] in info else k[1] if k[1] in info else k[2], "unknown") - return string.replace("(R)", "").replace("CPU ", "").replace("@ ", "") + if "cpu_info" not in PERSISTENT_CACHE: + with contextlib.suppress(Exception): + import cpuinfo # pip install py-cpuinfo + + k = "brand_raw", "hardware_raw", "arch_string_raw" # keys sorted by preference + info = cpuinfo.get_cpu_info() # info dict + string = info.get(k[0] if k[0] in info else k[1] if k[1] in info else k[2], "unknown") + PERSISTENT_CACHE["cpu_info"] = string.replace("(R)", "").replace("CPU ", "").replace("@ ", "") + return PERSISTENT_CACHE.get("cpu_info", "unknown") return "unknown" From 07a5ff9ddca487581035b61ff7678c0f7e0f40d9 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2024 21:22:55 +0200 Subject: [PATCH 48/80] `ultralytics 8.2.98` faster `fuse()` operations (#16375) Co-authored-by: UltralyticsAssistant --- ultralytics/__init__.py | 2 +- ultralytics/utils/torch_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 34c099b7..b3e0acfb 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.97" +__version__ = "8.2.98" import os diff --git a/ultralytics/utils/torch_utils.py b/ultralytics/utils/torch_utils.py index 75a90b76..824e1e82 100644 --- a/ultralytics/utils/torch_utils.py +++ b/ultralytics/utils/torch_utils.py @@ -251,7 +251,7 @@ def fuse_conv_and_bn(conv, bn): ) # Prepare filters - w_conv = conv.weight.clone().view(conv.out_channels, -1) + w_conv = conv.weight.view(conv.out_channels, -1) w_bn = torch.diag(bn.weight.div(torch.sqrt(bn.eps + bn.running_var))) fusedconv.weight.copy_(torch.mm(w_bn, w_conv).view(fusedconv.weight.shape)) @@ -282,7 +282,7 @@ def fuse_deconv_and_bn(deconv, bn): ) # Prepare filters - w_deconv = deconv.weight.clone().view(deconv.out_channels, -1) + w_deconv = deconv.weight.view(deconv.out_channels, -1) w_bn = torch.diag(bn.weight.div(torch.sqrt(bn.eps + bn.running_var))) fuseddconv.weight.copy_(torch.mm(w_bn, w_deconv).view(fuseddconv.weight.shape)) From 733781d1d4c4c22bac8ecac1caa8e69ebd956150 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:27:20 +0800 Subject: [PATCH 49/80] Remove extra `get_cpu_info` return (#16382) --- ultralytics/utils/torch_utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ultralytics/utils/torch_utils.py b/ultralytics/utils/torch_utils.py index 824e1e82..a3996929 100644 --- a/ultralytics/utils/torch_utils.py +++ b/ultralytics/utils/torch_utils.py @@ -122,8 +122,6 @@ def get_cpu_info(): PERSISTENT_CACHE["cpu_info"] = string.replace("(R)", "").replace("CPU ", "").replace("@ ", "") return PERSISTENT_CACHE.get("cpu_info", "unknown") - return "unknown" - def select_device(device="", batch=0, newline=False, verbose=True): """ From 5222b8e4fa097ad0fd07236a18a1546e282a9e9c Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Fri, 20 Sep 2024 18:26:59 +0500 Subject: [PATCH 50/80] Add https://youtu.be/5XYdm5CYODA to docs (#16392) --- docs/en/tasks/obb.md | 54 ++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/docs/en/tasks/obb.md b/docs/en/tasks/obb.md index 2fc2b9da..186ffbb0 100644 --- a/docs/en/tasks/obb.md +++ b/docs/en/tasks/obb.md @@ -19,28 +19,16 @@ The output of an oriented object detector is a set of rotated bounding boxes tha YOLOv8 OBB models use the `-obb` suffix, i.e. `yolov8n-obb.pt` and are pretrained on [DOTAv1](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/DOTAv1.yaml). - - - - - -
- -
- Watch: Object Detection using Ultralytics YOLOv8 Oriented Bounding Boxes (YOLOv8-OBB) -
- -
- Watch: Object Detection with YOLOv8-OBB using Ultralytics HUB -
+

+
+ +
+ Watch: Object Detection using Ultralytics YOLOv8 Oriented Bounding Boxes (YOLOv8-OBB) +

## Visual Samples @@ -98,6 +86,17 @@ Train YOLOv8n-obb on the `dota8.yaml` dataset for 100 epochs at image size 640. yolo obb train data=dota8.yaml model=yolov8n-obb.yaml pretrained=yolov8n-obb.pt epochs=100 imgsz=640 ``` +

+
+ +
+ Watch: How to Train Ultralytics YOLOv8-OBB (Oriented Bounding Boxes) Models on DOTA Dataset using Ultralytics HUB +

+ ### Dataset format OBB dataset format can be found in detail in the [Dataset Guide](../datasets/obb/index.md). @@ -158,6 +157,17 @@ Use a trained YOLOv8n-obb model to run predictions on images. yolo obb predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg' # predict with custom model ``` +

+
+ +
+ Watch: How to Detect and Track Storage Tanks using Ultralytics YOLOv8-OBB | Oriented Bounding Boxes | DOTA +

+ See full `predict` mode details in the [Predict](../modes/predict.md) page. ## Export From e65f59003b59aec3aa0c8f335aef0be03eab8898 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Sat, 21 Sep 2024 19:54:48 +0800 Subject: [PATCH 51/80] Remove `half` when profiling ONNX models (#16405) Co-authored-by: Glenn Jocher Co-authored-by: UltralyticsAssistant --- ultralytics/utils/benchmarks.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index 89bcc66a..4e8fb032 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -322,9 +322,12 @@ def __init__( num_warmup_runs (int, optional): Number of warmup runs before the actual profiling starts. Default is 10. min_time (float, optional): Minimum time in seconds for profiling a model. Default is 60. imgsz (int, optional): Size of the image used during profiling. Default is 640. - half (bool, optional): Flag to indicate whether to use half-precision floating point for profiling. + half (bool, optional): Flag to indicate whether to use FP16 half-precision for TensorRT profiling. trt (bool, optional): Flag to indicate whether to profile using TensorRT. Default is True. device (torch.device, optional): Device used for profiling. If None, it is determined automatically. + + Notes: + FP16 'half' argument option removed for ONNX as slower on CPU than FP32 """ self.paths = paths self.num_timed_runs = num_timed_runs @@ -353,10 +356,18 @@ def profile(self): model_info = model.info() if self.trt and self.device.type != "cpu" and not engine_file.is_file(): engine_file = model.export( - format="engine", half=self.half, imgsz=self.imgsz, device=self.device, verbose=False + format="engine", + half=self.half, + imgsz=self.imgsz, + device=self.device, + verbose=False, ) onnx_file = model.export( - format="onnx", half=self.half, imgsz=self.imgsz, simplify=True, device=self.device, verbose=False + format="onnx", + imgsz=self.imgsz, + simplify=True, + device=self.device, + verbose=False, ) elif file.suffix == ".onnx": model_info = self.get_onnx_model_info(file) From 5105dcc297a599fbf266c3267209c938b6aded7f Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Sun, 22 Sep 2024 18:35:18 +0500 Subject: [PATCH 52/80] Update `simple-utilities.md` (#16417) Co-authored-by: UltralyticsAssistant --- docs/en/usage/simple-utilities.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/en/usage/simple-utilities.md b/docs/en/usage/simple-utilities.md index ed59f8db..a5636ca6 100644 --- a/docs/en/usage/simple-utilities.md +++ b/docs/en/usage/simple-utilities.md @@ -460,15 +460,16 @@ for obb in obb_boxes: image_with_obb = ann.result() ``` -#### Bounding Boxes Circle Annotation ([Circle Label](https://docs.ultralytics.com/reference/utils/plotting/#ultralytics.utils.plotting.Annotator.circle_label)) +#### Bounding Boxes Circle Annotation [Circle Label](https://docs.ultralytics.com/reference/utils/plotting/#ultralytics.utils.plotting.Annotator.circle_label) ```python import cv2 from ultralytics import YOLO -from ultralytics.utils.plotting import Annotator, colors +from ultralytics.utils.plotting import Annotator model = YOLO("yolov8s.pt") +names = model.names cap = cv2.VideoCapture("path/to/video/file.mp4") w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS)) @@ -479,15 +480,13 @@ while True: if not ret: break - annotator = Annotator(im0, line_width=2) - + annotator = Annotator(im0) results = model.predict(im0) boxes = results[0].boxes.xyxy.cpu() clss = results[0].boxes.cls.cpu().tolist() for box, cls in zip(boxes, clss): - x1, y1 = int((box[0] + box[2]) // 2), int((box[1] + box[3]) // 2) - annotator.circle_label(box, label=model.names[int(cls)], color=colors(int(cls), True)) + annotator.circle_label(box, label=names[int(cls)]) writer.write(im0) cv2.imshow("Ultralytics circle annotation", im0) @@ -500,15 +499,16 @@ cap.release() cv2.destroyAllWindows() ``` -#### Bounding Boxes Text Annotation ([Text Label](https://docs.ultralytics.com/reference/utils/plotting/#ultralytics.utils.plotting.Annotator.text_label)) +#### Bounding Boxes Text Annotation [Text Label](https://docs.ultralytics.com/reference/utils/plotting/#ultralytics.utils.plotting.Annotator.text_label) ```python import cv2 from ultralytics import YOLO -from ultralytics.utils.plotting import Annotator, colors +from ultralytics.utils.plotting import Annotator model = YOLO("yolov8s.pt") +names = model.names cap = cv2.VideoCapture("path/to/video/file.mp4") w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS)) @@ -519,15 +519,13 @@ while True: if not ret: break - annotator = Annotator(im0, line_width=2) - + annotator = Annotator(im0) results = model.predict(im0) boxes = results[0].boxes.xyxy.cpu() clss = results[0].boxes.cls.cpu().tolist() for box, cls in zip(boxes, clss): - x1, y1 = int((box[0] + box[2]) // 2), int((box[1] + box[3]) // 2) - annotator.text_label(box, label=model.names[int(cls)], color=colors(int(cls), True)) + annotator.text_label(box, label=names[int(cls)]) writer.write(im0) cv2.imshow("Ultralytics text annotation", im0) From 486d4cbe5461c9b8ffe34b5bc3a9c88ec93ab252 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 22 Sep 2024 16:17:05 +0200 Subject: [PATCH 53/80] Update OpenVINO CI for Python 3.12 (#16420) --- tests/test_exports.py | 1 - ultralytics/utils/benchmarks.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_exports.py b/tests/test_exports.py index 7bc14c1c..98e4049d 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -32,7 +32,6 @@ def test_export_onnx(): YOLO(file)(SOURCE, imgsz=32) # exported model inference -@pytest.mark.skipif(checks.IS_PYTHON_3_12, reason="OpenVINO not supported in Python 3.12") @pytest.mark.skipif(not TORCH_1_13, reason="OpenVINO requires torch>=1.13") def test_export_openvino(): """Test YOLO exports to OpenVINO format for model inference compatibility.""" diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index 4e8fb032..8d760f80 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -97,8 +97,8 @@ def benchmark( assert MACOS or LINUX, "CoreML and TF.js export only supported on macOS and Linux" assert not IS_RASPBERRYPI, "CoreML and TF.js export not supported on Raspberry Pi" assert not IS_JETSON, "CoreML and TF.js export not supported on NVIDIA Jetson" - if i in {3, 5}: # CoreML and OpenVINO - assert not IS_PYTHON_3_12, "CoreML and OpenVINO not supported on Python 3.12" + if i in {5}: # CoreML + assert not IS_PYTHON_3_12, "CoreML not supported on Python 3.12" if i in {6, 7, 8}: # TF SavedModel, TF GraphDef, and TFLite assert not isinstance(model, YOLOWorld), "YOLOWorldv2 TensorFlow exports not supported by onnx2tf yet" if i in {9, 10}: # TF EdgeTPU and TF.js From d6492ab19ba6b7a372061e9a51cc7e078f66bb7a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 22 Sep 2024 17:11:23 +0200 Subject: [PATCH 54/80] Update TOML project URLs (#16421) --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8c915c0d..e1be881f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,9 +127,11 @@ extra = [ ] [project.urls] +"Homepage" = "https://ultralytics.com" +"Source" = "https://github.com/ultralytics/ultralytics" +"Documentation" = "https://docs.ultralytics.com" "Bug Reports" = "https://github.com/ultralytics/ultralytics/issues" -"Funding" = "https://ultralytics.com" -"Source" = "https://github.com/ultralytics/ultralytics/" +"Changelog" = "https://github.com/ultralytics/ultralytics/releases" [project.scripts] yolo = "ultralytics.cfg:entrypoint" From e50a56daa5413751f0eff11f2bf6fb750103e569 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 22 Sep 2024 20:45:16 +0200 Subject: [PATCH 55/80] Update pyproject.toml authors and maintainers fields (#16423) --- pyproject.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e1be881f..4e0b1cbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,14 +32,12 @@ requires-python = ">=3.8" license = { "text" = "AGPL-3.0" } keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "YOLOv9", "YOLOv10", "HUB", "Ultralytics"] authors = [ - { name = "Glenn Jocher" }, - { name = "Ayush Chaurasia" }, - { name = "Jing Qiu" } + { name = "Glenn Jocher", email = "glenn.jocher@ultralytics.com"}, + { name = "Jing Qiu", email = "jing.qiu@ultralytics.com"}, + { name = "Ayush Chaurasia" } ] maintainers = [ - { name = "Glenn Jocher" }, - { name = "Ayush Chaurasia" }, - { name = "Jing Qiu" } + { name = "Ultralytics", email = "hello@ultralytics.com" } ] classifiers = [ "Development Status :: 4 - Beta", From f5a60c634006dfe93273e55ecc495873815b6a71 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 22 Sep 2024 21:29:05 +0200 Subject: [PATCH 56/80] New `JSONDict` class (#16426) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/reference/utils/__init__.md | 4 +- ultralytics/utils/__init__.py | 145 ++++++++++++++++------------ 2 files changed, 86 insertions(+), 63 deletions(-) diff --git a/docs/en/reference/utils/__init__.md b/docs/en/reference/utils/__init__.md index 9c5f2b44..9b7d1b58 100644 --- a/docs/en/reference/utils/__init__.md +++ b/docs/en/reference/utils/__init__.md @@ -35,11 +35,11 @@ keywords: Ultralytics, utils, TQDM, Python, ML, Machine Learning utilities, YOLO



-## ::: ultralytics.utils.SettingsManager +## ::: ultralytics.utils.JSONDict



-## ::: ultralytics.utils.PersistentCacheDict +## ::: ultralytics.utils.SettingsManager



diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index 5ba58d08..a9ada7cd 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -1040,6 +1040,87 @@ def before_send(event, hint): sentry_sdk.set_user({"id": SETTINGS["uuid"]}) # SHA-256 anonymized UUID hash +class JSONDict(dict): + """ + A dictionary-like class that provides JSON persistence for its contents. + + This class extends the built-in dictionary to automatically save its contents to a JSON file whenever they are + modified. It ensures thread-safe operations using a lock. + + Attributes: + file_path (Path): The path to the JSON file used for persistence. + lock (threading.Lock): A lock object to ensure thread-safe operations. + + Methods: + _load: Loads the data from the JSON file into the dictionary. + _save: Saves the current state of the dictionary to the JSON file. + __setitem__: Stores a key-value pair and persists it to disk. + __delitem__: Removes an item and updates the persistent storage. + update: Updates the dictionary and persists changes. + clear: Clears all entries and updates the persistent storage. + + Examples: + >>> json_dict = JSONDict("data.json") + >>> json_dict["key"] = "value" + >>> print(json_dict["key"]) + value + >>> del json_dict["key"] + >>> json_dict.update({"new_key": "new_value"}) + >>> json_dict.clear() + """ + + def __init__(self, file_path: Union[str, Path] = "data.json"): + """Initialize a JSONDict object with a specified file path for JSON persistence.""" + super().__init__() + self.file_path = Path(file_path) + self.lock = Lock() + self._load() + + def _load(self): + """Load the data from the JSON file into the dictionary.""" + try: + if self.file_path.exists(): + with open(self.file_path) as f: + self.update(json.load(f)) + except json.JSONDecodeError: + print(f"Error decoding JSON from {self.file_path}. Starting with an empty dictionary.") + except Exception as e: + print(f"Error reading from {self.file_path}: {e}") + + def _save(self): + """Save the current state of the dictionary to the JSON file.""" + try: + self.file_path.parent.mkdir(parents=True, exist_ok=True) + with open(self.file_path, "w") as f: + json.dump(dict(self), f, indent=2) + except Exception as e: + print(f"Error writing to {self.file_path}: {e}") + + def __setitem__(self, key, value): + """Store a key-value pair and persist to disk.""" + with self.lock: + super().__setitem__(key, value) + self._save() + + def __delitem__(self, key): + """Remove an item and update the persistent storage.""" + with self.lock: + super().__delitem__(key) + self._save() + + def update(self, *args, **kwargs): + """Update the dictionary and persist changes.""" + with self.lock: + super().update(*args, **kwargs) + self._save() + + def clear(self): + """Clear all entries and update the persistent storage.""" + with self.lock: + super().clear() + self._save() + + class SettingsManager(dict): """ Manages Ultralytics settings stored in a YAML file. @@ -1138,61 +1219,6 @@ def reset(self): self.save() -class PersistentCacheDict(dict): - """A thread-safe dictionary that persists data to a JSON file for caching purposes.""" - - def __init__(self, file_path=USER_CONFIG_DIR / "persistent_cache.json"): - """Initializes a thread-safe persistent cache dictionary with a specified file path for storage.""" - super().__init__() - self.file_path = Path(file_path) - self.lock = Lock() - self._load() - - def _load(self): - """Load the persistent cache from a JSON file into the dictionary, handling errors gracefully.""" - try: - if self.file_path.exists(): - with open(self.file_path) as f: - self.update(json.load(f)) - except json.JSONDecodeError: - print(f"Error decoding JSON from {self.file_path}. Starting with an empty cache.") - except Exception as e: - print(f"Error reading from {self.file_path}: {e}") - - def _save(self): - """Save the current state of the cache dictionary to a JSON file, ensuring thread safety.""" - try: - self.file_path.parent.mkdir(parents=True, exist_ok=True) - with open(self.file_path, "w") as f: - json.dump(dict(self), f, indent=2) - except Exception as e: - print(f"Error writing to {self.file_path}: {e}") - - def __setitem__(self, key, value): - """Store a key-value pair in the cache and persist the updated cache to disk.""" - with self.lock: - super().__setitem__(key, value) - self._save() - - def __delitem__(self, key): - """Remove an item from the PersistentCacheDict and update the persistent storage.""" - with self.lock: - super().__delitem__(key) - self._save() - - def update(self, *args, **kwargs): - """Update the dictionary with key-value pairs from other mappings or iterables, ensuring thread safety.""" - with self.lock: - super().update(*args, **kwargs) - self._save() - - def clear(self): - """Clears all entries from the persistent cache dictionary, ensuring thread safety.""" - with self.lock: - super().clear() - self._save() - - def deprecation_warn(arg, new_arg): """Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument.""" LOGGER.warning( @@ -1216,11 +1242,8 @@ def vscode_msg(ext="ultralytics.ultralytics-snippets") -> str: path = (USER_CONFIG_DIR.parents[2] if WINDOWS else USER_CONFIG_DIR.parents[1]) / ".vscode/extensions" obs_file = path / ".obsolete" # file tracks uninstalled extensions, while source directory remains installed = any(path.glob(f"{ext}*")) and ext not in (obs_file.read_text("utf-8") if obs_file.exists() else "") - return ( - "" - if installed - else f"{colorstr('VS Code:')} view Ultralytics VS Code Extension ⚡ at https://docs.ultralytics.com/integrations/vscode" - ) + url = "https://docs.ultralytics.com/integrations/vscode" + return "" if installed else f"{colorstr('VS Code:')} view Ultralytics VS Code Extension ⚡ at {url}" # Run below code on utils init ------------------------------------------------------------------------------------ @@ -1228,7 +1251,7 @@ def vscode_msg(ext="ultralytics.ultralytics-snippets") -> str: # Check first-install steps PREFIX = colorstr("Ultralytics: ") SETTINGS = SettingsManager() # initialize settings -PERSISTENT_CACHE = PersistentCacheDict() # initialize persistent cache +PERSISTENT_CACHE = JSONDict(USER_CONFIG_DIR / "persistent_cache.json") # initialize persistent cache DATASETS_DIR = Path(SETTINGS["datasets_dir"]) # global datasets directory WEIGHTS_DIR = Path(SETTINGS["weights_dir"]) # global weights directory RUNS_DIR = Path(SETTINGS["runs_dir"]) # global runs directory From 43726d699f1984812f0baf540bfdeb453892ff9b Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 22 Sep 2024 22:38:35 +0200 Subject: [PATCH 57/80] `ultralytics 8.2.99` faster `JSONDict` settings (#16427) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/quickstart.md | 2 +- tests/test_integrations.py | 2 + ultralytics/__init__.py | 2 +- ultralytics/cfg/__init__.py | 8 +-- ultralytics/data/utils.py | 4 +- ultralytics/hub/__init__.py | 1 - ultralytics/utils/__init__.py | 98 ++++++++++++++++++++--------------- 7 files changed, 65 insertions(+), 52 deletions(-) diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md index a844dbbe..4a339d9a 100644 --- a/docs/en/quickstart.md +++ b/docs/en/quickstart.md @@ -253,7 +253,7 @@ For example, users can load a model, train it, evaluate its performance on a val ## Ultralytics Settings -The Ultralytics library provides a powerful settings management system to enable fine-grained control over your experiments. By making use of the `SettingsManager` housed within the `ultralytics.utils` module, users can readily access and alter their settings. These are stored in a YAML file and can be viewed or modified either directly within the Python environment or via the Command-Line Interface (CLI). +The Ultralytics library provides a powerful settings management system to enable fine-grained control over your experiments. By making use of the `SettingsManager` housed within the `ultralytics.utils` module, users can readily access and alter their settings. These are stored in a JSON file in the environment user configuration directory, and can be viewed or modified directly within the Python environment or via the Command-Line Interface (CLI). ### Inspecting Settings diff --git a/tests/test_integrations.py b/tests/test_integrations.py index aaa8330b..3a0d1b48 100644 --- a/tests/test_integrations.py +++ b/tests/test_integrations.py @@ -27,6 +27,7 @@ def test_mlflow(): """Test training with MLflow tracking enabled (see https://mlflow.org/ for details).""" SETTINGS["mlflow"] = True YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=3, plots=False, device="cpu") + SETTINGS["mlflow"] = False @pytest.mark.skipif(True, reason="Test failing in scheduled CI https://github.com/ultralytics/ultralytics/pull/8868") @@ -58,6 +59,7 @@ def test_mlflow_keep_run_active(): YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") status = mlflow.get_run(run_id=run_id).info.status assert status == "FINISHED", "MLflow run should be ended by default when MLFLOW_KEEP_RUN_ACTIVE is not set" + SETTINGS["mlflow"] = False @pytest.mark.skipif(not check_requirements("tritonclient", install=False), reason="tritonclient[all] not installed") diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index b3e0acfb..a1754a48 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.98" +__version__ = "8.2.99" import os diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py index 9ae1214e..06356e75 100644 --- a/ultralytics/cfg/__init__.py +++ b/ultralytics/cfg/__init__.py @@ -19,7 +19,7 @@ ROOT, RUNS_DIR, SETTINGS, - SETTINGS_YAML, + SETTINGS_FILE, TESTS_RUNNING, IterableSimpleNamespace, __version__, @@ -532,7 +532,7 @@ def handle_yolo_settings(args: List[str]) -> None: try: if any(args): if args[0] == "reset": - SETTINGS_YAML.unlink() # delete the settings file + SETTINGS_FILE.unlink() # delete the settings file SETTINGS.reset() # create new settings LOGGER.info("Settings reset successfully") # inform the user that settings have been reset else: # save a new setting @@ -540,8 +540,8 @@ def handle_yolo_settings(args: List[str]) -> None: check_dict_alignment(SETTINGS, new) SETTINGS.update(new) - LOGGER.info(f"💡 Learn about settings at {url}") - yaml_print(SETTINGS_YAML) # print the current settings + print(SETTINGS) # print the current settings + LOGGER.info(f"💡 Learn more about Ultralytics Settings at {url}") except Exception as e: LOGGER.warning(f"WARNING ⚠️ settings error: '{e}'. Please see {url} for help.") diff --git a/ultralytics/data/utils.py b/ultralytics/data/utils.py index 600f62e5..e82d8bb7 100644 --- a/ultralytics/data/utils.py +++ b/ultralytics/data/utils.py @@ -22,7 +22,7 @@ LOGGER, NUM_THREADS, ROOT, - SETTINGS_YAML, + SETTINGS_FILE, TQDM, clean_url, colorstr, @@ -324,7 +324,7 @@ def check_det_dataset(dataset, autodownload=True): if s and autodownload: LOGGER.warning(m) else: - m += f"\nNote dataset download directory is '{DATASETS_DIR}'. You can update this in '{SETTINGS_YAML}'" + m += f"\nNote dataset download directory is '{DATASETS_DIR}'. You can update this in '{SETTINGS_FILE}'" raise FileNotFoundError(m) t = time.time() r = None # success diff --git a/ultralytics/hub/__init__.py b/ultralytics/hub/__init__.py index d8d7b4a2..33b0c374 100644 --- a/ultralytics/hub/__init__.py +++ b/ultralytics/hub/__init__.py @@ -79,7 +79,6 @@ def logout(): ``` """ SETTINGS["api_key"] = "" - SETTINGS.save() LOGGER.info(f"{PREFIX}logged out ✅. To log in again, use 'yolo hub login'.") diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index a9ada7cd..b4cc312d 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -802,7 +802,7 @@ def get_user_config_dir(sub_dir="Ultralytics"): GIT_DIR = get_git_dir() IS_GIT_DIR = is_git_dir() USER_CONFIG_DIR = Path(os.getenv("YOLO_CONFIG_DIR") or get_user_config_dir()) # Ultralytics settings dir -SETTINGS_YAML = USER_CONFIG_DIR / "settings.yaml" +SETTINGS_FILE = USER_CONFIG_DIR / "settings.json" def colorstr(*input): @@ -1108,6 +1108,10 @@ def __delitem__(self, key): super().__delitem__(key) self._save() + def __str__(self): + """Return a pretty-printed JSON string representation of the dictionary.""" + return f'JSONDict("{self.file_path}"):\n{json.dumps(dict(self), indent=2, ensure_ascii=False)}' + def update(self, *args, **kwargs): """Update the dictionary and persist changes.""" with self.lock: @@ -1121,21 +1125,36 @@ def clear(self): self._save() -class SettingsManager(dict): +class SettingsManager(JSONDict): """ - Manages Ultralytics settings stored in a YAML file. + SettingsManager class for managing and persisting Ultralytics settings. - Args: - file (str | Path): Path to the Ultralytics settings YAML file. Default is USER_CONFIG_DIR / 'settings.yaml'. - version (str): Settings version. In case of local version mismatch, new default settings will be saved. + This class extends JSONDict to provide JSON persistence for settings, ensuring thread-safe operations and default + values. It validates settings on initialization and provides methods to update or reset settings. + + Attributes: + file (Path): The path to the JSON file used for persistence. + version (str): The version of the settings schema. + defaults (Dict): A dictionary containing default settings. + help_msg (str): A help message for users on how to view and update settings. + + Methods: + _validate_settings: Validates the current settings and resets if necessary. + update: Updates settings, validating keys and types. + reset: Resets the settings to default and saves them. + + Examples: + Initialize and update settings: + >>> settings = SettingsManager() + >>> settings.update(runs_dir="/new/runs/dir") + >>> print(settings["runs_dir"]) + /new/runs/dir """ - def __init__(self, file=SETTINGS_YAML, version="0.0.5"): + def __init__(self, file=SETTINGS_FILE, version="0.0.6"): """Initializes the SettingsManager with default settings and loads user settings.""" - import copy import hashlib - from ultralytics.utils.checks import check_version from ultralytics.utils.torch_utils import torch_distributed_zero_first root = GIT_DIR or Path() @@ -1164,45 +1183,42 @@ def __init__(self, file=SETTINGS_YAML, version="0.0.5"): "vscode_msg": True, } self.help_msg = ( - f"\nView settings with 'yolo settings' or at '{self.file}'" - "\nUpdate settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. " + f"\nView Ultralytics Settings with 'yolo settings' or at '{self.file}'" + "\nUpdate Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. " "For help see https://docs.ultralytics.com/quickstart/#ultralytics-settings." ) - super().__init__(copy.deepcopy(self.defaults)) - with torch_distributed_zero_first(RANK): - if not self.file.exists(): - self.save() - - self.load() - correct_keys = self.keys() == self.defaults.keys() - correct_types = all(type(a) is type(b) for a, b in zip(self.values(), self.defaults.values())) - correct_version = check_version(self["settings_version"], self.version) - if not (correct_keys and correct_types and correct_version): - LOGGER.warning( - "WARNING ⚠️ Ultralytics settings reset to default values. This may be due to a possible problem " - f"with your settings or a recent ultralytics package update. {self.help_msg}" - ) + super().__init__(self.file) + + if not self.file.exists() or not self: # Check if file doesn't exist or is empty + LOGGER.info(f"Creating new Ultralytics Settings v{version} file ✅ {self.help_msg}") self.reset() - if self.get("datasets_dir") == self.get("runs_dir"): - LOGGER.warning( - f"WARNING ⚠️ Ultralytics setting 'datasets_dir: {self.get('datasets_dir')}' " - f"must be different than 'runs_dir: {self.get('runs_dir')}'. " - f"Please change one to avoid possible issues during training. {self.help_msg}" - ) + self._validate_settings() + + def _validate_settings(self): + """Validate the current settings and reset if necessary.""" + correct_keys = set(self.keys()) == set(self.defaults.keys()) + correct_types = all(isinstance(self.get(k), type(v)) for k, v in self.defaults.items()) + correct_version = self.get("settings_version", "") == self.version - def load(self): - """Loads settings from the YAML file.""" - super().update(yaml_load(self.file)) + if not (correct_keys and correct_types and correct_version): + LOGGER.warning( + "WARNING ⚠️ Ultralytics settings reset to default values. This may be due to a possible problem " + f"with your settings or a recent ultralytics package update. {self.help_msg}" + ) + self.reset() - def save(self): - """Saves the current settings to the YAML file.""" - yaml_save(self.file, dict(self)) + if self.get("datasets_dir") == self.get("runs_dir"): + LOGGER.warning( + f"WARNING ⚠️ Ultralytics setting 'datasets_dir: {self.get('datasets_dir')}' " + f"must be different than 'runs_dir: {self.get('runs_dir')}'. " + f"Please change one to avoid possible issues during training. {self.help_msg}" + ) def update(self, *args, **kwargs): - """Updates a setting value in the current settings.""" + """Updates settings, validating keys and types.""" for k, v in kwargs.items(): if k not in self.defaults: raise KeyError(f"No Ultralytics setting '{k}'. {self.help_msg}") @@ -1210,20 +1226,16 @@ def update(self, *args, **kwargs): if not isinstance(v, t): raise TypeError(f"Ultralytics setting '{k}' must be of type '{t}', not '{type(v)}'. {self.help_msg}") super().update(*args, **kwargs) - self.save() def reset(self): """Resets the settings to default and saves them.""" self.clear() self.update(self.defaults) - self.save() def deprecation_warn(arg, new_arg): """Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument.""" - LOGGER.warning( - f"WARNING ⚠️ '{arg}' is deprecated and will be removed in in the future. " f"Please use '{new_arg}' instead." - ) + LOGGER.warning(f"WARNING ⚠️ '{arg}' is deprecated and will be removed in in the future. Use '{new_arg}' instead.") def clean_url(url): From 23e79e4e1f2c192a317c7efed91aff6e9cd5ebaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:18:14 +0200 Subject: [PATCH 58/80] Bump contributor-assistant/github-action from 2.5.1 to 2.5.2 in /.github/workflows (#16431) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index a9b57b3a..1edf59bb 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -26,7 +26,7 @@ jobs: steps: - name: CLA Assistant if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I sign the CLA') || github.event_name == 'pull_request_target' - uses: contributor-assistant/github-action@v2.5.1 + uses: contributor-assistant/github-action@v2.5.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Must be repository secret PAT From 8b8c25f216de005ff5d1c22680bcb957f0a07024 Mon Sep 17 00:00:00 2001 From: inisis <46103969+inisis@users.noreply.github.com> Date: Tue, 24 Sep 2024 05:46:18 +0800 Subject: [PATCH 59/80] Default `simplify=True` (#16435) --- docs/en/macros/export-args.md | 2 +- ultralytics/cfg/default.yaml | 2 +- ultralytics/utils/benchmarks.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/en/macros/export-args.md b/docs/en/macros/export-args.md index e87e4bb1..acfbce3e 100644 --- a/docs/en/macros/export-args.md +++ b/docs/en/macros/export-args.md @@ -7,7 +7,7 @@ | `half` | `bool` | `False` | Enables FP16 (half-precision) quantization, reducing model size and potentially speeding up inference on supported hardware. | | `int8` | `bool` | `False` | Activates INT8 quantization, further compressing the model and speeding up inference with minimal accuracy loss, primarily for edge devices. | | `dynamic` | `bool` | `False` | Allows dynamic input sizes for ONNX, TensorRT and OpenVINO exports, enhancing flexibility in handling varying image dimensions. | -| `simplify` | `bool` | `False` | Simplifies the model graph for ONNX exports with `onnxslim`, potentially improving performance and compatibility. | +| `simplify` | `bool` | `True` | Simplifies the model graph for ONNX exports with `onnxslim`, potentially improving performance and compatibility. | | `opset` | `int` | `None` | Specifies the ONNX opset version for compatibility with different ONNX parsers and runtimes. If not set, uses the latest supported version. | | `workspace` | `float` | `4.0` | Sets the maximum workspace size in GiB for TensorRT optimizations, balancing memory usage and performance. | | `nms` | `bool` | `False` | Adds Non-Maximum Suppression (NMS) to the CoreML export, essential for accurate and efficient detection post-processing. | diff --git a/ultralytics/cfg/default.yaml b/ultralytics/cfg/default.yaml index 205dd655..a44f6094 100644 --- a/ultralytics/cfg/default.yaml +++ b/ultralytics/cfg/default.yaml @@ -81,7 +81,7 @@ keras: False # (bool) use Kera=s optimize: False # (bool) TorchScript: optimize for mobile int8: False # (bool) CoreML/TF INT8 quantization dynamic: False # (bool) ONNX/TF/TensorRT: dynamic axes -simplify: False # (bool) ONNX: simplify model using `onnxslim` +simplify: True # (bool) ONNX: simplify model using `onnxslim` opset: # (int, optional) ONNX: opset version workspace: 4 # (int) TensorRT: workspace size (GB) nms: False # (bool) CoreML: add NMS diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index 8d760f80..53ad62c5 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -365,7 +365,6 @@ def profile(self): onnx_file = model.export( format="onnx", imgsz=self.imgsz, - simplify=True, device=self.device, verbose=False, ) From 443fbce1946f86329d8ac41fd5778e379d3f9117 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 23 Sep 2024 23:48:46 +0200 Subject: [PATCH 60/80] Add Docs glossary links (#16448) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/datasets/classify/caltech101.md | 8 +- docs/en/datasets/classify/caltech256.md | 16 +-- docs/en/datasets/classify/cifar10.md | 14 +-- docs/en/datasets/classify/cifar100.md | 14 +-- docs/en/datasets/classify/fashion-mnist.md | 12 +-- docs/en/datasets/classify/imagenet.md | 12 +-- docs/en/datasets/classify/imagenet10.md | 6 +- docs/en/datasets/classify/imagenette.md | 12 +-- docs/en/datasets/classify/imagewoof.md | 12 +-- docs/en/datasets/classify/index.md | 6 +- docs/en/datasets/classify/mnist.md | 10 +- docs/en/datasets/detect/african-wildlife.md | 8 +- docs/en/datasets/detect/argoverse.md | 4 +- docs/en/datasets/detect/brain-tumor.md | 4 +- docs/en/datasets/detect/coco.md | 10 +- docs/en/datasets/detect/coco8.md | 6 +- docs/en/datasets/detect/globalwheat2020.md | 6 +- docs/en/datasets/detect/index.md | 2 +- docs/en/datasets/detect/lvis.md | 14 +-- docs/en/datasets/detect/objects365.md | 10 +- docs/en/datasets/detect/open-images-v7.md | 16 +-- docs/en/datasets/detect/roboflow-100.md | 8 +- docs/en/datasets/detect/signature.md | 8 +- docs/en/datasets/detect/sku-110k.md | 8 +- docs/en/datasets/detect/visdrone.md | 12 +-- docs/en/datasets/detect/voc.md | 14 +-- docs/en/datasets/detect/xview.md | 14 +-- docs/en/datasets/explorer/api.md | 4 +- docs/en/datasets/explorer/dashboard.md | 6 +- docs/en/datasets/explorer/index.md | 4 +- docs/en/datasets/index.md | 12 +-- docs/en/datasets/obb/dota-v2.md | 4 +- docs/en/datasets/obb/dota8.md | 6 +- docs/en/datasets/obb/index.md | 6 +- docs/en/datasets/pose/coco.md | 6 +- docs/en/datasets/pose/coco8-pose.md | 6 +- docs/en/datasets/pose/index.md | 4 +- docs/en/datasets/pose/tiger-pose.md | 4 +- docs/en/datasets/segment/carparts-seg.md | 8 +- docs/en/datasets/segment/coco.md | 12 +-- docs/en/datasets/segment/coco8-seg.md | 8 +- docs/en/datasets/segment/crack-seg.md | 8 +- docs/en/datasets/segment/index.md | 4 +- docs/en/datasets/segment/package-seg.md | 8 +- docs/en/datasets/track/index.md | 4 +- docs/en/guides/analytics.md | 8 +- docs/en/guides/azureml-quickstart.md | 8 +- docs/en/guides/conda-quickstart.md | 6 +- .../guides/coral-edge-tpu-on-raspberry-pi.md | 6 +- .../guides/data-collection-and-annotation.md | 26 ++--- docs/en/guides/deepstream-nvidia-jetson.md | 8 +- docs/en/guides/defining-project-goals.md | 14 +-- docs/en/guides/distance-calculation.md | 6 +- docs/en/guides/docker-quickstart.md | 2 +- docs/en/guides/heatmaps.md | 8 +- docs/en/guides/hyperparameter-tuning.md | 18 ++-- docs/en/guides/index.md | 16 +-- .../instance-segmentation-and-tracking.md | 6 +- .../guides/isolating-segmentation-objects.md | 6 +- docs/en/guides/kfold-cross-validation.md | 10 +- docs/en/guides/model-deployment-options.md | 18 ++-- docs/en/guides/model-deployment-practices.md | 14 +-- docs/en/guides/model-evaluation-insights.md | 20 ++-- .../model-monitoring-and-maintenance.md | 18 ++-- docs/en/guides/model-testing.md | 22 ++-- docs/en/guides/model-training-tips.md | 30 +++--- docs/en/guides/nvidia-jetson.md | 8 +- docs/en/guides/object-blurring.md | 4 +- docs/en/guides/object-counting.md | 6 +- docs/en/guides/object-cropping.md | 4 +- ...ng-openvino-latency-vs-throughput-modes.md | 4 +- .../en/guides/preprocessing_annotated_data.md | 14 +-- docs/en/guides/queue-management.md | 2 +- docs/en/guides/raspberry-pi.md | 6 +- docs/en/guides/region-counting.md | 24 ++--- docs/en/guides/ros-quickstart.md | 4 +- docs/en/guides/sahi-tiled-inference.md | 6 +- docs/en/guides/security-alarm-system.md | 10 +- docs/en/guides/speed-estimation.md | 8 +- docs/en/guides/steps-of-a-cv-project.md | 40 +++---- docs/en/guides/streamlit-live-inference.md | 6 +- docs/en/guides/triton-inference-server.md | 10 +- docs/en/guides/view-results-in-terminal.md | 2 +- docs/en/guides/vision-eye.md | 8 +- docs/en/guides/workouts-monitoring.md | 2 +- docs/en/guides/yolo-common-issues.md | 24 ++--- docs/en/guides/yolo-performance-metrics.md | 16 +-- docs/en/help/FAQ.md | 18 ++-- docs/en/help/contributing.md | 2 +- docs/en/help/index.md | 8 +- docs/en/help/privacy.md | 2 +- docs/en/hub/app/android.md | 10 +- docs/en/hub/app/index.md | 4 +- docs/en/hub/app/ios.md | 6 +- docs/en/hub/cloud-training.md | 2 +- docs/en/hub/index.md | 4 +- docs/en/hub/inference-api.md | 12 +-- docs/en/hub/integrations.md | 2 +- docs/en/hub/models.md | 2 +- docs/en/hub/quickstart.md | 2 +- docs/en/index.md | 8 +- docs/en/integrations/amazon-sagemaker.md | 6 +- docs/en/integrations/clearml.md | 16 +-- docs/en/integrations/comet.md | 18 ++-- docs/en/integrations/coreml.md | 16 +-- docs/en/integrations/dvc.md | 12 +-- docs/en/integrations/edge-tpu.md | 12 +-- docs/en/integrations/google-colab.md | 4 +- docs/en/integrations/gradio.md | 6 +- docs/en/integrations/ibm-watsonx.md | 24 ++--- docs/en/integrations/index.md | 16 +-- docs/en/integrations/jupyterlab.md | 10 +- docs/en/integrations/kaggle.md | 4 +- docs/en/integrations/mlflow.md | 4 +- docs/en/integrations/ncnn.md | 18 ++-- docs/en/integrations/neural-magic.md | 10 +- docs/en/integrations/onnx.md | 12 +-- docs/en/integrations/openvino.md | 72 ++++++------- docs/en/integrations/paddlepaddle.md | 12 +-- docs/en/integrations/paperspace.md | 8 +- docs/en/integrations/ray-tune.md | 66 ++++++------ docs/en/integrations/roboflow.md | 12 +-- docs/en/integrations/tensorboard.md | 22 ++-- docs/en/integrations/tensorrt.md | 18 ++-- docs/en/integrations/tf-graphdef.md | 10 +- docs/en/integrations/tf-savedmodel.md | 8 +- docs/en/integrations/tfjs.md | 6 +- docs/en/integrations/tflite.md | 12 +-- docs/en/integrations/torchscript.md | 10 +- docs/en/integrations/vscode.md | 4 +- docs/en/integrations/weights-biases.md | 16 +-- docs/en/macros/export-args.md | 28 ++--- docs/en/macros/predict-args.md | 34 +++--- docs/en/macros/track-args.md | 18 ++-- docs/en/macros/train-args.md | 100 +++++++++--------- docs/en/macros/validation-args.md | 32 +++--- docs/en/models/fast-sam.md | 10 +- docs/en/models/index.md | 12 +-- docs/en/models/mobile-sam.md | 4 +- docs/en/models/rtdetr.md | 10 +- docs/en/models/sam-2.md | 18 ++-- docs/en/models/sam.md | 10 +- docs/en/models/yolo-nas.md | 12 +-- docs/en/models/yolo-world.md | 12 +-- docs/en/models/yolov10.md | 34 +++--- docs/en/models/yolov3.md | 8 +- docs/en/models/yolov4.md | 10 +- docs/en/models/yolov5.md | 6 +- docs/en/models/yolov6.md | 10 +- docs/en/models/yolov7.md | 6 +- docs/en/models/yolov8.md | 14 +-- docs/en/models/yolov9.md | 16 +-- docs/en/modes/benchmark.md | 28 ++--- docs/en/modes/export.md | 2 +- docs/en/modes/index.md | 10 +- docs/en/modes/predict.md | 42 ++++---- docs/en/modes/track.md | 6 +- docs/en/modes/train.md | 16 +-- docs/en/modes/val.md | 10 +- docs/en/quickstart.md | 44 ++++---- docs/en/solutions/index.md | 12 +-- docs/en/tasks/classify.md | 6 +- docs/en/tasks/detect.md | 6 +- docs/en/tasks/index.md | 10 +- docs/en/tasks/obb.md | 6 +- docs/en/tasks/pose.md | 2 +- docs/en/tasks/segment.md | 10 +- docs/en/usage/callbacks.md | 34 +++--- docs/en/usage/cfg.md | 32 +++--- docs/en/usage/cli.md | 8 +- docs/en/usage/engine.md | 6 +- docs/en/usage/python.md | 6 +- docs/en/usage/simple-utilities.md | 6 +- .../environments/aws_quickstart_tutorial.md | 6 +- .../azureml_quickstart_tutorial.md | 2 +- .../docker_image_quickstart_tutorial.md | 2 +- .../google_cloud_quickstart_tutorial.md | 10 +- docs/en/yolov5/index.md | 14 +-- docs/en/yolov5/quickstart_tutorial.md | 8 +- .../tutorials/architecture_description.md | 16 +-- .../tutorials/clearml_logging_integration.md | 6 +- .../tutorials/comet_logging_integration.md | 12 +-- .../tutorials/hyperparameter_evolution.md | 4 +- docs/en/yolov5/tutorials/model_ensembling.md | 4 +- docs/en/yolov5/tutorials/model_export.md | 6 +- .../en/yolov5/tutorials/multi_gpu_training.md | 6 +- .../neural_magic_pruning_quantization.md | 6 +- .../tutorials/pytorch_hub_model_loading.md | 4 +- .../roboflow_datasets_integration.md | 6 +- .../tutorials/test_time_augmentation.md | 2 +- .../tips_for_best_training_results.md | 10 +- docs/en/yolov5/tutorials/train_custom_data.md | 10 +- .../transfer_learning_with_frozen_layers.md | 4 +- 193 files changed, 1124 insertions(+), 1124 deletions(-) diff --git a/docs/en/datasets/classify/caltech101.md b/docs/en/datasets/classify/caltech101.md index b50a5191..51faa495 100644 --- a/docs/en/datasets/classify/caltech101.md +++ b/docs/en/datasets/classify/caltech101.md @@ -22,7 +22,7 @@ Unlike many other datasets, the Caltech-101 dataset is not formally split into t ## Applications -The Caltech-101 dataset is extensively used for training and evaluating deep learning models in object recognition tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. Its wide variety of categories and high-quality images make it an excellent dataset for research and development in the field of machine learning and computer vision. +The Caltech-101 dataset is extensively used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object recognition tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. Its wide variety of categories and high-quality images make it an excellent dataset for research and development in the field of machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). ## Usage @@ -84,11 +84,11 @@ We would like to acknowledge Li Fei-Fei, Rob Fergus, and Pietro Perona for creat ### What is the Caltech-101 dataset used for in machine learning? -The [Caltech-101](https://data.caltech.edu/records/mzrjq-6wc02) dataset is widely used in machine learning for object recognition tasks. It contains around 9,000 images across 101 categories, providing a challenging benchmark for evaluating object recognition algorithms. Researchers leverage it to train and test models, especially Convolutional Neural Networks (CNNs) and Support Vector Machines (SVMs), in computer vision. +The [Caltech-101](https://data.caltech.edu/records/mzrjq-6wc02) dataset is widely used in machine learning for object recognition tasks. It contains around 9,000 images across 101 categories, providing a challenging benchmark for evaluating object recognition algorithms. Researchers leverage it to train and test models, especially Convolutional [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) (CNNs) and [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs), in computer vision. ### How can I train an Ultralytics YOLO model on the Caltech-101 dataset? -To train an Ultralytics YOLO model on the Caltech-101 dataset, you can use the provided code snippets. For example, to train for 100 epochs: +To train an Ultralytics YOLO model on the Caltech-101 dataset, you can use the provided code snippets. For example, to train for 100 [epochs](https://www.ultralytics.com/glossary/epoch): !!! example "Train Example" @@ -122,7 +122,7 @@ The Caltech-101 dataset includes: - Variable number of images per category, typically between 40 and 800. - Variable image sizes, with most being medium resolution. -These features make it an excellent choice for training and evaluating object recognition models in machine learning and computer vision. +These features make it an excellent choice for training and evaluating object recognition models in [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision. ### Why should I cite the Caltech-101 dataset in my research? diff --git a/docs/en/datasets/classify/caltech256.md b/docs/en/datasets/classify/caltech256.md index c3377210..de7c2ea4 100644 --- a/docs/en/datasets/classify/caltech256.md +++ b/docs/en/datasets/classify/caltech256.md @@ -16,7 +16,7 @@ The [Caltech-256](https://data.caltech.edu/records/nyy15-4j048) dataset is an ex allowfullscreen>
- Watch: How to Train Image Classification Model using Caltech-256 Dataset with Ultralytics HUB + Watch: How to Train [Image Classification](https://www.ultralytics.com/glossary/image-classification) Model using Caltech-256 Dataset with Ultralytics HUB

## Key Features @@ -33,7 +33,7 @@ Like Caltech-101, the Caltech-256 dataset does not have a formal split between t ## Applications -The Caltech-256 dataset is extensively used for training and evaluating deep learning models in object recognition tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. Its diverse set of categories and high-quality images make it an invaluable dataset for research and development in the field of machine learning and computer vision. +The Caltech-256 dataset is extensively used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object recognition tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. Its diverse set of categories and high-quality images make it an invaluable dataset for research and development in the field of machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). ## Usage @@ -84,7 +84,7 @@ If you use the Caltech-256 dataset in your research or development work, please } ``` -We would like to acknowledge Gregory Griffin, Alex Holub, and Pietro Perona for creating and maintaining the Caltech-256 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the +We would like to acknowledge Gregory Griffin, Alex Holub, and Pietro Perona for creating and maintaining the Caltech-256 dataset as a valuable resource for the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision research community. For more information about the Caltech-256 dataset and its creators, visit the [Caltech-256 dataset website](https://data.caltech.edu/records/nyy15-4j048). @@ -96,7 +96,7 @@ The [Caltech-256](https://data.caltech.edu/records/nyy15-4j048) dataset is a lar ### How can I train a YOLO model on the Caltech-256 dataset using Python or CLI? -To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the following code snippets. Refer to the model [Training](../../modes/train.md) page for additional options. +To train a YOLO model on the Caltech-256 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch), you can use the following code snippets. Refer to the model [Training](../../modes/train.md) page for additional options. !!! example "Train Example" @@ -123,10 +123,10 @@ To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the The Caltech-256 dataset is widely used for various object recognition tasks such as: -- Training Convolutional Neural Networks (CNNs) -- Evaluating the performance of Support Vector Machines (SVMs) +- Training Convolutional [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) (CNNs) +- Evaluating the performance of [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs) - Benchmarking new deep learning algorithms -- Developing object detection models using frameworks like Ultralytics YOLO +- Developing [object detection](https://www.ultralytics.com/glossary/object-detection) models using frameworks like Ultralytics YOLO Its diversity and comprehensive annotations make it ideal for research and development in machine learning and computer vision. @@ -141,6 +141,6 @@ Ultralytics YOLO models offer several advantages for training on the Caltech-256 - **High Accuracy**: YOLO models are known for their state-of-the-art performance in object detection tasks. - **Speed**: They provide real-time inference capabilities, making them suitable for applications requiring quick predictions. - **Ease of Use**: With Ultralytics HUB, users can train, validate, and deploy models without extensive coding. -- **Pretrained Models**: Starting from pretrained models, like `yolov8n-cls.pt`, can significantly reduce training time and improve model accuracy. +- **Pretrained Models**: Starting from pretrained models, like `yolov8n-cls.pt`, can significantly reduce training time and improve model [accuracy](https://www.ultralytics.com/glossary/accuracy). For more details, explore our [comprehensive training guide](../../modes/train.md). diff --git a/docs/en/datasets/classify/cifar10.md b/docs/en/datasets/classify/cifar10.md index 865c8086..7bae78b3 100644 --- a/docs/en/datasets/classify/cifar10.md +++ b/docs/en/datasets/classify/cifar10.md @@ -6,7 +6,7 @@ keywords: CIFAR-10, dataset, machine learning, computer vision, image classifica # CIFAR-10 Dataset -The [CIFAR-10](https://www.cs.toronto.edu/~kriz/cifar.html) (Canadian Institute For Advanced Research) dataset is a collection of images used widely for machine learning and computer vision algorithms. It was developed by researchers at the CIFAR institute and consists of 60,000 32x32 color images in 10 different classes. +The [CIFAR-10](https://www.cs.toronto.edu/~kriz/cifar.html) (Canadian Institute For Advanced Research) dataset is a collection of images used widely for [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision algorithms. It was developed by researchers at the CIFAR institute and consists of 60,000 32x32 color images in 10 different classes.


@@ -16,7 +16,7 @@ The [CIFAR-10](https://www.cs.toronto.edu/~kriz/cifar.html) (Canadian Institute allowfullscreen>
- Watch: How to Train an Image Classification Model with CIFAR-10 Dataset using Ultralytics YOLOv8 + Watch: How to Train an [Image Classification](https://www.ultralytics.com/glossary/image-classification) Model with CIFAR-10 Dataset using Ultralytics YOLOv8

## Key Features @@ -36,7 +36,7 @@ The CIFAR-10 dataset is split into two subsets: ## Applications -The CIFAR-10 dataset is widely used for training and evaluating deep learning models in image classification tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The diversity of the dataset in terms of classes and the presence of color images make it a well-rounded dataset for research and development in the field of machine learning and computer vision. +The CIFAR-10 dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in image classification tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The diversity of the dataset in terms of classes and the presence of color images make it a well-rounded dataset for research and development in the field of machine learning and computer vision. ## Usage @@ -88,13 +88,13 @@ If you use the CIFAR-10 dataset in your research or development work, please cit } ``` -We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-10 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-10 dataset and its creator, visit the [CIFAR-10 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html). +We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-10 dataset as a valuable resource for the machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) research community. For more information about the CIFAR-10 dataset and its creator, visit the [CIFAR-10 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html). ## FAQ ### How can I train a YOLO model on the CIFAR-10 dataset? -To train a YOLO model on the CIFAR-10 dataset using Ultralytics, you can follow the examples provided for both Python and CLI. Here is a basic example to train your model for 100 epochs with an image size of 32x32 pixels: +To train a YOLO model on the CIFAR-10 dataset using Ultralytics, you can follow the examples provided for both Python and CLI. Here is a basic example to train your model for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 32x32 pixels: !!! example @@ -138,7 +138,7 @@ This diverse dataset is essential for training image classification models in fi ### Why use the CIFAR-10 dataset for image classification tasks? -The CIFAR-10 dataset is an excellent benchmark for image classification due to its diversity and structure. It contains a balanced mix of 60,000 labeled images across 10 different categories, which helps in training robust and generalized models. It is widely used for evaluating deep learning models, including Convolutional Neural Networks (CNNs) and other machine learning algorithms. The dataset is relatively small, making it suitable for quick experimentation and algorithm development. Explore its numerous applications in the [applications](#applications) section. +The CIFAR-10 dataset is an excellent benchmark for image classification due to its diversity and structure. It contains a balanced mix of 60,000 labeled images across 10 different categories, which helps in training robust and generalized models. It is widely used for evaluating deep learning models, including Convolutional [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) (CNNs) and other machine learning algorithms. The dataset is relatively small, making it suitable for quick experimentation and algorithm development. Explore its numerous applications in the [applications](#applications) section. ### How is the CIFAR-10 dataset structured? @@ -170,4 +170,4 @@ Acknowledging the dataset's creators helps support continued research and develo ### What are some practical examples of using the CIFAR-10 dataset? -The CIFAR-10 dataset is often used for training image classification models, such as Convolutional Neural Networks (CNNs) and Support Vector Machines (SVMs). These models can be employed in various computer vision tasks including object detection, image recognition, and automated tagging. To see some practical examples, check the code snippets in the [usage](#usage) section. +The CIFAR-10 dataset is often used for training image classification models, such as Convolutional Neural Networks (CNNs) and [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs). These models can be employed in various computer vision tasks including [object detection](https://www.ultralytics.com/glossary/object-detection), [image recognition](https://www.ultralytics.com/glossary/image-recognition), and automated tagging. To see some practical examples, check the code snippets in the [usage](#usage) section. diff --git a/docs/en/datasets/classify/cifar100.md b/docs/en/datasets/classify/cifar100.md index ca868240..a6735bbc 100644 --- a/docs/en/datasets/classify/cifar100.md +++ b/docs/en/datasets/classify/cifar100.md @@ -6,7 +6,7 @@ keywords: CIFAR-100, dataset, machine learning, computer vision, image classific # CIFAR-100 Dataset -The [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) (Canadian Institute For Advanced Research) dataset is a significant extension of the CIFAR-10 dataset, composed of 60,000 32x32 color images in 100 different classes. It was developed by researchers at the CIFAR institute, offering a more challenging dataset for more complex machine learning and computer vision tasks. +The [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) (Canadian Institute For Advanced Research) dataset is a significant extension of the CIFAR-10 dataset, composed of 60,000 32x32 color images in 100 different classes. It was developed by researchers at the CIFAR institute, offering a more challenging dataset for more complex machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. ## Key Features @@ -25,11 +25,11 @@ The CIFAR-100 dataset is split into two subsets: ## Applications -The CIFAR-100 dataset is extensively used for training and evaluating deep learning models in image classification tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The diversity of the dataset in terms of classes and the presence of color images make it a more challenging and comprehensive dataset for research and development in the field of machine learning and computer vision. +The CIFAR-100 dataset is extensively used for training and evaluating deep learning models in image classification tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The diversity of the dataset in terms of classes and the presence of color images make it a more challenging and comprehensive dataset for research and development in the field of machine learning and computer vision. ## Usage -To train a YOLO model on the CIFAR-100 dataset for 100 epochs with an image size of 32x32, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLO model on the CIFAR-100 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 32x32, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -54,7 +54,7 @@ To train a YOLO model on the CIFAR-100 dataset for 100 epochs with an image size ## Sample Images and Annotations -The CIFAR-100 dataset contains color images of various objects, providing a well-structured dataset for image classification tasks. Here are some examples of images from the dataset: +The CIFAR-100 dataset contains color images of various objects, providing a well-structured dataset for [image classification](https://www.ultralytics.com/glossary/image-classification) tasks. Here are some examples of images from the dataset: ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/cifar100-sample-image.avif) @@ -77,13 +77,13 @@ If you use the CIFAR-100 dataset in your research or development work, please ci } ``` -We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-100 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-100 dataset and its creator, visit the [CIFAR-100 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html). +We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-100 dataset as a valuable resource for the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision research community. For more information about the CIFAR-100 dataset and its creator, visit the [CIFAR-100 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html). ## FAQ ### What is the CIFAR-100 dataset and why is it significant? -The [CIFAR-100 dataset](https://www.cs.toronto.edu/~kriz/cifar.html) is a large collection of 60,000 32x32 color images classified into 100 classes. Developed by the Canadian Institute For Advanced Research (CIFAR), it provides a challenging dataset ideal for complex machine learning and computer vision tasks. Its significance lies in the diversity of classes and the small size of the images, making it a valuable resource for training and testing deep learning models, like Convolutional Neural Networks (CNNs), using frameworks such as Ultralytics YOLO. +The [CIFAR-100 dataset](https://www.cs.toronto.edu/~kriz/cifar.html) is a large collection of 60,000 32x32 color images classified into 100 classes. Developed by the Canadian Institute For Advanced Research (CIFAR), it provides a challenging dataset ideal for complex machine learning and computer vision tasks. Its significance lies in the diversity of classes and the small size of the images, making it a valuable resource for training and testing deep learning models, like Convolutional [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) (CNNs), using frameworks such as Ultralytics YOLO. ### How do I train a YOLO model on the CIFAR-100 dataset? @@ -114,7 +114,7 @@ For a comprehensive list of available arguments, please refer to the model [Trai ### What are the primary applications of the CIFAR-100 dataset? -The CIFAR-100 dataset is extensively used in training and evaluating deep learning models for image classification. Its diverse set of 100 classes, grouped into 20 coarse categories, provides a challenging environment for testing algorithms such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning approaches. This dataset is a key resource in research and development within machine learning and computer vision fields. +The CIFAR-100 dataset is extensively used in training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models for image classification. Its diverse set of 100 classes, grouped into 20 coarse categories, provides a challenging environment for testing algorithms such as Convolutional Neural Networks (CNNs), [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs), and various other machine learning approaches. This dataset is a key resource in research and development within machine learning and computer vision fields. ### How is the CIFAR-100 dataset structured? diff --git a/docs/en/datasets/classify/fashion-mnist.md b/docs/en/datasets/classify/fashion-mnist.md index d1c87e26..531cd2c1 100644 --- a/docs/en/datasets/classify/fashion-mnist.md +++ b/docs/en/datasets/classify/fashion-mnist.md @@ -6,7 +6,7 @@ keywords: Fashion-MNIST, image classification, Zalando dataset, machine learning # Fashion-MNIST Dataset -The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset is a database of Zalando's article images—consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. Fashion-MNIST is intended to serve as a direct drop-in replacement for the original MNIST dataset for benchmarking machine learning algorithms. +The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset is a database of Zalando's article images—consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. Fashion-MNIST is intended to serve as a direct drop-in replacement for the original MNIST dataset for benchmarking [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) algorithms.


@@ -16,7 +16,7 @@ The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset is allowfullscreen>
- Watch: How to do Image Classification on Fashion MNIST Dataset using Ultralytics YOLOv8 + Watch: How to do [Image Classification](https://www.ultralytics.com/glossary/image-classification) on Fashion MNIST Dataset using Ultralytics YOLOv8

## Key Features @@ -50,11 +50,11 @@ Each training and test example is assigned to one of the following labels: ## Applications -The Fashion-MNIST dataset is widely used for training and evaluating deep learning models in image classification tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The dataset's simple and well-structured format makes it an essential resource for researchers and practitioners in the field of machine learning and computer vision. +The Fashion-MNIST dataset is widely used for training and evaluating deep learning models in image classification tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs), and various other machine learning algorithms. The dataset's simple and well-structured format makes it an essential resource for researchers and practitioners in the field of machine learning and computer vision. ## Usage -To train a CNN model on the Fashion-MNIST dataset for 100 epochs with an image size of 28x28, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a CNN model on the Fashion-MNIST dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 28x28, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -124,7 +124,7 @@ For more detailed training parameters, refer to the [Training page](../../modes/ ### Why should I use the Fashion-MNIST dataset for benchmarking my machine learning models? -The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset is widely recognized in the deep learning community as a robust alternative to MNIST. It offers a more complex and varied set of images, making it an excellent choice for benchmarking image classification models. The dataset's structure, comprising 60,000 training images and 10,000 testing images, each labeled with one of 10 classes, makes it ideal for evaluating the performance of different machine learning algorithms in a more challenging context. +The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset is widely recognized in the [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) community as a robust alternative to MNIST. It offers a more complex and varied set of images, making it an excellent choice for benchmarking image classification models. The dataset's structure, comprising 60,000 training images and 10,000 testing images, each labeled with one of 10 classes, makes it ideal for evaluating the performance of different machine learning algorithms in a more challenging context. ### Can I use Ultralytics YOLO for image classification tasks like Fashion-MNIST? @@ -132,7 +132,7 @@ Yes, Ultralytics YOLO models can be used for image classification tasks, includi ### What are the key features and structure of the Fashion-MNIST dataset? -The Fashion-MNIST dataset is divided into two main subsets: 60,000 training images and 10,000 testing images. Each image is a 28x28-pixel grayscale picture representing one of 10 fashion-related classes. The simplicity and well-structured format make it ideal for training and evaluating models in machine learning and computer vision tasks. For more details on the dataset structure, see the [Dataset Structure section](#dataset-structure). +The Fashion-MNIST dataset is divided into two main subsets: 60,000 training images and 10,000 testing images. Each image is a 28x28-pixel grayscale picture representing one of 10 fashion-related classes. The simplicity and well-structured format make it ideal for training and evaluating models in machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. For more details on the dataset structure, see the [Dataset Structure section](#dataset-structure). ### How can I acknowledge the use of the Fashion-MNIST dataset in my research? diff --git a/docs/en/datasets/classify/imagenet.md b/docs/en/datasets/classify/imagenet.md index 8c4102ca..76e59b3f 100644 --- a/docs/en/datasets/classify/imagenet.md +++ b/docs/en/datasets/classify/imagenet.md @@ -6,7 +6,7 @@ keywords: ImageNet, deep learning, visual recognition, computer vision, pretrain # ImageNet Dataset -[ImageNet](https://www.image-net.org/) is a large-scale database of annotated images designed for use in visual object recognition research. It contains over 14 million images, with each image annotated using WordNet synsets, making it one of the most extensive resources available for training deep learning models in computer vision tasks. +[ImageNet](https://www.image-net.org/) is a large-scale database of annotated images designed for use in visual object recognition research. It contains over 14 million images, with each image annotated using WordNet synsets, making it one of the most extensive resources available for training [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. ## ImageNet Pretrained Models @@ -22,7 +22,7 @@ keywords: ImageNet, deep learning, visual recognition, computer vision, pretrain - ImageNet contains over 14 million high-resolution images spanning thousands of object categories. - The dataset is organized according to the WordNet hierarchy, with each synset representing a category. -- ImageNet is widely used for training and benchmarking in the field of computer vision, particularly for image classification and object detection tasks. +- ImageNet is widely used for training and benchmarking in the field of computer vision, particularly for [image classification](https://www.ultralytics.com/glossary/image-classification) and [object detection](https://www.ultralytics.com/glossary/object-detection) tasks. - The annual ImageNet Large Scale Visual Recognition Challenge (ILSVRC) has been instrumental in advancing computer vision research. ## Dataset Structure @@ -39,7 +39,7 @@ The ImageNet dataset is widely used for training and evaluating deep learning mo ## Usage -To train a deep learning model on the ImageNet dataset for 100 epochs with an image size of 224x224, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a deep learning model on the ImageNet dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 224x224, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -90,7 +90,7 @@ If you use the ImageNet dataset in your research or development work, please cit } ``` -We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/). +We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset as a valuable resource for the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/). ## FAQ @@ -127,7 +127,7 @@ For more in-depth training instruction, refer to our [Training page](../../modes ### Why should I use the Ultralytics YOLOv8 pretrained models for my ImageNet dataset projects? -Ultralytics YOLOv8 pretrained models offer state-of-the-art performance in terms of speed and accuracy for various computer vision tasks. For example, the YOLOv8n-cls model, with a top-1 accuracy of 69.0% and a top-5 accuracy of 88.3%, is optimized for real-time applications. Pretrained models reduce the computational resources required for training from scratch and accelerate development cycles. Learn more about the performance metrics of YOLOv8 models in the [ImageNet Pretrained Models section](#imagenet-pretrained-models). +Ultralytics YOLOv8 pretrained models offer state-of-the-art performance in terms of speed and [accuracy](https://www.ultralytics.com/glossary/accuracy) for various computer vision tasks. For example, the YOLOv8n-cls model, with a top-1 accuracy of 69.0% and a top-5 accuracy of 88.3%, is optimized for real-time applications. Pretrained models reduce the computational resources required for training from scratch and accelerate development cycles. Learn more about the performance metrics of YOLOv8 models in the [ImageNet Pretrained Models section](#imagenet-pretrained-models). ### How is the ImageNet dataset structured, and why is it important? @@ -135,4 +135,4 @@ The ImageNet dataset is organized using the WordNet hierarchy, where each node i ### What role does the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) play in computer vision? -The annual [ImageNet Large Scale Visual Recognition Challenge (ILSVRC)](https://image-net.org/challenges/LSVRC/) has been pivotal in driving advancements in computer vision by providing a competitive platform for evaluating algorithms on a large-scale, standardized dataset. It offers standardized evaluation metrics, fostering innovation and development in areas such as image classification, object detection, and image segmentation. The challenge has continuously pushed the boundaries of what is possible with deep learning and computer vision technologies. +The annual [ImageNet Large Scale Visual Recognition Challenge (ILSVRC)](https://image-net.org/challenges/LSVRC/) has been pivotal in driving advancements in computer vision by providing a competitive platform for evaluating algorithms on a large-scale, standardized dataset. It offers standardized evaluation metrics, fostering innovation and development in areas such as image classification, object detection, and [image segmentation](https://www.ultralytics.com/glossary/image-segmentation). The challenge has continuously pushed the boundaries of what is possible with deep learning and computer vision technologies. diff --git a/docs/en/datasets/classify/imagenet10.md b/docs/en/datasets/classify/imagenet10.md index b74e2a7a..4e40e665 100644 --- a/docs/en/datasets/classify/imagenet10.md +++ b/docs/en/datasets/classify/imagenet10.md @@ -12,7 +12,7 @@ The [ImageNet10](https://github.com/ultralytics/assets/releases/download/v0.0.0/ - ImageNet10 is a compact version of ImageNet, with 20 images representing the first 10 classes of the original dataset. - The dataset is organized according to the WordNet hierarchy, mirroring the structure of the full ImageNet dataset. -- It is ideally suited for CI tests, sanity checks, and rapid testing of training pipelines in computer vision tasks. +- It is ideally suited for CI tests, sanity checks, and rapid testing of training pipelines in [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. - Although not designed for model benchmarking, it can provide a quick indication of a model's basic functionality and correctness. ## Dataset Structure @@ -74,7 +74,7 @@ If you use the ImageNet10 dataset in your research or development work, please c } ``` -We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset. The ImageNet10 dataset, while a compact subset, is a valuable resource for quick testing and debugging in the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/). +We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset. The ImageNet10 dataset, while a compact subset, is a valuable resource for quick testing and debugging in the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/). ## FAQ @@ -111,7 +111,7 @@ Refer to the [Training](../../modes/train.md) page for a comprehensive list of a ### Why should I use the ImageNet10 dataset for CI tests and sanity checks? -The ImageNet10 dataset is designed specifically for CI tests, sanity checks, and quick evaluations in deep learning pipelines. Its small size allows for rapid iteration and testing, making it perfect for continuous integration processes where speed is crucial. By maintaining the structural complexity and diversity of the original ImageNet dataset, ImageNet10 provides a reliable indication of a model's basic functionality and correctness without the overhead of processing a large dataset. +The ImageNet10 dataset is designed specifically for CI tests, sanity checks, and quick evaluations in [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) pipelines. Its small size allows for rapid iteration and testing, making it perfect for continuous integration processes where speed is crucial. By maintaining the structural complexity and diversity of the original ImageNet dataset, ImageNet10 provides a reliable indication of a model's basic functionality and correctness without the overhead of processing a large dataset. ### What are the main features of the ImageNet10 dataset? diff --git a/docs/en/datasets/classify/imagenette.md b/docs/en/datasets/classify/imagenette.md index 42368a67..bf371502 100644 --- a/docs/en/datasets/classify/imagenette.md +++ b/docs/en/datasets/classify/imagenette.md @@ -23,7 +23,7 @@ The ImageNette dataset is split into two subsets: ## Applications -The ImageNette dataset is widely used for training and evaluating deep learning models in image classification tasks, such as Convolutional Neural Networks (CNNs), and various other machine learning algorithms. The dataset's straightforward format and well-chosen classes make it a handy resource for both beginner and experienced practitioners in the field of machine learning and computer vision. +The ImageNette dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in image classification tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), and various other machine learning algorithms. The dataset's straightforward format and well-chosen classes make it a handy resource for both beginner and experienced practitioners in the field of machine learning and computer vision. ## Usage @@ -52,7 +52,7 @@ To train a model on the ImageNette dataset for 100 epochs with a standard image ## Sample Images and Annotations -The ImageNette dataset contains colored images of various objects and scenes, providing a diverse dataset for image classification tasks. Here are some examples of images from the dataset: +The ImageNette dataset contains colored images of various objects and scenes, providing a diverse dataset for [image classification](https://www.ultralytics.com/glossary/image-classification) tasks. Here are some examples of images from the dataset: ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/imagenette-sample-image.avif) @@ -116,11 +116,11 @@ If you use the ImageNette dataset in your research or development work, please a ### What is the ImageNette dataset? -The [ImageNette dataset](https://github.com/fastai/imagenette) is a simplified subset of the larger [ImageNet dataset](https://www.image-net.org/), featuring only 10 easily distinguishable classes such as tench, English springer, and French horn. It was created to offer a more manageable dataset for efficient training and evaluation of image classification models. This dataset is particularly useful for quick software development and educational purposes in machine learning and computer vision. +The [ImageNette dataset](https://github.com/fastai/imagenette) is a simplified subset of the larger [ImageNet dataset](https://www.image-net.org/), featuring only 10 easily distinguishable classes such as tench, English springer, and French horn. It was created to offer a more manageable dataset for efficient training and evaluation of image classification models. This dataset is particularly useful for quick software development and educational purposes in [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision. ### How can I use the ImageNette dataset for training a YOLO model? -To train a YOLO model on the ImageNette dataset for 100 epochs, you can use the following commands. Make sure to have the Ultralytics YOLO environment set up. +To train a YOLO model on the ImageNette dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch), you can use the following commands. Make sure to have the Ultralytics YOLO environment set up. !!! example "Train Example" @@ -186,8 +186,8 @@ For more information, refer to [Training with ImageNette160 and ImageNette320](# The ImageNette dataset is extensively used in: -- **Educational Settings**: To educate beginners in machine learning and computer vision. +- **Educational Settings**: To educate beginners in machine learning and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). - **Software Development**: For rapid prototyping and development of image classification models. -- **Deep Learning Research**: To evaluate and benchmark the performance of various deep learning models, especially Convolutional Neural Networks (CNNs). +- **Deep Learning Research**: To evaluate and benchmark the performance of various deep learning models, especially Convolutional [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) (CNNs). Explore the [Applications](#applications) section for detailed use cases. diff --git a/docs/en/datasets/classify/imagewoof.md b/docs/en/datasets/classify/imagewoof.md index 54361abc..2ed0273b 100644 --- a/docs/en/datasets/classify/imagewoof.md +++ b/docs/en/datasets/classify/imagewoof.md @@ -6,7 +6,7 @@ keywords: ImageWoof dataset, ImageNet subset, dog breeds, image classification, # ImageWoof Dataset -The [ImageWoof](https://github.com/fastai/imagenette) dataset is a subset of the ImageNet consisting of 10 classes that are challenging to classify, since they're all dog breeds. It was created as a more difficult task for image classification algorithms to solve, aiming at encouraging development of more advanced models. +The [ImageWoof](https://github.com/fastai/imagenette) dataset is a subset of the ImageNet consisting of 10 classes that are challenging to classify, since they're all dog breeds. It was created as a more difficult task for [image classification](https://www.ultralytics.com/glossary/image-classification) algorithms to solve, aiming at encouraging development of more advanced models. ## Key Features @@ -24,7 +24,7 @@ The ImageWoof dataset is widely used for training and evaluating deep learning m ## Usage -To train a CNN model on the ImageWoof dataset for 100 epochs with an image size of 224x224, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a CNN model on the ImageWoof dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 224x224, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -97,7 +97,7 @@ The example showcases the subtle differences and similarities among the differen If you use the ImageWoof dataset in your research or development work, please make sure to acknowledge the creators of the dataset by linking to the [official dataset repository](https://github.com/fastai/imagenette). -We would like to acknowledge the FastAI team for creating and maintaining the ImageWoof dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageWoof dataset, visit the [ImageWoof dataset repository](https://github.com/fastai/imagenette). +We would like to acknowledge the FastAI team for creating and maintaining the ImageWoof dataset as a valuable resource for the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) research community. For more information about the ImageWoof dataset, visit the [ImageWoof dataset repository](https://github.com/fastai/imagenette). ## FAQ @@ -107,7 +107,7 @@ The [ImageWoof](https://github.com/fastai/imagenette) dataset is a challenging s ### How can I train a model using the ImageWoof dataset with Ultralytics YOLO? -To train a Convolutional Neural Network (CNN) model on the ImageWoof dataset using Ultralytics YOLO for 100 epochs at an image size of 224x224, you can use the following code: +To train a [Convolutional Neural Network](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNN) model on the ImageWoof dataset using Ultralytics YOLO for 100 epochs at an image size of 224x224, you can use the following code: !!! example "Train Example" @@ -137,7 +137,7 @@ The ImageWoof dataset comes in three sizes: 2. **Medium Size (imagewoof320)**: Resized images with a maximum edge length of 320 pixels, suited for faster training. 3. **Small Size (imagewoof160)**: Resized images with a maximum edge length of 160 pixels, perfect for rapid prototyping. -Use these versions by replacing 'imagewoof' in the dataset argument accordingly. Note, however, that smaller images may yield lower classification accuracy but can be useful for quicker iterations. +Use these versions by replacing 'imagewoof' in the dataset argument accordingly. Note, however, that smaller images may yield lower classification [accuracy](https://www.ultralytics.com/glossary/accuracy) but can be useful for quicker iterations. ### How do noisy labels in the ImageWoof dataset benefit training? @@ -145,4 +145,4 @@ Noisy labels in the ImageWoof dataset simulate real-world conditions where label ### What are the key challenges of using the ImageWoof dataset? -The primary challenge of the ImageWoof dataset lies in the subtle differences among the dog breeds it includes. Since it focuses on 10 closely related breeds, distinguishing between them requires more advanced and fine-tuned image classification models. This makes ImageWoof an excellent benchmark to test the capabilities and improvements of deep learning models. +The primary challenge of the ImageWoof dataset lies in the subtle differences among the dog breeds it includes. Since it focuses on 10 closely related breeds, distinguishing between them requires more advanced and fine-tuned image classification models. This makes ImageWoof an excellent benchmark to test the capabilities and improvements of [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models. diff --git a/docs/en/datasets/classify/index.md b/docs/en/datasets/classify/index.md index 2b01824a..3567d6a2 100644 --- a/docs/en/datasets/classify/index.md +++ b/docs/en/datasets/classify/index.md @@ -103,12 +103,12 @@ This structured approach ensures that the model can effectively learn from well- Ultralytics supports the following datasets with automatic download: -- [Caltech 101](caltech101.md): A dataset containing images of 101 object categories for image classification tasks. +- [Caltech 101](caltech101.md): A dataset containing images of 101 object categories for [image classification](https://www.ultralytics.com/glossary/image-classification) tasks. - [Caltech 256](caltech256.md): An extended version of Caltech 101 with 256 object categories and more challenging images. - [CIFAR-10](cifar10.md): A dataset of 60K 32x32 color images in 10 classes, with 6K images per class. - [CIFAR-100](cifar100.md): An extended version of CIFAR-10 with 100 object categories and 600 images per class. - [Fashion-MNIST](fashion-mnist.md): A dataset consisting of 70,000 grayscale images of 10 fashion categories for image classification tasks. -- [ImageNet](imagenet.md): A large-scale dataset for object detection and image classification with over 14 million images and 20,000 categories. +- [ImageNet](imagenet.md): A large-scale dataset for [object detection](https://www.ultralytics.com/glossary/object-detection) and image classification with over 14 million images and 20,000 categories. - [ImageNet-10](imagenet10.md): A smaller subset of ImageNet with 10 categories for faster experimentation and testing. - [Imagenette](imagenette.md): A smaller subset of ImageNet that contains 10 easily distinguishable classes for quicker training and testing. - [Imagewoof](imagewoof.md): A more challenging subset of ImageNet containing 10 dog breed categories for image classification tasks. @@ -184,7 +184,7 @@ Ultralytics YOLO offers several benefits for image classification, including: - **Pretrained Models**: Load pretrained models like `yolov8n-cls.pt` to jump-start your training process. - **Ease of Use**: Simple API and CLI commands for training and evaluation. -- **High Performance**: State-of-the-art accuracy and speed, ideal for real-time applications. +- **High Performance**: State-of-the-art [accuracy](https://www.ultralytics.com/glossary/accuracy) and speed, ideal for real-time applications. - **Support for Multiple Datasets**: Seamless integration with various popular datasets like CIFAR-10, ImageNet, and more. - **Community and Support**: Access to extensive documentation and an active community for troubleshooting and improvements. diff --git a/docs/en/datasets/classify/mnist.md b/docs/en/datasets/classify/mnist.md index 7ee45313..07f0a70a 100644 --- a/docs/en/datasets/classify/mnist.md +++ b/docs/en/datasets/classify/mnist.md @@ -12,7 +12,7 @@ The [MNIST](http://yann.lecun.com/exdb/mnist/) (Modified National Institute of S - MNIST contains 60,000 training images and 10,000 testing images of handwritten digits. - The dataset comprises grayscale images of size 28x28 pixels. -- The images are normalized to fit into a 28x28 pixel bounding box and anti-aliased, introducing grayscale levels. +- The images are normalized to fit into a 28x28 pixel [bounding box](https://www.ultralytics.com/glossary/bounding-box) and anti-aliased, introducing grayscale levels. - MNIST is widely used for training and testing in the field of machine learning, especially for image classification tasks. ## Dataset Structure @@ -28,11 +28,11 @@ Extended MNIST (EMNIST) is a newer dataset developed and released by NIST to be ## Applications -The MNIST dataset is widely used for training and evaluating deep learning models in image classification tasks, such as Convolutional Neural Networks (CNNs), Support Vector Machines (SVMs), and various other machine learning algorithms. The dataset's simple and well-structured format makes it an essential resource for researchers and practitioners in the field of machine learning and computer vision. +The MNIST dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in image classification tasks, such as [Convolutional Neural Networks](https://www.ultralytics.com/glossary/convolutional-neural-network-cnn) (CNNs), [Support Vector Machines](https://www.ultralytics.com/glossary/support-vector-machine-svm) (SVMs), and various other machine learning algorithms. The dataset's simple and well-structured format makes it an essential resource for researchers and practitioners in the field of machine learning and computer vision. ## Usage -To train a CNN model on the MNIST dataset for 100 epochs with an image size of 32x32, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a CNN model on the MNIST dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 32x32, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -57,7 +57,7 @@ To train a CNN model on the MNIST dataset for 100 epochs with an image size of 3 ## Sample Images and Annotations -The MNIST dataset contains grayscale images of handwritten digits, providing a well-structured dataset for image classification tasks. Here are some examples of images from the dataset: +The MNIST dataset contains grayscale images of handwritten digits, providing a well-structured dataset for [image classification](https://www.ultralytics.com/glossary/image-classification) tasks. Here are some examples of images from the dataset: ![Dataset sample image](https://upload.wikimedia.org/wikipedia/commons/2/27/MnistExamples.png) @@ -83,7 +83,7 @@ research or development work, please cite the following paper: } ``` -We would like to acknowledge Yann LeCun, Corinna Cortes, and Christopher J.C. Burges for creating and maintaining the MNIST dataset as a valuable resource for the machine learning and computer vision research community. For more information about the MNIST dataset and its creators, visit the [MNIST dataset website](http://yann.lecun.com/exdb/mnist/). +We would like to acknowledge Yann LeCun, Corinna Cortes, and Christopher J.C. Burges for creating and maintaining the MNIST dataset as a valuable resource for the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) research community. For more information about the MNIST dataset and its creators, visit the [MNIST dataset website](http://yann.lecun.com/exdb/mnist/). ## FAQ diff --git a/docs/en/datasets/detect/african-wildlife.md b/docs/en/datasets/detect/african-wildlife.md index d0c86a03..0d01372d 100644 --- a/docs/en/datasets/detect/african-wildlife.md +++ b/docs/en/datasets/detect/african-wildlife.md @@ -6,7 +6,7 @@ keywords: African Wildlife Dataset, South African animals, object detection, com # African Wildlife Dataset -This dataset showcases four common animal classes typically found in South African nature reserves. It includes images of African wildlife such as buffalo, elephant, rhino, and zebra, providing valuable insights into their characteristics. Essential for training computer vision algorithms, this dataset aids in identifying animals in various habitats, from zoos to forests, and supports wildlife research. +This dataset showcases four common animal classes typically found in South African nature reserves. It includes images of African wildlife such as buffalo, elephant, rhino, and zebra, providing valuable insights into their characteristics. Essential for training [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) algorithms, this dataset aids in identifying animals in various habitats, from zoos to forests, and supports wildlife research.


@@ -29,7 +29,7 @@ The African wildlife objects detection dataset is split into three subsets: ## Applications -This dataset can be applied in various computer vision tasks such as object detection, object tracking, and research. Specifically, it can be used to train and evaluate models for identifying African wildlife objects in images, which can have applications in wildlife conservation, ecological research, and monitoring efforts in natural reserves and protected areas. Additionally, it can serve as a valuable resource for educational purposes, enabling students and researchers to study and understand the characteristics and behaviors of different animal species. +This dataset can be applied in various computer vision tasks such as [object detection](https://www.ultralytics.com/glossary/object-detection), object tracking, and research. Specifically, it can be used to train and evaluate models for identifying African wildlife objects in images, which can have applications in wildlife conservation, ecological research, and monitoring efforts in natural reserves and protected areas. Additionally, it can serve as a valuable resource for educational purposes, enabling students and researchers to study and understand the characteristics and behaviors of different animal species. ## Dataset YAML @@ -43,7 +43,7 @@ A YAML (Yet Another Markup Language) file defines the dataset configuration, inc ## Usage -To train a YOLOv8n model on the African wildlife dataset for 100 epochs with an image size of 640, use the provided code samples. For a comprehensive list of available parameters, refer to the model's [Training](../../modes/train.md) page. +To train a YOLOv8n model on the African wildlife dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, use the provided code samples. For a comprehensive list of available parameters, refer to the model's [Training](../../modes/train.md) page. !!! example "Train Example" @@ -136,7 +136,7 @@ For additional training parameters and options, refer to the [Training](../../mo ### Where can I find the YAML configuration file for the African Wildlife Dataset? -The YAML configuration file for the African Wildlife Dataset, named `african-wildlife.yaml`, can be found at [this GitHub link](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/african-wildlife.yaml). This file defines the dataset configuration, including paths, classes, and other details crucial for training machine learning models. See the [Dataset YAML](#dataset-yaml) section for more details. +The YAML configuration file for the African Wildlife Dataset, named `african-wildlife.yaml`, can be found at [this GitHub link](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/african-wildlife.yaml). This file defines the dataset configuration, including paths, classes, and other details crucial for training [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models. See the [Dataset YAML](#dataset-yaml) section for more details. ### Can I see sample images and annotations from the African Wildlife Dataset? diff --git a/docs/en/datasets/detect/argoverse.md b/docs/en/datasets/detect/argoverse.md index 47ef822b..a834be90 100644 --- a/docs/en/datasets/detect/argoverse.md +++ b/docs/en/datasets/detect/argoverse.md @@ -29,7 +29,7 @@ The Argoverse dataset is organized into three main subsets: ## Applications -The Argoverse dataset is widely used for training and evaluating deep learning models in autonomous driving tasks such as 3D object tracking, motion forecasting, and stereo depth estimation. The dataset's diverse set of sensor data, object annotations, and map information make it a valuable resource for researchers and practitioners in the field of autonomous driving. +The Argoverse dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in autonomous driving tasks such as 3D object tracking, motion forecasting, and stereo depth estimation. The dataset's diverse set of sensor data, object annotations, and map information make it a valuable resource for researchers and practitioners in the field of autonomous driving. ## Dataset YAML @@ -43,7 +43,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the Argoverse dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the Argoverse dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" diff --git a/docs/en/datasets/detect/brain-tumor.md b/docs/en/datasets/detect/brain-tumor.md index aa48c5f9..9f108e73 100644 --- a/docs/en/datasets/detect/brain-tumor.md +++ b/docs/en/datasets/detect/brain-tumor.md @@ -6,7 +6,7 @@ keywords: brain tumor dataset, MRI scans, CT scans, brain tumor detection, medic # Brain Tumor Dataset -A brain tumor detection dataset consists of medical images from MRI or CT scans, containing information about brain tumor presence, location, and characteristics. This dataset is essential for training computer vision algorithms to automate brain tumor identification, aiding in early diagnosis and treatment planning. +A brain tumor detection dataset consists of medical images from MRI or CT scans, containing information about brain tumor presence, location, and characteristics. This dataset is essential for training [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) algorithms to automate brain tumor identification, aiding in early diagnosis and treatment planning.


@@ -42,7 +42,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the brain tumor dataset for 100 epochs with an image size of 640, utilize the provided code snippets. For a detailed list of available arguments, consult the model's [Training](../../modes/train.md) page. +To train a YOLOv8n model on the brain tumor dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, utilize the provided code snippets. For a detailed list of available arguments, consult the model's [Training](../../modes/train.md) page. !!! example "Train Example" diff --git a/docs/en/datasets/detect/coco.md b/docs/en/datasets/detect/coco.md index 25878ed9..d0901428 100644 --- a/docs/en/datasets/detect/coco.md +++ b/docs/en/datasets/detect/coco.md @@ -6,7 +6,7 @@ keywords: COCO dataset, object detection, segmentation, benchmarking, computer v # COCO Dataset -The [COCO](https://cocodataset.org/#home) (Common Objects in Context) dataset is a large-scale object detection, segmentation, and captioning dataset. It is designed to encourage research on a wide variety of object categories and is commonly used for benchmarking computer vision models. It is an essential dataset for researchers and developers working on object detection, segmentation, and pose estimation tasks. +The [COCO](https://cocodataset.org/#home) (Common Objects in Context) dataset is a large-scale object detection, segmentation, and captioning dataset. It is designed to encourage research on a wide variety of object categories and is commonly used for benchmarking [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) models. It is an essential dataset for researchers and developers working on object detection, segmentation, and pose estimation tasks.


@@ -34,7 +34,7 @@ The [COCO](https://cocodataset.org/#home) (Common Objects in Context) dataset is - COCO contains 330K images, with 200K images having annotations for object detection, segmentation, and captioning tasks. - The dataset comprises 80 object categories, including common objects like cars, bicycles, and animals, as well as more specific categories such as umbrellas, handbags, and sports equipment. - Annotations include object bounding boxes, segmentation masks, and captions for each image. -- COCO provides standardized evaluation metrics like mean Average Precision (mAP) for object detection, and mean Average Recall (mAR) for segmentation tasks, making it suitable for comparing model performance. +- COCO provides standardized evaluation metrics like [mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) for object detection, and mean Average [Recall](https://www.ultralytics.com/glossary/recall) (mAR) for segmentation tasks, making it suitable for comparing model performance. ## Dataset Structure @@ -46,7 +46,7 @@ The COCO dataset is split into three subsets: ## Applications -The COCO dataset is widely used for training and evaluating deep learning models in object detection (such as YOLO, Faster R-CNN, and SSD), instance segmentation (such as Mask R-CNN), and keypoint detection (such as OpenPose). The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. +The COCO dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object detection (such as YOLO, Faster R-CNN, and SSD), [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) (such as Mask R-CNN), and keypoint detection (such as OpenPose). The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. ## Dataset YAML @@ -60,7 +60,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the COCO dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the COCO dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -118,7 +118,7 @@ We would like to acknowledge the COCO Consortium for creating and maintaining th ### What is the COCO dataset and why is it important for computer vision? -The [COCO dataset](https://cocodataset.org/#home) (Common Objects in Context) is a large-scale dataset used for object detection, segmentation, and captioning. It contains 330K images with detailed annotations for 80 object categories, making it essential for benchmarking and training computer vision models. Researchers use COCO due to its diverse categories and standardized evaluation metrics like mean Average Precision (mAP). +The [COCO dataset](https://cocodataset.org/#home) (Common Objects in Context) is a large-scale dataset used for [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and captioning. It contains 330K images with detailed annotations for 80 object categories, making it essential for benchmarking and training computer vision models. Researchers use COCO due to its diverse categories and standardized evaluation metrics like mean Average [Precision](https://www.ultralytics.com/glossary/precision) (mAP). ### How can I train a YOLO model using the COCO dataset? diff --git a/docs/en/datasets/detect/coco8.md b/docs/en/datasets/detect/coco8.md index a0972693..4a8ad5a8 100644 --- a/docs/en/datasets/detect/coco8.md +++ b/docs/en/datasets/detect/coco8.md @@ -8,7 +8,7 @@ keywords: COCO8, Ultralytics, dataset, object detection, YOLOv8, training, valid ## Introduction -[Ultralytics](https://www.ultralytics.com/) COCO8 is a small, but versatile object detection dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. +[Ultralytics](https://www.ultralytics.com/) COCO8 is a small, but versatile [object detection](https://www.ultralytics.com/glossary/object-detection) dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets.


@@ -35,7 +35,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the COCO8 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -87,7 +87,7 @@ If you use the COCO dataset in your research or development work, please cite th } ``` -We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). +We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). ## FAQ diff --git a/docs/en/datasets/detect/globalwheat2020.md b/docs/en/datasets/detect/globalwheat2020.md index 37b9759f..ef7ff7ac 100644 --- a/docs/en/datasets/detect/globalwheat2020.md +++ b/docs/en/datasets/detect/globalwheat2020.md @@ -24,7 +24,7 @@ The Global Wheat Head Dataset is organized into two main subsets: ## Applications -The Global Wheat Head Dataset is widely used for training and evaluating deep learning models in wheat head detection tasks. The dataset's diverse set of images, capturing a wide range of appearances, environments, and conditions, make it a valuable resource for researchers and practitioners in the field of plant phenotyping and crop management. +The Global Wheat Head Dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in wheat head detection tasks. The dataset's diverse set of images, capturing a wide range of appearances, environments, and conditions, make it a valuable resource for researchers and practitioners in the field of plant phenotyping and crop management. ## Dataset YAML @@ -38,7 +38,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the Global Wheat Head Dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the Global Wheat Head Dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -130,7 +130,7 @@ Key features of the Global Wheat Head Dataset include: - Over 3,000 training images from Europe (France, UK, Switzerland) and North America (Canada). - Approximately 1,000 test images from Australia, Japan, and China. - High variability in wheat head appearances due to different growing environments. -- Detailed annotations with wheat head bounding boxes to aid object detection models. +- Detailed annotations with wheat head bounding boxes to aid [object detection](https://www.ultralytics.com/glossary/object-detection) models. These features facilitate the development of robust models capable of generalization across multiple regions. diff --git a/docs/en/datasets/detect/index.md b/docs/en/datasets/detect/index.md index f76ba40b..61640480 100644 --- a/docs/en/datasets/detect/index.md +++ b/docs/en/datasets/detect/index.md @@ -6,7 +6,7 @@ keywords: Ultralytics, YOLO, object detection datasets, dataset formats, COCO, d # Object Detection Datasets Overview -Training a robust and accurate object detection model requires a comprehensive dataset. This guide introduces various formats of datasets that are compatible with the Ultralytics YOLO model and provides insights into their structure, usage, and how to convert between different formats. +Training a robust and accurate [object detection](https://www.ultralytics.com/glossary/object-detection) model requires a comprehensive dataset. This guide introduces various formats of datasets that are compatible with the Ultralytics YOLO model and provides insights into their structure, usage, and how to convert between different formats. ## Supported Dataset Formats diff --git a/docs/en/datasets/detect/lvis.md b/docs/en/datasets/detect/lvis.md index 8c06920f..c4a4ff76 100644 --- a/docs/en/datasets/detect/lvis.md +++ b/docs/en/datasets/detect/lvis.md @@ -6,7 +6,7 @@ keywords: LVIS dataset, object detection, instance segmentation, Facebook AI Res # LVIS Dataset -The [LVIS dataset](https://www.lvisdataset.org/) is a large-scale, fine-grained vocabulary-level annotation dataset developed and released by Facebook AI Research (FAIR). It is primarily used as a research benchmark for object detection and instance segmentation with a large vocabulary of categories, aiming to drive further advancements in computer vision field. +The [LVIS dataset](https://www.lvisdataset.org/) is a large-scale, fine-grained vocabulary-level annotation dataset developed and released by Facebook AI Research (FAIR). It is primarily used as a research benchmark for object detection and [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) with a large vocabulary of categories, aiming to drive further advancements in computer vision field.


@@ -28,7 +28,7 @@ The [LVIS dataset](https://www.lvisdataset.org/) is a large-scale, fine-grained - LVIS contains 160k images and 2M instance annotations for object detection, segmentation, and captioning tasks. - The dataset comprises 1203 object categories, including common objects like cars, bicycles, and animals, as well as more specific categories such as umbrellas, handbags, and sports equipment. - Annotations include object bounding boxes, segmentation masks, and captions for each image. -- LVIS provides standardized evaluation metrics like mean Average Precision (mAP) for object detection, and mean Average Recall (mAR) for segmentation tasks, making it suitable for comparing model performance. +- LVIS provides standardized evaluation metrics like [mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) for object detection, and mean Average [Recall](https://www.ultralytics.com/glossary/recall) (mAR) for segmentation tasks, making it suitable for comparing model performance. - LVIS uses exactly the same images as [COCO](./coco.md) dataset, but with different splits and different annotations. ## Dataset Structure @@ -42,7 +42,7 @@ The LVIS dataset is split into three subsets: ## Applications -The LVIS dataset is widely used for training and evaluating deep learning models in object detection (such as YOLO, Faster R-CNN, and SSD), instance segmentation (such as Mask R-CNN). The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. +The LVIS dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object detection (such as YOLO, Faster R-CNN, and SSD), instance segmentation (such as Mask R-CNN). The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. ## Dataset YAML @@ -56,7 +56,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the LVIS dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the LVIS dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -106,7 +106,7 @@ If you use the LVIS dataset in your research or development work, please cite th } ``` -We would like to acknowledge the LVIS Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the LVIS dataset and its creators, visit the [LVIS dataset website](https://www.lvisdataset.org/). +We would like to acknowledge the LVIS Consortium for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the LVIS dataset and its creators, visit the [LVIS dataset website](https://www.lvisdataset.org/). ## FAQ @@ -144,11 +144,11 @@ For detailed training configurations, refer to the [Training](../../modes/train. ### How does the LVIS dataset differ from the COCO dataset? -The images in the LVIS dataset are the same as those in the [COCO dataset](./coco.md), but the two differ in terms of splitting and annotations. LVIS provides a larger and more detailed vocabulary with 1203 object categories compared to COCO's 80 categories. Additionally, LVIS focuses on annotation completeness and diversity, aiming to push the limits of object detection and instance segmentation models by offering more nuanced and comprehensive data. +The images in the LVIS dataset are the same as those in the [COCO dataset](./coco.md), but the two differ in terms of splitting and annotations. LVIS provides a larger and more detailed vocabulary with 1203 object categories compared to COCO's 80 categories. Additionally, LVIS focuses on annotation completeness and diversity, aiming to push the limits of [object detection](https://www.ultralytics.com/glossary/object-detection) and instance segmentation models by offering more nuanced and comprehensive data. ### Why should I use Ultralytics YOLO for training on the LVIS dataset? -Ultralytics YOLO models, including the latest YOLOv8, are optimized for real-time object detection with state-of-the-art accuracy and speed. They support a wide range of annotations, such as the fine-grained ones provided by the LVIS dataset, making them ideal for advanced computer vision applications. Moreover, Ultralytics offers seamless integration with various [training](../../modes/train.md), [validation](../../modes/val.md), and [prediction](../../modes/predict.md) modes, ensuring efficient model development and deployment. +Ultralytics YOLO models, including the latest YOLOv8, are optimized for real-time object detection with state-of-the-art [accuracy](https://www.ultralytics.com/glossary/accuracy) and speed. They support a wide range of annotations, such as the fine-grained ones provided by the LVIS dataset, making them ideal for advanced computer vision applications. Moreover, Ultralytics offers seamless integration with various [training](../../modes/train.md), [validation](../../modes/val.md), and [prediction](../../modes/predict.md) modes, ensuring efficient model development and deployment. ### Can I see some sample annotations from the LVIS dataset? diff --git a/docs/en/datasets/detect/objects365.md b/docs/en/datasets/detect/objects365.md index f2b44f24..49947617 100644 --- a/docs/en/datasets/detect/objects365.md +++ b/docs/en/datasets/detect/objects365.md @@ -24,7 +24,7 @@ The Objects365 dataset is organized into a single set of images with correspondi ## Applications -The Objects365 dataset is widely used for training and evaluating deep learning models in object detection tasks. The dataset's diverse set of object categories and high-quality annotations make it a valuable resource for researchers and practitioners in the field of computer vision. +The Objects365 dataset is widely used for training and evaluating deep learning models in object detection tasks. The dataset's diverse set of object categories and high-quality annotations make it a valuable resource for researchers and practitioners in the field of [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). ## Dataset YAML @@ -38,7 +38,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the Objects365 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the Objects365 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -63,7 +63,7 @@ To train a YOLOv8n model on the Objects365 dataset for 100 epochs with an image ## Sample Data and Annotations -The Objects365 dataset contains a diverse set of high-resolution images with objects from 365 categories, providing rich context for object detection tasks. Here are some examples of the images in the dataset: +The Objects365 dataset contains a diverse set of high-resolution images with objects from 365 categories, providing rich context for [object detection](https://www.ultralytics.com/glossary/object-detection) tasks. Here are some examples of the images in the dataset: ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/objects365-sample-image.avif) @@ -95,7 +95,7 @@ We would like to acknowledge the team of researchers who created and maintain th ### What is the Objects365 dataset used for? -The [Objects365 dataset](https://www.objects365.org/) is designed for object detection tasks in machine learning and computer vision. It provides a large-scale, high-quality dataset with 2 million annotated images and 30 million bounding boxes across 365 categories. Leveraging such a diverse dataset helps improve the performance and generalization of object detection models, making it invaluable for research and development in the field. +The [Objects365 dataset](https://www.objects365.org/) is designed for object detection tasks in [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and computer vision. It provides a large-scale, high-quality dataset with 2 million annotated images and 30 million bounding boxes across 365 categories. Leveraging such a diverse dataset helps improve the performance and generalization of object detection models, making it invaluable for research and development in the field. ### How can I train a YOLOv8 model on the Objects365 dataset? @@ -138,4 +138,4 @@ The YAML configuration file for the Objects365 dataset is available at [Objects3 ### How does the dataset structure of Objects365 enhance object detection modeling? -The [Objects365 dataset](https://www.objects365.org/) is organized with 2 million high-resolution images and comprehensive annotations of over 30 million bounding boxes. This structure ensures a robust dataset for training deep learning models in object detection, offering a wide variety of objects and scenarios. Such diversity and volume help in developing models that are more accurate and capable of generalizing well to real-world applications. For more details on the dataset structure, refer to the [Dataset YAML](#dataset-yaml) section. +The [Objects365 dataset](https://www.objects365.org/) is organized with 2 million high-resolution images and comprehensive annotations of over 30 million bounding boxes. This structure ensures a robust dataset for training [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object detection, offering a wide variety of objects and scenarios. Such diversity and volume help in developing models that are more accurate and capable of generalizing well to real-world applications. For more details on the dataset structure, refer to the [Dataset YAML](#dataset-yaml) section. diff --git a/docs/en/datasets/detect/open-images-v7.md b/docs/en/datasets/detect/open-images-v7.md index f6b0c63b..1e6f1f7e 100644 --- a/docs/en/datasets/detect/open-images-v7.md +++ b/docs/en/datasets/detect/open-images-v7.md @@ -6,7 +6,7 @@ keywords: Open Images V7, Google dataset, computer vision, YOLOv8 models, object # Open Images V7 Dataset -[Open Images V7](https://storage.googleapis.com/openimages/web/index.html) is a versatile and expansive dataset championed by Google. Aimed at propelling research in the realm of computer vision, it boasts a vast collection of images annotated with a plethora of data, including image-level labels, object bounding boxes, object segmentation masks, visual relationships, and localized narratives. +[Open Images V7](https://storage.googleapis.com/openimages/web/index.html) is a versatile and expansive dataset championed by Google. Aimed at propelling research in the realm of [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv), it boasts a vast collection of images annotated with a plethora of data, including image-level labels, object bounding boxes, object segmentation masks, visual relationships, and localized narratives.


@@ -16,7 +16,7 @@ keywords: Open Images V7, Google dataset, computer vision, YOLOv8 models, object allowfullscreen>
- Watch: Object Detection using OpenImagesV7 Pretrained Model + Watch: [Object Detection](https://www.ultralytics.com/glossary/object-detection) using OpenImagesV7 Pretrained Model

## Open Images V7 Pretrained Models @@ -34,13 +34,13 @@ keywords: Open Images V7, Google dataset, computer vision, YOLOv8 models, object ## Key Features - Encompasses ~9M images annotated in various ways to suit multiple computer vision tasks. -- Houses a staggering 16M bounding boxes across 600 object classes in 1.9M images. These boxes are primarily hand-drawn by experts ensuring high precision. +- Houses a staggering 16M bounding boxes across 600 object classes in 1.9M images. These boxes are primarily hand-drawn by experts ensuring high [precision](https://www.ultralytics.com/glossary/precision). - Visual relationship annotations totaling 3.3M are available, detailing 1,466 unique relationship triplets, object properties, and human activities. - V5 introduced segmentation masks for 2.8M objects across 350 classes. - V6 introduced 675k localized narratives that amalgamate voice, text, and mouse traces highlighting described objects. - V7 introduced 66.4M point-level labels on 1.4M images, spanning 5,827 classes. - Encompasses 61.4M image-level labels across a diverse set of 20,638 classes. -- Provides a unified platform for image classification, object detection, relationship detection, instance segmentation, and multimodal image descriptions. +- Provides a unified platform for image classification, object detection, relationship detection, [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), and multimodal image descriptions. ## Dataset Structure @@ -51,7 +51,7 @@ Open Images V7 is structured in multiple components catering to varied computer - **Segmentation Masks**: These detail the exact boundary of 2.8M objects across 350 classes. - **Visual Relationships**: 3.3M annotations indicating object relationships, properties, and actions. - **Localized Narratives**: 675k descriptions combining voice, text, and mouse traces. -- **Point-Level Labels**: 66.4M labels across 1.4M images, suitable for zero/few-shot semantic segmentation. +- **Point-Level Labels**: 66.4M labels across 1.4M images, suitable for zero/few-shot [semantic segmentation](https://www.ultralytics.com/glossary/semantic-segmentation). ## Applications @@ -69,7 +69,7 @@ Typically, datasets come with a YAML (Yet Another Markup Language) file that del ## Usage -To train a YOLOv8n model on the Open Images V7 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the Open Images V7 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! warning @@ -191,10 +191,10 @@ Ultralytics provides several YOLOv8 pretrained models for the Open Images V7 dat The Open Images V7 dataset supports a variety of computer vision tasks including: -- **Image Classification** +- **[Image Classification](https://www.ultralytics.com/glossary/image-classification)** - **Object Detection** - **Instance Segmentation** - **Visual Relationship Detection** - **Multimodal Image Descriptions** -Its comprehensive annotations and broad scope make it suitable for training and evaluating advanced machine learning models, as highlighted in practical use cases detailed in our [applications](#applications) section. +Its comprehensive annotations and broad scope make it suitable for training and evaluating advanced [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models, as highlighted in practical use cases detailed in our [applications](#applications) section. diff --git a/docs/en/datasets/detect/roboflow-100.md b/docs/en/datasets/detect/roboflow-100.md index 844326c3..6b3c540e 100644 --- a/docs/en/datasets/detect/roboflow-100.md +++ b/docs/en/datasets/detect/roboflow-100.md @@ -35,7 +35,7 @@ This structure enables a diverse and extensive testing ground for object detecti ## Benchmarking -Dataset benchmarking evaluates machine learning model performance on specific datasets using standardized metrics like accuracy, mean average precision and F1-score. +Dataset benchmarking evaluates machine learning model performance on specific datasets using standardized metrics like [accuracy](https://www.ultralytics.com/glossary/accuracy), [mean average precision](https://www.ultralytics.com/glossary/mean-average-precision-map) and F1-score. !!! tip "Benchmarking" @@ -85,7 +85,7 @@ Dataset benchmarking evaluates machine learning model performance on specific da ## Applications -Roboflow 100 is invaluable for various applications related to computer vision and deep learning. Researchers and engineers can use this benchmark to: +Roboflow 100 is invaluable for various applications related to [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl). Researchers and engineers can use this benchmark to: - Evaluate the performance of object detection models in a multi-domain context. - Test the adaptability of models to real-world scenarios beyond common object recognition. @@ -127,7 +127,7 @@ If you use the Roboflow 100 dataset in your research or development work, please Our thanks go to the Roboflow team and all the contributors for their hard work in creating and sustaining the Roboflow 100 dataset. -If you are interested in exploring more datasets to enhance your object detection and machine learning projects, feel free to visit [our comprehensive dataset collection](../index.md). +If you are interested in exploring more datasets to enhance your object detection and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) projects, feel free to visit [our comprehensive dataset collection](../index.md). ## FAQ @@ -183,7 +183,7 @@ To use the Roboflow 100 dataset for benchmarking, you can implement the RF100Ben ### Which domains are covered by the Roboflow 100 dataset? -The **Roboflow 100** dataset spans seven domains, each providing unique challenges and applications for object detection models: +The **Roboflow 100** dataset spans seven domains, each providing unique challenges and applications for [object detection](https://www.ultralytics.com/glossary/object-detection) models: 1. **Aerial**: 7 datasets, 9,683 images, 24 classes 2. **Video Games**: 7 datasets, 11,579 images, 88 classes diff --git a/docs/en/datasets/detect/signature.md b/docs/en/datasets/detect/signature.md index 0d76e11f..5746d57e 100644 --- a/docs/en/datasets/detect/signature.md +++ b/docs/en/datasets/detect/signature.md @@ -6,7 +6,7 @@ keywords: Signature Detection Dataset, document verification, fraud detection, c # Signature Detection Dataset -This dataset focuses on detecting human written signatures within documents. It includes a variety of document types with annotated signatures, providing valuable insights for applications in document verification and fraud detection. Essential for training computer vision algorithms, this dataset aids in identifying signatures in various document formats, supporting research and practical applications in document analysis. +This dataset focuses on detecting human written signatures within documents. It includes a variety of document types with annotated signatures, providing valuable insights for applications in document verification and fraud detection. Essential for training [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) algorithms, this dataset aids in identifying signatures in various document formats, supporting research and practical applications in document analysis. ## Dataset Structure @@ -31,7 +31,7 @@ A YAML (Yet Another Markup Language) file defines the dataset configuration, inc ## Usage -To train a YOLOv8n model on the signature detection dataset for 100 epochs with an image size of 640, use the provided code samples. For a comprehensive list of available parameters, refer to the model's [Training](../../modes/train.md) page. +To train a YOLOv8n model on the signature detection dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, use the provided code samples. For a comprehensive list of available parameters, refer to the model's [Training](../../modes/train.md) page. !!! example "Train Example" @@ -93,7 +93,7 @@ The dataset has been released available under the [AGPL-3.0 License](https://git ### What is the Signature Detection Dataset, and how can it be used? -The Signature Detection Dataset is a collection of annotated images aimed at detecting human signatures within various document types. It can be applied in computer vision tasks such as object detection and tracking, primarily for document verification, fraud detection, and archival research. This dataset helps train models to recognize signatures in different contexts, making it valuable for both research and practical applications. +The Signature Detection Dataset is a collection of annotated images aimed at detecting human signatures within various document types. It can be applied in computer vision tasks such as [object detection](https://www.ultralytics.com/glossary/object-detection) and tracking, primarily for document verification, fraud detection, and archival research. This dataset helps train models to recognize signatures in different contexts, making it valuable for both research and practical applications. ### How do I train a YOLOv8n model on the Signature Detection Dataset? @@ -131,7 +131,7 @@ The Signature Detection Dataset can be used for: 1. **Document Verification**: Automatically verifying the presence and authenticity of human signatures in documents. 2. **Fraud Detection**: Identifying forged or fraudulent signatures in legal and financial documents. 3. **Archival Research**: Assisting historians and archivists in the digital analysis and cataloging of historical documents. -4. **Education**: Supporting academic research and teaching in the fields of computer vision and machine learning. +4. **Education**: Supporting academic research and teaching in the fields of computer vision and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml). ### How can I perform inference using a model trained on the Signature Detection Dataset? diff --git a/docs/en/datasets/detect/sku-110k.md b/docs/en/datasets/detect/sku-110k.md index 14546832..c6cddc48 100644 --- a/docs/en/datasets/detect/sku-110k.md +++ b/docs/en/datasets/detect/sku-110k.md @@ -6,7 +6,7 @@ keywords: SKU-110k, dataset, object detection, retail shelf images, deep learnin # SKU-110k Dataset -The [SKU-110k](https://github.com/eg4000/SKU110K_CVPR19) dataset is a collection of densely packed retail shelf images, designed to support research in object detection tasks. Developed by Eran Goldman et al., the dataset contains over 110,000 unique store keeping unit (SKU) categories with densely packed objects, often looking similar or even identical, positioned in close proximity. +The [SKU-110k](https://github.com/eg4000/SKU110K_CVPR19) dataset is a collection of densely packed retail shelf images, designed to support research in [object detection](https://www.ultralytics.com/glossary/object-detection) tasks. Developed by Eran Goldman et al., the dataset contains over 110,000 unique store keeping unit (SKU) categories with densely packed objects, often looking similar or even identical, positioned in close proximity.


@@ -37,7 +37,7 @@ The SKU-110k dataset is organized into three main subsets: ## Applications -The SKU-110k dataset is widely used for training and evaluating deep learning models in object detection tasks, especially in densely packed scenes such as retail shelf displays. The dataset's diverse set of SKU categories and densely packed object arrangements make it a valuable resource for researchers and practitioners in the field of computer vision. +The SKU-110k dataset is widely used for training and evaluating deep learning models in object detection tasks, especially in densely packed scenes such as retail shelf displays. The dataset's diverse set of SKU categories and densely packed object arrangements make it a valuable resource for researchers and practitioners in the field of [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). ## Dataset YAML @@ -51,7 +51,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the SKU-110K dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the SKU-110K dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -151,7 +151,7 @@ Refer to the [Dataset Structure](#dataset-structure) section for more details. The SKU-110k dataset configuration is defined in a YAML file, which includes details about the dataset's paths, classes, and other relevant information. The `SKU-110K.yaml` file is maintained at [SKU-110K.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/SKU-110K.yaml). For example, you can train a model using this configuration as shown in our [Usage](#usage) section. -### What are the key features of the SKU-110k dataset in the context of deep learning? +### What are the key features of the SKU-110k dataset in the context of [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl)? The SKU-110k dataset features images of store shelves from around the world, showcasing densely packed objects that pose significant challenges for object detectors: diff --git a/docs/en/datasets/detect/visdrone.md b/docs/en/datasets/detect/visdrone.md index c1060e99..99b182cb 100644 --- a/docs/en/datasets/detect/visdrone.md +++ b/docs/en/datasets/detect/visdrone.md @@ -6,7 +6,7 @@ keywords: VisDrone, drone dataset, computer vision, object detection, object tra # VisDrone Dataset -The [VisDrone Dataset](https://github.com/VisDrone/VisDrone-Dataset) is a large-scale benchmark created by the AISKYEYE team at the Lab of Machine Learning and Data Mining, Tianjin University, China. It contains carefully annotated ground truth data for various computer vision tasks related to drone-based image and video analysis. +The [VisDrone Dataset](https://github.com/VisDrone/VisDrone-Dataset) is a large-scale benchmark created by the AISKYEYE team at the Lab of [Machine Learning](https://www.ultralytics.com/glossary/machine-learning-ml) and Data Mining, Tianjin University, China. It contains carefully annotated ground truth data for various computer vision tasks related to drone-based image and video analysis.


@@ -33,7 +33,7 @@ The VisDrone dataset is organized into five main subsets, each focusing on a spe ## Applications -The VisDrone dataset is widely used for training and evaluating deep learning models in drone-based computer vision tasks such as object detection, object tracking, and crowd counting. The dataset's diverse set of sensor data, object annotations, and attributes make it a valuable resource for researchers and practitioners in the field of drone-based computer vision. +The VisDrone dataset is widely used for training and evaluating deep learning models in drone-based [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks such as object detection, object tracking, and crowd counting. The dataset's diverse set of sensor data, object annotations, and attributes make it a valuable resource for researchers and practitioners in the field of drone-based computer vision. ## Dataset YAML @@ -47,7 +47,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the VisDrone dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the VisDrone dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -76,7 +76,7 @@ The VisDrone dataset contains a diverse set of images and videos captured by dro ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/visdrone-object-detection-sample.avif) -- **Task 1**: Object detection in images - This image demonstrates an example of object detection in images, where objects are annotated with bounding boxes. The dataset provides a wide variety of images taken from different locations, environments, and densities to facilitate the development of models for this task. +- **Task 1**: [Object detection](https://www.ultralytics.com/glossary/object-detection) in images - This image demonstrates an example of object detection in images, where objects are annotated with bounding boxes. The dataset provides a wide variety of images taken from different locations, environments, and densities to facilitate the development of models for this task. The example showcases the variety and complexity of the data in the VisDrone dataset and highlights the importance of high-quality sensor data for drone-based computer vision tasks. @@ -100,7 +100,7 @@ If you use the VisDrone dataset in your research or development work, please cit doi={10.1109/TPAMI.2021.3119563}} ``` -We would like to acknowledge the AISKYEYE team at the Lab of Machine Learning and Data Mining, Tianjin University, China, for creating and maintaining the VisDrone dataset as a valuable resource for the drone-based computer vision research community. For more information about the VisDrone dataset and its creators, visit the [VisDrone Dataset GitHub repository](https://github.com/VisDrone/VisDrone-Dataset). +We would like to acknowledge the AISKYEYE team at the Lab of Machine Learning and [Data Mining](https://www.ultralytics.com/glossary/data-mining), Tianjin University, China, for creating and maintaining the VisDrone dataset as a valuable resource for the drone-based computer vision research community. For more information about the VisDrone dataset and its creators, visit the [VisDrone Dataset GitHub repository](https://github.com/VisDrone/VisDrone-Dataset). ## FAQ @@ -150,7 +150,7 @@ The VisDrone dataset is divided into five main subsets, each tailored for a spec 4. **Task 4**: Multi-object tracking. 5. **Task 5**: Crowd counting. -These subsets are widely used for training and evaluating deep learning models in drone-based applications such as surveillance, traffic monitoring, and public safety. +These subsets are widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in drone-based applications such as surveillance, traffic monitoring, and public safety. ### Where can I find the configuration file for the VisDrone dataset in Ultralytics? diff --git a/docs/en/datasets/detect/voc.md b/docs/en/datasets/detect/voc.md index 0afc9205..7dc67fb5 100644 --- a/docs/en/datasets/detect/voc.md +++ b/docs/en/datasets/detect/voc.md @@ -13,7 +13,7 @@ The [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) (Visual Object Classes - VOC dataset includes two main challenges: VOC2007 and VOC2012. - The dataset comprises 20 object categories, including common objects like cars, bicycles, and animals, as well as more specific categories such as boats, sofas, and dining tables. - Annotations include object bounding boxes and class labels for object detection and classification tasks, and segmentation masks for the segmentation tasks. -- VOC provides standardized evaluation metrics like mean Average Precision (mAP) for object detection and classification, making it suitable for comparing model performance. +- VOC provides standardized evaluation metrics like [mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) for object detection and classification, making it suitable for comparing model performance. ## Dataset Structure @@ -25,7 +25,7 @@ The VOC dataset is split into three subsets: ## Applications -The VOC dataset is widely used for training and evaluating deep learning models in object detection (such as YOLO, Faster R-CNN, and SSD), instance segmentation (such as Mask R-CNN), and image classification. The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. +The VOC dataset is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in object detection (such as YOLO, Faster R-CNN, and SSD), [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) (such as Mask R-CNN), and [image classification](https://www.ultralytics.com/glossary/image-classification). The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners. ## Dataset YAML @@ -39,7 +39,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n model on the VOC dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n model on the VOC dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -91,13 +91,13 @@ If you use the VOC dataset in your research or development work, please cite the } ``` -We would like to acknowledge the PASCAL VOC Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the VOC dataset and its creators, visit the [PASCAL VOC dataset website](http://host.robots.ox.ac.uk/pascal/VOC/). +We would like to acknowledge the PASCAL VOC Consortium for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the VOC dataset and its creators, visit the [PASCAL VOC dataset website](http://host.robots.ox.ac.uk/pascal/VOC/). ## FAQ ### What is the PASCAL VOC dataset and why is it important for computer vision tasks? -The [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) (Visual Object Classes) dataset is a renowned benchmark for object detection, segmentation, and classification in computer vision. It includes comprehensive annotations like bounding boxes, class labels, and segmentation masks across 20 different object categories. Researchers use it widely to evaluate the performance of models like Faster R-CNN, YOLO, and Mask R-CNN due to its standardized evaluation metrics such as mean Average Precision (mAP). +The [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) (Visual Object Classes) dataset is a renowned benchmark for [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification in computer vision. It includes comprehensive annotations like bounding boxes, class labels, and segmentation masks across 20 different object categories. Researchers use it widely to evaluate the performance of models like Faster R-CNN, YOLO, and Mask R-CNN due to its standardized evaluation metrics such as mean Average Precision (mAP). ### How do I train a YOLOv8 model using the VOC dataset? @@ -130,8 +130,8 @@ The VOC dataset includes two main challenges: VOC2007 and VOC2012. These challen ### How does the PASCAL VOC dataset enhance model benchmarking and evaluation? -The PASCAL VOC dataset enhances model benchmarking and evaluation through its detailed annotations and standardized metrics like mean Average Precision (mAP). These metrics are crucial for assessing the performance of object detection and classification models. The dataset's diverse and complex images ensure comprehensive model evaluation across various real-world scenarios. +The PASCAL VOC dataset enhances model benchmarking and evaluation through its detailed annotations and standardized metrics like mean Average [Precision](https://www.ultralytics.com/glossary/precision) (mAP). These metrics are crucial for assessing the performance of object detection and classification models. The dataset's diverse and complex images ensure comprehensive model evaluation across various real-world scenarios. -### How do I use the VOC dataset for semantic segmentation in YOLO models? +### How do I use the VOC dataset for [semantic segmentation](https://www.ultralytics.com/glossary/semantic-segmentation) in YOLO models? To use the VOC dataset for semantic segmentation tasks with YOLO models, you need to configure the dataset properly in a YAML file. The YAML file defines paths and classes needed for training segmentation models. Check the VOC dataset YAML configuration file at [VOC.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/VOC.yaml) for detailed setups. diff --git a/docs/en/datasets/detect/xview.md b/docs/en/datasets/detect/xview.md index e7e2f3d3..df8e4933 100644 --- a/docs/en/datasets/detect/xview.md +++ b/docs/en/datasets/detect/xview.md @@ -6,7 +6,7 @@ keywords: xView dataset, overhead imagery, satellite images, object detection, h # xView Dataset -The [xView](http://xviewdataset.org/) dataset is one of the largest publicly available datasets of overhead imagery, containing images from complex scenes around the world annotated using bounding boxes. The goal of the xView dataset is to accelerate progress in four computer vision frontiers: +The [xView](http://xviewdataset.org/) dataset is one of the largest publicly available datasets of overhead imagery, containing images from complex scenes around the world annotated using bounding boxes. The goal of the xView dataset is to accelerate progress in four [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) frontiers: 1. Reduce minimum resolution for detection. 2. Improve learning efficiency. @@ -19,8 +19,8 @@ xView builds on the success of challenges like Common Objects in Context (COCO) - xView contains over 1 million object instances across 60 classes. - The dataset has a resolution of 0.3 meters, providing higher resolution imagery than most public satellite imagery datasets. -- xView features a diverse collection of small, rare, fine-grained, and multi-type objects with bounding box annotation. -- Comes with a pre-trained baseline model using the TensorFlow object detection API and an example for PyTorch. +- xView features a diverse collection of small, rare, fine-grained, and multi-type objects with [bounding box](https://www.ultralytics.com/glossary/bounding-box) annotation. +- Comes with a pre-trained baseline model using the TensorFlow object detection API and an example for [PyTorch](https://www.ultralytics.com/glossary/pytorch). ## Dataset Structure @@ -42,7 +42,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a model on the xView dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a model on the xView dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -71,7 +71,7 @@ The xView dataset contains high-resolution satellite images with a diverse set o ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/overhead-imagery-object-detection.avif) -- **Overhead Imagery**: This image demonstrates an example of object detection in overhead imagery, where objects are annotated with bounding boxes. The dataset provides high-resolution satellite images to facilitate the development of models for this task. +- **Overhead Imagery**: This image demonstrates an example of [object detection](https://www.ultralytics.com/glossary/object-detection) in overhead imagery, where objects are annotated with bounding boxes. The dataset provides high-resolution satellite images to facilitate the development of models for this task. The example showcases the variety and complexity of the data in the xView dataset and highlights the importance of high-quality satellite imagery for object detection tasks. @@ -137,11 +137,11 @@ The xView dataset stands out due to its comprehensive set of features: - Over 1 million object instances across 60 distinct classes. - High-resolution imagery at 0.3 meters. - Diverse object types including small, rare, and fine-grained objects, all annotated with bounding boxes. -- Availability of a pre-trained baseline model and examples in TensorFlow and PyTorch. +- Availability of a pre-trained baseline model and examples in [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) and PyTorch. ### What is the dataset structure of xView, and how is it annotated? -The xView dataset comprises high-resolution satellite images collected from WorldView-3 satellites at a 0.3m ground sample distance. It encompasses over 1 million objects across 60 classes in approximately 1,400 km² of imagery. Each object within the dataset is annotated with bounding boxes, making it ideal for training and evaluating deep learning models for object detection in overhead imagery. For a detailed overview, you can look at the dataset structure section [here](#dataset-structure). +The xView dataset comprises high-resolution satellite images collected from WorldView-3 satellites at a 0.3m ground sample distance. It encompasses over 1 million objects across 60 classes in approximately 1,400 km² of imagery. Each object within the dataset is annotated with bounding boxes, making it ideal for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models for object detection in overhead imagery. For a detailed overview, you can look at the dataset structure section [here](#dataset-structure). ### How do I cite the xView dataset in my research? diff --git a/docs/en/datasets/explorer/api.md b/docs/en/datasets/explorer/api.md index 905142ef..6c716c14 100644 --- a/docs/en/datasets/explorer/api.md +++ b/docs/en/datasets/explorer/api.md @@ -50,7 +50,7 @@ dataframe = explorer.get_similar(idx=0) !!! note - Embeddings table for a given dataset and model pair is only created once and reused. These use [LanceDB](https://lancedb.github.io/lancedb/) under the hood, which scales on-disk, so you can create and reuse embeddings for large datasets like COCO without running out of memory. + [Embeddings](https://www.ultralytics.com/glossary/embeddings) table for a given dataset and model pair is only created once and reused. These use [LanceDB](https://lancedb.github.io/lancedb/) under the hood, which scales on-disk, so you can create and reuse embeddings for large datasets like COCO without running out of memory. In case you want to force update the embeddings table, you can pass `force=True` to `create_embeddings_table` method. @@ -339,7 +339,7 @@ Try our GUI Demo based on Explorer API ### What is the Ultralytics Explorer API used for? -The Ultralytics Explorer API is designed for comprehensive dataset exploration. It allows users to filter and search datasets using SQL queries, vector similarity search, and semantic search. This powerful Python API can handle large datasets, making it ideal for various computer vision tasks using Ultralytics models. +The Ultralytics Explorer API is designed for comprehensive dataset exploration. It allows users to filter and search datasets using SQL queries, vector similarity search, and semantic search. This powerful Python API can handle large datasets, making it ideal for various [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks using Ultralytics models. ### How do I install the Ultralytics Explorer API? diff --git a/docs/en/datasets/explorer/dashboard.md b/docs/en/datasets/explorer/dashboard.md index 160d2b7a..3bc3a21e 100644 --- a/docs/en/datasets/explorer/dashboard.md +++ b/docs/en/datasets/explorer/dashboard.md @@ -36,7 +36,7 @@ pip install ultralytics[explorer] ## Vector Semantic Similarity Search -Semantic search is a technique for finding similar images to a given image. It is based on the idea that similar images will have similar embeddings. In the UI, you can select one of more images and search for the images similar to them. This can be useful when you want to find images similar to a given image or a set of images that don't perform as expected. +Semantic search is a technique for finding similar images to a given image. It is based on the idea that similar images will have similar [embeddings](https://www.ultralytics.com/glossary/embeddings). In the UI, you can select one of more images and search for the images similar to them. This can be useful when you want to find images similar to a given image or a set of images that don't perform as expected. For example: In this VOC Exploration dashboard, user selects a couple airplane images like this: @@ -79,7 +79,7 @@ This is a Demo build using the Explorer API. You can use the API to build your o ### What is Ultralytics Explorer GUI and how do I install it? -Ultralytics Explorer GUI is a powerful interface that unlocks advanced data exploration capabilities using the [Ultralytics Explorer API](api.md). It allows you to run semantic/vector similarity search, SQL queries, and natural language queries using the Ask AI feature powered by Large Language Models (LLMs). +Ultralytics Explorer GUI is a powerful interface that unlocks advanced data exploration capabilities using the [Ultralytics Explorer API](api.md). It allows you to run semantic/vector similarity search, SQL queries, and natural language queries using the Ask AI feature powered by [Large Language Models](https://www.ultralytics.com/glossary/large-language-model-llm) (LLMs). To install the Explorer GUI, you can use pip: @@ -91,7 +91,7 @@ Note: To use the Ask AI feature, you'll need to set the OpenAI API key: `yolo se ### How does the semantic search feature in Ultralytics Explorer GUI work? -The semantic search feature in Ultralytics Explorer GUI allows you to find images similar to a given image based on their embeddings. This technique is useful for identifying and exploring images that share visual similarities. To use this feature, select one or more images in the UI and execute a search for similar images. The result will display images that closely resemble the selected ones, facilitating efficient dataset exploration and anomaly detection. +The semantic search feature in Ultralytics Explorer GUI allows you to find images similar to a given image based on their embeddings. This technique is useful for identifying and exploring images that share visual similarities. To use this feature, select one or more images in the UI and execute a search for similar images. The result will display images that closely resemble the selected ones, facilitating efficient dataset exploration and [anomaly detection](https://www.ultralytics.com/glossary/anomaly-detection). Learn more about semantic search and other features by visiting the [Feature Overview](#vector-semantic-similarity-search) section. diff --git a/docs/en/datasets/explorer/index.md b/docs/en/datasets/explorer/index.md index d1092a76..d7e7ab66 100644 --- a/docs/en/datasets/explorer/index.md +++ b/docs/en/datasets/explorer/index.md @@ -44,7 +44,7 @@ Learn more about the Explorer API [here](api.md). ## GUI Explorer Usage -The GUI demo runs in your browser allowing you to create embeddings for your dataset and search for similar images, run SQL queries and perform semantic search. It can be run using the following command: +The GUI demo runs in your browser allowing you to create [embeddings](https://www.ultralytics.com/glossary/embeddings) for your dataset and search for similar images, run SQL queries and perform semantic search. It can be run using the following command: ```bash yolo explorer @@ -63,7 +63,7 @@ yolo explorer ### What is Ultralytics Explorer and how can it help with CV datasets? -Ultralytics Explorer is a powerful tool designed for exploring computer vision (CV) datasets through semantic search, SQL queries, vector similarity search, and even natural language. This versatile tool provides both a GUI and a Python API, allowing users to seamlessly interact with their datasets. By leveraging technologies like LanceDB, Ultralytics Explorer ensures efficient, scalable access to large datasets without excessive memory usage. Whether you're performing detailed dataset analysis or exploring data patterns, Ultralytics Explorer streamlines the entire process. +Ultralytics Explorer is a powerful tool designed for exploring [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) (CV) datasets through semantic search, SQL queries, vector similarity search, and even natural language. This versatile tool provides both a GUI and a Python API, allowing users to seamlessly interact with their datasets. By leveraging technologies like LanceDB, Ultralytics Explorer ensures efficient, scalable access to large datasets without excessive memory usage. Whether you're performing detailed dataset analysis or exploring data patterns, Ultralytics Explorer streamlines the entire process. Learn more about the [Explorer API](api.md). diff --git a/docs/en/datasets/index.md b/docs/en/datasets/index.md index 0a85ce15..19e39530 100644 --- a/docs/en/datasets/index.md +++ b/docs/en/datasets/index.md @@ -6,7 +6,7 @@ keywords: Ultralytics, datasets, computer vision, object detection, instance seg # Datasets Overview -Ultralytics provides support for various datasets to facilitate computer vision tasks such as detection, instance segmentation, pose estimation, classification, and multi-object tracking. Below is a list of the main Ultralytics datasets, followed by a summary of each computer vision task and the respective datasets. +Ultralytics provides support for various datasets to facilitate computer vision tasks such as detection, [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), pose estimation, classification, and multi-object tracking. Below is a list of the main Ultralytics datasets, followed by a summary of each computer vision task and the respective datasets.


@@ -21,7 +21,7 @@ Ultralytics provides support for various datasets to facilitate computer vision ## NEW 🚀 Ultralytics Explorer -Create embeddings for your dataset, search for similar images, run SQL queries, perform semantic search and even search using natural language! You can get started with our GUI app or build your own using the API. Learn more [here](explorer/index.md). +Create [embeddings](https://www.ultralytics.com/glossary/embeddings) for your dataset, search for similar images, run SQL queries, perform semantic search and even search using natural language! You can get started with our GUI app or build your own using the API. Learn more [here](explorer/index.md).

Ultralytics Explorer Screenshot @@ -32,7 +32,7 @@ Create embeddings for your dataset, search for similar images, run SQL queries, ## [Object Detection](detect/index.md) -Bounding box object detection is a computer vision technique that involves detecting and localizing objects in an image by drawing a bounding box around each object. +[Bounding box](https://www.ultralytics.com/glossary/bounding-box) object detection is a computer vision technique that involves detecting and localizing objects in an image by drawing a bounding box around each object. - [Argoverse](detect/argoverse.md): A dataset containing 3D tracking and motion forecasting data from urban environments with rich annotations. - [COCO](detect/coco.md): Common Objects in Context (COCO) is a large-scale object detection, segmentation, and captioning dataset with 80 object categories. @@ -72,7 +72,7 @@ Pose estimation is a technique used to determine the pose of the object relative ## [Classification](classify/index.md) -Image classification is a computer vision task that involves categorizing an image into one or more predefined classes or categories based on its visual content. +[Image classification](https://www.ultralytics.com/glossary/image-classification) is a computer vision task that involves categorizing an image into one or more predefined classes or categories based on its visual content. - [Caltech 101](classify/caltech101.md): A dataset containing images of 101 object categories for image classification tasks. - [Caltech 256](classify/caltech256.md): An extended version of Caltech 101 with 256 object categories and more challenging images. @@ -152,7 +152,7 @@ By following these steps, you can contribute a new dataset that integrates well ## FAQ -### What datasets does Ultralytics support for object detection? +### What datasets does Ultralytics support for [object detection](https://www.ultralytics.com/glossary/object-detection)? Ultralytics supports a wide variety of datasets for object detection, including: @@ -190,7 +190,7 @@ Ultralytics Explorer offers powerful features for dataset analysis, including: Explore the [Ultralytics Explorer](explorer/index.md) for more information and to try the [GUI Demo](explorer/index.md). -### What are the unique features of Ultralytics YOLO models for computer vision? +### What are the unique features of Ultralytics YOLO models for [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv)? Ultralytics YOLO models provide several unique features: diff --git a/docs/en/datasets/obb/dota-v2.md b/docs/en/datasets/obb/dota-v2.md index 66b3ac5f..76024cac 100644 --- a/docs/en/datasets/obb/dota-v2.md +++ b/docs/en/datasets/obb/dota-v2.md @@ -6,7 +6,7 @@ keywords: DOTA dataset, object detection, aerial images, oriented bounding boxes # DOTA Dataset with OBB -[DOTA](https://captain-whu.github.io/DOTA/index.html) stands as a specialized dataset, emphasizing object detection in aerial images. Originating from the DOTA series of datasets, it offers annotated images capturing a diverse array of aerial scenes with Oriented Bounding Boxes (OBB). +[DOTA](https://captain-whu.github.io/DOTA/index.html) stands as a specialized dataset, emphasizing [object detection](https://www.ultralytics.com/glossary/object-detection) in aerial images. Originating from the DOTA series of datasets, it offers annotated images capturing a diverse array of aerial scenes with Oriented Bounding Boxes (OBB). ![DOTA classes visual](https://github.com/ultralytics/docs/releases/download/0/dota-classes-visual.avif) @@ -128,7 +128,7 @@ Having a glance at the dataset illustrates its depth: ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/instances-DOTA.avif) -- **DOTA examples**: This snapshot underlines the complexity of aerial scenes and the significance of Oriented Bounding Box annotations, capturing objects in their natural orientation. +- **DOTA examples**: This snapshot underlines the complexity of aerial scenes and the significance of Oriented [Bounding Box](https://www.ultralytics.com/glossary/bounding-box) annotations, capturing objects in their natural orientation. The dataset's richness offers invaluable insights into object detection challenges exclusive to aerial imagery. diff --git a/docs/en/datasets/obb/dota8.md b/docs/en/datasets/obb/dota8.md index 0188c317..f24ea5bc 100644 --- a/docs/en/datasets/obb/dota8.md +++ b/docs/en/datasets/obb/dota8.md @@ -8,7 +8,7 @@ keywords: DOTA8 dataset, Ultralytics, YOLOv8, object detection, debugging, train ## Introduction -[Ultralytics](https://www.ultralytics.com/) DOTA8 is a small, but versatile oriented object detection dataset composed of the first 8 images of 8 images of the split DOTAv1 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. +[Ultralytics](https://www.ultralytics.com/) DOTA8 is a small, but versatile oriented [object detection](https://www.ultralytics.com/glossary/object-detection) dataset composed of the first 8 images of 8 images of the split DOTAv1 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. This dataset is intended for use with Ultralytics [HUB](https://hub.ultralytics.com/) and [YOLOv8](https://github.com/ultralytics/ultralytics). @@ -24,7 +24,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n-obb model on the DOTA8 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-obb model on the DOTA8 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -121,4 +121,4 @@ Mosaicing combines multiple images into one during training, increasing the vari ### Why should I use Ultralytics YOLOv8 for object detection tasks? -Ultralytics YOLOv8 provides state-of-the-art real-time object detection capabilities, including features like oriented bounding boxes (OBB), instance segmentation, and a highly versatile training pipeline. It's suitable for various applications and offers pretrained models for efficient fine-tuning. Explore further about the advantages and usage in the [Ultralytics YOLOv8 documentation](https://github.com/ultralytics/ultralytics). +Ultralytics YOLOv8 provides state-of-the-art real-time object detection capabilities, including features like oriented bounding boxes (OBB), [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), and a highly versatile training pipeline. It's suitable for various applications and offers pretrained models for efficient fine-tuning. Explore further about the advantages and usage in the [Ultralytics YOLOv8 documentation](https://github.com/ultralytics/ultralytics). diff --git a/docs/en/datasets/obb/index.md b/docs/en/datasets/obb/index.md index 4ca53497..edeffb83 100644 --- a/docs/en/datasets/obb/index.md +++ b/docs/en/datasets/obb/index.md @@ -6,7 +6,7 @@ keywords: Oriented Bounding Box, OBB Datasets, YOLO, Ultralytics, Object Detecti # Oriented Bounding Box (OBB) Datasets Overview -Training a precise object detection model with oriented bounding boxes (OBB) requires a thorough dataset. This guide explains the various OBB dataset formats compatible with Ultralytics YOLO models, offering insights into their structure, application, and methods for format conversions. +Training a precise [object detection](https://www.ultralytics.com/glossary/object-detection) model with oriented bounding boxes (OBB) requires a thorough dataset. This guide explains the various OBB dataset formats compatible with Ultralytics YOLO models, offering insights into their structure, application, and methods for format conversions. ## Supported OBB Dataset Formats @@ -18,7 +18,7 @@ The YOLO OBB format designates bounding boxes by their four corner points with c class_index x1 y1 x2 y2 x3 y3 x4 y4 ``` -Internally, YOLO processes losses and outputs in the `xywhr` format, which represents the bounding box's center point (xy), width, height, and rotation. +Internally, YOLO processes losses and outputs in the `xywhr` format, which represents the [bounding box](https://www.ultralytics.com/glossary/bounding-box)'s center point (xy), width, height, and rotation.

OBB format examples

@@ -129,7 +129,7 @@ Training a YOLOv8 model with OBBs involves ensuring your dataset is in the YOLO yolo obb train data=your_dataset.yaml model=yolov8n-obb.yaml epochs=100 imgsz=640 ``` -This ensures your model leverages the detailed OBB annotations for improved detection accuracy. +This ensures your model leverages the detailed OBB annotations for improved detection [accuracy](https://www.ultralytics.com/glossary/accuracy). ### What datasets are currently supported for OBB training in Ultralytics YOLO models? diff --git a/docs/en/datasets/pose/coco.md b/docs/en/datasets/pose/coco.md index 8addbd96..20042b40 100644 --- a/docs/en/datasets/pose/coco.md +++ b/docs/en/datasets/pose/coco.md @@ -37,7 +37,7 @@ The COCO-Pose dataset is split into three subsets: ## Applications -The COCO-Pose dataset is specifically used for training and evaluating deep learning models in keypoint detection and pose estimation tasks, such as OpenPose. The dataset's large number of annotated images and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners focused on pose estimation. +The COCO-Pose dataset is specifically used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in keypoint detection and pose estimation tasks, such as OpenPose. The dataset's large number of annotated images and standardized evaluation metrics make it an essential resource for [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) researchers and practitioners focused on pose estimation. ## Dataset YAML @@ -51,7 +51,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n-pose model on the COCO-Pose dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-pose model on the COCO-Pose dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -140,7 +140,7 @@ For more details on the training process and available arguments, check the [tra ### What are the different metrics provided by the COCO-Pose dataset for evaluating model performance? -The COCO-Pose dataset provides several standardized evaluation metrics for pose estimation tasks, similar to the original COCO dataset. Key metrics include the Object Keypoint Similarity (OKS), which evaluates the accuracy of predicted keypoints against ground truth annotations. These metrics allow for thorough performance comparisons between different models. For instance, the COCO-Pose pretrained models such as YOLOv8n-pose, YOLOv8s-pose, and others have specific performance metrics listed in the documentation, like mAPpose50-95 and mAPpose50. +The COCO-Pose dataset provides several standardized evaluation metrics for pose estimation tasks, similar to the original COCO dataset. Key metrics include the Object Keypoint Similarity (OKS), which evaluates the [accuracy](https://www.ultralytics.com/glossary/accuracy) of predicted keypoints against ground truth annotations. These metrics allow for thorough performance comparisons between different models. For instance, the COCO-Pose pretrained models such as YOLOv8n-pose, YOLOv8s-pose, and others have specific performance metrics listed in the documentation, like mAPpose50-95 and mAPpose50. ### How is the dataset structured and split for the COCO-Pose dataset? diff --git a/docs/en/datasets/pose/coco8-pose.md b/docs/en/datasets/pose/coco8-pose.md index c5847e11..95157b79 100644 --- a/docs/en/datasets/pose/coco8-pose.md +++ b/docs/en/datasets/pose/coco8-pose.md @@ -8,7 +8,7 @@ keywords: COCO8-Pose, Ultralytics, pose detection dataset, object detection, YOL ## Introduction -[Ultralytics](https://www.ultralytics.com/) COCO8-Pose is a small, but versatile pose detection dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. +[Ultralytics](https://www.ultralytics.com/) COCO8-Pose is a small, but versatile pose detection dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging [object detection](https://www.ultralytics.com/glossary/object-detection) models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. This dataset is intended for use with Ultralytics [HUB](https://hub.ultralytics.com/) and [YOLOv8](https://github.com/ultralytics/ultralytics). @@ -24,7 +24,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -76,7 +76,7 @@ If you use the COCO dataset in your research or development work, please cite th } ``` -We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). +We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). ## FAQ diff --git a/docs/en/datasets/pose/index.md b/docs/en/datasets/pose/index.md index 42884971..9a6b6d93 100644 --- a/docs/en/datasets/pose/index.md +++ b/docs/en/datasets/pose/index.md @@ -34,7 +34,7 @@ Format with Dim = 3 ``` -In this format, `` is the index of the class for the object,` ` are coordinates of bounding box, and ` ... ` are the pixel coordinates of the keypoints. The coordinates are separated by spaces. +In this format, `` is the index of the class for the object,` ` are coordinates of [bounding box](https://www.ultralytics.com/glossary/bounding-box), and ` ... ` are the pixel coordinates of the keypoints. The coordinates are separated by spaces. ### Dataset YAML format @@ -91,7 +91,7 @@ This section outlines the datasets that are compatible with Ultralytics YOLO for ### COCO-Pose -- **Description**: COCO-Pose is a large-scale object detection, segmentation, and pose estimation dataset. It is a subset of the popular COCO dataset and focuses on human pose estimation. COCO-Pose includes multiple keypoints for each human instance. +- **Description**: COCO-Pose is a large-scale [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and pose estimation dataset. It is a subset of the popular COCO dataset and focuses on human pose estimation. COCO-Pose includes multiple keypoints for each human instance. - **Label Format**: Same as Ultralytics YOLO format as described above, with keypoints for human poses. - **Number of Classes**: 1 (Human). - **Keypoints**: 17 keypoints including nose, eyes, ears, shoulders, elbows, wrists, hips, knees, and ankles. diff --git a/docs/en/datasets/pose/tiger-pose.md b/docs/en/datasets/pose/tiger-pose.md index 13f62232..06333b34 100644 --- a/docs/en/datasets/pose/tiger-pose.md +++ b/docs/en/datasets/pose/tiger-pose.md @@ -37,7 +37,7 @@ A YAML (Yet Another Markup Language) file serves as the means to specify the con ## Usage -To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -161,4 +161,4 @@ To perform inference using a YOLOv8 model trained on the Tiger-Pose dataset, you ### What are the benefits of using the Tiger-Pose dataset for pose estimation? -The Tiger-Pose dataset, despite its manageable size of 210 images for training, provides a diverse collection of images that are ideal for testing pose estimation pipelines. The dataset helps identify potential errors and acts as a preliminary step before working with larger datasets. Additionally, the dataset supports the training and refinement of pose estimation algorithms using advanced tools like [Ultralytics HUB](https://hub.ultralytics.com/) and [YOLOv8](https://github.com/ultralytics/ultralytics), enhancing model performance and accuracy. +The Tiger-Pose dataset, despite its manageable size of 210 images for training, provides a diverse collection of images that are ideal for testing pose estimation pipelines. The dataset helps identify potential errors and acts as a preliminary step before working with larger datasets. Additionally, the dataset supports the training and refinement of pose estimation algorithms using advanced tools like [Ultralytics HUB](https://hub.ultralytics.com/) and [YOLOv8](https://github.com/ultralytics/ultralytics), enhancing model performance and [accuracy](https://www.ultralytics.com/glossary/accuracy). diff --git a/docs/en/datasets/segment/carparts-seg.md b/docs/en/datasets/segment/carparts-seg.md index 6283cae8..b798caca 100644 --- a/docs/en/datasets/segment/carparts-seg.md +++ b/docs/en/datasets/segment/carparts-seg.md @@ -6,7 +6,7 @@ keywords: Carparts Segmentation Dataset, Roboflow, computer vision, automotive A # Roboflow Universe Carparts Segmentation Dataset -The [Roboflow](https://roboflow.com/?ref=ultralytics) [Carparts Segmentation Dataset](https://universe.roboflow.com/gianmarco-russo-vt9xr/car-seg-un1pm?ref=ultralytics) is a curated collection of images and videos designed for computer vision applications, specifically focusing on segmentation tasks related to car parts. This dataset provides a diverse set of visuals captured from multiple perspectives, offering valuable annotated examples for training and testing segmentation models. +The [Roboflow](https://roboflow.com/?ref=ultralytics) [Carparts Segmentation Dataset](https://universe.roboflow.com/gianmarco-russo-vt9xr/car-seg-un1pm?ref=ultralytics) is a curated collection of images and videos designed for [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) applications, specifically focusing on segmentation tasks related to car parts. This dataset provides a diverse set of visuals captured from multiple perspectives, offering valuable annotated examples for training and testing segmentation models. Whether you're working on automotive research, developing AI solutions for vehicle maintenance, or exploring computer vision applications, the Carparts Segmentation Dataset serves as a valuable resource for enhancing accuracy and efficiency in your projects. @@ -18,7 +18,7 @@ Whether you're working on automotive research, developing AI solutions for vehic allowfullscreen>
- Watch: Carparts Instance Segmentation Using Ultralytics HUB + Watch: Carparts [Instance Segmentation](https://www.ultralytics.com/glossary/instance-segmentation) Using Ultralytics HUB

## Dataset Structure @@ -45,7 +45,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train Ultralytics YOLOv8n model on the Carparts Segmentation dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train Ultralytics YOLOv8n model on the Carparts Segmentation dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -156,6 +156,6 @@ The dataset configuration file for the Carparts Segmentation dataset, `carparts- ### Why should I use the Carparts Segmentation Dataset? -The Carparts Segmentation Dataset provides rich, annotated data essential for developing high-accuracy segmentation models in automotive computer vision. This dataset's diversity and detailed annotations improve model training, making it ideal for applications like vehicle maintenance automation, enhancing vehicle safety systems, and supporting autonomous driving technologies. Partnering with a robust dataset accelerates AI development and ensures better model performance. +The Carparts Segmentation Dataset provides rich, annotated data essential for developing high-[accuracy](https://www.ultralytics.com/glossary/accuracy) segmentation models in automotive computer vision. This dataset's diversity and detailed annotations improve model training, making it ideal for applications like vehicle maintenance automation, enhancing vehicle safety systems, and supporting autonomous driving technologies. Partnering with a robust dataset accelerates AI development and ensures better model performance. For more details, visit the [CarParts Segmentation Dataset Page](https://universe.roboflow.com/gianmarco-russo-vt9xr/car-seg-un1pm?ref=ultralytics). diff --git a/docs/en/datasets/segment/coco.md b/docs/en/datasets/segment/coco.md index 5c6b5640..0f403c69 100644 --- a/docs/en/datasets/segment/coco.md +++ b/docs/en/datasets/segment/coco.md @@ -6,7 +6,7 @@ keywords: COCO-Seg, dataset, YOLO models, instance segmentation, object detectio # COCO-Seg Dataset -The [COCO-Seg](https://cocodataset.org/#home) dataset, an extension of the COCO (Common Objects in Context) dataset, is specially designed to aid research in object instance segmentation. It uses the same images as COCO but introduces more detailed segmentation annotations. This dataset is a crucial resource for researchers and developers working on instance segmentation tasks, especially for training YOLO models. +The [COCO-Seg](https://cocodataset.org/#home) dataset, an extension of the COCO (Common Objects in Context) dataset, is specially designed to aid research in object [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation). It uses the same images as COCO but introduces more detailed segmentation annotations. This dataset is a crucial resource for researchers and developers working on instance segmentation tasks, especially for training YOLO models. ## COCO-Seg Pretrained Models @@ -23,7 +23,7 @@ The [COCO-Seg](https://cocodataset.org/#home) dataset, an extension of the COCO - COCO-Seg retains the original 330K images from COCO. - The dataset consists of the same 80 object categories found in the original COCO dataset. - Annotations now include more detailed instance segmentation masks for each object in the images. -- COCO-Seg provides standardized evaluation metrics like mean Average Precision (mAP) for object detection, and mean Average Recall (mAR) for instance segmentation tasks, enabling effective comparison of model performance. +- COCO-Seg provides standardized evaluation metrics like [mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) for object detection, and mean Average [Recall](https://www.ultralytics.com/glossary/recall) (mAR) for instance segmentation tasks, enabling effective comparison of model performance. ## Dataset Structure @@ -35,7 +35,7 @@ The COCO-Seg dataset is partitioned into three subsets: ## Applications -COCO-Seg is widely used for training and evaluating deep learning models in instance segmentation, such as the YOLO models. The large number of annotated images, the diversity of object categories, and the standardized evaluation metrics make it an indispensable resource for computer vision researchers and practitioners. +COCO-Seg is widely used for training and evaluating [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models in instance segmentation, such as the YOLO models. The large number of annotated images, the diversity of object categories, and the standardized evaluation metrics make it an indispensable resource for computer vision researchers and practitioners. ## Dataset YAML @@ -49,7 +49,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n-seg model on the COCO-Seg dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-seg model on the COCO-Seg dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -101,7 +101,7 @@ If you use the COCO-Seg dataset in your research or development work, please cit } ``` -We extend our thanks to the COCO Consortium for creating and maintaining this invaluable resource for the computer vision community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). +We extend our thanks to the COCO Consortium for creating and maintaining this invaluable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). ## FAQ @@ -141,7 +141,7 @@ The COCO-Seg dataset includes several key features: - Retains the original 330K images from the COCO dataset. - Annotates the same 80 object categories found in the original COCO. - Provides more detailed instance segmentation masks for each object. -- Uses standardized evaluation metrics such as mean Average Precision (mAP) for object detection and mean Average Recall (mAR) for instance segmentation tasks. +- Uses standardized evaluation metrics such as mean Average [Precision](https://www.ultralytics.com/glossary/precision) (mAP) for [object detection](https://www.ultralytics.com/glossary/object-detection) and mean Average Recall (mAR) for instance segmentation tasks. ### What pretrained models are available for COCO-Seg, and what are their performance metrics? diff --git a/docs/en/datasets/segment/coco8-seg.md b/docs/en/datasets/segment/coco8-seg.md index 50a7f41a..21abf3d8 100644 --- a/docs/en/datasets/segment/coco8-seg.md +++ b/docs/en/datasets/segment/coco8-seg.md @@ -8,7 +8,7 @@ keywords: COCO8-Seg, Ultralytics, segmentation dataset, YOLOv8, COCO 2017, model ## Introduction -[Ultralytics](https://www.ultralytics.com/) COCO8-Seg is a small, but versatile instance segmentation dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging segmentation models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. +[Ultralytics](https://www.ultralytics.com/) COCO8-Seg is a small, but versatile [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) dataset composed of the first 8 images of the COCO train 2017 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging segmentation models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. This dataset is intended for use with Ultralytics [HUB](https://hub.ultralytics.com/) and [YOLOv8](https://github.com/ultralytics/ultralytics). @@ -24,7 +24,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train a YOLOv8n-seg model on the COCO8-Seg dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train a YOLOv8n-seg model on the COCO8-Seg dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -76,7 +76,7 @@ If you use the COCO dataset in your research or development work, please cite th } ``` -We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). +We would like to acknowledge the COCO Consortium for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the COCO dataset and its creators, visit the [COCO dataset website](https://cocodataset.org/#home). ## FAQ @@ -121,4 +121,4 @@ The YAML configuration file for the **COCO8-Seg dataset** is available in the Ul ### What are some benefits of using mosaicing during training with the COCO8-Seg dataset? -Using **mosaicing** during training helps increase the diversity and variety of objects and scenes in each training batch. This technique combines multiple images into a single composite image, enhancing the model's ability to generalize to different object sizes, aspect ratios, and contexts within the scene. Mosaicing is beneficial for improving a model's robustness and accuracy, especially when working with small datasets like COCO8-Seg. For an example of mosaiced images, see the [Sample Images and Annotations](#sample-images-and-annotations) section. +Using **mosaicing** during training helps increase the diversity and variety of objects and scenes in each training batch. This technique combines multiple images into a single composite image, enhancing the model's ability to generalize to different object sizes, aspect ratios, and contexts within the scene. Mosaicing is beneficial for improving a model's robustness and [accuracy](https://www.ultralytics.com/glossary/accuracy), especially when working with small datasets like COCO8-Seg. For an example of mosaiced images, see the [Sample Images and Annotations](#sample-images-and-annotations) section. diff --git a/docs/en/datasets/segment/crack-seg.md b/docs/en/datasets/segment/crack-seg.md index ed66d7cf..f5ffbe92 100644 --- a/docs/en/datasets/segment/crack-seg.md +++ b/docs/en/datasets/segment/crack-seg.md @@ -6,9 +6,9 @@ keywords: Roboflow, Crack Segmentation Dataset, Ultralytics, transportation safe # Roboflow Universe Crack Segmentation Dataset -The [Roboflow](https://roboflow.com/?ref=ultralytics) [Crack Segmentation Dataset](https://universe.roboflow.com/university-bswxt/crack-bphdr?ref=ultralytics) stands out as an extensive resource designed specifically for individuals involved in transportation and public safety studies. It is equally beneficial for those working on the development of self-driving car models or simply exploring computer vision applications for recreational purposes. +The [Roboflow](https://roboflow.com/?ref=ultralytics) [Crack Segmentation Dataset](https://universe.roboflow.com/university-bswxt/crack-bphdr?ref=ultralytics) stands out as an extensive resource designed specifically for individuals involved in transportation and public safety studies. It is equally beneficial for those working on the development of self-driving car models or simply exploring [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) applications for recreational purposes. -Comprising a total of 4029 static images captured from diverse road and wall scenarios, this dataset emerges as a valuable asset for tasks related to crack segmentation. Whether you are delving into the intricacies of transportation research or seeking to enhance the accuracy of your self-driving car models, this dataset provides a rich and varied collection of images to support your endeavors. +Comprising a total of 4029 static images captured from diverse road and wall scenarios, this dataset emerges as a valuable asset for tasks related to crack segmentation. Whether you are delving into the intricacies of transportation research or seeking to enhance the [accuracy](https://www.ultralytics.com/glossary/accuracy) of your self-driving car models, this dataset provides a rich and varied collection of images to support your endeavors. ## Dataset Structure @@ -34,7 +34,7 @@ A YAML (Yet Another Markup Language) file is employed to outline the configurati ## Usage -To train Ultralytics YOLOv8n model on the Crack Segmentation dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train Ultralytics YOLOv8n model on the Crack Segmentation dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -129,7 +129,7 @@ The Crack Segmentation Dataset is exceptionally suited for self-driving car proj ### What unique features does Ultralytics YOLO offer for crack segmentation? -Ultralytics YOLO offers advanced real-time object detection, segmentation, and classification capabilities that make it ideal for crack segmentation tasks. Its ability to handle large datasets and complex scenarios ensures high accuracy and efficiency. For example, the model [Training](../../modes/train.md), [Predict](../../modes/predict.md), and [Export](../../modes/export.md) modes cover comprehensive functionalities from training to deployment. +Ultralytics YOLO offers advanced real-time [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification capabilities that make it ideal for crack segmentation tasks. Its ability to handle large datasets and complex scenarios ensures high accuracy and efficiency. For example, the model [Training](../../modes/train.md), [Predict](../../modes/predict.md), and [Export](../../modes/export.md) modes cover comprehensive functionalities from training to deployment. ### How do I cite the Roboflow Crack Segmentation Dataset in my research paper? diff --git a/docs/en/datasets/segment/index.md b/docs/en/datasets/segment/index.md index 4d39fc12..52b19781 100644 --- a/docs/en/datasets/segment/index.md +++ b/docs/en/datasets/segment/index.md @@ -91,9 +91,9 @@ The `train` and `val` fields specify the paths to the directories containing the ## Supported Datasets -- [COCO](coco.md): A comprehensive dataset for object detection, segmentation, and captioning, featuring over 200K labeled images across a wide range of categories. +- [COCO](coco.md): A comprehensive dataset for [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and captioning, featuring over 200K labeled images across a wide range of categories. - [COCO8-seg](coco8-seg.md): A compact, 8-image subset of COCO designed for quick testing of segmentation model training, ideal for CI checks and workflow validation in the `ultralytics` repository. -- [COCO128-seg](coco.md): A smaller dataset for instance segmentation tasks, containing a subset of 128 COCO images with segmentation annotations. +- [COCO128-seg](coco.md): A smaller dataset for [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) tasks, containing a subset of 128 COCO images with segmentation annotations. - [Carparts-seg](carparts-seg.md): A specialized dataset focused on the segmentation of car parts, ideal for automotive applications. It includes a variety of vehicles with detailed annotations of individual car components. - [Crack-seg](crack-seg.md): A dataset tailored for the segmentation of cracks in various surfaces. Essential for infrastructure maintenance and quality control, it provides detailed imagery for training models to identify structural weaknesses. - [Package-seg](package-seg.md): A dataset dedicated to the segmentation of different types of packaging materials and shapes. It's particularly useful for logistics and warehouse automation, aiding in the development of systems for package handling and sorting. diff --git a/docs/en/datasets/segment/package-seg.md b/docs/en/datasets/segment/package-seg.md index db5f62be..477072fb 100644 --- a/docs/en/datasets/segment/package-seg.md +++ b/docs/en/datasets/segment/package-seg.md @@ -6,7 +6,7 @@ keywords: Roboflow, Package Segmentation Dataset, computer vision, package ident # Roboflow Universe Package Segmentation Dataset -The [Roboflow](https://roboflow.com/?ref=ultralytics) [Package Segmentation Dataset](https://universe.roboflow.com/factorypackage/factory_package?ref=ultralytics) is a curated collection of images specifically tailored for tasks related to package segmentation in the field of computer vision. This dataset is designed to assist researchers, developers, and enthusiasts working on projects related to package identification, sorting, and handling. +The [Roboflow](https://roboflow.com/?ref=ultralytics) [Package Segmentation Dataset](https://universe.roboflow.com/factorypackage/factory_package?ref=ultralytics) is a curated collection of images specifically tailored for tasks related to package segmentation in the field of [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). This dataset is designed to assist researchers, developers, and enthusiasts working on projects related to package identification, sorting, and handling. Containing a diverse set of images showcasing various packages in different contexts and environments, the dataset serves as a valuable resource for training and evaluating segmentation models. Whether you are engaged in logistics, warehouse automation, or any application requiring precise package analysis, the Package Segmentation Dataset provides a targeted and comprehensive set of images to enhance the performance of your computer vision algorithms. @@ -34,7 +34,7 @@ A YAML (Yet Another Markup Language) file is used to define the dataset configur ## Usage -To train Ultralytics YOLOv8n model on the Package Segmentation dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. +To train Ultralytics YOLOv8n model on the Package Segmentation dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. !!! example "Train Example" @@ -63,7 +63,7 @@ The Package Segmentation dataset comprises a varied collection of images and vid ![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/dataset-sample-image-1.avif) -- This image displays an instance of image object detection, featuring annotated bounding boxes with masks outlining recognized objects. The dataset incorporates a diverse collection of images taken in different locations, environments, and densities. It serves as a comprehensive resource for developing models specific to this task. +- This image displays an instance of image [object detection](https://www.ultralytics.com/glossary/object-detection), featuring annotated bounding boxes with masks outlining recognized objects. The dataset incorporates a diverse collection of images taken in different locations, environments, and densities. It serves as a comprehensive resource for developing models specific to this task. - The example emphasizes the diversity and complexity present in the VisDrone dataset, underscoring the significance of high-quality sensor data for computer vision tasks involving drones. ## Citations and Acknowledgments @@ -136,7 +136,7 @@ This structure ensures a balanced dataset for thorough model training, validatio ### Why should I use Ultralytics YOLOv8 with the Package Segmentation Dataset? -Ultralytics YOLOv8 provides state-of-the-art accuracy and speed for real-time object detection and segmentation tasks. Using it with the Package Segmentation Dataset allows you to leverage YOLOv8's capabilities for precise package segmentation. This combination is especially beneficial for industries like logistics and warehouse automation, where accurate package identification is critical. For more information, check out our [page on YOLOv8 segmentation](https://docs.ultralytics.com/models/yolov8/). +Ultralytics YOLOv8 provides state-of-the-art [accuracy](https://www.ultralytics.com/glossary/accuracy) and speed for real-time object detection and segmentation tasks. Using it with the Package Segmentation Dataset allows you to leverage YOLOv8's capabilities for precise package segmentation. This combination is especially beneficial for industries like logistics and warehouse automation, where accurate package identification is critical. For more information, check out our [page on YOLOv8 segmentation](https://docs.ultralytics.com/models/yolov8/). ### How can I access and use the package-seg.yaml file for the Package Segmentation Dataset? diff --git a/docs/en/datasets/track/index.md b/docs/en/datasets/track/index.md index a2e5c131..f9a8b4f8 100644 --- a/docs/en/datasets/track/index.md +++ b/docs/en/datasets/track/index.md @@ -52,7 +52,7 @@ To use Multi-Object Tracking with Ultralytics YOLO, you can start by using the P yolo track model=yolov8n.pt source="https://youtu.be/LNwODJXcvt4" conf=0.3 iou=0.5 show ``` -These commands load the YOLOv8 model and use it for tracking objects in the given video source with specific confidence (`conf`) and Intersection over Union (`iou`) thresholds. For more details, refer to the [track mode documentation](../../modes/track.md). +These commands load the YOLOv8 model and use it for tracking objects in the given video source with specific confidence (`conf`) and [Intersection over Union](https://www.ultralytics.com/glossary/intersection-over-union-iou) (`iou`) thresholds. For more details, refer to the [track mode documentation](../../modes/track.md). ### What are the upcoming features for training trackers in Ultralytics? @@ -60,7 +60,7 @@ Ultralytics is continuously enhancing its AI models. An upcoming feature will en ### Why should I use Ultralytics YOLO for multi-object tracking? -Ultralytics YOLO is a state-of-the-art object detection model known for its real-time performance and high accuracy. Using YOLO for multi-object tracking provides several advantages: +Ultralytics YOLO is a state-of-the-art [object detection](https://www.ultralytics.com/glossary/object-detection) model known for its real-time performance and high [accuracy](https://www.ultralytics.com/glossary/accuracy). Using YOLO for multi-object tracking provides several advantages: - **Real-time tracking:** Achieve efficient and high-speed tracking ideal for dynamic environments. - **Flexibility with pre-trained models:** No need to train from scratch; simply use pre-trained detection, segmentation, or Pose models. diff --git a/docs/en/guides/analytics.md b/docs/en/guides/analytics.md index 8da149d3..7519f032 100644 --- a/docs/en/guides/analytics.md +++ b/docs/en/guides/analytics.md @@ -8,7 +8,7 @@ keywords: Ultralytics, YOLOv8, data visualization, line graphs, bar plots, pie c ## Introduction -This guide provides a comprehensive overview of three fundamental types of data visualizations: line graphs, bar plots, and pie charts. Each section includes step-by-step instructions and code snippets on how to create these visualizations using Python. +This guide provides a comprehensive overview of three fundamental types of [data visualizations](https://www.ultralytics.com/glossary/data-visualization): line graphs, bar plots, and pie charts. Each section includes step-by-step instructions and code snippets on how to create these visualizations using Python. ### Visual Samples @@ -361,7 +361,7 @@ For further details on configuring the `Analytics` class, visit the [Analytics u Using Ultralytics YOLOv8 for creating bar plots offers several benefits: -1. **Real-time Data Visualization**: Seamlessly integrate object detection results into bar plots for dynamic updates. +1. **Real-time Data Visualization**: Seamlessly integrate [object detection](https://www.ultralytics.com/glossary/object-detection) results into bar plots for dynamic updates. 2. **Ease of Use**: Simple API and functions make it straightforward to implement and visualize data. 3. **Customization**: Customize titles, labels, colors, and more to fit your specific requirements. 4. **Efficiency**: Efficiently handle large amounts of data and update plots in real-time during video processing. @@ -472,11 +472,11 @@ cv2.destroyAllWindows() To learn about the complete functionality, see the [Tracking](../modes/track.md) section. -### What makes Ultralytics YOLOv8 different from other object detection solutions like OpenCV and TensorFlow? +### What makes Ultralytics YOLOv8 different from other object detection solutions like [OpenCV](https://www.ultralytics.com/glossary/opencv) and [TensorFlow](https://www.ultralytics.com/glossary/tensorflow)? Ultralytics YOLOv8 stands out from other object detection solutions like OpenCV and TensorFlow for multiple reasons: -1. **State-of-the-art Accuracy**: YOLOv8 provides superior accuracy in object detection, segmentation, and classification tasks. +1. **State-of-the-art [Accuracy](https://www.ultralytics.com/glossary/accuracy)**: YOLOv8 provides superior accuracy in object detection, segmentation, and classification tasks. 2. **Ease of Use**: User-friendly API allows for quick implementation and integration without extensive coding. 3. **Real-time Performance**: Optimized for high-speed inference, suitable for real-time applications. 4. **Diverse Applications**: Supports various tasks including multi-object tracking, custom model training, and exporting to different formats like ONNX, TensorRT, and CoreML. diff --git a/docs/en/guides/azureml-quickstart.md b/docs/en/guides/azureml-quickstart.md index 92e3d837..a769eee1 100644 --- a/docs/en/guides/azureml-quickstart.md +++ b/docs/en/guides/azureml-quickstart.md @@ -8,7 +8,7 @@ keywords: YOLOv8, AzureML, machine learning, cloud computing, quickstart, termin ## What is Azure? -[Azure](https://azure.microsoft.com/) is Microsoft's cloud computing platform, designed to help organizations move their workloads to the cloud from on-premises data centers. With the full spectrum of cloud services including those for computing, databases, analytics, machine learning, and networking, users can pick and choose from these services to develop and scale new applications, or run existing applications, in the public cloud. +[Azure](https://azure.microsoft.com/) is Microsoft's [cloud computing](https://www.ultralytics.com/glossary/cloud-computing) platform, designed to help organizations move their workloads to the cloud from on-premises data centers. With the full spectrum of cloud services including those for computing, databases, analytics, [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml), and networking, users can pick and choose from these services to develop and scale new applications, or run existing applications, in the public cloud. ## What is Azure Machine Learning (AzureML)? @@ -71,7 +71,7 @@ Predict: yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' ``` -Train a detection model for 10 epochs with an initial learning_rate of 0.01: +Train a detection model for 10 [epochs](https://www.ultralytics.com/glossary/epoch) with an initial learning_rate of 0.01: ```bash yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 @@ -216,12 +216,12 @@ Yes, AzureML allows you to use both the Ultralytics CLI and the Python interface Refer to the quickstart guides for more detailed instructions [here](../quickstart.md#use-ultralytics-with-cli) and [here](../quickstart.md#use-ultralytics-with-python). -### What is the advantage of using Ultralytics YOLOv8 over other object detection models? +### What is the advantage of using Ultralytics YOLOv8 over other [object detection](https://www.ultralytics.com/glossary/object-detection) models? Ultralytics YOLOv8 offers several unique advantages over competing object detection models: - **Speed**: Faster inference and training times compared to models like Faster R-CNN and SSD. -- **Accuracy**: High accuracy in detection tasks with features like anchor-free design and enhanced augmentation strategies. +- **[Accuracy](https://www.ultralytics.com/glossary/accuracy)**: High accuracy in detection tasks with features like anchor-free design and enhanced augmentation strategies. - **Ease of Use**: Intuitive API and CLI for quick setup, making it accessible both to beginners and experts. To explore more about YOLOv8's features, visit the [Ultralytics YOLO](https://www.ultralytics.com/yolo) page for detailed insights. diff --git a/docs/en/guides/conda-quickstart.md b/docs/en/guides/conda-quickstart.md index 7afb202b..6b523392 100644 --- a/docs/en/guides/conda-quickstart.md +++ b/docs/en/guides/conda-quickstart.md @@ -10,7 +10,7 @@ keywords: Ultralytics, Conda, setup, installation, environment, guide, machine l Ultralytics Conda Package Visual

-This guide provides a comprehensive introduction to setting up a Conda environment for your Ultralytics projects. Conda is an open-source package and environment management system that offers an excellent alternative to pip for installing packages and dependencies. Its isolated environments make it particularly well-suited for data science and machine learning endeavors. For more details, visit the Ultralytics Conda package on [Anaconda](https://anaconda.org/conda-forge/ultralytics) and check out the Ultralytics feedstock repository for package updates on [GitHub](https://github.com/conda-forge/ultralytics-feedstock/). +This guide provides a comprehensive introduction to setting up a Conda environment for your Ultralytics projects. Conda is an open-source package and environment management system that offers an excellent alternative to pip for installing packages and dependencies. Its isolated environments make it particularly well-suited for data science and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) endeavors. For more details, visit the Ultralytics Conda package on [Anaconda](https://anaconda.org/conda-forge/ultralytics) and check out the Ultralytics feedstock repository for package updates on [GitHub](https://github.com/conda-forge/ultralytics-feedstock/). [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ultralytics?logo=condaforge)](https://anaconda.org/conda-forge/ultralytics) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/ultralytics.svg)](https://anaconda.org/conda-forge/ultralytics) @@ -68,7 +68,7 @@ conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cu ## Using Ultralytics -With Ultralytics installed, you can now start using its robust features for object detection, instance segmentation, and more. For example, to predict an image, you can run: +With Ultralytics installed, you can now start using its robust features for [object detection](https://www.ultralytics.com/glossary/object-detection), [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), and more. For example, to predict an image, you can run: ```python from ultralytics import YOLO @@ -162,7 +162,7 @@ Yes, you can enhance performance by utilizing a CUDA-enabled environment. Ensure conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics ``` -This setup enables GPU acceleration, crucial for intensive tasks like deep learning model training and inference. For more information, visit the [Ultralytics installation guide](../quickstart.md). +This setup enables GPU acceleration, crucial for intensive tasks like [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) model training and inference. For more information, visit the [Ultralytics installation guide](../quickstart.md). ### What are the benefits of using Ultralytics Docker images with a Conda environment? diff --git a/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md b/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md index 8f8f0767..db61c081 100644 --- a/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md +++ b/docs/en/guides/coral-edge-tpu-on-raspberry-pi.md @@ -12,7 +12,7 @@ keywords: Coral Edge TPU, Raspberry Pi, YOLOv8, Ultralytics, TensorFlow Lite, ML ## What is a Coral Edge TPU? -The Coral Edge TPU is a compact device that adds an Edge TPU coprocessor to your system. It enables low-power, high-performance ML inference for TensorFlow Lite models. Read more at the [Coral Edge TPU home page](https://coral.ai/products/accelerator). +The Coral Edge TPU is a compact device that adds an Edge TPU coprocessor to your system. It enables low-power, high-performance ML inference for [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) Lite models. Read more at the [Coral Edge TPU home page](https://coral.ai/products/accelerator).


@@ -38,7 +38,7 @@ The [existing guide](https://coral.ai/docs/accelerator/get-started/) by Coral on - [Raspberry Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) (2GB or more recommended) or [Raspberry Pi 5](https://www.raspberrypi.com/products/raspberry-pi-5/) (Recommended) - [Raspberry Pi OS](https://www.raspberrypi.com/software/) Bullseye/Bookworm (64-bit) with desktop (Recommended) - [Coral USB Accelerator](https://coral.ai/products/accelerator/) -- A non-ARM based platform for exporting an Ultralytics PyTorch model +- A non-ARM based platform for exporting an Ultralytics [PyTorch](https://www.ultralytics.com/glossary/pytorch) model ## Installation Walkthrough @@ -154,7 +154,7 @@ Find comprehensive information on the [Predict](../modes/predict.md) page for fu ### What is a Coral Edge TPU and how does it enhance Raspberry Pi's performance with Ultralytics YOLOv8? -The Coral Edge TPU is a compact device designed to add an Edge TPU coprocessor to your system. This coprocessor enables low-power, high-performance machine learning inference, particularly optimized for TensorFlow Lite models. When using a Raspberry Pi, the Edge TPU accelerates ML model inference, significantly boosting performance, especially for Ultralytics YOLOv8 models. You can read more about the Coral Edge TPU on their [home page](https://coral.ai/products/accelerator). +The Coral Edge TPU is a compact device designed to add an Edge TPU coprocessor to your system. This coprocessor enables low-power, high-performance [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) inference, particularly optimized for TensorFlow Lite models. When using a Raspberry Pi, the Edge TPU accelerates ML model inference, significantly boosting performance, especially for Ultralytics YOLOv8 models. You can read more about the Coral Edge TPU on their [home page](https://coral.ai/products/accelerator). ### How do I install the Coral Edge TPU runtime on a Raspberry Pi? diff --git a/docs/en/guides/data-collection-and-annotation.md b/docs/en/guides/data-collection-and-annotation.md index 7939d12a..6ca20526 100644 --- a/docs/en/guides/data-collection-and-annotation.md +++ b/docs/en/guides/data-collection-and-annotation.md @@ -35,7 +35,7 @@ You can use public datasets or gather your own custom data. Public datasets like Custom data collection, on the other hand, allows you to customize your dataset to your specific needs. You might capture images and videos with cameras or drones, scrape the web for images, or use existing internal data from your organization. Custom data gives you more control over its quality and relevance. Combining both public and custom data sources helps create a diverse and comprehensive dataset. -### Avoiding Bias in Data Collection +### Avoiding [Bias in](https://www.ultralytics.com/glossary/bias-in-ai) Data Collection Bias occurs when certain groups or scenarios are underrepresented or overrepresented in your dataset. It leads to a model that performs well on some data but poorly on others. It's crucial to avoid bias so that your computer vision model can perform well in a variety of scenarios. @@ -44,20 +44,20 @@ Here is how you can avoid bias while collecting data: - **Diverse Sources**: Collect data from many sources to capture different perspectives and scenarios. - **Balanced Representation**: Include balanced representation from all relevant groups. For example, consider different ages, genders, and ethnicities. - **Continuous Monitoring**: Regularly review and update your dataset to identify and address any emerging biases. -- **Bias Mitigation Techniques**: Use methods like oversampling underrepresented classes, data augmentation, and fairness-aware algorithms. +- **Bias Mitigation Techniques**: Use methods like oversampling underrepresented classes, [data augmentation](https://www.ultralytics.com/glossary/data-augmentation), and fairness-aware algorithms. Following these practices helps create a more robust and fair model that can generalize well in real-world applications. ## What is Data Annotation? -Data annotation is the process of labeling data to make it usable for training machine learning models. In computer vision, this means labeling images or videos with the information that a model needs to learn from. Without properly annotated data, models cannot accurately learn the relationships between inputs and outputs. +Data annotation is the process of labeling data to make it usable for training [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models. In computer vision, this means labeling images or videos with the information that a model needs to learn from. Without properly annotated data, models cannot accurately learn the relationships between inputs and outputs. ### Types of Data Annotation Depending on the specific requirements of a [computer vision task](../tasks/index.md), there are different types of data annotation. Here are some examples: - **Bounding Boxes**: Rectangular boxes drawn around objects in an image, used primarily for object detection tasks. These boxes are defined by their top-left and bottom-right coordinates. -- **Polygons**: Detailed outlines for objects, allowing for more precise annotation than bounding boxes. Polygons are used in tasks like instance segmentation, where the shape of the object is important. +- **Polygons**: Detailed outlines for objects, allowing for more precise annotation than bounding boxes. Polygons are used in tasks like [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), where the shape of the object is important. - **Masks**: Binary masks where each pixel is either part of an object or the background. Masks are used in semantic segmentation tasks to provide pixel-level detail. - **Keypoints**: Specific points marked within an image to identify locations of interest. Keypoints are used in tasks like pose estimation and facial landmark detection. @@ -69,11 +69,11 @@ Depending on the specific requirements of a [computer vision task](../tasks/inde After selecting a type of annotation, it's important to choose the appropriate format for storing and sharing annotations. -Commonly used formats include [COCO](../datasets/detect/coco.md), which supports various annotation types like object detection, keypoint detection, stuff segmentation, panoptic segmentation, and image captioning, stored in JSON. [Pascal VOC](../datasets/detect/voc.md) uses XML files and is popular for object detection tasks. YOLO, on the other hand, creates a .txt file for each image, containing annotations like object class, coordinates, height, and width, making it suitable for object detection. +Commonly used formats include [COCO](../datasets/detect/coco.md), which supports various annotation types like [object detection](https://www.ultralytics.com/glossary/object-detection), keypoint detection, stuff segmentation, [panoptic segmentation](https://www.ultralytics.com/glossary/panoptic-segmentation), and image captioning, stored in JSON. [Pascal VOC](../datasets/detect/voc.md) uses XML files and is popular for object detection tasks. YOLO, on the other hand, creates a .txt file for each image, containing annotations like object class, coordinates, height, and width, making it suitable for object detection. ### Techniques of Annotation -Now, assuming you've chosen a type of annotation and format, it's time to establish clear and objective labeling rules. These rules are like a roadmap for consistency and accuracy throughout the annotation process. Key aspects of these rules include: +Now, assuming you've chosen a type of annotation and format, it's time to establish clear and objective labeling rules. These rules are like a roadmap for consistency and [accuracy](https://www.ultralytics.com/glossary/accuracy) throughout the annotation process. Key aspects of these rules include: - **Clarity and Detail**: Make sure your instructions are clear. Use examples and illustrations to understand what's expected. - **Consistency**: Keep your annotations uniform. Set standard criteria for annotating different types of data, so all annotations follow the same rules. @@ -98,11 +98,11 @@ These open-source tools are budget-friendly and provide a range of features to m ### Some More Things to Consider Before Annotating Data -Before you dive into annotating your data, there are a few more things to keep in mind. You should be aware of accuracy, precision, outliers, and quality control to avoid labeling your data in a counterproductive manner. +Before you dive into annotating your data, there are a few more things to keep in mind. You should be aware of accuracy, [precision](https://www.ultralytics.com/glossary/precision), outliers, and quality control to avoid labeling your data in a counterproductive manner. #### Understanding Accuracy and Precision -It's important to understand the difference between accuracy and precision and how it relates to annotation. Accuracy refers to how close the annotated data is to the true values. It helps us measure how closely the labels reflect real-world scenarios. Precision indicates the consistency of annotations. It checks if you are giving the same label to the same object or feature throughout the dataset. High accuracy and precision lead to better-trained models by reducing noise and improving the model's ability to generalize from the training data. +It's important to understand the difference between accuracy and precision and how it relates to annotation. Accuracy refers to how close the annotated data is to the true values. It helps us measure how closely the labels reflect real-world scenarios. Precision indicates the consistency of annotations. It checks if you are giving the same label to the same object or feature throughout the dataset. High accuracy and precision lead to better-trained models by reducing noise and improving the model's ability to generalize from the [training data](https://www.ultralytics.com/glossary/training-data).

Example of Precision @@ -114,9 +114,9 @@ Outliers are data points that deviate quite a bit from other observations in the You can use various methods to detect and correct outliers: -- **Statistical Techniques**: To detect outliers in numerical features like pixel values, bounding box coordinates, or object sizes, you can use methods such as box plots, histograms, or z-scores. +- **Statistical Techniques**: To detect outliers in numerical features like pixel values, [bounding box](https://www.ultralytics.com/glossary/bounding-box) coordinates, or object sizes, you can use methods such as box plots, histograms, or z-scores. - **Visual Techniques**: To spot anomalies in categorical features like object classes, colors, or shapes, use visual methods like plotting images, labels, or heat maps. -- **Algorithmic Methods**: Use tools like clustering (e.g., K-means clustering, DBSCAN) and anomaly detection algorithms to identify outliers based on data distribution patterns. +- **Algorithmic Methods**: Use tools like clustering (e.g., K-means clustering, DBSCAN) and [anomaly detection](https://www.ultralytics.com/glossary/anomaly-detection) algorithms to identify outliers based on data distribution patterns. #### Quality Control of Annotated Data @@ -132,7 +132,7 @@ While reviewing, if you find errors, correct them and update the guidelines to a ## Share Your Thoughts with the Community -Bouncing your ideas and queries off other computer vision enthusiasts can help accelerate your projects. Here are some great ways to learn, troubleshoot, and network: +Bouncing your ideas and queries off other [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) enthusiasts can help accelerate your projects. Here are some great ways to learn, troubleshoot, and network: ### Where to Find Help and Support @@ -159,7 +159,7 @@ Ensuring high consistency and accuracy in data annotation involves establishing ### How many images do I need for training Ultralytics YOLO models? -For effective transfer learning and object detection with Ultralytics YOLO models, start with a minimum of a few hundred annotated objects per class. If training for just one class, begin with at least 100 annotated images and train for approximately 100 epochs. More complex tasks might require thousands of images per class to achieve high reliability and performance. Quality annotations are crucial, so ensure your data collection and annotation processes are rigorous and aligned with your project's specific goals. Explore detailed training strategies in the [YOLOv8 training guide](../modes/train.md). +For effective [transfer learning](https://www.ultralytics.com/glossary/transfer-learning) and object detection with Ultralytics YOLO models, start with a minimum of a few hundred annotated objects per class. If training for just one class, begin with at least 100 annotated images and train for approximately 100 [epochs](https://www.ultralytics.com/glossary/epoch). More complex tasks might require thousands of images per class to achieve high reliability and performance. Quality annotations are crucial, so ensure your data collection and annotation processes are rigorous and aligned with your project's specific goals. Explore detailed training strategies in the [YOLOv8 training guide](../modes/train.md). ### What are some popular tools for data annotation? @@ -177,7 +177,7 @@ Different types of data annotation cater to various computer vision tasks: - **Bounding Boxes**: Used primarily for object detection, these are rectangular boxes around objects in an image. - **Polygons**: Provide more precise object outlines suitable for instance segmentation tasks. -- **Masks**: Offer pixel-level detail, used in semantic segmentation to differentiate objects from the background. +- **Masks**: Offer pixel-level detail, used in [semantic segmentation](https://www.ultralytics.com/glossary/semantic-segmentation) to differentiate objects from the background. - **Keypoints**: Identify specific points of interest within an image, useful for tasks like pose estimation and facial landmark detection. Selecting the appropriate annotation type depends on your project's requirements. Learn more about how to implement these annotations and their formats in our [data annotation guide](#what-is-data-annotation). diff --git a/docs/en/guides/deepstream-nvidia-jetson.md b/docs/en/guides/deepstream-nvidia-jetson.md index cd114b86..ab15009b 100644 --- a/docs/en/guides/deepstream-nvidia-jetson.md +++ b/docs/en/guides/deepstream-nvidia-jetson.md @@ -27,7 +27,7 @@ This comprehensive guide provides a detailed walkthrough for deploying Ultralyti ## What is NVIDIA DeepStream? -[NVIDIA's DeepStream SDK](https://developer.nvidia.com/deepstream-sdk) is a complete streaming analytics toolkit based on GStreamer for AI-based multi-sensor processing, video, audio, and image understanding. It's ideal for vision AI developers, software partners, startups, and OEMs building IVA (Intelligent Video Analytics) apps and services. You can now create stream-processing pipelines that incorporate neural networks and other complex processing tasks like tracking, video encoding/decoding, and video rendering. These pipelines enable real-time analytics on video, image, and sensor data. DeepStream's multi-platform support gives you a faster, easier way to develop vision AI applications and services on-premise, at the edge, and in the cloud. +[NVIDIA's DeepStream SDK](https://developer.nvidia.com/deepstream-sdk) is a complete streaming analytics toolkit based on GStreamer for AI-based multi-sensor processing, video, audio, and image understanding. It's ideal for vision AI developers, software partners, startups, and OEMs building IVA (Intelligent Video Analytics) apps and services. You can now create stream-processing pipelines that incorporate [neural networks](https://www.ultralytics.com/glossary/neural-network-nn) and other complex processing tasks like tracking, video encoding/decoding, and video rendering. These pipelines enable real-time analytics on video, image, and sensor data. DeepStream's multi-platform support gives you a faster, easier way to develop vision AI applications and services on-premise, at the edge, and in the cloud. ## Prerequisites @@ -183,7 +183,7 @@ deepstream-app -c deepstream_app_config.txt !!! tip - If you want to convert the model to FP16 precision, simply set `model-engine-file=model_b1_gpu0_fp16.engine` and `network-mode=2` inside `config_infer_primary_yoloV8.txt` + If you want to convert the model to FP16 [precision](https://www.ultralytics.com/glossary/precision), simply set `model-engine-file=model_b1_gpu0_fp16.engine` and `network-mode=2` inside `config_infer_primary_yoloV8.txt` ## INT8 Calibration @@ -219,7 +219,7 @@ If you want to use INT8 precision for inference, you need to follow the steps be !!! note - NVIDIA recommends at least 500 images to get a good accuracy. On this example, 1000 images are chosen to get better accuracy (more images = more accuracy). You can set it from **head -1000**. For example, for 2000 images, **head -2000**. This process can take a long time. + NVIDIA recommends at least 500 images to get a good [accuracy](https://www.ultralytics.com/glossary/accuracy). On this example, 1000 images are chosen to get better accuracy (more images = more accuracy). You can set it from **head -1000**. For example, for 2000 images, **head -2000**. This process can take a long time. 6. Create the `calibration.txt` file with all selected images @@ -323,7 +323,7 @@ To set up Ultralytics YOLOv8 on an [NVIDIA Jetson](https://www.nvidia.com/en-us/ ### What is the benefit of using TensorRT with YOLOv8 on NVIDIA Jetson? -Using TensorRT with YOLOv8 optimizes the model for inference, significantly reducing latency and improving throughput on NVIDIA Jetson devices. TensorRT provides high-performance, low-latency deep learning inference through layer fusion, precision calibration, and kernel auto-tuning. This leads to faster and more efficient execution, particularly useful for real-time applications like video analytics and autonomous machines. +Using TensorRT with YOLOv8 optimizes the model for inference, significantly reducing latency and improving throughput on NVIDIA Jetson devices. TensorRT provides high-performance, low-latency [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) inference through layer fusion, precision calibration, and kernel auto-tuning. This leads to faster and more efficient execution, particularly useful for real-time applications like video analytics and autonomous machines. ### Can I run Ultralytics YOLOv8 with DeepStream SDK across different NVIDIA Jetson hardware? diff --git a/docs/en/guides/defining-project-goals.md b/docs/en/guides/defining-project-goals.md index fcd32f12..c5e3c58c 100644 --- a/docs/en/guides/defining-project-goals.md +++ b/docs/en/guides/defining-project-goals.md @@ -4,7 +4,7 @@ description: Learn how to define clear goals and objectives for your computer vi keywords: computer vision, project planning, problem statement, measurable objectives, dataset preparation, model selection, YOLOv8, Ultralytics --- -# A Practical Guide for Defining Your Computer Vision Project +# A Practical Guide for Defining Your [Computer Vision](https://www.ultralytics.com/glossary/computer-vision-cv) Project ## Introduction @@ -33,7 +33,7 @@ Consider a computer vision project where you want to [estimate the speed of vehi Speed Estimation Using YOLOv8

-Primary users include traffic management authorities and law enforcement, while secondary stakeholders are highway planners and the public benefiting from safer roads. Key requirements involve evaluating budget, time, and personnel, as well as addressing technical needs like high-resolution cameras and real-time data processing. Additionally, regulatory constraints on privacy and data security must be considered. +Primary users include traffic management authorities and law enforcement, while secondary stakeholders are highway planners and the public benefiting from safer roads. Key requirements involve evaluating budget, time, and personnel, as well as addressing technical needs like high-resolution cameras and real-time data processing. Additionally, regulatory constraints on privacy and [data security](https://www.ultralytics.com/glossary/data-security) must be considered. ### Setting Measurable Objectives @@ -41,7 +41,7 @@ Setting measurable objectives is key to the success of a computer vision project For example, if you are developing a system to estimate vehicle speeds on a highway. You could consider the following measurable objectives: -- To achieve at least 95% accuracy in speed detection within six months, using a dataset of 10,000 vehicle images. +- To achieve at least 95% [accuracy](https://www.ultralytics.com/glossary/accuracy) in speed detection within six months, using a dataset of 10,000 vehicle images. - The system should be able to process real-time video feeds at 30 frames per second with minimal delay. By setting specific and quantifiable goals, you can effectively track progress, identify areas for improvement, and ensure the project stays on course. @@ -68,7 +68,7 @@ The order of model selection, dataset preparation, and training approach depends - **Unique or Limited Data**: If your project is constrained by unique or limited data, begin with dataset preparation. For instance, if you have a rare dataset of medical images, annotate and prepare the data first. Then, select a model that performs well on such data, followed by choosing a suitable training approach. - - **Example**: Prepare the data first for a facial recognition system with a small dataset. Annotate it, then select a model that works well with limited data, such as a pre-trained model for transfer learning. Finally, decide on a training approach, including data augmentation, to expand the dataset. + - **Example**: Prepare the data first for a facial recognition system with a small dataset. Annotate it, then select a model that works well with limited data, such as a pre-trained model for [transfer learning](https://www.ultralytics.com/glossary/transfer-learning). Finally, decide on a training approach, including [data augmentation](https://www.ultralytics.com/glossary/data-augmentation), to expand the dataset. - **Need for Experimentation**: In projects where experimentation is crucial, start with the training approach. This is common in research projects where you might initially test different training techniques. Refine your model selection after identifying a promising method and prepare the dataset based on your findings. - **Example**: In a project exploring new methods for detecting manufacturing defects, start with experimenting on a small data subset. Once you find a promising technique, select a model tailored to those findings and prepare a comprehensive dataset. @@ -79,7 +79,7 @@ Next, let's look at a few common discussion points in the community regarding co ### What Are the Different Computer Vision Tasks? -The most popular computer vision tasks include image classification, object detection, and image segmentation. +The most popular computer vision tasks include [image classification](https://www.ultralytics.com/glossary/image-classification), [object detection](https://www.ultralytics.com/glossary/object-detection), and [image segmentation](https://www.ultralytics.com/glossary/image-segmentation).

Overview of Computer Vision Tasks @@ -103,7 +103,7 @@ If you want to use the classes the model was pre-trained on, a practical approac - **Edge Devices**: Deploying on edge devices like smartphones or IoT devices requires lightweight models due to their limited computational resources. Example technologies include [TensorFlow Lite](../integrations/tflite.md) and [ONNX Runtime](../integrations/onnx.md), which are optimized for such environments. - **Cloud Servers**: Cloud deployments can handle more complex models with larger computational demands. Cloud platforms like [AWS](../integrations/amazon-sagemaker.md), Google Cloud, and Azure offer robust hardware options that can scale based on the project's needs. -- **On-Premise Servers**: For scenarios requiring high data privacy and security, deploying on-premise might be necessary. This involves significant upfront hardware investment but allows full control over the data and infrastructure. +- **On-Premise Servers**: For scenarios requiring high [data privacy](https://www.ultralytics.com/glossary/data-privacy) and security, deploying on-premise might be necessary. This involves significant upfront hardware investment but allows full control over the data and infrastructure. - **Hybrid Solutions**: Some projects might benefit from a hybrid approach, where some processing is done on the edge, while more complex analyses are offloaded to the cloud. This can balance performance needs with cost and latency considerations. Each deployment option offers different benefits and challenges, and the choice depends on specific project requirements like performance, cost, and security. @@ -158,7 +158,7 @@ For example, "Achieve 95% accuracy in speed detection within six months using a Deployment options critically impact the performance of your Ultralytics YOLO models. Here are key options: -- **Edge Devices:** Use lightweight models like TensorFlow Lite or ONNX Runtime for deployment on devices with limited resources. +- **Edge Devices:** Use lightweight models like [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) Lite or ONNX Runtime for deployment on devices with limited resources. - **Cloud Servers:** Utilize robust cloud platforms like AWS, Google Cloud, or Azure for handling complex models. - **On-Premise Servers:** High data privacy and security needs may require on-premise deployments. - **Hybrid Solutions:** Combine edge and cloud approaches for balanced performance and cost-efficiency. diff --git a/docs/en/guides/distance-calculation.md b/docs/en/guides/distance-calculation.md index a805b95e..443b208b 100644 --- a/docs/en/guides/distance-calculation.md +++ b/docs/en/guides/distance-calculation.md @@ -8,7 +8,7 @@ keywords: Ultralytics, YOLOv8, distance calculation, computer vision, object tra ## What is Distance Calculation? -Measuring the gap between two objects is known as distance calculation within a specified space. In the case of [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics), the bounding box centroid is employed to calculate the distance for bounding boxes highlighted by the user. +Measuring the gap between two objects is known as distance calculation within a specified space. In the case of [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics), the [bounding box](https://www.ultralytics.com/glossary/bounding-box) centroid is employed to calculate the distance for bounding boxes highlighted by the user.


@@ -29,7 +29,7 @@ Measuring the gap between two objects is known as distance calculation within a ## Advantages of Distance Calculation? -- **Localization Precision:** Enhances accurate spatial positioning in computer vision tasks. +- **Localization [Precision](https://www.ultralytics.com/glossary/precision):** Enhances accurate spatial positioning in [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. - **Size Estimation:** Allows estimation of object size for better contextual understanding. ???+ tip "Distance Calculation" @@ -112,7 +112,7 @@ Using distance calculation with Ultralytics YOLOv8 offers several advantages: ### Can I perform distance calculation in real-time video streams with Ultralytics YOLOv8? -Yes, you can perform distance calculation in real-time video streams with Ultralytics YOLOv8. The process involves capturing video frames using OpenCV, running YOLOv8 object detection, and using the `DistanceCalculation` class to calculate distances between objects in successive frames. For a detailed implementation, see the [video stream example](#distance-calculation-using-ultralytics-yolov8). +Yes, you can perform distance calculation in real-time video streams with Ultralytics YOLOv8. The process involves capturing video frames using [OpenCV](https://www.ultralytics.com/glossary/opencv), running YOLOv8 [object detection](https://www.ultralytics.com/glossary/object-detection), and using the `DistanceCalculation` class to calculate distances between objects in successive frames. For a detailed implementation, see the [video stream example](#distance-calculation-using-ultralytics-yolov8). ### How do I delete points drawn during distance calculation using Ultralytics YOLOv8? diff --git a/docs/en/guides/docker-quickstart.md b/docs/en/guides/docker-quickstart.md index 6d08fac0..3ee48946 100644 --- a/docs/en/guides/docker-quickstart.md +++ b/docs/en/guides/docker-quickstart.md @@ -237,7 +237,7 @@ sudo docker pull ultralytics/ultralytics:latest For detailed steps, refer to our [Docker Quickstart Guide](../quickstart.md). -### What are the benefits of using Ultralytics Docker images for machine learning projects? +### What are the benefits of using Ultralytics Docker images for [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) projects? Using Ultralytics Docker images ensures a consistent environment across different machines, replicating the same software and dependencies. This is particularly useful for collaborating across teams, running models on various hardware, and maintaining reproducibility. For GPU-based training, Ultralytics provides optimized Docker images such as `Dockerfile` for general GPU usage and `Dockerfile-jetson` for NVIDIA Jetson devices. Explore [Ultralytics Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics) for more details. diff --git a/docs/en/guides/heatmaps.md b/docs/en/guides/heatmaps.md index 02f99c0d..d2ebd4b1 100644 --- a/docs/en/guides/heatmaps.md +++ b/docs/en/guides/heatmaps.md @@ -4,7 +4,7 @@ description: Transform complex data into insightful heatmaps using Ultralytics Y keywords: Ultralytics, YOLOv8, heatmaps, data visualization, data analysis, complex data, patterns, trends, anomalies --- -# Advanced Data Visualization: Heatmaps using Ultralytics YOLOv8 🚀 +# Advanced [Data Visualization](https://www.ultralytics.com/glossary/data-visualization): Heatmaps using Ultralytics YOLOv8 🚀 ## Introduction to Heatmaps @@ -359,9 +359,9 @@ cv2.destroyAllWindows() For further guidance, check the [Tracking Mode](../modes/track.md) page. -### What makes Ultralytics YOLOv8 heatmaps different from other data visualization tools like those from OpenCV or Matplotlib? +### What makes Ultralytics YOLOv8 heatmaps different from other data visualization tools like those from [OpenCV](https://www.ultralytics.com/glossary/opencv) or Matplotlib? -Ultralytics YOLOv8 heatmaps are specifically designed for integration with its object detection and tracking models, providing an end-to-end solution for real-time data analysis. Unlike generic visualization tools like OpenCV or Matplotlib, YOLOv8 heatmaps are optimized for performance and automated processing, supporting features like persistent tracking, decay factor adjustment, and real-time video overlay. For more information on YOLOv8's unique features, visit the [Ultralytics YOLOv8 Introduction](https://www.ultralytics.com/blog/introducing-ultralytics-yolov8). +Ultralytics YOLOv8 heatmaps are specifically designed for integration with its [object detection](https://www.ultralytics.com/glossary/object-detection) and tracking models, providing an end-to-end solution for real-time data analysis. Unlike generic visualization tools like OpenCV or Matplotlib, YOLOv8 heatmaps are optimized for performance and automated processing, supporting features like persistent tracking, decay factor adjustment, and real-time video overlay. For more information on YOLOv8's unique features, visit the [Ultralytics YOLOv8 Introduction](https://www.ultralytics.com/blog/introducing-ultralytics-yolov8). ### How can I visualize only specific object classes in heatmaps using Ultralytics YOLOv8? @@ -393,4 +393,4 @@ cv2.destroyAllWindows() ### Why should businesses choose Ultralytics YOLOv8 for heatmap generation in data analysis? -Ultralytics YOLOv8 offers seamless integration of advanced object detection and real-time heatmap generation, making it an ideal choice for businesses looking to visualize data more effectively. The key advantages include intuitive data distribution visualization, efficient pattern detection, and enhanced spatial analysis for better decision-making. Additionally, YOLOv8's cutting-edge features such as persistent tracking, customizable colormaps, and support for various export formats make it superior to other tools like TensorFlow and OpenCV for comprehensive data analysis. Learn more about business applications at [Ultralytics Plans](https://www.ultralytics.com/plans). +Ultralytics YOLOv8 offers seamless integration of advanced object detection and real-time heatmap generation, making it an ideal choice for businesses looking to visualize data more effectively. The key advantages include intuitive data distribution visualization, efficient pattern detection, and enhanced spatial analysis for better decision-making. Additionally, YOLOv8's cutting-edge features such as persistent tracking, customizable colormaps, and support for various export formats make it superior to other tools like [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) and OpenCV for comprehensive data analysis. Learn more about business applications at [Ultralytics Plans](https://www.ultralytics.com/plans). diff --git a/docs/en/guides/hyperparameter-tuning.md b/docs/en/guides/hyperparameter-tuning.md index b9b1723d..d715820f 100644 --- a/docs/en/guides/hyperparameter-tuning.md +++ b/docs/en/guides/hyperparameter-tuning.md @@ -4,19 +4,19 @@ description: Master hyperparameter tuning for Ultralytics YOLO to optimize model keywords: Ultralytics YOLO, hyperparameter tuning, machine learning, model optimization, genetic algorithms, learning rate, batch size, epochs --- -# Ultralytics YOLO Hyperparameter Tuning Guide +# Ultralytics YOLO [Hyperparameter Tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning) Guide ## Introduction -Hyperparameter tuning is not just a one-time set-up but an iterative process aimed at optimizing the machine learning model's performance metrics, such as accuracy, precision, and recall. In the context of Ultralytics YOLO, these hyperparameters could range from learning rate to architectural details, such as the number of layers or types of activation functions used. +Hyperparameter tuning is not just a one-time set-up but an iterative process aimed at optimizing the [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) model's performance metrics, such as accuracy, precision, and recall. In the context of Ultralytics YOLO, these hyperparameters could range from learning rate to architectural details, such as the number of layers or types of activation functions used. ### What are Hyperparameters? Hyperparameters are high-level, structural settings for the algorithm. They are set prior to the training phase and remain constant during it. Here are some commonly tuned hyperparameters in Ultralytics YOLO: -- **Learning Rate** `lr0`: Determines the step size at each iteration while moving towards a minimum in the loss function. -- **Batch Size** `batch`: Number of images processed simultaneously in a forward pass. -- **Number of Epochs** `epochs`: An epoch is one complete forward and backward pass of all the training examples. +- **Learning Rate** `lr0`: Determines the step size at each iteration while moving towards a minimum in the [loss function](https://www.ultralytics.com/glossary/loss-function). +- **[Batch Size](https://www.ultralytics.com/glossary/batch-size)** `batch`: Number of images processed simultaneously in a forward pass. +- **Number of [Epochs](https://www.ultralytics.com/glossary/epoch)** `epochs`: An epoch is one complete forward and backward pass of all the training examples. - **Architecture Specifics**: Such as channel counts, number of layers, types of activation functions, etc.

@@ -162,7 +162,7 @@ This is a plot displaying fitness (typically a performance metric like AP50) aga #### tune_results.csv -A CSV file containing detailed results of each iteration during the tuning. Each row in the file represents one iteration, and it includes metrics like fitness score, precision, recall, as well as the hyperparameters used. +A CSV file containing detailed results of each iteration during the tuning. Each row in the file represents one iteration, and it includes metrics like fitness score, [precision](https://www.ultralytics.com/glossary/precision), [recall](https://www.ultralytics.com/glossary/recall), as well as the hyperparameters used. - **Format**: CSV - **Usage**: Per-iteration results tracking. @@ -187,7 +187,7 @@ This file contains scatter plots generated from `tune_results.csv`, helping you #### weights/ -This directory contains the saved PyTorch models for the last and the best iterations during the hyperparameter tuning process. +This directory contains the saved [PyTorch](https://www.ultralytics.com/glossary/pytorch) models for the last and the best iterations during the hyperparameter tuning process. - **`last.pt`**: The last.pt are the weights from the last epoch of training. - **`best.pt`**: The best.pt weights for the iteration that achieved the best fitness score. @@ -208,7 +208,7 @@ For deeper insights, you can explore the `Tuner` class source code and accompany ## FAQ -### How do I optimize the learning rate for Ultralytics YOLO during hyperparameter tuning? +### How do I optimize the [learning rate](https://www.ultralytics.com/glossary/learning-rate) for Ultralytics YOLO during hyperparameter tuning? To optimize the learning rate for Ultralytics YOLO, start by setting an initial learning rate using the `lr0` parameter. Common values range from `0.001` to `0.01`. During the hyperparameter tuning process, this value will be mutated to find the optimal setting. You can utilize the `model.tune()` method to automate this process. For example: @@ -250,7 +250,7 @@ When evaluating model performance during hyperparameter tuning in YOLO, you can - **AP50**: The average precision at IoU threshold of 0.50. - **F1-Score**: The harmonic mean of precision and recall. -- **Precision and Recall**: Individual metrics indicating the model's accuracy in identifying true positives versus false positives and false negatives. +- **Precision and Recall**: Individual metrics indicating the model's [accuracy](https://www.ultralytics.com/glossary/accuracy) in identifying true positives versus false positives and false negatives. These metrics help you understand different aspects of your model's performance. Refer to the [Ultralytics YOLO performance metrics](../guides/yolo-performance-metrics.md) guide for a comprehensive overview. diff --git a/docs/en/guides/index.md b/docs/en/guides/index.md index e1cb5341..1ad70434 100644 --- a/docs/en/guides/index.md +++ b/docs/en/guides/index.md @@ -6,9 +6,9 @@ keywords: Ultralytics, YOLO, tutorials, guides, object detection, deep learning, # Comprehensive Tutorials to Ultralytics YOLO -Welcome to the Ultralytics' YOLO 🚀 Guides! Our comprehensive tutorials cover various aspects of the YOLO object detection model, ranging from training and prediction to deployment. Built on PyTorch, YOLO stands out for its exceptional speed and accuracy in real-time object detection tasks. +Welcome to the Ultralytics' YOLO 🚀 Guides! Our comprehensive tutorials cover various aspects of the YOLO [object detection](https://www.ultralytics.com/glossary/object-detection) model, ranging from training and prediction to deployment. Built on [PyTorch](https://www.ultralytics.com/glossary/pytorch), YOLO stands out for its exceptional speed and [accuracy](https://www.ultralytics.com/glossary/accuracy) in real-time object detection tasks. -Whether you're a beginner or an expert in deep learning, our tutorials offer valuable insights into the implementation and optimization of YOLO for your computer vision projects. Let's dive in! +Whether you're a beginner or an expert in [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl), our tutorials offer valuable insights into the implementation and optimization of YOLO for your [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) projects. Let's dive in!


@@ -26,12 +26,12 @@ Whether you're a beginner or an expert in deep learning, our tutorials offer val Here's a compilation of in-depth guides to help you master different aspects of Ultralytics YOLO. - [YOLO Common Issues](yolo-common-issues.md) ⭐ RECOMMENDED: Practical solutions and troubleshooting tips to the most frequently encountered issues when working with Ultralytics YOLO models. -- [YOLO Performance Metrics](yolo-performance-metrics.md) ⭐ ESSENTIAL: Understand the key metrics like mAP, IoU, and F1 score used to evaluate the performance of your YOLO models. Includes practical examples and tips on how to improve detection accuracy and speed. -- [Model Deployment Options](model-deployment-options.md): Overview of YOLO model deployment formats like ONNX, OpenVINO, and TensorRT, with pros and cons for each to inform your deployment strategy. +- [YOLO Performance Metrics](yolo-performance-metrics.md) ⭐ ESSENTIAL: Understand the key metrics like mAP, IoU, and [F1 score](https://www.ultralytics.com/glossary/f1-score) used to evaluate the performance of your YOLO models. Includes practical examples and tips on how to improve detection accuracy and speed. +- [Model Deployment Options](model-deployment-options.md): Overview of YOLO [model deployment](https://www.ultralytics.com/glossary/model-deployment) formats like ONNX, OpenVINO, and TensorRT, with pros and cons for each to inform your deployment strategy. - [K-Fold Cross Validation](kfold-cross-validation.md) 🚀 NEW: Learn how to improve model generalization using K-Fold cross-validation technique. - [Hyperparameter Tuning](hyperparameter-tuning.md) 🚀 NEW: Discover how to optimize your YOLO models by fine-tuning hyperparameters using the Tuner class and genetic evolution algorithms. - [SAHI Tiled Inference](sahi-tiled-inference.md) 🚀 NEW: Comprehensive guide on leveraging SAHI's sliced inference capabilities with YOLOv8 for object detection in high-resolution images. -- [AzureML Quickstart](azureml-quickstart.md) 🚀 NEW: Get up and running with Ultralytics YOLO models on Microsoft's Azure Machine Learning platform. Learn how to train, deploy, and scale your object detection projects in the cloud. +- [AzureML Quickstart](azureml-quickstart.md) 🚀 NEW: Get up and running with Ultralytics YOLO models on Microsoft's Azure [Machine Learning](https://www.ultralytics.com/glossary/machine-learning-ml) platform. Learn how to train, deploy, and scale your object detection projects in the cloud. - [Conda Quickstart](conda-quickstart.md) 🚀 NEW: Step-by-step guide to setting up a [Conda](https://anaconda.org/conda-forge/ultralytics) environment for Ultralytics. Learn how to install and start using the Ultralytics package efficiently with Conda. - [Docker Quickstart](docker-quickstart.md) 🚀 NEW: Complete guide to setting up and using Ultralytics YOLO models with [Docker](https://hub.docker.com/r/ultralytics/ultralytics). Learn how to install Docker, manage GPU support, and run YOLO models in isolated containers for consistent development and deployment. - [Raspberry Pi](raspberry-pi.md) 🚀 NEW: Quickstart tutorial to run YOLO models to the latest Raspberry Pi hardware. @@ -47,7 +47,7 @@ Here's a compilation of in-depth guides to help you master different aspects of - [Defining A Computer Vision Project's Goals](defining-project-goals.md) 🚀 NEW: Walk through how to effectively define clear and measurable goals for your computer vision project. Learn the importance of a well-defined problem statement and how it creates a roadmap for your project. - [Data Collection and Annotation](data-collection-and-annotation.md) 🚀 NEW: Explore the tools, techniques, and best practices for collecting and annotating data to create high-quality inputs for your computer vision models. - [Preprocessing Annotated Data](preprocessing_annotated_data.md) 🚀 NEW: Learn about preprocessing and augmenting image data in computer vision projects using YOLOv8, including normalization, dataset augmentation, splitting, and exploratory data analysis (EDA). -- [Tips for Model Training](model-training-tips.md) 🚀 NEW: Explore tips on optimizing batch sizes, using mixed precision, applying pre-trained weights, and more to make training your computer vision model a breeze. +- [Tips for Model Training](model-training-tips.md) 🚀 NEW: Explore tips on optimizing [batch sizes](https://www.ultralytics.com/glossary/batch-size), using [mixed precision](https://www.ultralytics.com/glossary/mixed-precision), applying pre-trained weights, and more to make training your computer vision model a breeze. - [Insights on Model Evaluation and Fine-Tuning](model-evaluation-insights.md) 🚀 NEW: Gain insights into the strategies and best practices for evaluating and fine-tuning your computer vision models. Learn about the iterative process of refining models to achieve optimal results. - [A Guide on Model Testing](model-testing.md) 🚀 NEW: A thorough guide on testing your computer vision models in realistic settings. Learn how to verify accuracy, reliability, and performance in line with project goals. - [Best Practices for Model Deployment](model-deployment-practices.md) 🚀 NEW: Walk through tips and best practices for efficiently deploying models in computer vision projects, with a focus on optimization, troubleshooting, and security. @@ -89,7 +89,7 @@ For detailed dataset formatting and additional options, refer to our [Tips for M ### What performance metrics should I use to evaluate my YOLO model? -Evaluating your YOLO model performance is crucial to understanding its efficacy. Key metrics include Mean Average Precision (mAP), Intersection over Union (IoU), and F1 score. These metrics help assess the accuracy and precision of object detection tasks. You can learn more about these metrics and how to improve your model in our [YOLO Performance Metrics](yolo-performance-metrics.md) guide. +Evaluating your YOLO model performance is crucial to understanding its efficacy. Key metrics include [Mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP), [Intersection over Union](https://www.ultralytics.com/glossary/intersection-over-union-iou) (IoU), and F1 score. These metrics help assess the accuracy and [precision](https://www.ultralytics.com/glossary/precision) of object detection tasks. You can learn more about these metrics and how to improve your model in our [YOLO Performance Metrics](yolo-performance-metrics.md) guide. ### Why should I use Ultralytics HUB for my computer vision projects? @@ -97,7 +97,7 @@ Ultralytics HUB is a no-code platform that simplifies managing, training, and de ### What are the common issues faced during YOLO model training, and how can I resolve them? -Common issues during YOLO model training include data formatting errors, model architecture mismatches, and insufficient training data. To address these, ensure your dataset is correctly formatted, check for compatible model versions, and augment your training data. For a comprehensive list of solutions, refer to our [YOLO Common Issues](yolo-common-issues.md) guide. +Common issues during YOLO model training include data formatting errors, model architecture mismatches, and insufficient [training data](https://www.ultralytics.com/glossary/training-data). To address these, ensure your dataset is correctly formatted, check for compatible model versions, and augment your training data. For a comprehensive list of solutions, refer to our [YOLO Common Issues](yolo-common-issues.md) guide. ### How can I deploy my YOLO model for real-time object detection on edge devices? diff --git a/docs/en/guides/instance-segmentation-and-tracking.md b/docs/en/guides/instance-segmentation-and-tracking.md index 52a11a3a..95e91a8c 100644 --- a/docs/en/guides/instance-segmentation-and-tracking.md +++ b/docs/en/guides/instance-segmentation-and-tracking.md @@ -6,9 +6,9 @@ keywords: instance segmentation, tracking, YOLOv8, Ultralytics, object detection # Instance Segmentation and Tracking using Ultralytics YOLOv8 🚀 -## What is Instance Segmentation? +## What is [Instance Segmentation](https://www.ultralytics.com/glossary/instance-segmentation)? -[Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) instance segmentation involves identifying and outlining individual objects in an image, providing a detailed understanding of spatial distribution. Unlike semantic segmentation, it uniquely labels and precisely delineates each object, crucial for tasks like object detection and medical imaging. +[Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) instance segmentation involves identifying and outlining individual objects in an image, providing a detailed understanding of spatial distribution. Unlike [semantic segmentation](https://www.ultralytics.com/glossary/semantic-segmentation), it uniquely labels and precisely delineates each object, crucial for tasks like [object detection](https://www.ultralytics.com/glossary/object-detection) and medical imaging. There are two types of instance segmentation tracking available in the Ultralytics package: @@ -194,7 +194,7 @@ Instance segmentation identifies and outlines individual objects within an image ### Why should I use Ultralytics YOLOv8 for instance segmentation and tracking over other models like Mask R-CNN or Faster R-CNN? -Ultralytics YOLOv8 offers real-time performance, superior accuracy, and ease of use compared to other models like Mask R-CNN or Faster R-CNN. YOLOv8 provides a seamless integration with Ultralytics HUB, allowing users to manage models, datasets, and training pipelines efficiently. Discover more about the benefits of YOLOv8 in the [Ultralytics blog](https://www.ultralytics.com/blog/introducing-ultralytics-yolov8). +Ultralytics YOLOv8 offers real-time performance, superior [accuracy](https://www.ultralytics.com/glossary/accuracy), and ease of use compared to other models like Mask R-CNN or Faster R-CNN. YOLOv8 provides a seamless integration with Ultralytics HUB, allowing users to manage models, datasets, and training pipelines efficiently. Discover more about the benefits of YOLOv8 in the [Ultralytics blog](https://www.ultralytics.com/blog/introducing-ultralytics-yolov8). ### How can I implement object tracking using Ultralytics YOLOv8? diff --git a/docs/en/guides/isolating-segmentation-objects.md b/docs/en/guides/isolating-segmentation-objects.md index 0954dc19..737510e9 100644 --- a/docs/en/guides/isolating-segmentation-objects.md +++ b/docs/en/guides/isolating-segmentation-objects.md @@ -96,7 +96,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab 1. For more info on `c.masks.xy` see [Masks Section from Predict Mode](../modes/predict.md#masks). - 2. Here the values are cast into `np.int32` for compatibility with `drawContours()` function from OpenCV. + 2. Here the values are cast into `np.int32` for compatibility with `drawContours()` function from [OpenCV](https://www.ultralytics.com/glossary/opencv). 3. The OpenCV `drawContours()` function expects contours to have a shape of `[N, 1, 2]` expand section below for more details. @@ -178,7 +178,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab iso_crop = isolated[y1:y2, x1:x2] ``` - 1. For more information on bounding box results, see [Boxes Section from Predict Mode](../modes/predict.md/#boxes) + 1. For more information on [bounding box](https://www.ultralytics.com/glossary/bounding-box) results, see [Boxes Section from Predict Mode](../modes/predict.md/#boxes) ??? question "What does this code do?" @@ -253,7 +253,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab _ = cv2.imwrite(f"{img_name}_{label}-{ci}.png", iso_crop) ``` - - In this example, the `img_name` is the base-name of the source image file, `label` is the detected class-name, and `ci` is the index of the object detection (in case of multiple instances with the same class name). + - In this example, the `img_name` is the base-name of the source image file, `label` is the detected class-name, and `ci` is the index of the [object detection](https://www.ultralytics.com/glossary/object-detection) (in case of multiple instances with the same class name). ## Full Example code diff --git a/docs/en/guides/kfold-cross-validation.md b/docs/en/guides/kfold-cross-validation.md index a0a34533..381aef0e 100644 --- a/docs/en/guides/kfold-cross-validation.md +++ b/docs/en/guides/kfold-cross-validation.md @@ -8,13 +8,13 @@ keywords: Ultralytics, YOLO, K-Fold Cross Validation, object detection, sklearn, ## Introduction -This comprehensive guide illustrates the implementation of K-Fold Cross Validation for object detection datasets within the Ultralytics ecosystem. We'll leverage the YOLO detection format and key Python libraries such as sklearn, pandas, and PyYaml to guide you through the necessary setup, the process of generating feature vectors, and the execution of a K-Fold dataset split. +This comprehensive guide illustrates the implementation of K-Fold Cross Validation for [object detection](https://www.ultralytics.com/glossary/object-detection) datasets within the Ultralytics ecosystem. We'll leverage the YOLO detection format and key Python libraries such as sklearn, pandas, and PyYaml to guide you through the necessary setup, the process of generating feature vectors, and the execution of a K-Fold dataset split.

K-Fold Cross Validation Overview

-Whether your project involves the Fruit Detection dataset or a custom data source, this tutorial aims to help you comprehend and apply K-Fold Cross Validation to bolster the reliability and robustness of your machine learning models. While we're applying `k=5` folds for this tutorial, keep in mind that the optimal number of folds can vary depending on your dataset and the specifics of your project. +Whether your project involves the Fruit Detection dataset or a custom data source, this tutorial aims to help you comprehend and apply K-Fold Cross Validation to bolster the reliability and robustness of your [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models. While we're applying `k=5` folds for this tutorial, keep in mind that the optimal number of folds can vary depending on your dataset and the specifics of your project. Without further ado, let's dive in! @@ -285,7 +285,7 @@ Remember that although we used YOLO in this guide, these steps are mostly transf ### What is K-Fold Cross Validation and why is it useful in object detection? -K-Fold Cross Validation is a technique where the dataset is divided into 'k' subsets (folds) to evaluate model performance more reliably. Each fold serves as both training and validation data. In the context of object detection, using K-Fold Cross Validation helps to ensure your Ultralytics YOLO model's performance is robust and generalizable across different data splits, enhancing its reliability. For detailed instructions on setting up K-Fold Cross Validation with Ultralytics YOLO, refer to [K-Fold Cross Validation with Ultralytics](#introduction). +K-Fold Cross Validation is a technique where the dataset is divided into 'k' subsets (folds) to evaluate model performance more reliably. Each fold serves as both training and [validation data](https://www.ultralytics.com/glossary/validation-data). In the context of object detection, using K-Fold Cross Validation helps to ensure your Ultralytics YOLO model's performance is robust and generalizable across different data splits, enhancing its reliability. For detailed instructions on setting up K-Fold Cross Validation with Ultralytics YOLO, refer to [K-Fold Cross Validation with Ultralytics](#introduction). ### How do I implement K-Fold Cross Validation using Ultralytics YOLO? @@ -301,11 +301,11 @@ For a comprehensive guide, see the [K-Fold Dataset Split](#k-fold-dataset-split) ### Why should I use Ultralytics YOLO for object detection? -Ultralytics YOLO offers state-of-the-art, real-time object detection with high accuracy and efficiency. It's versatile, supporting multiple computer vision tasks such as detection, segmentation, and classification. Additionally, it integrates seamlessly with tools like Ultralytics HUB for no-code model training and deployment. For more details, explore the benefits and features on our [Ultralytics YOLO page](https://www.ultralytics.com/yolo). +Ultralytics YOLO offers state-of-the-art, real-time object detection with high [accuracy](https://www.ultralytics.com/glossary/accuracy) and efficiency. It's versatile, supporting multiple [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks such as detection, segmentation, and classification. Additionally, it integrates seamlessly with tools like Ultralytics HUB for no-code model training and deployment. For more details, explore the benefits and features on our [Ultralytics YOLO page](https://www.ultralytics.com/yolo). ### How can I ensure my annotations are in the correct format for Ultralytics YOLO? -Your annotations should follow the YOLO detection format. Each annotation file must list the object class, alongside its bounding box coordinates in the image. The YOLO format ensures streamlined and standardized data processing for training object detection models. For more information on proper annotation formatting, visit the [YOLO detection format guide](../datasets/detect/index.md). +Your annotations should follow the YOLO detection format. Each annotation file must list the object class, alongside its [bounding box](https://www.ultralytics.com/glossary/bounding-box) coordinates in the image. The YOLO format ensures streamlined and standardized data processing for training object detection models. For more information on proper annotation formatting, visit the [YOLO detection format guide](../datasets/detect/index.md). ### Can I use K-Fold Cross Validation with custom datasets other than Fruit Detection? diff --git a/docs/en/guides/model-deployment-options.md b/docs/en/guides/model-deployment-options.md index 635716e5..c2ecf8b6 100644 --- a/docs/en/guides/model-deployment-options.md +++ b/docs/en/guides/model-deployment-options.md @@ -24,7 +24,7 @@ Let's walk through the different YOLOv8 deployment options. For a detailed walkt #### PyTorch -PyTorch is an open-source machine learning library widely used for applications in deep learning and artificial intelligence. It provides a high level of flexibility and speed, which has made it a favorite among researchers and developers. +PyTorch is an open-source machine learning library widely used for applications in [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) and [artificial intelligence](https://www.ultralytics.com/glossary/artificial-intelligence-ai). It provides a high level of flexibility and speed, which has made it a favorite among researchers and developers. - **Performance Benchmarks**: PyTorch is known for its ease of use and flexibility, which may result in a slight trade-off in raw performance when compared to other frameworks that are more specialized and optimized. @@ -60,7 +60,7 @@ TorchScript extends PyTorch's capabilities by allowing the exportation of models #### ONNX -The Open Neural Network Exchange (ONNX) is a format that allows for model interoperability across different frameworks, which can be critical when deploying to various platforms. +The Open [Neural Network](https://www.ultralytics.com/glossary/neural-network-nn) Exchange (ONNX) is a format that allows for model interoperability across different frameworks, which can be critical when deploying to various platforms. - **Performance Benchmarks**: ONNX models may experience a variable performance depending on the specific runtime they are deployed on. @@ -84,9 +84,9 @@ OpenVINO is an Intel toolkit designed to facilitate the deployment of deep learn - **Compatibility and Integration**: Works best within the Intel ecosystem but also supports a range of other platforms. -- **Community Support and Ecosystem**: Backed by Intel, with a solid user base especially in the computer vision domain. +- **Community Support and Ecosystem**: Backed by Intel, with a solid user base especially in the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) domain. -- **Case Studies**: Often utilized in IoT and edge computing scenarios where Intel hardware is prevalent. +- **Case Studies**: Often utilized in IoT and [edge computing](https://www.ultralytics.com/glossary/edge-computing) scenarios where Intel hardware is prevalent. - **Maintenance and Updates**: Intel regularly updates OpenVINO to support the latest deep learning models and Intel hardware. @@ -128,7 +128,7 @@ CoreML is Apple's machine learning framework, optimized for on-device performanc - **Maintenance and Updates**: Regularly updated by Apple to support the latest machine learning advancements and Apple hardware. -- **Security Considerations**: Benefits from Apple's focus on user privacy and data security. +- **Security Considerations**: Benefits from Apple's focus on user privacy and [data security](https://www.ultralytics.com/glossary/data-security). - **Hardware Acceleration**: Takes full advantage of Apple's neural engine and GPU for accelerated machine learning tasks. @@ -236,7 +236,7 @@ PaddlePaddle is an open-source deep learning framework developed by Baidu. It is - **Maintenance and Updates**: Regularly updated with a focus on serving Chinese language AI applications and services. -- **Security Considerations**: Emphasizes data privacy and security, catering to Chinese data governance standards. +- **Security Considerations**: Emphasizes [data privacy](https://www.ultralytics.com/glossary/data-privacy) and security, catering to Chinese data governance standards. - **Hardware Acceleration**: Supports various hardware accelerations, including Baidu's own Kunlun chips. @@ -329,7 +329,7 @@ For more insights, check out our [blog post](https://www.ultralytics.com/blog/ac ### Can I deploy YOLOv8 models on mobile devices? -Yes, YOLOv8 models can be deployed on mobile devices using TensorFlow Lite (TF Lite) for both Android and iOS platforms. TF Lite is designed for mobile and embedded devices, providing efficient on-device inference. +Yes, YOLOv8 models can be deployed on mobile devices using [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) Lite (TF Lite) for both Android and iOS platforms. TF Lite is designed for mobile and embedded devices, providing efficient on-device inference. !!! example @@ -356,13 +356,13 @@ When choosing a deployment format for YOLOv8, consider the following factors: - **Performance**: Some formats like TensorRT provide exceptional speeds on NVIDIA GPUs, while OpenVINO is optimized for Intel hardware. - **Compatibility**: ONNX offers broad compatibility across different platforms. - **Ease of Integration**: Formats like CoreML or TF Lite are tailored for specific ecosystems like iOS and Android, respectively. -- **Community Support**: Formats like PyTorch and TensorFlow have extensive community resources and support. +- **Community Support**: Formats like [PyTorch](https://www.ultralytics.com/glossary/pytorch) and TensorFlow have extensive community resources and support. For a comparative analysis, refer to our [export formats documentation](../modes/export.md#export-formats). ### How can I deploy YOLOv8 models in a web application? -To deploy YOLOv8 models in a web application, you can use TensorFlow.js (TF.js), which allows for running machine learning models directly in the browser. This approach eliminates the need for backend infrastructure and provides real-time performance. +To deploy YOLOv8 models in a web application, you can use TensorFlow.js (TF.js), which allows for running [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models directly in the browser. This approach eliminates the need for backend infrastructure and provides real-time performance. 1. Export the YOLOv8 model to the TF.js format. 2. Integrate the exported model into your web application. diff --git a/docs/en/guides/model-deployment-practices.md b/docs/en/guides/model-deployment-practices.md index df485abd..f259779c 100644 --- a/docs/en/guides/model-deployment-practices.md +++ b/docs/en/guides/model-deployment-practices.md @@ -4,7 +4,7 @@ description: Learn essential tips, insights, and best practices for deploying co keywords: Model Deployment, Machine Learning Model Deployment, ML Model Deployment, AI Model Deployment, How to Deploy a Machine Learning Model, How to Deploy ML Models --- -# Best Practices for Model Deployment +# Best Practices for [Model Deployment](https://www.ultralytics.com/glossary/model-deployment) ## Introduction @@ -31,13 +31,13 @@ With respect to YOLOv8, you can [export your model](../modes/export.md) to diffe ### Choosing a Deployment Environment -Choosing where to deploy your computer vision model depends on multiple factors. Different environments have unique benefits and challenges, so it's essential to pick the one that best fits your needs. +Choosing where to deploy your [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) model depends on multiple factors. Different environments have unique benefits and challenges, so it's essential to pick the one that best fits your needs. #### Cloud Deployment Cloud deployment is great for applications that need to scale up quickly and handle large amounts of data. Platforms like AWS, [Google Cloud](../yolov5/environments/google_cloud_quickstart_tutorial.md), and Azure make it easy to manage your models from training to deployment. They offer services like [AWS SageMaker](../integrations/amazon-sagemaker.md), Google AI Platform, and [Azure Machine Learning](./azureml-quickstart.md) to help you throughout the process. -However, using the cloud can be expensive, especially with high data usage, and you might face latency issues if your users are far from the data centers. To manage costs and performance, it's important to optimize resource use and ensure compliance with data privacy rules. +However, using the cloud can be expensive, especially with high data usage, and you might face latency issues if your users are far from the data centers. To manage costs and performance, it's important to optimize resource use and ensure compliance with [data privacy](https://www.ultralytics.com/glossary/data-privacy) rules. #### Edge Deployment @@ -65,7 +65,7 @@ Pruning reduces the size of the model by removing weights that contribute little ### Model Quantization -Quantization converts the model's weights and activations from high precision (like 32-bit floats) to lower precision (like 8-bit integers). By reducing the model size, it speeds up inference. Quantization-aware training (QAT) is a method where the model is trained with quantization in mind, preserving accuracy better than post-training quantization. By handling quantization during the training phase, the model learns to adjust to lower precision, maintaining performance while reducing computational demands. +Quantization converts the model's weights and activations from high [precision](https://www.ultralytics.com/glossary/precision) (like 32-bit floats) to lower precision (like 8-bit integers). By reducing the model size, it speeds up inference. Quantization-aware training (QAT) is a method where the model is trained with quantization in mind, preserving accuracy better than post-training quantization. By handling quantization during the training phase, the model learns to adjust to lower precision, maintaining performance while reducing computational demands.

Model Quantization Overview @@ -73,7 +73,7 @@ Quantization converts the model's weights and activations from high precision (l ### Knowledge Distillation -Knowledge distillation involves training a smaller, simpler model (the student) to mimic the outputs of a larger, more complex model (the teacher). The student model learns to approximate the teacher's predictions, resulting in a compact model that retains much of the teacher's accuracy. This technique is beneficial for creating efficient models suitable for deployment on edge devices with constrained resources. +Knowledge distillation involves training a smaller, simpler model (the student) to mimic the outputs of a larger, more complex model (the teacher). The student model learns to approximate the teacher's predictions, resulting in a compact model that retains much of the teacher's [accuracy](https://www.ultralytics.com/glossary/accuracy). This technique is beneficial for creating efficient models suitable for deployment on edge devices with constrained resources.

Knowledge Distillation Overview @@ -98,7 +98,7 @@ When deploying YOLOv8, several factors can affect model accuracy. Converting mod ### Inferences Are Taking Longer Than You Expected -When deploying machine learning models, it's important that they run efficiently. If inferences are taking longer than expected, it can affect the user experience and the effectiveness of your application. Here are some steps to help you identify and resolve the problem: +When deploying [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models, it's important that they run efficiently. If inferences are taking longer than expected, it can affect the user experience and the effectiveness of your application. Here are some steps to help you identify and resolve the problem: - **Implement Warm-Up Runs**: Initial runs often include setup overhead, which can skew latency measurements. Perform a few warm-up inferences before measuring latency. Excluding these initial runs provides a more accurate measurement of the model's performance. - **Optimize the Inference Engine:** Double-check that the inference engine is fully optimized for your specific GPU architecture. Use the latest drivers and software versions tailored to your hardware to ensure maximum performance and compatibility. @@ -124,7 +124,7 @@ It's essential to control who can access your model and its data to prevent unau ### Model Obfuscation -Protecting your model from being reverse-engineered or misuse can be done through model obfuscation. It involves encrypting model parameters, such as weights and biases in neural networks, to make it difficult for unauthorized individuals to understand or alter the model. You can also obfuscate the model's architecture by renaming layers and parameters or adding dummy layers, making it harder for attackers to reverse-engineer it. You can also serve the model in a secure environment, like a secure enclave or using a trusted execution environment (TEE), can provide an extra layer of protection during inference. +Protecting your model from being reverse-engineered or misuse can be done through model obfuscation. It involves encrypting model parameters, such as weights and biases in [neural networks](https://www.ultralytics.com/glossary/neural-network-nn), to make it difficult for unauthorized individuals to understand or alter the model. You can also obfuscate the model's architecture by renaming layers and parameters or adding dummy layers, making it harder for attackers to reverse-engineer it. You can also serve the model in a secure environment, like a secure enclave or using a trusted execution environment (TEE), can provide an extra layer of protection during inference. ## Share Ideas With Your Peers diff --git a/docs/en/guides/model-evaluation-insights.md b/docs/en/guides/model-evaluation-insights.md index 22c44e5d..ef9389c2 100644 --- a/docs/en/guides/model-evaluation-insights.md +++ b/docs/en/guides/model-evaluation-insights.md @@ -24,19 +24,19 @@ _Quick Tip:_ When running inferences, if you aren't seeing any predictions and y ### Intersection over Union -Intersection over Union (IoU) is a metric in object detection that measures how well the predicted bounding box overlaps with the ground truth bounding box. IoU values range from 0 to 1, where one stands for a perfect match. IoU is essential because it measures how closely the predicted boundaries match the actual object boundaries. +[Intersection over Union](https://www.ultralytics.com/glossary/intersection-over-union-iou) (IoU) is a metric in [object detection](https://www.ultralytics.com/glossary/object-detection) that measures how well the predicted [bounding box](https://www.ultralytics.com/glossary/bounding-box) overlaps with the ground truth bounding box. IoU values range from 0 to 1, where one stands for a perfect match. IoU is essential because it measures how closely the predicted boundaries match the actual object boundaries.

Intersection over Union Overview

-### Mean Average Precision +### Mean Average [Precision](https://www.ultralytics.com/glossary/precision) -Mean Average Precision (mAP) is a way to measure how well an object detection model performs. It looks at the precision of detecting each object class, averages these scores, and gives an overall number that shows how accurately the model can identify and classify objects. +[Mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) is a way to measure how well an object detection model performs. It looks at the precision of detecting each object class, averages these scores, and gives an overall number that shows how accurately the model can identify and classify objects. Let's focus on two specific mAP metrics: -- *mAP@.5:* Measures the average precision at a single IoU (Intersection over Union) threshold of 0.5. This metric checks if the model can correctly find objects with a looser accuracy requirement. It focuses on whether the object is roughly in the right place, not needing perfect placement. It helps see if the model is generally good at spotting objects. +- *mAP@.5:* Measures the average precision at a single IoU (Intersection over Union) threshold of 0.5. This metric checks if the model can correctly find objects with a looser [accuracy](https://www.ultralytics.com/glossary/accuracy) requirement. It focuses on whether the object is roughly in the right place, not needing perfect placement. It helps see if the model is generally good at spotting objects. - *mAP@.5:.95:* Averages the mAP values calculated at multiple IoU thresholds, from 0.5 to 0.95 in 0.05 increments. This metric is more detailed and strict. It gives a fuller picture of how accurately the model can find objects at different levels of strictness and is especially useful for applications that need precise object detection. Other mAP metrics include mAP@0.75, which uses a stricter IoU threshold of 0.75, and mAP@small, medium, and large, which evaluate precision across objects of different sizes. @@ -111,9 +111,9 @@ Fine-tuning involves taking a pre-trained model and adjusting its parameters to Fine-tuning a model means paying close attention to several vital parameters and techniques to achieve optimal performance. Here are some essential tips to guide you through the process. -### Starting With a Higher Learning Rate +### Starting With a Higher [Learning Rate](https://www.ultralytics.com/glossary/learning-rate) -Usually, during the initial training epochs, the learning rate starts low and gradually increases to stabilize the training process. However, since your model has already learned some features from the previous dataset, starting with a higher learning rate right away can be more beneficial. +Usually, during the initial training [epochs](https://www.ultralytics.com/glossary/epoch), the learning rate starts low and gradually increases to stabilize the training process. However, since your model has already learned some features from the previous dataset, starting with a higher learning rate right away can be more beneficial. When evaluating your YOLOv8 model, you can set the `warmup_epochs` validation parameter to `warmup_epochs=0` to prevent the learning rate from starting too high. By following this process, the training will continue from the provided weights, adjusting to the nuances of your new data. @@ -123,7 +123,7 @@ Image tiling can improve detection accuracy for small objects. By dividing large ## Engage with the Community -Sharing your ideas and questions with other computer vision enthusiasts can inspire creative solutions to roadblocks in your projects. Here are some excellent ways to learn, troubleshoot, and connect. +Sharing your ideas and questions with other [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) enthusiasts can inspire creative solutions to roadblocks in your projects. Here are some excellent ways to learn, troubleshoot, and connect. ### Finding Help and Support @@ -136,7 +136,7 @@ Sharing your ideas and questions with other computer vision enthusiasts can insp ## Final Thoughts -Evaluating and fine-tuning your computer vision model are important steps for successful model deployment. These steps help make sure that your model is accurate, efficient, and suited to your overall application. The key to training the best model possible is continuous experimentation and learning. Don't hesitate to tweak parameters, try new techniques, and explore different datasets. Keep experimenting and pushing the boundaries of what's possible! +Evaluating and fine-tuning your computer vision model are important steps for successful [model deployment](https://www.ultralytics.com/glossary/model-deployment). These steps help make sure that your model is accurate, efficient, and suited to your overall application. The key to training the best model possible is continuous experimentation and learning. Don't hesitate to tweak parameters, try new techniques, and explore different datasets. Keep experimenting and pushing the boundaries of what's possible! ## FAQ @@ -156,8 +156,8 @@ To handle variable image sizes during evaluation, use the `rect=true` parameter Improving mean average precision (mAP) for a YOLOv8 model involves several steps: -1. **Tuning Hyperparameters**: Experiment with different learning rates, batch sizes, and image augmentations. -2. **Data Augmentation**: Use techniques like Mosaic and MixUp to create diverse training samples. +1. **Tuning Hyperparameters**: Experiment with different learning rates, [batch sizes](https://www.ultralytics.com/glossary/batch-size), and image augmentations. +2. **[Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation)**: Use techniques like Mosaic and MixUp to create diverse training samples. 3. **Image Tiling**: Split larger images into smaller tiles to improve detection accuracy for small objects. Refer to our detailed guide on [model fine-tuning](#tips-for-fine-tuning-your-model) for specific strategies. diff --git a/docs/en/guides/model-monitoring-and-maintenance.md b/docs/en/guides/model-monitoring-and-maintenance.md index ab5e417a..2aedc8e3 100644 --- a/docs/en/guides/model-monitoring-and-maintenance.md +++ b/docs/en/guides/model-monitoring-and-maintenance.md @@ -34,8 +34,8 @@ Here are some best practices to keep in mind while monitoring your computer visi You can use automated monitoring tools to make it easier to monitor models after deployment. Many tools offer real-time insights and alerting capabilities. Here are some examples of open-source model monitoring tools that can work together: - **[Prometheus](https://prometheus.io/)**: Prometheus is an open-source monitoring tool that collects and stores metrics for detailed performance tracking. It integrates easily with Kubernetes and Docker, collecting data at set intervals and storing it in a time-series database. Prometheus can also scrape HTTP endpoints to gather real-time metrics. Collected data can be queried using the PromQL language. -- **[Grafana](https://grafana.com/)**: Grafana is an open-source data visualization and monitoring tool that allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. It works well with Prometheus and offers advanced data visualization features. You can create custom dashboards to show important metrics for your computer vision models, like inference latency, error rates, and resource usage. Grafana turns collected data into easy-to-read dashboards with line graphs, heat maps, and histograms. It also supports alerts, which can be sent through channels like Slack to quickly notify teams of any issues. -- **[Evidently AI](https://www.evidentlyai.com/)**: Evidently AI is an open-source tool designed for monitoring and debugging machine learning models in production. It generates interactive reports from pandas DataFrames, helping analyze machine learning models. Evidently AI can detect data drift, model performance degradation, and other issues that may arise with your deployed models. +- **[Grafana](https://grafana.com/)**: Grafana is an open-source [data visualization](https://www.ultralytics.com/glossary/data-visualization) and monitoring tool that allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. It works well with Prometheus and offers advanced data visualization features. You can create custom dashboards to show important metrics for your computer vision models, like inference latency, error rates, and resource usage. Grafana turns collected data into easy-to-read dashboards with line graphs, heat maps, and histograms. It also supports alerts, which can be sent through channels like Slack to quickly notify teams of any issues. +- **[Evidently AI](https://www.evidentlyai.com/)**: Evidently AI is an open-source tool designed for monitoring and debugging [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) models in production. It generates interactive reports from pandas DataFrames, helping analyze machine learning models. Evidently AI can detect data drift, model performance degradation, and other issues that may arise with your deployed models. The three tools introduced above, Evidently AI, Prometheus, and Grafana, can work together seamlessly as a fully open-source ML monitoring solution that is ready for production. Evidently AI is used to collect and calculate metrics, Prometheus stores these metrics, and Grafana displays them and sets up alerts. While there are many other tools available, this setup is an exciting open-source option that provides robust capabilities for monitoring and maintaining your models. @@ -45,7 +45,7 @@ The three tools introduced above, Evidently AI, Prometheus, and Grafana, can wor ### Anomaly Detection and Alert Systems -An anomaly is any data point or pattern that deviates quite a bit from what is expected. With respect to computer vision models, anomalies can be images that are very different from the ones the model was trained on. These unexpected images can be signs of issues like changes in data distribution, outliers, or behaviors that might reduce model performance. Setting up alert systems to detect these anomalies is an important part of model monitoring. +An anomaly is any data point or pattern that deviates quite a bit from what is expected. With respect to [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) models, anomalies can be images that are very different from the ones the model was trained on. These unexpected images can be signs of issues like changes in data distribution, outliers, or behaviors that might reduce model performance. Setting up alert systems to detect these anomalies is an important part of model monitoring. By setting standard performance levels and limits for key metrics, you can catch problems early. When performance goes outside these limits, alerts are triggered, prompting quick fixes. Regularly updating and retraining models with new data keeps them relevant and accurate as the data changes. @@ -69,7 +69,7 @@ Here are several methods to detect data drift: **Continuous Monitoring**: Regularly monitor the model's input data and outputs for signs of drift. Track key metrics and compare them against historical data to identify significant changes. -**Statistical Techniques**: Use methods like the Kolmogorov-Smirnov test or Population Stability Index (PSI) to detect changes in data distributions. These tests compare the distribution of new data with the training data to identify significant differences. +**Statistical Techniques**: Use methods like the Kolmogorov-Smirnov test or Population Stability Index (PSI) to detect changes in data distributions. These tests compare the distribution of new data with the [training data](https://www.ultralytics.com/glossary/training-data) to identify significant differences. **Feature Drift**: Monitor individual features for drift. Sometimes, the overall data distribution may remain stable, but individual features may drift. Identifying which features are drifting helps in fine-tuning the retraining process. @@ -91,7 +91,7 @@ Regardless of the method, validation and testing are a must after updates. It is ### Deciding When to Retrain Your Model -The frequency of retraining your computer vision model depends on data changes and model performance. Retrain your model whenever you observe a significant performance drop or detect data drift. Regular evaluations can help determine the right retraining schedule by testing the model against new data. Monitoring performance metrics and data patterns lets you decide if your model needs more frequent updates to maintain accuracy. +The frequency of retraining your computer vision model depends on data changes and model performance. Retrain your model whenever you observe a significant performance drop or detect data drift. Regular evaluations can help determine the right retraining schedule by testing the model against new data. Monitoring performance metrics and data patterns lets you decide if your model needs more frequent updates to maintain [accuracy](https://www.ultralytics.com/glossary/accuracy).

When to Retrain Overview @@ -108,8 +108,8 @@ These are some of the key elements that should be included in project documentat - **[Project Overview](./steps-of-a-cv-project.md)**: Provide a high-level summary of the project, including the problem statement, solution approach, expected outcomes, and project scope. Explain the role of computer vision in addressing the problem and outline the stages and deliverables. - **Model Architecture**: Detail the structure and design of the model, including its components, layers, and connections. Explain the chosen hyperparameters and the rationale behind these choices. - **[Data Preparation](./data-collection-and-annotation.md)**: Describe the data sources, types, formats, sizes, and preprocessing steps. Discuss data quality, reliability, and any transformations applied before training the model. -- **[Training Process](./model-training-tips.md)**: Document the training procedure, including the datasets used, training parameters, and loss functions. Explain how the model was trained and any challenges encountered during training. -- **[Evaluation Metrics](./model-evaluation-insights.md)**: Specify the metrics used to evaluate the model's performance, such as accuracy, precision, recall, and F1-score. Include performance results and an analysis of these metrics. +- **[Training Process](./model-training-tips.md)**: Document the training procedure, including the datasets used, training parameters, and [loss functions](https://www.ultralytics.com/glossary/loss-function). Explain how the model was trained and any challenges encountered during training. +- **[Evaluation Metrics](./model-evaluation-insights.md)**: Specify the metrics used to evaluate the model's performance, such as accuracy, [precision](https://www.ultralytics.com/glossary/precision), [recall](https://www.ultralytics.com/glossary/recall), and F1-score. Include performance results and an analysis of these metrics. - **[Deployment Steps](./model-deployment-options.md)**: Outline the steps taken to deploy the model, including the tools and platforms used, deployment configurations, and any specific challenges or considerations. - **Monitoring and Maintenance Procedure**: Provide a detailed plan for monitoring the model's performance post-deployment. Include methods for detecting and addressing data and model drift, and describe the process for regular updates and retraining. @@ -155,7 +155,7 @@ Maintaining computer vision models involves regular updates, retraining, and mon Data drift detection is essential because it helps identify when the statistical properties of the input data change over time, which can degrade model performance. Techniques like continuous monitoring, statistical tests (e.g., Kolmogorov-Smirnov test), and feature drift analysis can help spot issues early. Addressing data drift ensures that your model remains accurate and relevant in changing environments. Learn more about data drift detection in our [Data Drift Detection](#data-drift-detection) section. -### What tools can I use for anomaly detection in computer vision models? +### What tools can I use for [anomaly detection](https://www.ultralytics.com/glossary/anomaly-detection) in computer vision models? For anomaly detection in computer vision models, tools like [Prometheus](https://prometheus.io/), [Grafana](https://grafana.com/), and [Evidently AI](https://www.evidentlyai.com/) are highly effective. These tools can help you set up alert systems to detect unusual data points or patterns that deviate from expected behavior. Configurable alerts and standardized messages can help you respond quickly to potential issues. Explore more in our [Anomaly Detection and Alert Systems](#anomaly-detection-and-alert-systems) section. @@ -168,5 +168,5 @@ Effective documentation of a computer vision project should include: - **Data Preparation**: Information on data sources, preprocessing steps, and transformations. - **Training Process**: Description of the training procedure, datasets used, and challenges encountered. - **Evaluation Metrics**: Metrics used for performance evaluation and analysis. -- **Deployment Steps**: Steps taken for model deployment and any specific challenges. +- **Deployment Steps**: Steps taken for [model deployment](https://www.ultralytics.com/glossary/model-deployment) and any specific challenges. - **Monitoring and Maintenance Procedure**: Plan for ongoing monitoring and maintenance. For more comprehensive guidelines, refer to our [Documentation](#documentation) section. diff --git a/docs/en/guides/model-testing.md b/docs/en/guides/model-testing.md index 71ff69b0..8d324679 100644 --- a/docs/en/guides/model-testing.md +++ b/docs/en/guides/model-testing.md @@ -10,19 +10,19 @@ keywords: Overfitting and Underfitting in Machine Learning, Model Testing, Data After [training](./model-training-tips.md) and [evaluating](./model-evaluation-insights.md) your model, it's time to test it. Model testing involves assessing how well it performs in real-world scenarios. Testing considers factors like accuracy, reliability, fairness, and how easy it is to understand the model's decisions. The goal is to make sure the model performs as intended, delivers the expected results, and fits into the [overall objective of your application](./defining-project-goals.md) or project. -Model testing is quite similar to model evaluation, but they are two distinct [steps in a computer vision project](./steps-of-a-cv-project.md). Model evaluation involves metrics and plots to assess the model's accuracy. On the other hand, model testing checks if the model's learned behavior is the same as expectations. In this guide, we'll explore strategies for testing your computer vision models. +Model testing is quite similar to model evaluation, but they are two distinct [steps in a computer vision project](./steps-of-a-cv-project.md). Model evaluation involves metrics and plots to assess the model's accuracy. On the other hand, model testing checks if the model's learned behavior is the same as expectations. In this guide, we'll explore strategies for testing your [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) models. ## Model Testing Vs. Model Evaluation First, let's understand the difference between model evaluation and testing with an example. -Suppose you have trained a computer vision model to recognize cats and dogs, and you want to deploy this model at a pet store to monitor the animals. During the model evaluation phase, you use a labeled dataset to calculate metrics like accuracy, precision, recall, and F1 score. For instance, the model might have an accuracy of 98% in distinguishing between cats and dogs in a given dataset. +Suppose you have trained a computer vision model to recognize cats and dogs, and you want to deploy this model at a pet store to monitor the animals. During the model evaluation phase, you use a labeled dataset to calculate metrics like accuracy, [precision](https://www.ultralytics.com/glossary/precision), [recall](https://www.ultralytics.com/glossary/recall), and F1 score. For instance, the model might have an accuracy of 98% in distinguishing between cats and dogs in a given dataset. After evaluation, you test the model using images from a pet store to see how well it identifies cats and dogs in more varied and realistic conditions. You check if it can correctly label cats and dogs when they are moving, in different lighting conditions, or partially obscured by objects like toys or furniture. Model testing checks that the model behaves as expected outside the controlled evaluation environment. ## Preparing for Model Testing -Computer vision models learn from datasets by detecting patterns, making predictions, and evaluating their performance. These [datasets](./preprocessing_annotated_data.md) are usually divided into training and testing sets to simulate real-world conditions. Training data teaches the model while testing data verifies its accuracy. +Computer vision models learn from datasets by detecting patterns, making predictions, and evaluating their performance. These [datasets](./preprocessing_annotated_data.md) are usually divided into training and testing sets to simulate real-world conditions. [Training data](https://www.ultralytics.com/glossary/training-data) teaches the model while testing data verifies its accuracy. Here are two points to keep in mind before testing your model: @@ -61,7 +61,7 @@ If you want to test your trained YOLOv8 model on multiple images stored in a fol If you are interested in testing the basic YOLOv8 model to understand whether it can be used for your application without custom training, you can use the prediction mode. While the model is pre-trained on datasets like COCO, running predictions on your own dataset can give you a quick sense of how well it might perform in your specific context. -## Overfitting and Underfitting in Machine Learning +## Overfitting and [Underfitting](https://www.ultralytics.com/glossary/underfitting) in [Machine Learning](https://www.ultralytics.com/glossary/machine-learning-ml) When testing a machine learning model, especially in computer vision, it's important to watch out for overfitting and underfitting. These issues can significantly affect how well your model works with new data. @@ -71,7 +71,7 @@ Overfitting happens when your model learns the training data too well, including #### Signs of Overfitting -- **High Training Accuracy, Low Validation Accuracy:** If your model performs very well on training data but poorly on validation or test data, it's likely overfitting. +- **High Training Accuracy, Low Validation Accuracy:** If your model performs very well on training data but poorly on validation or [test data](https://www.ultralytics.com/glossary/test-data), it's likely overfitting. - **Visual Inspection:** Sometimes, you can see overfitting if your model is too sensitive to minor changes or irrelevant details in images. ### Underfitting @@ -102,7 +102,7 @@ Data leakage can be tricky to spot and often comes from hidden biases in the tra - **Camera Bias:** Different angles, lighting, shadows, and camera movements can introduce unwanted patterns. - **Overlay Bias:** Logos, timestamps, or other overlays in images can mislead the model. - **Font and Object Bias:** Specific fonts or objects that frequently appear in certain classes can skew the model's learning. -- **Spatial Bias:** Imbalances in foreground-background, bounding box distributions, and object locations can affect training. +- **Spatial Bias:** Imbalances in foreground-background, [bounding box](https://www.ultralytics.com/glossary/bounding-box) distributions, and object locations can affect training. - **Label and Domain Bias:** Incorrect labels or shifts in data types can lead to leakage. ### Detecting Data Leakage @@ -139,13 +139,13 @@ These resources will help you navigate challenges and remain updated on the late ## In Summary -Building trustworthy computer vision models relies on rigorous model testing. By testing the model with previously unseen data, we can analyze it and spot weaknesses like overfitting and data leakage. Addressing these issues before deployment helps the model perform well in real-world applications. It's important to remember that model testing is just as crucial as model evaluation in guaranteeing the model's long-term success and effectiveness. +Building trustworthy computer vision models relies on rigorous model testing. By testing the model with previously unseen data, we can analyze it and spot weaknesses like [overfitting](https://www.ultralytics.com/glossary/overfitting) and data leakage. Addressing these issues before deployment helps the model perform well in real-world applications. It's important to remember that model testing is just as crucial as model evaluation in guaranteeing the model's long-term success and effectiveness. ## FAQ ### What are the key differences between model evaluation and model testing in computer vision? -Model evaluation and model testing are distinct steps in a computer vision project. Model evaluation involves using a labeled dataset to compute metrics such as accuracy, precision, recall, and F1 score, providing insights into the model's performance with a controlled dataset. Model testing, on the other hand, assesses the model's performance in real-world scenarios by applying it to new, unseen data, ensuring the model's learned behavior aligns with expectations outside the evaluation environment. For a detailed guide, refer to the [steps in a computer vision project](./steps-of-a-cv-project.md). +Model evaluation and model testing are distinct steps in a computer vision project. Model evaluation involves using a labeled dataset to compute metrics such as [accuracy](https://www.ultralytics.com/glossary/accuracy), precision, recall, and [F1 score](https://www.ultralytics.com/glossary/f1-score), providing insights into the model's performance with a controlled dataset. Model testing, on the other hand, assesses the model's performance in real-world scenarios by applying it to new, unseen data, ensuring the model's learned behavior aligns with expectations outside the evaluation environment. For a detailed guide, refer to the [steps in a computer vision project](./steps-of-a-cv-project.md). ### How can I test my Ultralytics YOLOv8 model on multiple images? @@ -155,7 +155,7 @@ To test your Ultralytics YOLOv8 model on multiple images, you can use the [predi To address **overfitting**: -- Regularization techniques like dropout. +- [Regularization](https://www.ultralytics.com/glossary/regularization) techniques like dropout. - Increase the size of the training dataset. - Simplify the model architecture. @@ -163,7 +163,7 @@ To address **underfitting**: - Use a more complex model. - Provide more relevant features. -- Increase training iterations or epochs. +- Increase training iterations or [epochs](https://www.ultralytics.com/glossary/epoch). Review misclassified images, perform thorough error analysis, and regularly track performance metrics to maintain a balance. For more information on these concepts, explore our section on [Overfitting and Underfitting](#overfitting-and-underfitting-in-machine-learning). @@ -190,7 +190,7 @@ Post-testing, if the model performance meets the project goals, proceed with dep - Error analysis. - Gathering more diverse and high-quality data. -- Hyperparameter tuning. +- [Hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning). - Retraining the model. Gain insights from the [Model Testing Vs. Model Evaluation](#model-testing-vs-model-evaluation) section to refine and enhance model effectiveness in real-world applications. diff --git a/docs/en/guides/model-training-tips.md b/docs/en/guides/model-training-tips.md index 932a412f..725081a2 100644 --- a/docs/en/guides/model-training-tips.md +++ b/docs/en/guides/model-training-tips.md @@ -18,22 +18,22 @@ One of the most important steps when working on a [computer vision project](./st allowfullscreen>
- Watch: Model Training Tips | How to Handle Large Datasets | Batch Size, GPU Utilization and Mixed Precision + Watch: Model Training Tips | How to Handle Large Datasets | Batch Size, GPU Utilization and [Mixed Precision](https://www.ultralytics.com/glossary/mixed-precision)

So, what is [model training](../modes/train.md)? Model training is the process of teaching your model to recognize visual patterns and make predictions based on your data. It directly impacts the performance and accuracy of your application. In this guide, we'll cover best practices, optimization techniques, and troubleshooting tips to help you train your computer vision models effectively. -## How to Train a Machine Learning Model +## How to Train a [Machine Learning](https://www.ultralytics.com/glossary/machine-learning-ml) Model A computer vision model is trained by adjusting its internal parameters to minimize errors. Initially, the model is fed a large set of labeled images. It makes predictions about what is in these images, and the predictions are compared to the actual labels or contents to calculate errors. These errors show how far off the model's predictions are from the true values. -During training, the model iteratively makes predictions, calculates errors, and updates its parameters through a process called backpropagation. In this process, the model adjusts its internal parameters (weights and biases) to reduce the errors. By repeating this cycle many times, the model gradually improves its accuracy. Over time, it learns to recognize complex patterns such as shapes, colors, and textures. +During training, the model iteratively makes predictions, calculates errors, and updates its parameters through a process called [backpropagation](https://www.ultralytics.com/glossary/backpropagation). In this process, the model adjusts its internal parameters (weights and biases) to reduce the errors. By repeating this cycle many times, the model gradually improves its accuracy. Over time, it learns to recognize complex patterns such as shapes, colors, and textures.

What is Backpropagation?

-This learning process makes it possible for the computer vision model to perform various [tasks](../tasks/index.md), including [object detection](../tasks/detect.md), [instance segmentation](../tasks/segment.md), and [image classification](../tasks/classify.md). The ultimate goal is to create a model that can generalize its learning to new, unseen images so that it can accurately understand visual data in real-world applications. +This learning process makes it possible for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) model to perform various [tasks](../tasks/index.md), including [object detection](../tasks/detect.md), [instance segmentation](../tasks/segment.md), and [image classification](../tasks/classify.md). The ultimate goal is to create a model that can generalize its learning to new, unseen images so that it can accurately understand visual data in real-world applications. Now that we know what is happening behind the scenes when we train a model, let's look at points to consider when training a model. @@ -46,7 +46,7 @@ There are a few different aspects to think about when you are planning on using When training models on large datasets, efficiently utilizing your GPU is key. Batch size is an important factor. It is the number of data samples that a machine learning model processes in a single training iteration. Using the maximum batch size supported by your GPU, you can fully take advantage of its capabilities and reduce the time model training takes. However, you want to avoid running out of GPU memory. If you encounter memory errors, reduce the batch size incrementally until the model trains smoothly. -With respect to YOLOv8, you can set the `batch_size` parameter in the [training configuration](../modes/train.md) to match your GPU capacity. Also, setting `batch=-1` in your training script will automatically determine the batch size that can be efficiently processed based on your device's capabilities. By fine-tuning the batch size, you can make the most of your GPU resources and improve the overall training process. +With respect to YOLOv8, you can set the `batch_size` parameter in the [training configuration](../modes/train.md) to match your GPU capacity. Also, setting `batch=-1` in your training script will automatically determine the [batch size](https://www.ultralytics.com/glossary/batch-size) that can be efficiently processed based on your device's capabilities. By fine-tuning the batch size, you can make the most of your GPU resources and improve the overall training process. ### Subset Training @@ -72,19 +72,19 @@ Caching can be controlled when training YOLOv8 using the `cache` parameter: ### Mixed Precision Training -Mixed precision training uses both 16-bit (FP16) and 32-bit (FP32) floating-point types. The strengths of both FP16 and FP32 are leveraged by using FP16 for faster computation and FP32 to maintain precision where needed. Most of the neural network's operations are done in FP16 to benefit from faster computation and lower memory usage. However, a master copy of the model's weights is kept in FP32 to ensure accuracy during the weight update steps. You can handle larger models or larger batch sizes within the same hardware constraints. +Mixed precision training uses both 16-bit (FP16) and 32-bit (FP32) floating-point types. The strengths of both FP16 and FP32 are leveraged by using FP16 for faster computation and FP32 to maintain precision where needed. Most of the [neural network](https://www.ultralytics.com/glossary/neural-network-nn)'s operations are done in FP16 to benefit from faster computation and lower memory usage. However, a master copy of the model's weights is kept in FP32 to ensure accuracy during the weight update steps. You can handle larger models or larger batch sizes within the same hardware constraints.

Mixed Precision Training Overview

-To implement mixed precision training, you'll need to modify your training scripts and ensure your hardware (like GPUs) supports it. Many modern deep learning frameworks, such as Tensorflow, offer built-in support for mixed precision. +To implement mixed precision training, you'll need to modify your training scripts and ensure your hardware (like GPUs) supports it. Many modern [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) frameworks, such as [Tensorflow](https://www.ultralytics.com/glossary/tensorflow), offer built-in support for mixed precision. Mixed precision training is straightforward when working with YOLOv8. You can use the `amp` flag in your training configuration. Setting `amp=True` enables Automatic Mixed Precision (AMP) training. Mixed precision training is a simple yet effective way to optimize your model training process. ### Pre-trained Weights -Using pretrained weights is a smart way to speed up your model's training process. Pretrained weights come from models already trained on large datasets, giving your model a head start. Transfer learning adapts pretrained models to new, related tasks. Fine-tuning a pre-trained model involves starting with these weights and then continuing training on your specific dataset. This method of training results in faster training times and often better performance because the model starts with a solid understanding of basic features. +Using pretrained weights is a smart way to speed up your model's training process. Pretrained weights come from models already trained on large datasets, giving your model a head start. [Transfer learning](https://www.ultralytics.com/glossary/transfer-learning) adapts pretrained models to new, related tasks. Fine-tuning a pre-trained model involves starting with these weights and then continuing training on your specific dataset. This method of training results in faster training times and often better performance because the model starts with a solid understanding of basic features. The `pretrained` parameter makes transfer learning easy with YOLOv8. Setting `pretrained=True` will use default pre-trained weights, or you can specify a path to a custom pre-trained model. Using pre-trained weights and transfer learning effectively boosts your model's capabilities and reduces training costs. @@ -92,14 +92,14 @@ The `pretrained` parameter makes transfer learning easy with YOLOv8. Setting `pr There are a couple of other techniques to consider when handling a large dataset: -- **Learning Rate Schedulers**: Implementing learning rate schedulers dynamically adjusts the learning rate during training. A well-tuned learning rate can prevent the model from overshooting minima and improve stability. When training YOLOv8, the `lrf` parameter helps manage learning rate scheduling by setting the final learning rate as a fraction of the initial rate. +- **[Learning Rate](https://www.ultralytics.com/glossary/learning-rate) Schedulers**: Implementing learning rate schedulers dynamically adjusts the learning rate during training. A well-tuned learning rate can prevent the model from overshooting minima and improve stability. When training YOLOv8, the `lrf` parameter helps manage learning rate scheduling by setting the final learning rate as a fraction of the initial rate. - **Distributed Training**: For handling large datasets, distributed training can be a game-changer. You can reduce the training time by spreading the training workload across multiple GPUs or machines. ## The Number of Epochs To Train For When training a model, an epoch refers to one complete pass through the entire training dataset. During an epoch, the model processes each example in the training set once and updates its parameters based on the learning algorithm. Multiple epochs are usually needed to allow the model to learn and refine its parameters over time. -A common question that comes up is how to determine the number of epochs to train the model for. A good starting point is 300 epochs. If the model overfits early, you can reduce the number of epochs. If overfitting does not occur after 300 epochs, you can extend the training to 600, 1200, or more epochs. +A common question that comes up is how to determine the number of epochs to train the model for. A good starting point is 300 epochs. If the model overfits early, you can reduce the number of epochs. If [overfitting](https://www.ultralytics.com/glossary/overfitting) does not occur after 300 epochs, you can extend the training to 600, 1200, or more epochs. However, the ideal number of epochs can vary based on your dataset's size and project goals. Larger datasets might require more epochs for the model to learn effectively, while smaller datasets might need fewer epochs to avoid overfitting. With respect to YOLOv8, you can set the `epochs` parameter in your training script. @@ -107,7 +107,7 @@ However, the ideal number of epochs can vary based on your dataset's size and pr Early stopping is a valuable technique for optimizing model training. By monitoring validation performance, you can halt training once the model stops improving. You can save computational resources and prevent overfitting. -The process involves setting a patience parameter that determines how many epochs to wait for an improvement in validation metrics before stopping training. If the model's performance does not improve within these epochs, training is stopped to avoid wasting time and resources. +The process involves setting a patience parameter that determines how many [epochs](https://www.ultralytics.com/glossary/epoch) to wait for an improvement in validation metrics before stopping training. If the model's performance does not improve within these epochs, training is stopped to avoid wasting time and resources.

Early Stopping Overview @@ -125,7 +125,7 @@ Local training provides greater control and customization, letting you tailor yo ## Selecting an Optimizer -An optimizer is an algorithm that adjusts the weights of your neural network to minimize the loss function, which measures how well the model is performing. In simpler terms, the optimizer helps the model learn by tweaking its parameters to reduce errors. Choosing the right optimizer directly affects how quickly and accurately the model learns. +An optimizer is an algorithm that adjusts the weights of your neural network to minimize the [loss function](https://www.ultralytics.com/glossary/loss-function), which measures how well the model is performing. In simpler terms, the optimizer helps the model learn by tweaking its parameters to reduce errors. Choosing the right optimizer directly affects how quickly and accurately the model learns. You can also fine-tune optimizer parameters to improve model performance. Adjusting the learning rate sets the size of the steps when updating parameters. For stability, you might start with a moderate learning rate and gradually decrease it over time to improve long-term learning. Additionally, setting the momentum determines how much influence past updates have on current updates. A common value for momentum is around 0.9. It generally provides a good balance. @@ -147,7 +147,7 @@ Different optimizers have various strengths and weaknesses. Let's take a glimpse - **RMSProp (Root Mean Square Propagation)**: - Adjusts the learning rate for each parameter by dividing the gradient by a running average of the magnitudes of recent gradients. - - Helps in handling the vanishing gradient problem and is effective for recurrent neural networks. + - Helps in handling the vanishing gradient problem and is effective for [recurrent neural networks](https://www.ultralytics.com/glossary/recurrent-neural-network-rnn). For YOLOv8, the `optimizer` parameter lets you choose from various optimizers, including SGD, Adam, AdamW, NAdam, RAdam, and RMSProp, or you can set it to `auto` for automatic selection based on model configuration. @@ -168,7 +168,7 @@ Using these resources will help you solve challenges and stay up-to-date with th ## Key Takeaways -Training computer vision models involves following good practices, optimizing your strategies, and solving problems as they arise. Techniques like adjusting batch sizes, mixed precision training, and starting with pre-trained weights can make your models work better and train faster. Methods like subset training and early stopping help you save time and resources. Staying connected with the community and keeping up with new trends will help you keep improving your model training skills. +Training computer vision models involves following good practices, optimizing your strategies, and solving problems as they arise. Techniques like adjusting batch sizes, mixed [precision](https://www.ultralytics.com/glossary/precision) training, and starting with pre-trained weights can make your models work better and train faster. Methods like subset training and early stopping help you save time and resources. Staying connected with the community and keeping up with new trends will help you keep improving your model training skills. ## FAQ @@ -178,7 +178,7 @@ To improve GPU utilization, set the `batch_size` parameter in your training conf ### What is mixed precision training, and how do I enable it in YOLOv8? -Mixed precision training utilizes both 16-bit (FP16) and 32-bit (FP32) floating-point types to balance computational speed and precision. This approach speeds up training and reduces memory usage without sacrificing model accuracy. To enable mixed precision training in YOLOv8, set the `amp` parameter to `True` in your training configuration. This activates Automatic Mixed Precision (AMP) training. For more details on this optimization technique, see the [training configuration](../modes/train.md). +Mixed precision training utilizes both 16-bit (FP16) and 32-bit (FP32) floating-point types to balance computational speed and precision. This approach speeds up training and reduces memory usage without sacrificing model [accuracy](https://www.ultralytics.com/glossary/accuracy). To enable mixed precision training in YOLOv8, set the `amp` parameter to `True` in your training configuration. This activates Automatic Mixed Precision (AMP) training. For more details on this optimization technique, see the [training configuration](../modes/train.md). ### How does multiscale training enhance YOLOv8 model performance? diff --git a/docs/en/guides/nvidia-jetson.md b/docs/en/guides/nvidia-jetson.md index db1b9b79..f352c76b 100644 --- a/docs/en/guides/nvidia-jetson.md +++ b/docs/en/guides/nvidia-jetson.md @@ -27,7 +27,7 @@ This comprehensive guide provides a detailed walkthrough for deploying Ultralyti ## What is NVIDIA Jetson? -NVIDIA Jetson is a series of embedded computing boards designed to bring accelerated AI (artificial intelligence) computing to edge devices. These compact and powerful devices are built around NVIDIA's GPU architecture and are capable of running complex AI algorithms and deep learning models directly on the device, without needing to rely on cloud computing resources. Jetson boards are often used in robotics, autonomous vehicles, industrial automation, and other applications where AI inference needs to be performed locally with low latency and high efficiency. Additionally, these boards are based on the ARM64 architecture and runs on lower power compared to traditional GPU computing devices. +NVIDIA Jetson is a series of embedded computing boards designed to bring accelerated AI (artificial intelligence) computing to edge devices. These compact and powerful devices are built around NVIDIA's GPU architecture and are capable of running complex AI algorithms and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models directly on the device, without needing to rely on [cloud computing](https://www.ultralytics.com/glossary/cloud-computing) resources. Jetson boards are often used in robotics, autonomous vehicles, industrial automation, and other applications where AI inference needs to be performed locally with low latency and high efficiency. Additionally, these boards are based on the ARM64 architecture and runs on lower power compared to traditional GPU computing devices. ## NVIDIA Jetson Series Comparison @@ -46,7 +46,7 @@ For a more detailed comparison table, please visit the **Technical Specification ## What is NVIDIA JetPack? -[NVIDIA JetPack SDK](https://developer.nvidia.com/embedded/jetpack) powering the Jetson modules is the most comprehensive solution and provides full development environment for building end-to-end accelerated AI applications and shortens time to market. JetPack includes Jetson Linux with bootloader, Linux kernel, Ubuntu desktop environment, and a complete set of libraries for acceleration of GPU computing, multimedia, graphics, and computer vision. It also includes samples, documentation, and developer tools for both host computer and developer kit, and supports higher level SDKs such as DeepStream for streaming video analytics, Isaac for robotics, and Riva for conversational AI. +[NVIDIA JetPack SDK](https://developer.nvidia.com/embedded/jetpack) powering the Jetson modules is the most comprehensive solution and provides full development environment for building end-to-end accelerated AI applications and shortens time to market. JetPack includes Jetson Linux with bootloader, Linux kernel, Ubuntu desktop environment, and a complete set of libraries for acceleration of GPU computing, multimedia, graphics, and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). It also includes samples, documentation, and developer tools for both host computer and developer kit, and supports higher level SDKs such as DeepStream for streaming video analytics, Isaac for robotics, and Riva for conversational AI. ## Flash JetPack to NVIDIA Jetson @@ -110,7 +110,7 @@ For a native installation without Docker, please refer to the steps below. #### Install Ultralytics Package -Here we will install Ultralytics package on the Jetson with optional dependencies so that we can export the PyTorch models to other different formats. We will mainly focus on [NVIDIA TensorRT exports](../integrations/tensorrt.md) because TensorRT will make sure we can get the maximum performance out of the Jetson devices. +Here we will install Ultralytics package on the Jetson with optional dependencies so that we can export the [PyTorch](https://www.ultralytics.com/glossary/pytorch) models to other different formats. We will mainly focus on [NVIDIA TensorRT exports](../integrations/tensorrt.md) because TensorRT will make sure we can get the maximum performance out of the Jetson devices. 1. Update packages list, install pip and upgrade to latest @@ -280,7 +280,7 @@ The YOLOv8n model in PyTorch format is converted to TensorRT to run inference wi ## NVIDIA Jetson Orin YOLOv8 Benchmarks -YOLOv8 benchmarks were run by the Ultralytics team on 10 different model formats measuring speed and accuracy: PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, TF SavedModel, TF GraphDef, TF Lite, PaddlePaddle, NCNN. Benchmarks were run on Seeed Studio reComputer J4012 powered by Jetson Orin NX 16GB device at FP32 precision with default input image size of 640. +YOLOv8 benchmarks were run by the Ultralytics team on 10 different model formats measuring speed and [accuracy](https://www.ultralytics.com/glossary/accuracy): PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, TF SavedModel, TF GraphDef, TF Lite, PaddlePaddle, NCNN. Benchmarks were run on Seeed Studio reComputer J4012 powered by Jetson Orin NX 16GB device at FP32 [precision](https://www.ultralytics.com/glossary/precision) with default input image size of 640. ### Comparison Chart diff --git a/docs/en/guides/object-blurring.md b/docs/en/guides/object-blurring.md index 709ca1bd..315bcd76 100644 --- a/docs/en/guides/object-blurring.md +++ b/docs/en/guides/object-blurring.md @@ -92,7 +92,7 @@ Object blurring with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly ### How can I implement real-time object blurring using YOLOv8? -To implement real-time object blurring with YOLOv8, follow the provided Python example. This involves using YOLOv8 for object detection and OpenCV for applying the blur effect. Here's a simplified version: +To implement real-time object blurring with YOLOv8, follow the provided Python example. This involves using YOLOv8 for [object detection](https://www.ultralytics.com/glossary/object-detection) and OpenCV for applying the blur effect. Here's a simplified version: ```python import cv2 @@ -132,7 +132,7 @@ For more detailed applications, check the [advantages of object blurring section ### Can I use Ultralytics YOLOv8 to blur faces in a video for privacy reasons? -Yes, Ultralytics YOLOv8 can be configured to detect and blur faces in videos to protect privacy. By training or using a pre-trained model to specifically recognize faces, the detection results can be processed with OpenCV to apply a blur effect. Refer to our guide on [object detection with YOLOv8](https://docs.ultralytics.com/models/yolov8/) and modify the code to target face detection. +Yes, Ultralytics YOLOv8 can be configured to detect and blur faces in videos to protect privacy. By training or using a pre-trained model to specifically recognize faces, the detection results can be processed with [OpenCV](https://www.ultralytics.com/glossary/opencv) to apply a blur effect. Refer to our guide on [object detection with YOLOv8](https://docs.ultralytics.com/models/yolov8/) and modify the code to target face detection. ### How does YOLOv8 compare to other object detection models like Faster R-CNN for object blurring? diff --git a/docs/en/guides/object-counting.md b/docs/en/guides/object-counting.md index 749ffbe8..bdec66e4 100644 --- a/docs/en/guides/object-counting.md +++ b/docs/en/guides/object-counting.md @@ -8,7 +8,7 @@ keywords: object counting, YOLOv8, Ultralytics, real-time object detection, AI, ## What is Object Counting? -Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves accurate identification and counting of specific objects in videos and camera streams. YOLOv8 excels in real-time applications, providing efficient and precise object counting for various scenarios like crowd analysis and surveillance, thanks to its state-of-the-art algorithms and deep learning capabilities. +Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves accurate identification and counting of specific objects in videos and camera streams. YOLOv8 excels in real-time applications, providing efficient and precise object counting for various scenarios like crowd analysis and surveillance, thanks to its state-of-the-art algorithms and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) capabilities. @@ -340,12 +340,12 @@ count_specific_classes("path/to/video.mp4", "output_specific_classes.avi", "yolo In this example, `classes_to_count=[0, 2]`, which means it counts objects of class `0` and `2` (e.g., person and car). -### Why should I use YOLOv8 over other object detection models for real-time applications? +### Why should I use YOLOv8 over other [object detection](https://www.ultralytics.com/glossary/object-detection) models for real-time applications? Ultralytics YOLOv8 provides several advantages over other object detection models like Faster R-CNN, SSD, and previous YOLO versions: 1. **Speed and Efficiency:** YOLOv8 offers real-time processing capabilities, making it ideal for applications requiring high-speed inference, such as surveillance and autonomous driving. -2. **Accuracy:** It provides state-of-the-art accuracy for object detection and tracking tasks, reducing the number of false positives and improving overall system reliability. +2. **[Accuracy](https://www.ultralytics.com/glossary/accuracy):** It provides state-of-the-art accuracy for object detection and tracking tasks, reducing the number of false positives and improving overall system reliability. 3. **Ease of Integration:** YOLOv8 offers seamless integration with various platforms and devices, including mobile and edge devices, which is crucial for modern AI applications. 4. **Flexibility:** Supports various tasks like object detection, segmentation, and tracking with configurable models to meet specific use-case requirements. diff --git a/docs/en/guides/object-cropping.md b/docs/en/guides/object-cropping.md index 09adb625..f4b50ed0 100644 --- a/docs/en/guides/object-cropping.md +++ b/docs/en/guides/object-cropping.md @@ -25,7 +25,7 @@ Object cropping with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly - **Focused Analysis**: YOLOv8 facilitates targeted object cropping, allowing for in-depth examination or processing of individual items within a scene. - **Reduced Data Volume**: By extracting only relevant objects, object cropping helps in minimizing data size, making it efficient for storage, transmission, or subsequent computational tasks. -- **Enhanced Precision**: YOLOv8's object detection accuracy ensures that the cropped objects maintain their spatial relationships, preserving the integrity of the visual information for detailed analysis. +- **Enhanced Precision**: YOLOv8's [object detection](https://www.ultralytics.com/glossary/object-detection) [accuracy](https://www.ultralytics.com/glossary/accuracy) ensures that the cropped objects maintain their spatial relationships, preserving the integrity of the visual information for detailed analysis. ## Visuals @@ -100,7 +100,7 @@ Object cropping with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly ### What is object cropping in Ultralytics YOLOv8 and how does it work? -Object cropping using [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) involves isolating and extracting specific objects from an image or video based on YOLOv8's detection capabilities. This process allows for focused analysis, reduced data volume, and enhanced precision by leveraging YOLOv8 to identify objects with high accuracy and crop them accordingly. For an in-depth tutorial, refer to the [object cropping example](#object-cropping-using-ultralytics-yolov8). +Object cropping using [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) involves isolating and extracting specific objects from an image or video based on YOLOv8's detection capabilities. This process allows for focused analysis, reduced data volume, and enhanced [precision](https://www.ultralytics.com/glossary/precision) by leveraging YOLOv8 to identify objects with high accuracy and crop them accordingly. For an in-depth tutorial, refer to the [object cropping example](#object-cropping-using-ultralytics-yolov8). ### Why should I use Ultralytics YOLOv8 for object cropping over other solutions? diff --git a/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md b/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md index 63fbb7a9..154ec7a8 100644 --- a/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md +++ b/docs/en/guides/optimizing-openvino-latency-vs-throughput-modes.md @@ -10,7 +10,7 @@ keywords: Ultralytics YOLO, OpenVINO optimization, deep learning, model inferenc ## Introduction -When deploying deep learning models, particularly those for object detection such as Ultralytics YOLO models, achieving optimal performance is crucial. This guide delves into leveraging Intel's OpenVINO toolkit to optimize inference, focusing on latency and throughput. Whether you're working on consumer-grade applications or large-scale deployments, understanding and applying these optimization strategies will ensure your models run efficiently on various devices. +When deploying [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models, particularly those for [object detection](https://www.ultralytics.com/glossary/object-detection) such as Ultralytics YOLO models, achieving optimal performance is crucial. This guide delves into leveraging Intel's OpenVINO toolkit to optimize inference, focusing on latency and throughput. Whether you're working on consumer-grade applications or large-scale deployments, understanding and applying these optimization strategies will ensure your models run efficiently on various devices. ## Optimizing for Latency @@ -123,6 +123,6 @@ Yes, Ultralytics YOLO models are highly versatile and can be integrated with var - **TensorRT:** For NVIDIA GPU optimization, follow the [TensorRT integration guide](https://docs.ultralytics.com/integrations/tensorrt/). - **CoreML:** For Apple devices, refer to our [CoreML export instructions](https://docs.ultralytics.com/integrations/coreml/). -- **TensorFlow.js:** For web and Node.js apps, see the [TF.js conversion guide](https://docs.ultralytics.com/integrations/tfjs/). +- **[TensorFlow](https://www.ultralytics.com/glossary/tensorflow).js:** For web and Node.js apps, see the [TF.js conversion guide](https://docs.ultralytics.com/integrations/tfjs/). Explore more integrations on the [Ultralytics Integrations page](https://docs.ultralytics.com/integrations/). diff --git a/docs/en/guides/preprocessing_annotated_data.md b/docs/en/guides/preprocessing_annotated_data.md index 36fcf9f9..fcd329c7 100644 --- a/docs/en/guides/preprocessing_annotated_data.md +++ b/docs/en/guides/preprocessing_annotated_data.md @@ -4,7 +4,7 @@ description: Learn essential data preprocessing techniques for annotated compute keywords: data preprocessing, computer vision, image resizing, normalization, data augmentation, training dataset, validation dataset, test dataset, YOLOv8 --- -# Data Preprocessing Techniques for Annotated Computer Vision Data +# Data Preprocessing Techniques for Annotated [Computer Vision](https://www.ultralytics.com/glossary/computer-vision-cv) Data ## Introduction @@ -33,7 +33,7 @@ You can resize your images using the following methods: To make resizing a simpler task, you can use the following tools: -- **OpenCV**: A popular computer vision library with extensive functions for image processing. +- **[OpenCV](https://www.ultralytics.com/glossary/opencv)**: A popular computer vision library with extensive functions for image processing. - **PIL (Pillow)**: A Python Imaging Library for opening, manipulating, and saving image files. With respect to YOLOv8, the 'imgsz' parameter during [model training](../modes/train.md) allows for flexible input sizes. When set to a specific size, such as 640, the model will resize input images so their largest dimension is 640 pixels while maintaining the original aspect ratio. @@ -65,7 +65,7 @@ The most commonly discussed data preprocessing step is data augmentation. Data a Here are some other benefits of data augmentation: - **Creates a More Robust Dataset**: Data augmentation can make the model more robust to variations and distortions in the input data. This includes changes in lighting, orientation, and scale. -- **Cost-Effective**: Data augmentation is a cost-effective way to increase the amount of training data without collecting and labeling new data. +- **Cost-Effective**: Data augmentation is a cost-effective way to increase the amount of [training data](https://www.ultralytics.com/glossary/training-data) without collecting and labeling new data. - **Better Use of Data**: Every available data point is used to its maximum potential by creating new variations #### Data Augmentation Methods @@ -96,7 +96,7 @@ Here's what each step of preprocessing would look like for this project: - Resizing Images: Since YOLOv8 handles flexible input sizes and performs resizing automatically, manual resizing is not required. The model will adjust the image size according to the specified 'imgsz' parameter during training. - Normalizing Pixel Values: YOLOv8 automatically normalizes pixel values to a range of 0 to 1 during preprocessing, so it's not required. - Splitting the Dataset: Divide the dataset into training (70%), validation (20%), and test (10%) sets using tools like scikit-learn. -- Data Augmentation: Modify the dataset configuration file (.yaml) to include data augmentation techniques such as random crops, horizontal flips, and brightness adjustments. +- [Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation): Modify the dataset configuration file (.yaml) to include data augmentation techniques such as random crops, horizontal flips, and brightness adjustments. These steps make sure the dataset is prepared without any potential issues and is ready for Exploratory Data Analysis (EDA). @@ -120,7 +120,7 @@ Common tools for visualizations include: ### Using Ultralytics Explorer for EDA -For a more advanced approach to EDA, you can use the Ultralytics Explorer tool. It offers robust capabilities for exploring computer vision datasets. By supporting semantic search, SQL queries, and vector similarity search, the tool makes it easy to analyze and understand your data. With Ultralytics Explorer, you can create embeddings for your dataset to find similar images, run SQL queries for detailed analysis, and perform semantic searches, all through a user-friendly graphical interface. +For a more advanced approach to EDA, you can use the Ultralytics Explorer tool. It offers robust capabilities for exploring computer vision datasets. By supporting semantic search, SQL queries, and vector similarity search, the tool makes it easy to analyze and understand your data. With Ultralytics Explorer, you can create [embeddings](https://www.ultralytics.com/glossary/embeddings) for your dataset to find similar images, run SQL queries for detailed analysis, and perform semantic searches, all through a user-friendly graphical interface.

Overview of Ultralytics Explorer @@ -151,7 +151,7 @@ Data preprocessing is essential in computer vision projects because it ensures t ### How can I use Ultralytics YOLO for data augmentation? -For data augmentation with Ultralytics YOLOv8, you need to modify the dataset configuration file (.yaml). In this file, you can specify various augmentation techniques such as random crops, horizontal flips, and brightness adjustments. This can be effectively done using the training configurations [explained here](../modes/train.md). Data augmentation helps create a more robust dataset, reduce overfitting, and improve model generalization. +For data augmentation with Ultralytics YOLOv8, you need to modify the dataset configuration file (.yaml). In this file, you can specify various augmentation techniques such as random crops, horizontal flips, and brightness adjustments. This can be effectively done using the training configurations [explained here](../modes/train.md). Data augmentation helps create a more robust dataset, reduce [overfitting](https://www.ultralytics.com/glossary/overfitting), and improve model generalization. ### What are the best data normalization techniques for computer vision data? @@ -164,7 +164,7 @@ For YOLOv8, normalization is handled automatically, including conversion to RGB ### How should I split my annotated dataset for training? -To split your dataset, a common practice is to divide it into 70% for training, 20% for validation, and 10% for testing. It is important to maintain the data distribution of classes across these splits and avoid data leakage by performing augmentation only on the training set. Use tools like scikit-learn or TensorFlow for efficient dataset splitting. See the detailed guide on [dataset preparation](../guides/data-collection-and-annotation.md). +To split your dataset, a common practice is to divide it into 70% for training, 20% for validation, and 10% for testing. It is important to maintain the data distribution of classes across these splits and avoid data leakage by performing augmentation only on the training set. Use tools like scikit-learn or [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) for efficient dataset splitting. See the detailed guide on [dataset preparation](../guides/data-collection-and-annotation.md). ### Can I handle varying image sizes in YOLOv8 without manual resizing? diff --git a/docs/en/guides/queue-management.md b/docs/en/guides/queue-management.md index 993d4141..9fb4897e 100644 --- a/docs/en/guides/queue-management.md +++ b/docs/en/guides/queue-management.md @@ -187,7 +187,7 @@ Using Ultralytics YOLOv8 for queue management offers several benefits: For more details, explore our [Queue Management](https://docs.ultralytics.com/reference/solutions/queue_management/) solutions. -### Why should I choose Ultralytics YOLOv8 over competitors like TensorFlow or Detectron2 for queue management? +### Why should I choose Ultralytics YOLOv8 over competitors like [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) or Detectron2 for queue management? Ultralytics YOLOv8 has several advantages over TensorFlow and Detectron2 for queue management: diff --git a/docs/en/guides/raspberry-pi.md b/docs/en/guides/raspberry-pi.md index 25d45068..c25557e8 100644 --- a/docs/en/guides/raspberry-pi.md +++ b/docs/en/guides/raspberry-pi.md @@ -49,7 +49,7 @@ The first thing to do after getting your hands on a Raspberry Pi is to flash a m ## Set Up Ultralytics -There are two ways of setting up Ultralytics package on Raspberry Pi to build your next Computer Vision project. You can use either of them. +There are two ways of setting up Ultralytics package on Raspberry Pi to build your next [Computer Vision](https://www.ultralytics.com/glossary/computer-vision-cv) project. You can use either of them. - [Start with Docker](#start-with-docker) - [Start without Docker](#start-without-docker) @@ -70,7 +70,7 @@ After this is done, skip to [Use NCNN on Raspberry Pi section](#use-ncnn-on-rasp #### Install Ultralytics Package -Here we will install Ultralytics package on the Raspberry Pi with optional dependencies so that we can export the PyTorch models to other different formats. +Here we will install Ultralytics package on the Raspberry Pi with optional dependencies so that we can export the [PyTorch](https://www.ultralytics.com/glossary/pytorch) models to other different formats. 1. Update packages list, install pip and upgrade to latest @@ -136,7 +136,7 @@ The YOLOv8n model in PyTorch format is converted to NCNN to run inference with t ## Raspberry Pi 5 vs Raspberry Pi 4 YOLOv8 Benchmarks -YOLOv8 benchmarks were run by the Ultralytics team on nine different model formats measuring speed and accuracy: PyTorch, TorchScript, ONNX, OpenVINO, TF SavedModel, TF GraphDef, TF Lite, PaddlePaddle, NCNN. Benchmarks were run on both Raspberry Pi 5 and Raspberry Pi 4 at FP32 precision with default input image size of 640. +YOLOv8 benchmarks were run by the Ultralytics team on nine different model formats measuring speed and [accuracy](https://www.ultralytics.com/glossary/accuracy): PyTorch, TorchScript, ONNX, OpenVINO, TF SavedModel, TF GraphDef, TF Lite, PaddlePaddle, NCNN. Benchmarks were run on both Raspberry Pi 5 and Raspberry Pi 4 at FP32 [precision](https://www.ultralytics.com/glossary/precision) with default input image size of 640. !!! note diff --git a/docs/en/guides/region-counting.md b/docs/en/guides/region-counting.md index f2be9d45..a27c2b4e 100644 --- a/docs/en/guides/region-counting.md +++ b/docs/en/guides/region-counting.md @@ -8,7 +8,7 @@ keywords: object counting, regions, YOLOv8, computer vision, Ultralytics, effici ## What is Object Counting in Regions? -[Object counting](../guides/object-counting.md) in regions with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves precisely determining the number of objects within specified areas using advanced computer vision. This approach is valuable for optimizing processes, enhancing security, and improving efficiency in various applications. +[Object counting](../guides/object-counting.md) in regions with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves precisely determining the number of objects within specified areas using advanced [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv). This approach is valuable for optimizing processes, enhancing security, and improving efficiency in various applications.


@@ -23,7 +23,7 @@ keywords: object counting, regions, YOLOv8, computer vision, Ultralytics, effici ## Advantages of Object Counting in Regions? -- **Precision and Accuracy:** Object counting in regions with advanced computer vision ensures precise and accurate counts, minimizing errors often associated with manual counting. +- **[Precision](https://www.ultralytics.com/glossary/precision) and Accuracy:** Object counting in regions with advanced computer vision ensures precise and accurate counts, minimizing errors often associated with manual counting. - **Efficiency Improvement:** Automated object counting enhances operational efficiency, providing real-time results and streamlining processes across different applications. - **Versatility and Application:** The versatility of object counting in regions makes it applicable across various domains, from manufacturing and surveillance to traffic monitoring, contributing to its widespread utility and effectiveness. @@ -75,21 +75,21 @@ python yolov8_region_counter.py --source "path/to/video.mp4" --view-img ### Optional Arguments -| Name | Type | Default | Description | -| -------------------- | ------ | ------------ | ------------------------------------------ | -| `--source` | `str` | `None` | Path to video file, for webcam 0 | -| `--line_thickness` | `int` | `2` | Bounding Box thickness | -| `--save-img` | `bool` | `False` | Save the predicted video/image | -| `--weights` | `str` | `yolov8n.pt` | Weights file path | -| `--classes` | `list` | `None` | Detect specific classes i.e. --classes 0 2 | -| `--region-thickness` | `int` | `2` | Region Box thickness | -| `--track-thickness` | `int` | `2` | Tracking line thickness | +| Name | Type | Default | Description | +| -------------------- | ------ | ------------ | --------------------------------------------------------------------------- | +| `--source` | `str` | `None` | Path to video file, for webcam 0 | +| `--line_thickness` | `int` | `2` | [Bounding Box](https://www.ultralytics.com/glossary/bounding-box) thickness | +| `--save-img` | `bool` | `False` | Save the predicted video/image | +| `--weights` | `str` | `yolov8n.pt` | Weights file path | +| `--classes` | `list` | `None` | Detect specific classes i.e. --classes 0 2 | +| `--region-thickness` | `int` | `2` | Region Box thickness | +| `--track-thickness` | `int` | `2` | Tracking line thickness | ## FAQ ### What is object counting in specified regions using Ultralytics YOLOv8? -Object counting in specified regions with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) involves detecting and tallying the number of objects within defined areas using advanced computer vision. This precise method enhances efficiency and accuracy across various applications like manufacturing, surveillance, and traffic monitoring. +Object counting in specified regions with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) involves detecting and tallying the number of objects within defined areas using advanced computer vision. This precise method enhances efficiency and [accuracy](https://www.ultralytics.com/glossary/accuracy) across various applications like manufacturing, surveillance, and traffic monitoring. ### How do I run the object counting script with Ultralytics YOLOv8? diff --git a/docs/en/guides/ros-quickstart.md b/docs/en/guides/ros-quickstart.md index 227286de..27371131 100644 --- a/docs/en/guides/ros-quickstart.md +++ b/docs/en/guides/ros-quickstart.md @@ -69,7 +69,7 @@ Apart from the ROS environment, you will need to install the following dependenc ## Use Ultralytics with ROS `sensor_msgs/Image` -The `sensor_msgs/Image` [message type](https://docs.ros.org/en/api/sensor_msgs/html/msg/Image.html) is commonly used in ROS for representing image data. It contains fields for encoding, height, width, and pixel data, making it suitable for transmitting images captured by cameras or other sensors. Image messages are widely used in robotic applications for tasks such as visual perception, object detection, and navigation. +The `sensor_msgs/Image` [message type](https://docs.ros.org/en/api/sensor_msgs/html/msg/Image.html) is commonly used in ROS for representing image data. It contains fields for encoding, height, width, and pixel data, making it suitable for transmitting images captured by cameras or other sensors. Image messages are widely used in robotic applications for tasks such as visual perception, [object detection](https://www.ultralytics.com/glossary/object-detection), and navigation.

Detection and Segmentation in ROS Gazebo @@ -360,7 +360,7 @@ A point cloud is a collection of data points defined within a three-dimensional Point Clouds can be obtained using various sensors: - 1. **LIDAR (Light Detection and Ranging)**: Uses laser pulses to measure distances to objects and create high-precision 3D maps. + 1. **LIDAR (Light Detection and Ranging)**: Uses laser pulses to measure distances to objects and create high-[precision](https://www.ultralytics.com/glossary/precision) 3D maps. 2. **Depth Cameras**: Capture depth information for each pixel, allowing for 3D reconstruction of the scene. 3. **Stereo Cameras**: Utilize two or more cameras to obtain depth information through triangulation. 4. **Structured Light Scanners**: Project a known pattern onto a surface and measure the deformation to calculate depth. diff --git a/docs/en/guides/sahi-tiled-inference.md b/docs/en/guides/sahi-tiled-inference.md index 6b23b21c..1137d6b8 100644 --- a/docs/en/guides/sahi-tiled-inference.md +++ b/docs/en/guides/sahi-tiled-inference.md @@ -6,7 +6,7 @@ keywords: YOLOv8, SAHI, Sliced Inference, Object Detection, Ultralytics, High-re # Ultralytics Docs: Using YOLOv8 with SAHI for Sliced Inference -Welcome to the Ultralytics documentation on how to use YOLOv8 with [SAHI](https://github.com/obss/sahi) (Slicing Aided Hyper Inference). This comprehensive guide aims to furnish you with all the essential knowledge you'll need to implement SAHI alongside YOLOv8. We'll deep-dive into what SAHI is, why sliced inference is critical for large-scale applications, and how to integrate these functionalities with YOLOv8 for enhanced object detection performance. +Welcome to the Ultralytics documentation on how to use YOLOv8 with [SAHI](https://github.com/obss/sahi) (Slicing Aided Hyper Inference). This comprehensive guide aims to furnish you with all the essential knowledge you'll need to implement SAHI alongside YOLOv8. We'll deep-dive into what SAHI is, why sliced inference is critical for large-scale applications, and how to integrate these functionalities with YOLOv8 for enhanced [object detection](https://www.ultralytics.com/glossary/object-detection) performance.

SAHI Sliced Inference Overview @@ -31,7 +31,7 @@ SAHI (Slicing Aided Hyper Inference) is an innovative library designed to optimi - **Seamless Integration**: SAHI integrates effortlessly with YOLO models, meaning you can start slicing and detecting without a lot of code modification. - **Resource Efficiency**: By breaking down large images into smaller parts, SAHI optimizes the memory usage, allowing you to run high-quality detection on hardware with limited resources. -- **High Accuracy**: SAHI maintains the detection accuracy by employing smart algorithms to merge overlapping detection boxes during the stitching process. +- **High [Accuracy](https://www.ultralytics.com/glossary/accuracy)**: SAHI maintains the detection accuracy by employing smart algorithms to merge overlapping detection boxes during the stitching process. ## What is Sliced Inference? @@ -202,7 +202,7 @@ If you use SAHI in your research or development work, please cite the original S } ``` -We extend our thanks to the SAHI research group for creating and maintaining this invaluable resource for the computer vision community. For more information about SAHI and its creators, visit the [SAHI GitHub repository](https://github.com/obss/sahi). +We extend our thanks to the SAHI research group for creating and maintaining this invaluable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about SAHI and its creators, visit the [SAHI GitHub repository](https://github.com/obss/sahi). ## FAQ diff --git a/docs/en/guides/security-alarm-system.md b/docs/en/guides/security-alarm-system.md index 4b5cdeeb..d90e44a5 100644 --- a/docs/en/guides/security-alarm-system.md +++ b/docs/en/guides/security-alarm-system.md @@ -8,10 +8,10 @@ keywords: YOLOv8, Security Alarm System, real-time object detection, Ultralytics Security Alarm System -The Security Alarm System Project utilizing Ultralytics YOLOv8 integrates advanced computer vision capabilities to enhance security measures. YOLOv8, developed by Ultralytics, provides real-time object detection, allowing the system to identify and respond to potential security threats promptly. This project offers several advantages: +The Security Alarm System Project utilizing Ultralytics YOLOv8 integrates advanced [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) capabilities to enhance security measures. YOLOv8, developed by Ultralytics, provides real-time object detection, allowing the system to identify and respond to potential security threats promptly. This project offers several advantages: - **Real-time Detection:** YOLOv8's efficiency enables the Security Alarm System to detect and respond to security incidents in real-time, minimizing response time. -- **Accuracy:** YOLOv8 is known for its accuracy in object detection, reducing false positives and enhancing the reliability of the security alarm system. +- **[Accuracy](https://www.ultralytics.com/glossary/accuracy):** YOLOv8 is known for its accuracy in object detection, reducing false positives and enhancing the reliability of the security alarm system. - **Integration Capabilities:** The project can be seamlessly integrated with existing security infrastructure, providing an upgraded layer of intelligent surveillance.

@@ -22,7 +22,7 @@ The Security Alarm System Project utilizing Ultralytics YOLOv8 integrates advanc allowfullscreen>
- Watch: Security Alarm System Project with Ultralytics YOLOv8 Object Detection + Watch: Security Alarm System Project with Ultralytics YOLOv8 [Object Detection](https://www.ultralytics.com/glossary/object-detection)

### Code @@ -193,8 +193,8 @@ Running Ultralytics YOLOv8 on a standard setup typically requires around 5GB of ### What makes Ultralytics YOLOv8 different from other object detection models like Faster R-CNN or SSD? -Ultralytics YOLOv8 provides an edge over models like Faster R-CNN or SSD with its real-time detection capabilities and higher accuracy. Its unique architecture allows it to process images much faster without compromising on precision, making it ideal for time-sensitive applications like security alarm systems. For a comprehensive comparison of object detection models, you can explore our [guide](https://docs.ultralytics.com/models/). +Ultralytics YOLOv8 provides an edge over models like Faster R-CNN or SSD with its real-time detection capabilities and higher accuracy. Its unique architecture allows it to process images much faster without compromising on [precision](https://www.ultralytics.com/glossary/precision), making it ideal for time-sensitive applications like security alarm systems. For a comprehensive comparison of object detection models, you can explore our [guide](https://docs.ultralytics.com/models/). ### How can I reduce the frequency of false positives in my security system using Ultralytics YOLOv8? -To reduce false positives, ensure your Ultralytics YOLOv8 model is adequately trained with a diverse and well-annotated dataset. Fine-tuning hyperparameters and regularly updating the model with new data can significantly improve detection accuracy. Detailed hyperparameter tuning techniques can be found in our [hyperparameter tuning guide](../guides/hyperparameter-tuning.md). +To reduce false positives, ensure your Ultralytics YOLOv8 model is adequately trained with a diverse and well-annotated dataset. Fine-tuning hyperparameters and regularly updating the model with new data can significantly improve detection accuracy. Detailed [hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning) techniques can be found in our [hyperparameter tuning guide](../guides/hyperparameter-tuning.md). diff --git a/docs/en/guides/speed-estimation.md b/docs/en/guides/speed-estimation.md index 9b76d0a3..6f3726c9 100644 --- a/docs/en/guides/speed-estimation.md +++ b/docs/en/guides/speed-estimation.md @@ -8,7 +8,7 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision ## What is Speed Estimation? -[Speed estimation](https://www.ultralytics.com/blog/ultralytics-yolov8-for-speed-estimation-in-computer-vision-projects) is the process of calculating the rate of movement of an object within a given context, often employed in computer vision applications. Using [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) you can now calculate the speed of object using [object tracking](../modes/track.md) alongside distance and time data, crucial for tasks like traffic and surveillance. The accuracy of speed estimation directly influences the efficiency and reliability of various applications, making it a key component in the advancement of intelligent systems and real-time decision-making processes. +[Speed estimation](https://www.ultralytics.com/blog/ultralytics-yolov8-for-speed-estimation-in-computer-vision-projects) is the process of calculating the rate of movement of an object within a given context, often employed in [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) applications. Using [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) you can now calculate the speed of object using [object tracking](../modes/track.md) alongside distance and time data, crucial for tasks like traffic and surveillance. The accuracy of speed estimation directly influences the efficiency and reliability of various applications, making it a key component in the advancement of intelligent systems and real-time decision-making processes.


@@ -104,7 +104,7 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision ### How do I estimate object speed using Ultralytics YOLOv8? -Estimating object speed with Ultralytics YOLOv8 involves combining object detection and tracking techniques. First, you need to detect objects in each frame using the YOLOv8 model. Then, track these objects across frames to calculate their movement over time. Finally, use the distance traveled by the object between frames and the frame rate to estimate its speed. +Estimating object speed with Ultralytics YOLOv8 involves combining [object detection](https://www.ultralytics.com/glossary/object-detection) and tracking techniques. First, you need to detect objects in each frame using the YOLOv8 model. Then, track these objects across frames to calculate their movement over time. Finally, use the distance traveled by the object between frames and the frame rate to estimate its speed. **Example**: @@ -152,7 +152,7 @@ Using Ultralytics YOLOv8 for speed estimation offers significant advantages in t For more applications, see [advantages of speed estimation](#advantages-of-speed-estimation). -### Can YOLOv8 be integrated with other AI frameworks like TensorFlow or PyTorch? +### Can YOLOv8 be integrated with other AI frameworks like [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) or [PyTorch](https://www.ultralytics.com/glossary/pytorch)? Yes, YOLOv8 can be integrated with other AI frameworks like TensorFlow and PyTorch. Ultralytics provides support for exporting YOLOv8 models to various formats like ONNX, TensorRT, and CoreML, ensuring smooth interoperability with other ML frameworks. @@ -166,7 +166,7 @@ Learn more about exporting models in our [guide on export](../modes/export.md). ### How accurate is the speed estimation using Ultralytics YOLOv8? -The accuracy of speed estimation using Ultralytics YOLOv8 depends on several factors, including the quality of the object tracking, the resolution and frame rate of the video, and environmental variables. While the speed estimator provides reliable estimates, it may not be 100% accurate due to variances in frame processing speed and object occlusion. +The [accuracy](https://www.ultralytics.com/glossary/accuracy) of speed estimation using Ultralytics YOLOv8 depends on several factors, including the quality of the object tracking, the resolution and frame rate of the video, and environmental variables. While the speed estimator provides reliable estimates, it may not be 100% accurate due to variances in frame processing speed and object occlusion. **Note**: Always consider margin of error and validate the estimates with ground truth data when possible. diff --git a/docs/en/guides/steps-of-a-cv-project.md b/docs/en/guides/steps-of-a-cv-project.md index ec9b84ff..bbdbef5f 100644 --- a/docs/en/guides/steps-of-a-cv-project.md +++ b/docs/en/guides/steps-of-a-cv-project.md @@ -8,7 +8,7 @@ keywords: Computer Vision, AI, Object Detection, Image Classification, Instance ## Introduction -Computer vision is a subfield of artificial intelligence (AI) that helps computers see and understand the world like humans do. It processes and analyzes images or videos to extract information, recognize patterns, and make decisions based on that data. +Computer vision is a subfield of [artificial intelligence](https://www.ultralytics.com/glossary/artificial-intelligence-ai) (AI) that helps computers see and understand the world like humans do. It processes and analyzes images or videos to extract information, recognize patterns, and make decisions based on that data.


@@ -18,7 +18,7 @@ Computer vision is a subfield of artificial intelligence (AI) that helps compute allowfullscreen>
- Watch: How to Do Computer Vision Projects | A Step-by-Step Guide + Watch: How to Do [Computer Vision](https://www.ultralytics.com/glossary/computer-vision-cv) Projects | A Step-by-Step Guide

Computer vision techniques like [object detection](../tasks/detect.md), [image classification](../tasks/classify.md), and [instance segmentation](../tasks/segment.md) can be applied across various industries, from [autonomous driving](https://www.ultralytics.com/solutions/ai-in-self-driving) to [medical imaging](https://www.ultralytics.com/solutions/ai-in-healthcare) to gain valuable insights. @@ -60,7 +60,7 @@ Here are some examples of project objectives and the computer vision tasks that - **Computer Vision Task:** Image segmentation is suitable for medical imaging because it provides accurate and detailed boundaries of tumors that are crucial for assessing size, shape, and treatment planning. - **Objective:** To create a digital system that categorizes various documents (e.g., invoices, receipts, legal paperwork) to improve organizational efficiency and document retrieval. - - **Computer Vision Task:** Image classification is ideal here as it handles one document at a time, without needing to consider the document's position in the image. This approach simplifies and accelerates the sorting process. + - **Computer Vision Task:** [Image classification](https://www.ultralytics.com/glossary/image-classification) is ideal here as it handles one document at a time, without needing to consider the document's position in the image. This approach simplifies and accelerates the sorting process. ### Step 1.5: Selecting the Right Model and Training Approach @@ -68,13 +68,13 @@ After understanding the project objective and suitable computer vision tasks, an Depending on the objective, you might choose to select the model first or after seeing what data you are able to collect in Step 2. For example, suppose your project is highly dependent on the availability of specific types of data. In that case, it may be more practical to gather and analyze the data first before selecting a model. On the other hand, if you have a clear understanding of the model requirements, you can choose the model first and then collect data that fits those specifications. -Choosing between training from scratch or using transfer learning affects how you prepare your data. Training from scratch requires a diverse dataset to build the model's understanding from the ground up. Transfer learning, on the other hand, allows you to use a pre-trained model and adapt it with a smaller, more specific dataset. Also, choosing a specific model to train will determine how you need to prepare your data, such as resizing images or adding annotations, according to the model's specific requirements. +Choosing between training from scratch or using [transfer learning](https://www.ultralytics.com/glossary/transfer-learning) affects how you prepare your data. Training from scratch requires a diverse dataset to build the model's understanding from the ground up. Transfer learning, on the other hand, allows you to use a pre-trained model and adapt it with a smaller, more specific dataset. Also, choosing a specific model to train will determine how you need to prepare your data, such as resizing images or adding annotations, according to the model's specific requirements.

Training From Scratch Vs. Using Transfer Learning

-Note: When choosing a model, consider its [deployment](./model-deployment-options.md) to ensure compatibility and performance. For example, lightweight models are ideal for edge computing due to their efficiency on resource-constrained devices. To learn more about the key points related to defining your project, read [our guide](./defining-project-goals.md) on defining your project's goals and selecting the right model. +Note: When choosing a model, consider its [deployment](./model-deployment-options.md) to ensure compatibility and performance. For example, lightweight models are ideal for [edge computing](https://www.ultralytics.com/glossary/edge-computing) due to their efficiency on resource-constrained devices. To learn more about the key points related to defining your project, read [our guide](./defining-project-goals.md) on defining your project's goals and selecting the right model. Before getting into the hands-on work of a computer vision project, it's important to have a clear understanding of these details. Double-check that you've considered the following before moving on to Step 2: @@ -93,8 +93,8 @@ Some libraries, like Ultralytics, provide [built-in support for various datasets However, if you choose to collect images or take your own pictures, you'll need to annotate your data. Data annotation is the process of labeling your data to impart knowledge to your model. The type of data annotation you'll work with depends on your specific computer vision technique. Here are some examples: - **Image Classification:** You'll label the entire image as a single class. -- **Object Detection:** You'll draw bounding boxes around each object in the image and label each box. -- **Image Segmentation:** You'll label each pixel in the image according to the object it belongs to, creating detailed object boundaries. +- **[Object Detection](https://www.ultralytics.com/glossary/object-detection):** You'll draw bounding boxes around each object in the image and label each box. +- **[Image Segmentation](https://www.ultralytics.com/glossary/image-segmentation):** You'll label each pixel in the image according to the object it belongs to, creating detailed object boundaries.

Different Types of Image Annotation @@ -102,14 +102,14 @@ However, if you choose to collect images or take your own pictures, you'll need [Data collection and annotation](./data-collection-and-annotation.md) can be a time-consuming manual effort. Annotation tools can help make this process easier. Here are some useful open annotation tools: [LabeI Studio](https://github.com/HumanSignal/label-studio), [CVAT](https://github.com/cvat-ai/cvat), and [Labelme](https://github.com/labelmeai/labelme). -## Step 3: Data Augmentation and Splitting Your Dataset +## Step 3: [Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation) and Splitting Your Dataset After collecting and annotating your image data, it's important to first split your dataset into training, validation, and test sets before performing data augmentation. Splitting your dataset before augmentation is crucial to test and validate your model on original, unaltered data. It helps accurately assess how well the model generalizes to new, unseen data. Here's how to split your data: - **Training Set:** It is the largest portion of your data, typically 70-80% of the total, used to train your model. -- **Validation Set:** Usually around 10-15% of your data; this set is used to tune hyperparameters and validate the model during training, helping to prevent overfitting. +- **Validation Set:** Usually around 10-15% of your data; this set is used to tune hyperparameters and validate the model during training, helping to prevent [overfitting](https://www.ultralytics.com/glossary/overfitting). - **Test Set:** The remaining 10-15% of your data is set aside as the test set. It is used to evaluate the model's performance on unseen data after training is complete. After splitting your data, you can perform data augmentation by applying transformations like rotating, scaling, and flipping images to artificially increase the size of your dataset. Data augmentation makes your model more robust to variations and improves its performance on unseen images. @@ -118,7 +118,7 @@ After splitting your data, you can perform data augmentation by applying transfo Examples of Data Augmentations

-Libraries like OpenCV, Albumentations, and TensorFlow offer flexible augmentation functions that you can use. Additionally, some libraries, such as Ultralytics, have [built-in augmentation settings](../modes/train.md) directly within its model training function, simplifying the process. +Libraries like [OpenCV](https://www.ultralytics.com/glossary/opencv), Albumentations, and [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) offer flexible augmentation functions that you can use. Additionally, some libraries, such as Ultralytics, have [built-in augmentation settings](../modes/train.md) directly within its model training function, simplifying the process. To understand your data better, you can use tools like [Matplotlib](https://matplotlib.org/) or [Seaborn](https://seaborn.pydata.org/) to visualize the images and analyze their distribution and characteristics. Visualizing your data helps identify patterns, anomalies, and the effectiveness of your augmentation techniques. You can also use [Ultralytics Explorer](../datasets/explorer/index.md), a tool for exploring computer vision datasets with semantic search, SQL queries, and vector similarity search. @@ -134,23 +134,23 @@ Once your dataset is ready for training, you can focus on setting up the necessa First, you'll need to make sure your environment is configured correctly. Typically, this includes the following: -- Installing essential libraries and frameworks like TensorFlow, PyTorch, or [Ultralytics](../quickstart.md). +- Installing essential libraries and frameworks like TensorFlow, [PyTorch](https://www.ultralytics.com/glossary/pytorch), or [Ultralytics](../quickstart.md). - If you are using a GPU, installing libraries like CUDA and cuDNN will help enable GPU acceleration and speed up the training process. -Then, you can load your training and validation datasets into your environment. Normalize and preprocess the data through resizing, format conversion, or augmentation. With your model selected, configure the layers and specify hyperparameters. Compile the model by setting the loss function, optimizer, and performance metrics. +Then, you can load your training and validation datasets into your environment. Normalize and preprocess the data through resizing, format conversion, or augmentation. With your model selected, configure the layers and specify hyperparameters. Compile the model by setting the [loss function](https://www.ultralytics.com/glossary/loss-function), optimizer, and performance metrics. -Libraries like Ultralytics simplify the training process. You can [start training](../modes/train.md) by feeding data into the model with minimal code. These libraries handle weight adjustments, backpropagation, and validation automatically. They also offer tools to monitor progress and adjust hyperparameters easily. After training, save the model and its weights with a few commands. +Libraries like Ultralytics simplify the training process. You can [start training](../modes/train.md) by feeding data into the model with minimal code. These libraries handle weight adjustments, [backpropagation](https://www.ultralytics.com/glossary/backpropagation), and validation automatically. They also offer tools to monitor progress and adjust hyperparameters easily. After training, save the model and its weights with a few commands. It's important to keep in mind that proper dataset management is vital for efficient training. Use version control for datasets to track changes and ensure reproducibility. Tools like [DVC (Data Version Control)](../integrations/dvc.md) can help manage large datasets. -## Step 5: Model Evaluation and Model Finetuning +## Step 5: Model Evaluation and Model [Finetuning](https://www.ultralytics.com/glossary/fine-tuning) -It's important to assess your model's performance using various metrics and refine it to improve accuracy. [Evaluating](../modes/val.md) helps identify areas where the model excels and where it may need improvement. Fine-tuning ensures the model is optimized for the best possible performance. +It's important to assess your model's performance using various metrics and refine it to improve [accuracy](https://www.ultralytics.com/glossary/accuracy). [Evaluating](../modes/val.md) helps identify areas where the model excels and where it may need improvement. Fine-tuning ensures the model is optimized for the best possible performance. -- **[Performance Metrics](./yolo-performance-metrics.md):** Use metrics like accuracy, precision, recall, and F1-score to evaluate your model's performance. These metrics provide insights into how well your model is making predictions. +- **[Performance Metrics](./yolo-performance-metrics.md):** Use metrics like accuracy, [precision](https://www.ultralytics.com/glossary/precision), recall, and F1-score to evaluate your model's performance. These metrics provide insights into how well your model is making predictions. - **[Hyperparameter Tuning](./hyperparameter-tuning.md):** Adjust hyperparameters to optimize model performance. Techniques like grid search or random search can help find the best hyperparameter values. -- Fine-Tuning: Make small adjustments to the model architecture or training process to enhance performance. This might involve tweaking learning rates, batch sizes, or other model parameters. +- Fine-Tuning: Make small adjustments to the model architecture or training process to enhance performance. This might involve tweaking [learning rates](https://www.ultralytics.com/glossary/learning-rate), [batch sizes](https://www.ultralytics.com/glossary/batch-size), or other model parameters. ## Step 6: Model Testing @@ -158,9 +158,9 @@ In this step, you can make sure that your model performs well on completely unse It's important to thoroughly test and debug any common issues that may arise. Test your model on a separate test dataset that was not used during training or validation. This dataset should represent real-world scenarios to ensure the model's performance is consistent and reliable. -Also, address common problems such as overfitting, underfitting, and data leakage. Use techniques like cross-validation and anomaly detection to identify and fix these issues. +Also, address common problems such as overfitting, [underfitting](https://www.ultralytics.com/glossary/underfitting), and data leakage. Use techniques like cross-validation and [anomaly detection](https://www.ultralytics.com/glossary/anomaly-detection) to identify and fix these issues. -## Step 7: Model Deployment +## Step 7: [Model Deployment](https://www.ultralytics.com/glossary/model-deployment) Once your model has been thoroughly tested, it's time to deploy it. Deployment involves making your model available for use in a production environment. Here are the steps to deploy a computer vision model: @@ -222,7 +222,7 @@ Tools like [Label Studio](https://github.com/HumanSignal/label-studio), [CVAT](h Splitting your dataset before augmentation helps validate model performance on original, unaltered data. Follow these steps: - **Training Set**: 70-80% of your data. -- **Validation Set**: 10-15% for hyperparameter tuning. +- **Validation Set**: 10-15% for [hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning). - **Test Set**: Remaining 10-15% for final evaluation. After splitting, apply data augmentation techniques like rotation, scaling, and flipping to increase dataset diversity. Libraries such as Albumentations and OpenCV can help. Ultralytics also offers [built-in augmentation settings](../modes/train.md) for convenience. diff --git a/docs/en/guides/streamlit-live-inference.md b/docs/en/guides/streamlit-live-inference.md index 84e1bce8..e8fb5c91 100644 --- a/docs/en/guides/streamlit-live-inference.md +++ b/docs/en/guides/streamlit-live-inference.md @@ -8,7 +8,7 @@ keywords: Streamlit, YOLOv8, Real-time Object Detection, Streamlit Application, ## Introduction -Streamlit makes it simple to build and deploy interactive web applications. Combining this with Ultralytics YOLOv8 allows for real-time object detection and analysis directly in your browser. YOLOv8 high accuracy and speed ensure seamless performance for live video streams, making it ideal for applications in security, retail, and beyond. +Streamlit makes it simple to build and deploy interactive web applications. Combining this with Ultralytics YOLOv8 allows for real-time [object detection](https://www.ultralytics.com/glossary/object-detection) and analysis directly in your browser. YOLOv8 high accuracy and speed ensure seamless performance for live video streams, making it ideal for applications in security, retail, and beyond.


@@ -18,7 +18,7 @@ Streamlit makes it simple to build and deploy interactive web applications. Comb allowfullscreen>
- Watch: How to Use Streamlit with Ultralytics for Real-Time Computer Vision in Your Browser + Watch: How to Use Streamlit with Ultralytics for Real-Time [Computer Vision](https://www.ultralytics.com/glossary/computer-vision-cv) in Your Browser

| Aquaculture | Animals husbandry | @@ -128,7 +128,7 @@ For more details on the practical setup, refer to the [Streamlit Application Cod Using Ultralytics YOLOv8 with Streamlit for real-time object detection offers several advantages: -- **Seamless Real-Time Detection**: Achieve high-accuracy, real-time object detection directly from webcam feeds. +- **Seamless Real-Time Detection**: Achieve high-[accuracy](https://www.ultralytics.com/glossary/accuracy), real-time object detection directly from webcam feeds. - **User-Friendly Interface**: Streamlit's intuitive interface allows easy use and deployment without extensive technical knowledge. - **Resource Efficiency**: YOLOv8's optimized algorithms ensure high-speed processing with minimal computational resources. diff --git a/docs/en/guides/triton-inference-server.md b/docs/en/guides/triton-inference-server.md index 05edf54f..1233ba9a 100644 --- a/docs/en/guides/triton-inference-server.md +++ b/docs/en/guides/triton-inference-server.md @@ -6,7 +6,7 @@ keywords: Triton Inference Server, YOLOv8, Ultralytics, NVIDIA, deep learning, A # Triton Inference Server with Ultralytics YOLOv8 -The [Triton Inference Server](https://developer.nvidia.com/triton-inference-server) (formerly known as TensorRT Inference Server) is an open-source software solution developed by NVIDIA. It provides a cloud inference solution optimized for NVIDIA GPUs. Triton simplifies the deployment of AI models at scale in production. Integrating Ultralytics YOLOv8 with Triton Inference Server allows you to deploy scalable, high-performance deep learning inference workloads. This guide provides steps to set up and test the integration. +The [Triton Inference Server](https://developer.nvidia.com/triton-inference-server) (formerly known as TensorRT Inference Server) is an open-source software solution developed by NVIDIA. It provides a cloud inference solution optimized for NVIDIA GPUs. Triton simplifies the deployment of AI models at scale in production. Integrating Ultralytics YOLOv8 with Triton Inference Server allows you to deploy scalable, high-performance [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) inference workloads. This guide provides steps to set up and test the integration.


@@ -21,7 +21,7 @@ The [Triton Inference Server](https://developer.nvidia.com/triton-inference-serv ## What is Triton Inference Server? -Triton Inference Server is designed to deploy a variety of AI models in production. It supports a wide range of deep learning and machine learning frameworks, including TensorFlow, PyTorch, ONNX Runtime, and many others. Its primary use cases are: +Triton Inference Server is designed to deploy a variety of AI models in production. It supports a wide range of deep learning and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) frameworks, including TensorFlow, [PyTorch](https://www.ultralytics.com/glossary/pytorch), ONNX Runtime, and many others. Its primary use cases are: - Serving multiple models from a single server instance. - Dynamic model loading and unloading without server restart. @@ -216,7 +216,7 @@ This setup can help you efficiently deploy YOLOv8 models at scale on Triton Infe Integrating [Ultralytics YOLOv8](../models/yolov8.md) with [NVIDIA Triton Inference Server](https://developer.nvidia.com/triton-inference-server) provides several advantages: - **Scalable AI Inference**: Triton allows serving multiple models from a single server instance, supporting dynamic model loading and unloading, making it highly scalable for diverse AI workloads. -- **High Performance**: Optimized for NVIDIA GPUs, Triton Inference Server ensures high-speed inference operations, perfect for real-time applications such as object detection. +- **High Performance**: Optimized for NVIDIA GPUs, Triton Inference Server ensures high-speed inference operations, perfect for real-time applications such as [object detection](https://www.ultralytics.com/glossary/object-detection). - **Ensemble and Model Versioning**: Triton's ensemble mode enables combining multiple models to improve results, and its model versioning supports A/B testing and rolling updates. For detailed instructions on setting up and running YOLOv8 with Triton, you can refer to the [setup guide](#setting-up-triton-model-repository). @@ -256,11 +256,11 @@ results = model("path/to/image.jpg") For an in-depth guide on setting up and running Triton Server with YOLOv8, refer to the [running triton inference server](#running-triton-inference-server) section. -### How does Ultralytics YOLOv8 compare to TensorFlow and PyTorch models for deployment? +### How does Ultralytics YOLOv8 compare to [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) and PyTorch models for deployment? [Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8/) offers several unique advantages compared to TensorFlow and PyTorch models for deployment: -- **Real-time Performance**: Optimized for real-time object detection tasks, YOLOv8 provides state-of-the-art accuracy and speed, making it ideal for applications requiring live video analytics. +- **Real-time Performance**: Optimized for real-time object detection tasks, YOLOv8 provides state-of-the-art [accuracy](https://www.ultralytics.com/glossary/accuracy) and speed, making it ideal for applications requiring live video analytics. - **Ease of Use**: YOLOv8 integrates seamlessly with Triton Inference Server and supports diverse export formats (ONNX, TensorRT, CoreML), making it flexible for various deployment scenarios. - **Advanced Features**: YOLOv8 includes features like dynamic model loading, model versioning, and ensemble inference, which are crucial for scalable and reliable AI deployments. diff --git a/docs/en/guides/view-results-in-terminal.md b/docs/en/guides/view-results-in-terminal.md index c599f664..cb6ce1c0 100644 --- a/docs/en/guides/view-results-in-terminal.md +++ b/docs/en/guides/view-results-in-terminal.md @@ -58,7 +58,7 @@ The VSCode compatible protocols for viewing images using the integrated terminal 1. See [plot method parameters](../modes/predict.md#plot-method-parameters) to see possible arguments to use. -4. Now, use OpenCV to convert the `numpy.ndarray` to `bytes` data. Then use `io.BytesIO` to make a "file-like" object. +4. Now, use [OpenCV](https://www.ultralytics.com/glossary/opencv) to convert the `numpy.ndarray` to `bytes` data. Then use `io.BytesIO` to make a "file-like" object. ```{ .py .annotate } import io diff --git a/docs/en/guides/vision-eye.md b/docs/en/guides/vision-eye.md index 891a589b..48cff274 100644 --- a/docs/en/guides/vision-eye.md +++ b/docs/en/guides/vision-eye.md @@ -8,7 +8,7 @@ keywords: VisionEye, YOLOv8, Ultralytics, object mapping, object tracking, dista ## What is VisionEye Object Mapping? -[Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) VisionEye offers the capability for computers to identify and pinpoint objects, simulating the observational precision of the human eye. This functionality enables computers to discern and focus on specific objects, much like the way the human eye observes details from a particular viewpoint. +[Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) VisionEye offers the capability for computers to identify and pinpoint objects, simulating the observational [precision](https://www.ultralytics.com/glossary/precision) of the human eye. This functionality enables computers to discern and focus on specific objects, much like the way the human eye observes details from a particular viewpoint. ## Samples @@ -182,7 +182,7 @@ For any inquiries, feel free to post your questions in the [Ultralytics Issue Se ### How do I start using VisionEye Object Mapping with Ultralytics YOLOv8? -To start using VisionEye Object Mapping with Ultralytics YOLOv8, first, you'll need to install the Ultralytics YOLO package via pip. Then, you can use the sample code provided in the documentation to set up object detection with VisionEye. Here's a simple example to get you started: +To start using VisionEye Object Mapping with Ultralytics YOLOv8, first, you'll need to install the Ultralytics YOLO package via pip. Then, you can use the sample code provided in the documentation to set up [object detection](https://www.ultralytics.com/glossary/object-detection) with VisionEye. Here's a simple example to get you started: ```python import cv2 @@ -292,7 +292,7 @@ For detailed instructions, refer to the [VisionEye with Distance Calculation](#s ### Why should I use Ultralytics YOLOv8 for object mapping and tracking? -Ultralytics YOLOv8 is renowned for its speed, accuracy, and ease of integration, making it a top choice for object mapping and tracking. Key advantages include: +Ultralytics YOLOv8 is renowned for its speed, [accuracy](https://www.ultralytics.com/glossary/accuracy), and ease of integration, making it a top choice for object mapping and tracking. Key advantages include: 1. **State-of-the-art Performance**: Delivers high accuracy in real-time object detection. 2. **Flexibility**: Supports various tasks such as detection, tracking, and distance calculation. @@ -301,7 +301,7 @@ Ultralytics YOLOv8 is renowned for its speed, accuracy, and ease of integration, For more information on applications and benefits, check out the [Ultralytics YOLOv8 documentation](https://docs.ultralytics.com/models/yolov8/). -### How can I integrate VisionEye with other machine learning tools like Comet or ClearML? +### How can I integrate VisionEye with other [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) tools like Comet or ClearML? Ultralytics YOLOv8 can integrate seamlessly with various machine learning tools like Comet and ClearML, enhancing experiment tracking, collaboration, and reproducibility. Follow the detailed guides on [how to use YOLOv5 with Comet](https://www.ultralytics.com/blog/how-to-use-yolov5-with-comet) and [integrate YOLOv8 with ClearML](https://docs.ultralytics.com/integrations/clearml/) to get started. diff --git a/docs/en/guides/workouts-monitoring.md b/docs/en/guides/workouts-monitoring.md index e042acfa..45856316 100644 --- a/docs/en/guides/workouts-monitoring.md +++ b/docs/en/guides/workouts-monitoring.md @@ -179,7 +179,7 @@ You can watch a [YouTube video demonstration](https://www.youtube.com/watch?v=LG ### How accurate is Ultralytics YOLOv8 in detecting and tracking exercises? -Ultralytics YOLOv8 is highly accurate in detecting and tracking exercises due to its state-of-the-art pose estimation capabilities. It can accurately track key body landmarks and joints, providing real-time feedback on exercise form and performance metrics. The model's pretrained weights and robust architecture ensure high precision and reliability. For real-world examples, check out the [real-world applications](#real-world-applications) section in the documentation, which showcases pushups and pullups counting. +Ultralytics YOLOv8 is highly accurate in detecting and tracking exercises due to its state-of-the-art pose estimation capabilities. It can accurately track key body landmarks and joints, providing real-time feedback on exercise form and performance metrics. The model's pretrained weights and robust architecture ensure high [precision](https://www.ultralytics.com/glossary/precision) and reliability. For real-world examples, check out the [real-world applications](#real-world-applications) section in the documentation, which showcases pushups and pullups counting. ### Can I use Ultralytics YOLOv8 for custom workout routines? diff --git a/docs/en/guides/yolo-common-issues.md b/docs/en/guides/yolo-common-issues.md index 77351eaa..6da5d164 100644 --- a/docs/en/guides/yolo-common-issues.md +++ b/docs/en/guides/yolo-common-issues.md @@ -33,7 +33,7 @@ Installation errors can arise due to various reasons, such as incompatible versi - You're using Python 3.8 or later as recommended. -- Ensure that you have the correct version of PyTorch (1.8 or later) installed. +- Ensure that you have the correct version of [PyTorch](https://www.ultralytics.com/glossary/pytorch) (1.8 or later) installed. - Consider using virtual environments to avoid conflicts. @@ -86,7 +86,7 @@ model.train(data="/path/to/your/data.yaml", batch=4) **Issue**: Training is slow on a single GPU, and you want to speed up the process using multiple GPUs. -**Solution**: Increasing the batch size can accelerate training, but it's essential to consider GPU memory capacity. To speed up training with multiple GPUs, follow these steps: +**Solution**: Increasing the [batch size](https://www.ultralytics.com/glossary/batch-size) can accelerate training, but it's essential to consider GPU memory capacity. To speed up training with multiple GPUs, follow these steps: - Ensure that you have multiple GPUs available. @@ -109,7 +109,7 @@ model.train(data="/path/to/your/data.yaml", batch=32, multi_scale=True) - Precision - Recall -- Mean Average Precision (mAP) +- [Mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) You can access these metrics from the training logs or by using tools like TensorBoard or wandb for visualization. Implementing early stopping based on these metrics can help you achieve better results. @@ -119,7 +119,7 @@ You can access these metrics from the training logs or by using tools like Tenso **Solution**: To track and visualize training progress, you can consider using the following tools: -- [TensorBoard](https://www.tensorflow.org/tensorboard): TensorBoard is a popular choice for visualizing training metrics, including loss, accuracy, and more. You can integrate it with your YOLOv8 training process. +- [TensorBoard](https://www.tensorflow.org/tensorboard): TensorBoard is a popular choice for visualizing training metrics, including loss, [accuracy](https://www.ultralytics.com/glossary/accuracy), and more. You can integrate it with your YOLOv8 training process. - [Comet](https://bit.ly/yolov8-readme-comet): Comet provides an extensive toolkit for experiment tracking and comparison. It allows you to track metrics, hyperparameters, and even model weights. Integration with YOLO models is also straightforward, providing you with a complete overview of your experiment cycle. - [Ultralytics HUB](https://hub.ultralytics.com/): Ultralytics HUB offers a specialized environment for tracking YOLO models, giving you a one-stop platform to manage metrics, datasets, and even collaborate with your team. Given its tailored focus on YOLO, it offers more customized tracking options. @@ -145,17 +145,17 @@ Here are some things to keep in mind, if you are facing issues related to model **Dataset Format and Labels** -- Importance: The foundation of any machine learning model lies in the quality and format of the data it is trained on. +- Importance: The foundation of any [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) model lies in the quality and format of the data it is trained on. - Recommendation: Ensure that your custom dataset and its associated labels adhere to the expected format. It's crucial to verify that annotations are accurate and of high quality. Incorrect or subpar annotations can derail the model's learning process, leading to unpredictable outcomes. **Model Convergence** -- Importance: Achieving model convergence ensures that the model has sufficiently learned from the training data. +- Importance: Achieving model convergence ensures that the model has sufficiently learned from the [training data](https://www.ultralytics.com/glossary/training-data). -- Recommendation: When training a model 'from scratch', it's vital to ensure that the model reaches a satisfactory level of convergence. This might necessitate a longer training duration, with more epochs, compared to when you're fine-tuning an existing model. +- Recommendation: When training a model 'from scratch', it's vital to ensure that the model reaches a satisfactory level of convergence. This might necessitate a longer training duration, with more [epochs](https://www.ultralytics.com/glossary/epoch), compared to when you're fine-tuning an existing model. -**Learning Rate and Batch Size** +**[Learning Rate](https://www.ultralytics.com/glossary/learning-rate) and Batch Size** - Importance: These hyperparameters play a pivotal role in determining how the model updates its weights during training. @@ -207,9 +207,9 @@ yolo task=detect mode=segment model=yolov8n-seg.pt source='path/to/car.mp4' show #### Understanding Precision Metrics in YOLOv8 -**Issue**: Confusion regarding the difference between box precision, mask precision, and confusion matrix precision in YOLOv8. +**Issue**: Confusion regarding the difference between box precision, mask precision, and [confusion matrix](https://www.ultralytics.com/glossary/confusion-matrix) precision in YOLOv8. -**Solution**: Box precision measures the accuracy of predicted bounding boxes compared to the actual ground truth boxes using IoU (Intersection over Union) as the metric. Mask precision assesses the agreement between predicted segmentation masks and ground truth masks in pixel-wise object classification. Confusion matrix precision, on the other hand, focuses on overall classification accuracy across all classes and does not consider the geometric accuracy of predictions. It's important to note that a bounding box can be geometrically accurate (true positive) even if the class prediction is wrong, leading to differences between box precision and confusion matrix precision. These metrics evaluate distinct aspects of a model's performance, reflecting the need for different evaluation metrics in various tasks. +**Solution**: Box precision measures the accuracy of predicted bounding boxes compared to the actual ground truth boxes using IoU (Intersection over Union) as the metric. Mask precision assesses the agreement between predicted segmentation masks and ground truth masks in pixel-wise object classification. Confusion matrix precision, on the other hand, focuses on overall classification accuracy across all classes and does not consider the geometric accuracy of predictions. It's important to note that a [bounding box](https://www.ultralytics.com/glossary/bounding-box) can be geometrically accurate (true positive) even if the class prediction is wrong, leading to differences between box precision and confusion matrix precision. These metrics evaluate distinct aspects of a model's performance, reflecting the need for different evaluation metrics in various tasks. #### Extracting Object Dimensions in YOLOv8 @@ -280,7 +280,7 @@ These resources should provide a solid foundation for troubleshooting and improv ## Conclusion -Troubleshooting is an integral part of any development process, and being equipped with the right knowledge can significantly reduce the time and effort spent in resolving issues. This guide aimed to address the most common challenges faced by users of the YOLOv8 model within the Ultralytics ecosystem. By understanding and addressing these common issues, you can ensure smoother project progress and achieve better results with your computer vision tasks. +Troubleshooting is an integral part of any development process, and being equipped with the right knowledge can significantly reduce the time and effort spent in resolving issues. This guide aimed to address the most common challenges faced by users of the YOLOv8 model within the Ultralytics ecosystem. By understanding and addressing these common issues, you can ensure smoother project progress and achieve better results with your [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. Remember, the Ultralytics community is a valuable resource. Engaging with fellow developers and experts can provide additional insights and solutions that might not be covered in standard documentation. Always keep learning, experimenting, and sharing your experiences to contribute to the collective knowledge of the community. @@ -312,7 +312,7 @@ This sets the training process to the first GPU. Consult the `nvidia-smi` comman ### How can I monitor and track my YOLOv8 model training progress? -Tracking and visualizing training progress can be efficiently managed through tools like [TensorBoard](https://www.tensorflow.org/tensorboard), [Comet](https://bit.ly/yolov8-readme-comet), and [Ultralytics HUB](https://hub.ultralytics.com/). These tools allow you to log and visualize metrics such as loss, precision, recall, and mAP. Implementing [early stopping](#continuous-monitoring-parameters) based on these metrics can also help achieve better training outcomes. +Tracking and visualizing training progress can be efficiently managed through tools like [TensorBoard](https://www.tensorflow.org/tensorboard), [Comet](https://bit.ly/yolov8-readme-comet), and [Ultralytics HUB](https://hub.ultralytics.com/). These tools allow you to log and visualize metrics such as loss, [precision](https://www.ultralytics.com/glossary/precision), [recall](https://www.ultralytics.com/glossary/recall), and mAP. Implementing [early stopping](#continuous-monitoring-parameters) based on these metrics can also help achieve better training outcomes. ### What should I do if YOLOv8 is not recognizing my dataset format? diff --git a/docs/en/guides/yolo-performance-metrics.md b/docs/en/guides/yolo-performance-metrics.md index d885b9ea..aeed8235 100644 --- a/docs/en/guides/yolo-performance-metrics.md +++ b/docs/en/guides/yolo-performance-metrics.md @@ -8,7 +8,7 @@ keywords: YOLOv8 performance metrics, mAP, IoU, F1 Score, Precision, Recall, obj ## Introduction -Performance metrics are key tools to evaluate the accuracy and efficiency of object detection models. They shed light on how effectively a model can identify and localize objects within images. Additionally, they help in understanding the model's handling of false positives and false negatives. These insights are crucial for evaluating and enhancing the model's performance. In this guide, we will explore various performance metrics associated with YOLOv8, their significance, and how to interpret them. +Performance metrics are key tools to evaluate the [accuracy](https://www.ultralytics.com/glossary/accuracy) and efficiency of [object detection](https://www.ultralytics.com/glossary/object-detection) models. They shed light on how effectively a model can identify and localize objects within images. Additionally, they help in understanding the model's handling of false positives and false negatives. These insights are crucial for evaluating and enhancing the model's performance. In this guide, we will explore various performance metrics associated with YOLOv8, their significance, and how to interpret them.


@@ -18,14 +18,14 @@ Performance metrics are key tools to evaluate the accuracy and efficiency of obj allowfullscreen>
- Watch: Ultralytics YOLOv8 Performance Metrics | MAP, F1 Score, Precision, IoU & Accuracy + Watch: Ultralytics YOLOv8 Performance Metrics | MAP, F1 Score, [Precision](https://www.ultralytics.com/glossary/precision), IoU & Accuracy

## Object Detection Metrics Let's start by discussing some metrics that are not only important to YOLOv8 but are broadly applicable across different object detection models. -- **Intersection over Union (IoU):** IoU is a measure that quantifies the overlap between a predicted bounding box and a ground truth bounding box. It plays a fundamental role in evaluating the accuracy of object localization. +- **[Intersection over Union](https://www.ultralytics.com/glossary/intersection-over-union-iou) (IoU):** IoU is a measure that quantifies the overlap between a predicted [bounding box](https://www.ultralytics.com/glossary/bounding-box) and a ground truth bounding box. It plays a fundamental role in evaluating the accuracy of object localization. - **Average Precision (AP):** AP computes the area under the precision-recall curve, providing a single value that encapsulates the model's precision and recall performance. @@ -77,15 +77,15 @@ For users validating on the COCO dataset, additional metrics are calculated usin The model.val() function, apart from producing numeric metrics, also yields visual outputs that can provide a more intuitive understanding of the model's performance. Here's a breakdown of the visual outputs you can expect: -- **F1 Score Curve (`F1_curve.png`)**: This curve represents the F1 score across various thresholds. Interpreting this curve can offer insights into the model's balance between false positives and false negatives over different thresholds. +- **F1 Score Curve (`F1_curve.png`)**: This curve represents the [F1 score](https://www.ultralytics.com/glossary/f1-score) across various thresholds. Interpreting this curve can offer insights into the model's balance between false positives and false negatives over different thresholds. -- **Precision-Recall Curve (`PR_curve.png`)**: An integral visualization for any classification problem, this curve showcases the trade-offs between precision and recall at varied thresholds. It becomes especially significant when dealing with imbalanced classes. +- **Precision-Recall Curve (`PR_curve.png`)**: An integral visualization for any classification problem, this curve showcases the trade-offs between precision and [recall](https://www.ultralytics.com/glossary/recall) at varied thresholds. It becomes especially significant when dealing with imbalanced classes. - **Precision Curve (`P_curve.png`)**: A graphical representation of precision values at different thresholds. This curve helps in understanding how precision varies as the threshold changes. - **Recall Curve (`R_curve.png`)**: Correspondingly, this graph illustrates how the recall values change across different thresholds. -- **Confusion Matrix (`confusion_matrix.png`)**: The confusion matrix provides a detailed view of the outcomes, showcasing the counts of true positives, true negatives, false positives, and false negatives for each class. +- **[Confusion Matrix](https://www.ultralytics.com/glossary/confusion-matrix) (`confusion_matrix.png`)**: The confusion matrix provides a detailed view of the outcomes, showcasing the counts of true positives, true negatives, false positives, and false negatives for each class. - **Normalized Confusion Matrix (`confusion_matrix_normalized.png`)**: This visualization is a normalized version of the confusion matrix. It represents the data in proportions rather than raw counts. This format makes it simpler to compare the performance across classes. @@ -123,7 +123,7 @@ It's important to understand the metrics. Here's what some of the commonly obser - **Low Precision:** The model may be detecting too many non-existent objects. Adjusting confidence thresholds might reduce this. -- **Low Recall:** The model could be missing real objects. Improving feature extraction or using more data might help. +- **Low Recall:** The model could be missing real objects. Improving [feature extraction](https://www.ultralytics.com/glossary/feature-extraction) or using more data might help. - **Imbalanced F1 Score:** There's a disparity between precision and recall. @@ -177,7 +177,7 @@ Happy object detecting! ## FAQ -### What is the significance of Mean Average Precision (mAP) in evaluating YOLOv8 model performance? +### What is the significance of [Mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) in evaluating YOLOv8 model performance? Mean Average Precision (mAP) is crucial for evaluating YOLOv8 models as it provides a single metric encapsulating precision and recall across multiple classes. mAP@0.50 measures precision at an IoU threshold of 0.50, focusing on the model's ability to detect objects correctly. mAP@0.50:0.95 averages precision across a range of IoU thresholds, offering a comprehensive assessment of detection performance. High mAP scores indicate that the model effectively balances precision and recall, essential for applications like autonomous driving and surveillance. diff --git a/docs/en/help/FAQ.md b/docs/en/help/FAQ.md index 24472e77..234fb9e8 100644 --- a/docs/en/help/FAQ.md +++ b/docs/en/help/FAQ.md @@ -12,7 +12,7 @@ This FAQ section addresses common questions and issues users might encounter whi ### What is Ultralytics and what does it offer? -Ultralytics is a computer vision AI company specializing in state-of-the-art object detection and image segmentation models, with a focus on the YOLO (You Only Look Once) family. Their offerings include: +Ultralytics is a [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) AI company specializing in state-of-the-art object detection and [image segmentation](https://www.ultralytics.com/glossary/image-segmentation) models, with a focus on the YOLO (You Only Look Once) family. Their offerings include: - Open-source implementations of [YOLOv5](https://docs.ultralytics.com/models/yolov5/) and [YOLOv8](https://docs.ultralytics.com/models/yolov8/) - A wide range of [pre-trained models](https://docs.ultralytics.com/models/) for various computer vision tasks @@ -41,7 +41,7 @@ Detailed installation instructions can be found in the [quickstart guide](https: Minimum requirements: - Python 3.7+ -- PyTorch 1.7+ +- [PyTorch](https://www.ultralytics.com/glossary/pytorch) 1.7+ - CUDA-compatible GPU (for GPU acceleration) Recommended setup: @@ -80,10 +80,10 @@ For a more in-depth guide, including data preparation and advanced training opti Ultralytics offers a diverse range of pretrained YOLOv8 models for various tasks: - Object Detection: YOLOv8n, YOLOv8s, YOLOv8m, YOLOv8l, YOLOv8x -- Instance Segmentation: YOLOv8n-seg, YOLOv8s-seg, YOLOv8m-seg, YOLOv8l-seg, YOLOv8x-seg +- [Instance Segmentation](https://www.ultralytics.com/glossary/instance-segmentation): YOLOv8n-seg, YOLOv8s-seg, YOLOv8m-seg, YOLOv8l-seg, YOLOv8x-seg - Classification: YOLOv8n-cls, YOLOv8s-cls, YOLOv8m-cls, YOLOv8l-cls, YOLOv8x-cls -These models vary in size and complexity, offering different trade-offs between speed and accuracy. Explore the full range of [pretrained models](https://docs.ultralytics.com/models/yolov8/) to find the best fit for your project. +These models vary in size and complexity, offering different trade-offs between speed and [accuracy](https://www.ultralytics.com/glossary/accuracy). Explore the full range of [pretrained models](https://docs.ultralytics.com/models/yolov8/) to find the best fit for your project. ### How do I perform inference using a trained Ultralytics model? @@ -113,7 +113,7 @@ Absolutely! Ultralytics models are designed for versatile deployment across vari - Edge devices: Optimize inference on devices like NVIDIA Jetson or Intel Neural Compute Stick using TensorRT, ONNX, or OpenVINO. - Mobile: Deploy on Android or iOS devices by converting models to TFLite or Core ML. -- Cloud: Leverage frameworks like TensorFlow Serving or PyTorch Serve for scalable cloud deployments. +- Cloud: Leverage frameworks like [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) Serving or PyTorch Serve for scalable cloud deployments. - Web: Implement in-browser inference using ONNX.js or TensorFlow.js. Ultralytics provides export functions to convert models to various formats for deployment. Explore the wide range of [deployment options](https://docs.ultralytics.com/guides/model-deployment-options/) to find the best solution for your use case. @@ -124,7 +124,7 @@ Key distinctions include: - Architecture: YOLOv8 features an improved backbone and head design for enhanced performance. - Performance: YOLOv8 generally offers superior accuracy and speed compared to YOLOv5. -- Tasks: YOLOv8 natively supports object detection, instance segmentation, and classification in a unified framework. +- Tasks: YOLOv8 natively supports [object detection](https://www.ultralytics.com/glossary/object-detection), instance segmentation, and classification in a unified framework. - Codebase: YOLOv8 is implemented with a more modular and extensible architecture, facilitating easier customization and extension. - Training: YOLOv8 incorporates advanced training techniques like multi-dataset training and hyperparameter evolution for improved results. @@ -174,9 +174,9 @@ Explore the [YOLO models page](https://docs.ultralytics.com/models/yolov8/) for Enhancing your YOLO model's performance can be achieved through several techniques: -1. Hyperparameter Tuning: Experiment with different hyperparameters using the [Hyperparameter Tuning Guide](https://docs.ultralytics.com/guides/hyperparameter-tuning/) to optimize model performance. -2. Data Augmentation: Implement techniques like flip, scale, rotate, and color adjustments to enhance your training dataset and improve model generalization. -3. Transfer Learning: Leverage pre-trained models and fine-tune them on your specific dataset using the [Train YOLOv8](https://docs.ultralytics.com/modes/train/) guide. +1. [Hyperparameter Tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning): Experiment with different hyperparameters using the [Hyperparameter Tuning Guide](https://docs.ultralytics.com/guides/hyperparameter-tuning/) to optimize model performance. +2. [Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation): Implement techniques like flip, scale, rotate, and color adjustments to enhance your training dataset and improve model generalization. +3. [Transfer Learning](https://www.ultralytics.com/glossary/transfer-learning): Leverage pre-trained models and fine-tune them on your specific dataset using the [Train YOLOv8](https://docs.ultralytics.com/modes/train/) guide. 4. Export to Efficient Formats: Convert your model to optimized formats like TensorRT or ONNX for faster inference using the [Export guide](../modes/export.md). 5. Benchmarking: Utilize the [Benchmark Mode](https://docs.ultralytics.com/modes/benchmark/) to measure and improve inference speed and accuracy systematically. diff --git a/docs/en/help/contributing.md b/docs/en/help/contributing.md index 4078a6ce..1dad4f53 100644 --- a/docs/en/help/contributing.md +++ b/docs/en/help/contributing.md @@ -135,7 +135,7 @@ We encourage all contributors to familiarize themselves with the terms of the AG Thank you for your interest in contributing to [Ultralytics](https://www.ultralytics.com/) [open-source](https://github.com/ultralytics) YOLO projects. Your participation is essential in shaping the future of our software and building a vibrant community of innovation and collaboration. Whether you're enhancing code, reporting bugs, or suggesting new features, your contributions are invaluable. -We're excited to see your ideas come to life and appreciate your commitment to advancing object detection technology. Together, let's continue to grow and innovate in this exciting open-source journey. Happy coding! 🚀🌟 +We're excited to see your ideas come to life and appreciate your commitment to advancing [object detection](https://www.ultralytics.com/glossary/object-detection) technology. Together, let's continue to grow and innovate in this exciting open-source journey. Happy coding! 🚀🌟 ## FAQ diff --git a/docs/en/help/index.md b/docs/en/help/index.md index 9d9aa851..e8f2eecd 100644 --- a/docs/en/help/index.md +++ b/docs/en/help/index.md @@ -20,9 +20,9 @@ We encourage you to review these resources for a seamless and productive experie ## FAQ -### What is Ultralytics YOLO and how does it benefit my machine learning projects? +### What is Ultralytics YOLO and how does it benefit my [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) projects? -Ultralytics YOLO (You Only Look Once) is a state-of-the-art, real-time object detection model. Its latest version, YOLOv8, enhances speed, accuracy, and versatility, making it ideal for a wide range of applications, from real-time video analytics to advanced machine learning research. YOLO's efficiency in detecting objects in images and videos has made it the go-to solution for businesses and researchers looking to integrate robust computer vision capabilities into their projects. +Ultralytics YOLO (You Only Look Once) is a state-of-the-art, real-time [object detection](https://www.ultralytics.com/glossary/object-detection) model. Its latest version, YOLOv8, enhances speed, [accuracy](https://www.ultralytics.com/glossary/accuracy), and versatility, making it ideal for a wide range of applications, from real-time video analytics to advanced machine learning research. YOLO's efficiency in detecting objects in images and videos has made it the go-to solution for businesses and researchers looking to integrate robust [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) capabilities into their projects. For more details on YOLOv8, visit the [YOLOv8 documentation](../tasks/detect.md). @@ -32,7 +32,7 @@ Contributing to Ultralytics YOLO repositories is straightforward. Start by revie ### Why should I use Ultralytics HUB for my machine learning projects? -Ultralytics HUB offers a seamless, no-code solution for managing your machine learning projects. It enables you to generate, train, and deploy AI models like YOLOv8 effortlessly. Unique features include cloud training, real-time tracking, and intuitive dataset management. Ultralytics HUB simplifies the entire workflow, from data processing to model deployment, making it an indispensable tool for both beginners and advanced users. +Ultralytics HUB offers a seamless, no-code solution for managing your machine learning projects. It enables you to generate, train, and deploy AI models like YOLOv8 effortlessly. Unique features include cloud training, real-time tracking, and intuitive dataset management. Ultralytics HUB simplifies the entire workflow, from data processing to [model deployment](https://www.ultralytics.com/glossary/model-deployment), making it an indispensable tool for both beginners and advanced users. To get started, visit [Ultralytics HUB Quickstart](../hub/quickstart.md). @@ -42,7 +42,7 @@ Continuous Integration (CI) in Ultralytics involves automated processes that ens Learn more in the [Continuous Integration (CI) Guide](../help/CI.md). -### How is data privacy handled by Ultralytics? +### How is [data privacy](https://www.ultralytics.com/glossary/data-privacy) handled by Ultralytics? Ultralytics takes data privacy seriously. Our [Privacy Policy](../help/privacy.md) outlines how we collect and use anonymized data to improve the YOLO package while prioritizing user privacy and control. We adhere to strict data protection regulations to ensure your information is secure at all times. diff --git a/docs/en/help/privacy.md b/docs/en/help/privacy.md index 3683b1ae..567a72ae 100644 --- a/docs/en/help/privacy.md +++ b/docs/en/help/privacy.md @@ -19,7 +19,7 @@ keywords: Ultralytics, data collection, YOLO, Python package, Google Analytics, - **System Information**: We collect general non-identifiable information about your computing environment to ensure our package performs well across various systems. - **Performance Data**: Understanding the performance of our models during training, validation, and inference helps us in identifying optimization opportunities. -For more information about Google Analytics and data privacy, visit [Google Analytics Privacy](https://support.google.com/analytics/answer/6004245). +For more information about Google Analytics and [data privacy](https://www.ultralytics.com/glossary/data-privacy), visit [Google Analytics Privacy](https://support.google.com/analytics/answer/6004245). ### How We Use This Data diff --git a/docs/en/hub/app/android.md b/docs/en/hub/app/android.md index 0f3f0b82..bca298fa 100644 --- a/docs/en/hub/app/android.md +++ b/docs/en/hub/app/android.md @@ -4,7 +4,7 @@ description: Experience real-time object detection on Android with Ultralytics. keywords: Ultralytics, Android app, real-time object detection, YOLO models, TensorFlow Lite, FP16 quantization, INT8 quantization, hardware delegates, mobile AI, download app --- -# Ultralytics Android App: Real-time Object Detection with YOLO Models +# Ultralytics Android App: Real-time [Object Detection](https://www.ultralytics.com/glossary/object-detection) with YOLO Models Ultralytics HUB preview image @@ -29,7 +29,7 @@ keywords: Ultralytics, Android app, real-time object detection, YOLO models, Ten Google Play store  -The Ultralytics Android App is a powerful tool that allows you to run YOLO models directly on your Android device for real-time object detection. This app utilizes TensorFlow Lite for model optimization and various hardware delegates for acceleration, enabling fast and efficient object detection. +The Ultralytics Android App is a powerful tool that allows you to run YOLO models directly on your Android device for real-time object detection. This app utilizes [TensorFlow](https://www.ultralytics.com/glossary/tensorflow) Lite for model optimization and various hardware delegates for acceleration, enabling fast and efficient object detection.


@@ -44,7 +44,7 @@ The Ultralytics Android App is a powerful tool that allows you to run YOLO model ## Quantization and Acceleration -To achieve real-time performance on your Android device, YOLO models are quantized to either FP16 or INT8 precision. Quantization is a process that reduces the numerical precision of the model's weights and biases, thus reducing the model's size and the amount of computation required. This results in faster inference times without significantly affecting the model's accuracy. +To achieve real-time performance on your Android device, YOLO models are quantized to either FP16 or INT8 [precision](https://www.ultralytics.com/glossary/precision). Quantization is a process that reduces the numerical precision of the model's weights and biases, thus reducing the model's size and the amount of computation required. This results in faster inference times without significantly affecting the model's [accuracy](https://www.ultralytics.com/glossary/accuracy). ### FP16 Quantization @@ -52,7 +52,7 @@ FP16 (or half-precision) quantization converts the model's 32-bit floating-point ### INT8 Quantization -INT8 (or 8-bit integer) quantization further reduces the model's size and computation requirements by converting its 32-bit floating-point numbers to 8-bit integers. This quantization method can result in a significant speedup, but it may lead to a slight reduction in mean average precision (mAP) due to the lower numerical precision. +INT8 (or 8-bit integer) quantization further reduces the model's size and computation requirements by converting its 32-bit floating-point numbers to 8-bit integers. This quantization method can result in a significant speedup, but it may lead to a slight reduction in [mean average precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) due to the lower numerical precision. !!! tip "mAP Reduction in INT8 Models" @@ -65,7 +65,7 @@ Different delegates are available on Android devices to accelerate model inferen 1. **CPU**: The default option, with reasonable performance on most devices. 2. **GPU**: Utilizes the device's GPU for faster inference. It can provide a significant performance boost on devices with powerful GPUs. 3. **Hexagon**: Leverages Qualcomm's Hexagon DSP for faster and more efficient processing. This option is available on devices with Qualcomm Snapdragon processors. -4. **NNAPI**: The Android Neural Networks API (NNAPI) serves as an abstraction layer for running ML models on Android devices. NNAPI can utilize various hardware accelerators, such as CPU, GPU, and dedicated AI chips (e.g., Google's Edge TPU, or the Pixel Neural Core). +4. **NNAPI**: The Android [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn) API (NNAPI) serves as an abstraction layer for running ML models on Android devices. NNAPI can utilize various hardware accelerators, such as CPU, GPU, and dedicated AI chips (e.g., Google's Edge TPU, or the Pixel Neural Core). Here's a table showing the primary vendors, their product lines, popular devices, and supported delegates: diff --git a/docs/en/hub/app/index.md b/docs/en/hub/app/index.md index 9266a0bd..e812d686 100644 --- a/docs/en/hub/app/index.md +++ b/docs/en/hub/app/index.md @@ -31,11 +31,11 @@ keywords: Ultralytics HUB, YOLO models, mobile app, iOS, Android, hardware accel Google Play store  -Welcome to the Ultralytics HUB App! We are excited to introduce this powerful mobile app that allows you to run YOLOv5 and YOLOv8 models directly on your [iOS](https://apps.apple.com/xk/app/ultralytics/id1583935240) and [Android](https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app) devices. With the HUB App, you can utilize hardware acceleration features like Apple's Neural Engine (ANE) or Android GPU and Neural Network API (NNAPI) delegates to achieve impressive performance on your mobile device. +Welcome to the Ultralytics HUB App! We are excited to introduce this powerful mobile app that allows you to run YOLOv5 and YOLOv8 models directly on your [iOS](https://apps.apple.com/xk/app/ultralytics/id1583935240) and [Android](https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app) devices. With the HUB App, you can utilize hardware acceleration features like Apple's Neural Engine (ANE) or Android GPU and [Neural Network](https://www.ultralytics.com/glossary/neural-network-nn) API (NNAPI) delegates to achieve impressive performance on your mobile device. ## Features -- **Run YOLOv5 and YOLOv8 models**: Experience the power of YOLO models on your mobile device for real-time object detection and image recognition tasks. +- **Run YOLOv5 and YOLOv8 models**: Experience the power of YOLO models on your mobile device for real-time [object detection](https://www.ultralytics.com/glossary/object-detection) and [image recognition](https://www.ultralytics.com/glossary/image-recognition) tasks. - **Hardware Acceleration**: Benefit from Apple ANE on iOS devices or Android GPU and NNAPI delegates for optimized performance. - **Custom Model Training**: Train custom models with the Ultralytics HUB platform and preview them live using the HUB App. - **Mobile Compatibility**: The HUB App supports both iOS and Android devices, bringing the power of YOLO models to a wide range of users. diff --git a/docs/en/hub/app/ios.md b/docs/en/hub/app/ios.md index 5468633f..be896fe8 100644 --- a/docs/en/hub/app/ios.md +++ b/docs/en/hub/app/ios.md @@ -4,7 +4,7 @@ description: Discover the Ultralytics iOS App for running YOLO models on your iP keywords: Ultralytics, iOS App, YOLO models, real-time object detection, Apple Neural Engine, Core ML, FP16 quantization, INT8 quantization, machine learning --- -# Ultralytics iOS App: Real-time Object Detection with YOLO Models +# Ultralytics iOS App: Real-time [Object Detection](https://www.ultralytics.com/glossary/object-detection) with YOLO Models Ultralytics HUB preview image @@ -44,7 +44,7 @@ The Ultralytics iOS App is a powerful tool that allows you to run YOLO models di ## Quantization and Acceleration -To achieve real-time performance on your iOS device, YOLO models are quantized to either FP16 or INT8 precision. Quantization is a process that reduces the numerical precision of the model's weights and biases, thus reducing the model's size and the amount of computation required. This results in faster inference times without significantly affecting the model's accuracy. +To achieve real-time performance on your iOS device, YOLO models are quantized to either FP16 or INT8 [precision](https://www.ultralytics.com/glossary/precision). Quantization is a process that reduces the numerical precision of the model's weights and biases, thus reducing the model's size and the amount of computation required. This results in faster inference times without significantly affecting the model's [accuracy](https://www.ultralytics.com/glossary/accuracy). ### FP16 Quantization @@ -56,7 +56,7 @@ INT8 (or 8-bit integer) quantization further reduces the model's size and comput ## Apple Neural Engine -The Apple Neural Engine (ANE) is a dedicated hardware component integrated into Apple's A-series and M-series chips. It's designed to accelerate machine learning tasks, particularly for neural networks, allowing for faster and more efficient execution of your YOLO models. +The Apple Neural Engine (ANE) is a dedicated hardware component integrated into Apple's A-series and M-series chips. It's designed to accelerate [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) tasks, particularly for [neural networks](https://www.ultralytics.com/glossary/neural-network-nn), allowing for faster and more efficient execution of your YOLO models. By combining quantized YOLO models with the Apple Neural Engine, the Ultralytics iOS App achieves real-time object detection on your iOS device without compromising on accuracy or performance. diff --git a/docs/en/hub/cloud-training.md b/docs/en/hub/cloud-training.md index 557e2847..f0303673 100644 --- a/docs/en/hub/cloud-training.md +++ b/docs/en/hub/cloud-training.md @@ -44,7 +44,7 @@ Most of the times, you will use the Epochs training. The number of epochs can be !!! note - When using the Epochs training, the [account balance](./pro.md#account-balance) is deducted after every epoch. + When using the Epochs training, the [account balance](./pro.md#account-balance) is deducted after every [epoch](https://www.ultralytics.com/glossary/epoch). Also, after every epoch, we check if you have enough [account balance](./pro.md#account-balance) for the next epoch. In case you don't have enough [account balance](./pro.md#account-balance) for the next epoch, we will stop the training session, allowing you to resume training your model from the last checkpoint saved. diff --git a/docs/en/hub/index.md b/docs/en/hub/index.md index 77b98b61..24dbdd3f 100644 --- a/docs/en/hub/index.md +++ b/docs/en/hub/index.md @@ -49,7 +49,7 @@ We hope that the resources here will help you get the most out of HUB. Please br ## Introduction -[Ultralytics HUB](https://www.ultralytics.com/hub) is designed to be user-friendly and intuitive, allowing users to quickly upload their datasets and train new YOLO models. It also offers a range of pre-trained models to choose from, making it extremely easy for users to get started. Once a model is trained, it can be effortlessly previewed in the [Ultralytics HUB App](app/index.md) before being deployed for real-time classification, object detection, and instance segmentation tasks. +[Ultralytics HUB](https://www.ultralytics.com/hub) is designed to be user-friendly and intuitive, allowing users to quickly upload their datasets and train new YOLO models. It also offers a range of pre-trained models to choose from, making it extremely easy for users to get started. Once a model is trained, it can be effortlessly previewed in the [Ultralytics HUB App](app/index.md) before being deployed for real-time classification, [object detection](https://www.ultralytics.com/glossary/object-detection), and [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) tasks.


- Watch: Explore Ultralytics YOLO Tasks: Object Detection, Segmentation, OBB, Tracking, and Pose Estimation. + Watch: Explore Ultralytics YOLO Tasks: [Object Detection](https://www.ultralytics.com/glossary/object-detection), Segmentation, OBB, Tracking, and Pose Estimation.

## [Detection](detect.md) -Detection is the primary task supported by YOLOv8. It involves detecting objects in an image or video frame and drawing bounding boxes around them. The detected objects are classified into different categories based on their features. YOLOv8 can detect multiple objects in a single image or video frame with high accuracy and speed. +Detection is the primary task supported by YOLOv8. It involves detecting objects in an image or video frame and drawing bounding boxes around them. The detected objects are classified into different categories based on their features. YOLOv8 can detect multiple objects in a single image or video frame with high [accuracy](https://www.ultralytics.com/glossary/accuracy) and speed. [Detection Examples](detect.md){ .md-button } ## [Segmentation](segment.md) -Segmentation is a task that involves segmenting an image into different regions based on the content of the image. Each region is assigned a label based on its content. This task is useful in applications such as image segmentation and medical imaging. YOLOv8 uses a variant of the U-Net architecture to perform segmentation. +Segmentation is a task that involves segmenting an image into different regions based on the content of the image. Each region is assigned a label based on its content. This task is useful in applications such as [image segmentation](https://www.ultralytics.com/glossary/image-segmentation) and medical imaging. YOLOv8 uses a variant of the U-Net architecture to perform segmentation. [Segmentation Examples](segment.md){ .md-button } @@ -114,7 +114,7 @@ For more details and implementation tips, visit our [pose estimation examples](p ### Why should I choose Ultralytics YOLOv8 for oriented object detection (OBB)? -Oriented Object Detection (OBB) with YOLOv8 provides enhanced precision by detecting objects with an additional angle parameter. This feature is beneficial for applications requiring accurate localization of rotated objects, such as aerial imagery analysis and warehouse automation. +Oriented Object Detection (OBB) with YOLOv8 provides enhanced [precision](https://www.ultralytics.com/glossary/precision) by detecting objects with an additional angle parameter. This feature is beneficial for applications requiring accurate localization of rotated objects, such as aerial imagery analysis and warehouse automation. - **Increased Precision:** The angle component reduces false positives for rotated objects. - **Versatile Applications:** Useful for tasks in geospatial analysis, robotics, etc. diff --git a/docs/en/tasks/obb.md b/docs/en/tasks/obb.md index 186ffbb0..9175d827 100644 --- a/docs/en/tasks/obb.md +++ b/docs/en/tasks/obb.md @@ -5,7 +5,7 @@ keywords: Oriented Bounding Boxes, OBB, Object Detection, YOLOv8, Ultralytics, D model_name: yolov8n-obb --- -# Oriented Bounding Boxes Object Detection +# Oriented Bounding Boxes [Object Detection](https://www.ultralytics.com/glossary/object-detection) @@ -55,7 +55,7 @@ YOLOv8 pretrained OBB models are shown here, which are pretrained on the [DOTAv1 ## Train -Train YOLOv8n-obb on the `dota8.yaml` dataset for 100 epochs at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. +Train YOLOv8n-obb on the `dota8.yaml` dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. !!! example @@ -103,7 +103,7 @@ OBB dataset format can be found in detail in the [Dataset Guide](../datasets/obb ## Val -Validate trained YOLOv8n-obb model accuracy on the DOTA8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-obb model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the DOTA8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/pose.md b/docs/en/tasks/pose.md index ead809d4..ca0d5fec 100644 --- a/docs/en/tasks/pose.md +++ b/docs/en/tasks/pose.md @@ -117,7 +117,7 @@ YOLO pose dataset format can be found in detail in the [Dataset Guide](../datase ## Val -Validate trained YOLOv8n-pose model accuracy on the COCO128-pose dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-pose model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the COCO128-pose dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example diff --git a/docs/en/tasks/segment.md b/docs/en/tasks/segment.md index e1c43eea..73398d18 100644 --- a/docs/en/tasks/segment.md +++ b/docs/en/tasks/segment.md @@ -9,7 +9,7 @@ model_name: yolov8n-seg Instance segmentation examples -Instance segmentation goes a step further than object detection and involves identifying individual objects in an image and segmenting them from the rest of the image. +[Instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) goes a step further than object detection and involves identifying individual objects in an image and segmenting them from the rest of the image. The output of an instance segmentation model is a set of masks or contours that outline each object in the image, along with class labels and confidence scores for each object. Instance segmentation is useful when you need to know not only where objects are in an image, but also what their exact shape is. @@ -47,7 +47,7 @@ YOLOv8 pretrained Segment models are shown here. Detect, Segment and Pose models ## Train -Train YOLOv8n-seg on the COCO128-seg dataset for 100 epochs at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. +Train YOLOv8n-seg on the COCO128-seg dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. !!! example @@ -84,7 +84,7 @@ YOLO segmentation dataset format can be found in detail in the [Dataset Guide](. ## Val -Validate trained YOLOv8n-seg model accuracy on the COCO128-seg dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n-seg model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the COCO128-seg dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example @@ -204,7 +204,7 @@ To train a YOLOv8 segmentation model on a custom dataset, you first need to prep Check the [Configuration](../usage/cfg.md) page for more available arguments. -### What is the difference between object detection and instance segmentation in YOLOv8? +### What is the difference between [object detection](https://www.ultralytics.com/glossary/object-detection) and instance segmentation in YOLOv8? Object detection identifies and localizes objects within an image by drawing bounding boxes around them, whereas instance segmentation not only identifies the bounding boxes but also delineates the exact shape of each object. YOLOv8 instance segmentation models provide masks or contours that outline each detected object, which is particularly useful for tasks where knowing the precise shape of objects is important, such as medical imaging or autonomous driving. @@ -238,7 +238,7 @@ Loading and validating a pretrained YOLOv8 segmentation model is straightforward yolo segment val model=yolov8n-seg.pt ``` -These steps will provide you with validation metrics like Mean Average Precision (mAP), crucial for assessing model performance. +These steps will provide you with validation metrics like [Mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP), crucial for assessing model performance. ### How can I export a YOLOv8 segmentation model to ONNX format? diff --git a/docs/en/usage/callbacks.md b/docs/en/usage/callbacks.md index 083b6587..2886f8f5 100644 --- a/docs/en/usage/callbacks.md +++ b/docs/en/usage/callbacks.md @@ -57,22 +57,22 @@ Here are all supported callbacks. See callbacks [source code](https://github.com ### Trainer Callbacks -| Callback | Description | -| --------------------------- | ------------------------------------------------------- | -| `on_pretrain_routine_start` | Triggered at the beginning of pre-training routine | -| `on_pretrain_routine_end` | Triggered at the end of pre-training routine | -| `on_train_start` | Triggered when the training starts | -| `on_train_epoch_start` | Triggered at the start of each training epoch | -| `on_train_batch_start` | Triggered at the start of each training batch | -| `optimizer_step` | Triggered during the optimizer step | -| `on_before_zero_grad` | Triggered before gradients are zeroed | -| `on_train_batch_end` | Triggered at the end of each training batch | -| `on_train_epoch_end` | Triggered at the end of each training epoch | -| `on_fit_epoch_end` | Triggered at the end of each fit epoch | -| `on_model_save` | Triggered when the model is saved | -| `on_train_end` | Triggered when the training process ends | -| `on_params_update` | Triggered when model parameters are updated | -| `teardown` | Triggered when the training process is being cleaned up | +| Callback | Description | +| --------------------------- | ------------------------------------------------------------------------------------------- | +| `on_pretrain_routine_start` | Triggered at the beginning of pre-training routine | +| `on_pretrain_routine_end` | Triggered at the end of pre-training routine | +| `on_train_start` | Triggered when the training starts | +| `on_train_epoch_start` | Triggered at the start of each training [epoch](https://www.ultralytics.com/glossary/epoch) | +| `on_train_batch_start` | Triggered at the start of each training batch | +| `optimizer_step` | Triggered during the optimizer step | +| `on_before_zero_grad` | Triggered before gradients are zeroed | +| `on_train_batch_end` | Triggered at the end of each training batch | +| `on_train_epoch_end` | Triggered at the end of each training epoch | +| `on_fit_epoch_end` | Triggered at the end of each fit epoch | +| `on_model_save` | Triggered when the model is saved | +| `on_train_end` | Triggered when the training process ends | +| `on_params_update` | Triggered when model parameters are updated | +| `teardown` | Triggered when the training process is being cleaned up | ### Validator Callbacks @@ -199,7 +199,7 @@ For more comprehensive usage, refer to the [Prediction Guide](../modes/predict.m Ultralytics YOLO supports various practical implementations of callbacks to enhance and customize different phases like training, validation, and prediction. Some practical examples include: 1. **Logging Custom Metrics**: Log additional metrics at different stages, such as the end of training or validation epochs. -2. **Data Augmentation**: Implement custom data transformations or augmentations during prediction or training batches. +2. **[Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation)**: Implement custom data transformations or augmentations during prediction or training batches. 3. **Intermediate Results**: Save intermediate results such as predictions or frames for further analysis or visualization. Example: Combining frames with prediction results during prediction using `on_predict_batch_end`: diff --git a/docs/en/usage/cfg.md b/docs/en/usage/cfg.md index 2d0ce1dd..aecc5fc6 100644 --- a/docs/en/usage/cfg.md +++ b/docs/en/usage/cfg.md @@ -4,7 +4,7 @@ description: Optimize your YOLO model's performance with the right settings and keywords: YOLO, hyperparameters, configuration, training, validation, prediction, model settings, Ultralytics, performance optimization, machine learning --- -YOLO settings and hyperparameters play a critical role in the model's performance, speed, and accuracy. These settings and hyperparameters can affect the model's behavior at various stages of the model development process, including training, validation, and prediction. +YOLO settings and hyperparameters play a critical role in the model's performance, speed, and [accuracy](https://www.ultralytics.com/glossary/accuracy). These settings and hyperparameters can affect the model's behavior at various stages of the model development process, including training, validation, and prediction.


@@ -57,9 +57,9 @@ YOLO models can be used for a variety of tasks, including detection, segmentatio - **Pose**: For identifying objects and estimating their keypoints in an image or video. - **OBB**: Oriented (i.e. rotated) bounding boxes suitable for satellite or medical imagery. -| Argument | Default | Description | -| -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `task` | `'detect'` | Specifies the YOLO task to be executed. Options include `detect` for object detection, `segment` for segmentation, `classify` for classification, `pose` for pose estimation and `OBB` for oriented bounding boxes. Each task is tailored to specific types of output and problems within image and video analysis. | +| Argument | Default | Description | +| -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `task` | `'detect'` | Specifies the YOLO task to be executed. Options include `detect` for [object detection](https://www.ultralytics.com/glossary/object-detection), `segment` for segmentation, `classify` for classification, `pose` for pose estimation and `OBB` for oriented bounding boxes. Each task is tailored to specific types of output and problems within image and video analysis. | [Tasks Guide](../tasks/index.md){ .md-button } @@ -82,7 +82,7 @@ YOLO models can be used in different modes depending on the specific problem you ## Train Settings -The training settings for YOLO models encompass various hyperparameters and configurations used during the training process. These settings influence the model's performance, speed, and accuracy. Key training settings include batch size, learning rate, momentum, and weight decay. Additionally, the choice of optimizer, loss function, and training dataset composition can impact the training process. Careful tuning and experimentation with these settings are crucial for optimizing performance. +The training settings for YOLO models encompass various hyperparameters and configurations used during the training process. These settings influence the model's performance, speed, and accuracy. Key training settings include batch size, [learning rate](https://www.ultralytics.com/glossary/learning-rate), momentum, and weight decay. Additionally, the choice of optimizer, [loss function](https://www.ultralytics.com/glossary/loss-function), and training dataset composition can impact the training process. Careful tuning and experimentation with these settings are crucial for optimizing performance. {% include "macros/train-args.md" %} @@ -90,7 +90,7 @@ The training settings for YOLO models encompass various hyperparameters and conf The `batch` argument can be configured in three ways: - - **Fixed Batch Size**: Set an integer value (e.g., `batch=16`), specifying the number of images per batch directly. + - **Fixed [Batch Size](https://www.ultralytics.com/glossary/batch-size)**: Set an integer value (e.g., `batch=16`), specifying the number of images per batch directly. - **Auto Mode (60% GPU Memory)**: Use `batch=-1` to automatically adjust batch size for approximately 60% CUDA memory utilization. - **Auto Mode with Utilization Fraction**: Set a fraction value (e.g., `batch=0.70`) to adjust batch size based on the specified fraction of GPU memory usage. @@ -116,7 +116,7 @@ The val (validation) settings for YOLO models involve various hyperparameters an {% include "macros/validation-args.md" %} -Careful tuning and experimentation with these settings are crucial to ensure optimal performance on the validation dataset and detect and prevent overfitting. +Careful tuning and experimentation with these settings are crucial to ensure optimal performance on the validation dataset and detect and prevent [overfitting](https://www.ultralytics.com/glossary/overfitting). [Val Guide](../modes/val.md){ .md-button } @@ -132,7 +132,7 @@ It is crucial to thoughtfully configure these settings to ensure the exported mo ## Augmentation Settings -Augmentation techniques are essential for improving the robustness and performance of YOLO models by introducing variability into the training data, helping the model generalize better to unseen data. The following table outlines the purpose and effect of each augmentation argument: +Augmentation techniques are essential for improving the robustness and performance of YOLO models by introducing variability into the [training data](https://www.ultralytics.com/glossary/training-data), helping the model generalize better to unseen data. The following table outlines the purpose and effect of each augmentation argument: {% include "macros/augmentation-args.md" %} @@ -149,19 +149,19 @@ Logging, checkpoints, plotting, and file management are important considerations Effective logging, checkpointing, plotting, and file management can help you keep track of the model's progress and make it easier to debug and optimize the training process. -| Argument | Default | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project` | `'runs'` | Specifies the root directory for saving training runs. Each run will be saved in a separate subdirectory within this directory. | -| `name` | `'exp'` | Defines the name of the experiment. If not specified, YOLO automatically increments this name for each run, e.g., `exp`, `exp2`, etc., to avoid overwriting previous experiments. | -| `exist_ok` | `False` | Determines whether to overwrite an existing experiment directory if one with the same name already exists. Setting this to `True` allows overwriting, while `False` prevents it. | -| `plots` | `False` | Controls the generation and saving of training and validation plots. Set to `True` to create plots such as loss curves, precision-recall curves, and sample predictions. Useful for visually tracking model performance over time. | -| `save` | `False` | Enables the saving of training checkpoints and final model weights. Set to `True` to periodically save model states, allowing training to be resumed from these checkpoints or models to be deployed. | +| Argument | Default | Description | +| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project` | `'runs'` | Specifies the root directory for saving training runs. Each run will be saved in a separate subdirectory within this directory. | +| `name` | `'exp'` | Defines the name of the experiment. If not specified, YOLO automatically increments this name for each run, e.g., `exp`, `exp2`, etc., to avoid overwriting previous experiments. | +| `exist_ok` | `False` | Determines whether to overwrite an existing experiment directory if one with the same name already exists. Setting this to `True` allows overwriting, while `False` prevents it. | +| `plots` | `False` | Controls the generation and saving of training and validation plots. Set to `True` to create plots such as loss curves, [precision](https://www.ultralytics.com/glossary/precision)-[recall](https://www.ultralytics.com/glossary/recall) curves, and sample predictions. Useful for visually tracking model performance over time. | +| `save` | `False` | Enables the saving of training checkpoints and final model weights. Set to `True` to periodically save model states, allowing training to be resumed from these checkpoints or models to be deployed. | ## FAQ ### How do I improve the performance of my YOLO model during training? -Improving YOLO model performance involves tuning hyperparameters like batch size, learning rate, momentum, and weight decay. Adjusting augmentation settings, selecting the right optimizer, and employing techniques like early stopping or mixed precision can also help. For detailed guidance on training settings, refer to the [Train Guide](../modes/train.md). +Improving YOLO model performance involves tuning hyperparameters like batch size, learning rate, momentum, and weight decay. Adjusting augmentation settings, selecting the right optimizer, and employing techniques like early stopping or [mixed precision](https://www.ultralytics.com/glossary/mixed-precision) can also help. For detailed guidance on training settings, refer to the [Train Guide](../modes/train.md). ### What are the key hyperparameters to consider for YOLO model accuracy? diff --git a/docs/en/usage/cli.md b/docs/en/usage/cli.md index 3e6c4b37..d1d7c8de 100644 --- a/docs/en/usage/cli.md +++ b/docs/en/usage/cli.md @@ -35,7 +35,7 @@ The YOLO command line interface (CLI) allows for simple single-line commands wit === "Train" - Train a detection model for 10 epochs with an initial learning_rate of 0.01 + Train a detection model for 10 [epochs](https://www.ultralytics.com/glossary/epoch) with an initial learning_rate of 0.01 ```bash yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 ``` @@ -109,7 +109,7 @@ Train YOLOv8n on the COCO8 dataset for 100 epochs at image size 640. For a full ## Val -Validate trained YOLOv8n model accuracy on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. +Validate trained YOLOv8n model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes. !!! example @@ -221,7 +221,7 @@ This will create `default_copy.yaml`, which you can then pass as `cfg=default_co ### How do I use the Ultralytics YOLOv8 command line interface (CLI) for model training? -To train a YOLOv8 model using the CLI, you can execute a simple one-line command in the terminal. For example, to train a detection model for 10 epochs with a learning rate of 0.01, you would run: +To train a YOLOv8 model using the CLI, you can execute a simple one-line command in the terminal. For example, to train a detection model for 10 epochs with a [learning rate](https://www.ultralytics.com/glossary/learning-rate) of 0.01, you would run: ```bash yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 @@ -241,7 +241,7 @@ Each task can be customized with various arguments. For detailed syntax and exam ### How can I validate the accuracy of a trained YOLOv8 model using the CLI? -To validate a YOLOv8 model's accuracy, use the `val` mode. For example, to validate a pretrained detection model with a batch size of 1 and image size of 640, run: +To validate a YOLOv8 model's accuracy, use the `val` mode. For example, to validate a pretrained detection model with a [batch size](https://www.ultralytics.com/glossary/batch-size) of 1 and image size of 640, run: ```bash yolo val model=yolov8n.pt data=coco8.yaml batch=1 imgsz=640 diff --git a/docs/en/usage/engine.md b/docs/en/usage/engine.md index 7e43e08e..dc44047f 100644 --- a/docs/en/usage/engine.md +++ b/docs/en/usage/engine.md @@ -128,7 +128,7 @@ For more details on the customization and source code, see the [`BaseTrainer` Re ### How can I add a callback to the Ultralytics YOLOv8 DetectionTrainer? -You can add callbacks to monitor and modify the training process in Ultralytics YOLOv8 `DetectionTrainer`. For instance, here's how you can add a callback to log model weights after every training epoch: +You can add callbacks to monitor and modify the training process in Ultralytics YOLOv8 `DetectionTrainer`. For instance, here's how you can add a callback to log model weights after every training [epoch](https://www.ultralytics.com/glossary/epoch): ```python from ultralytics.models.yolo.detect import DetectionTrainer @@ -153,8 +153,8 @@ For further details on callback events and entry points, refer to our [Callbacks Ultralytics YOLOv8 offers a high-level abstraction on powerful engine executors, making it ideal for rapid development and customization. Key benefits include: - **Ease of Use**: Both command-line and Python interfaces simplify complex tasks. -- **Performance**: Optimized for real-time object detection and various vision AI applications. -- **Customization**: Easily extendable for custom models, loss functions, and dataloaders. +- **Performance**: Optimized for real-time [object detection](https://www.ultralytics.com/glossary/object-detection) and various vision AI applications. +- **Customization**: Easily extendable for custom models, [loss functions](https://www.ultralytics.com/glossary/loss-function), and dataloaders. Learn more about YOLOv8's capabilities by visiting [Ultralytics YOLO](https://www.ultralytics.com/yolo). diff --git a/docs/en/usage/python.md b/docs/en/usage/python.md index 66b2e6c6..5236af0a 100644 --- a/docs/en/usage/python.md +++ b/docs/en/usage/python.md @@ -6,7 +6,7 @@ keywords: YOLOv8, Python, object detection, segmentation, classification, machin # Python Usage -Welcome to the YOLOv8 Python Usage documentation! This guide is designed to help you seamlessly integrate YOLOv8 into your Python projects for object detection, segmentation, and classification. Here, you'll learn how to load and use pretrained models, train new models, and perform predictions on images. The easy-to-use Python interface is a valuable resource for anyone looking to incorporate YOLOv8 into their Python projects, allowing you to quickly implement advanced object detection capabilities. Let's get started! +Welcome to the YOLOv8 Python Usage documentation! This guide is designed to help you seamlessly integrate YOLOv8 into your Python projects for [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification. Here, you'll learn how to load and use pretrained models, train new models, and perform predictions on images. The easy-to-use Python interface is a valuable resource for anyone looking to incorporate YOLOv8 into their Python projects, allowing you to quickly implement advanced object detection capabilities. Let's get started!


@@ -80,7 +80,7 @@ Train mode is used for training a YOLOv8 model on a custom dataset. In this mode ## [Val](../modes/val.md) -Val mode is used for validating a YOLOv8 model after it has been trained. In this mode, the model is evaluated on a validation set to measure its accuracy and generalization performance. This mode can be used to tune the hyperparameters of the model to improve its performance. +Val mode is used for validating a YOLOv8 model after it has been trained. In this mode, the model is evaluated on a validation set to measure its [accuracy](https://www.ultralytics.com/glossary/accuracy) and generalization performance. This mode can be used to tune the hyperparameters of the model to improve its performance. !!! example "Val" @@ -355,7 +355,7 @@ See more detailed examples in our [Predict Mode](../modes/predict.md) section. ### What are the different modes available in YOLOv8? -Ultralytics YOLOv8 provides various modes to cater to different machine learning workflows. These include: +Ultralytics YOLOv8 provides various modes to cater to different [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) workflows. These include: - **[Train](../modes/train.md)**: Train a model using custom datasets. - **[Val](../modes/val.md)**: Validate model performance on a validation set. diff --git a/docs/en/usage/simple-utilities.md b/docs/en/usage/simple-utilities.md index a5636ca6..e40a2478 100644 --- a/docs/en/usage/simple-utilities.md +++ b/docs/en/usage/simple-utilities.md @@ -31,7 +31,7 @@ The `ultralytics` package comes with a myriad of utilities that can support, enh ### Auto Labeling / Annotations -Dataset annotation is a very resource intensive and time-consuming process. If you have a YOLO object detection model trained on a reasonable amount of data, you can use it and [SAM](../models/sam.md) to auto-annotate additional data (segmentation format). +Dataset annotation is a very resource intensive and time-consuming process. If you have a YOLO [object detection](https://www.ultralytics.com/glossary/object-detection) model trained on a reasonable amount of data, you can use it and [SAM](../models/sam.md) to auto-annotate additional data (segmentation format). ```{ .py .annotate } from ultralytics.data.annotator import auto_annotate @@ -86,7 +86,7 @@ convert_coco( # (1)! For additional information about the `convert_coco` function, [visit the reference page](../reference/data/converter.md#ultralytics.data.converter.convert_coco) -### Get Bounding Box Dimensions +### Get [Bounding Box](https://www.ultralytics.com/glossary/bounding-box) Dimensions ```{.py .annotate } from ultralytics.utils.plotting import Annotator @@ -585,7 +585,7 @@ make_divisible(7, 2) ## FAQ -### What utilities are included in the Ultralytics package to enhance machine learning workflows? +### What utilities are included in the Ultralytics package to enhance [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) workflows? The Ultralytics package includes a variety of utilities designed to streamline and optimize machine learning workflows. Key utilities include [auto-annotation](../reference/data/annotator.md#ultralytics.data.annotator.auto_annotate) for labeling datasets, converting COCO to YOLO format with [convert_coco](../reference/data/converter.md#ultralytics.data.converter.convert_coco), compressing images, and dataset auto-splitting. These tools aim to reduce manual effort, ensure consistency, and enhance data processing efficiency. diff --git a/docs/en/yolov5/environments/aws_quickstart_tutorial.md b/docs/en/yolov5/environments/aws_quickstart_tutorial.md index ffa6a2c9..0e5daf2f 100644 --- a/docs/en/yolov5/environments/aws_quickstart_tutorial.md +++ b/docs/en/yolov5/environments/aws_quickstart_tutorial.md @@ -6,7 +6,7 @@ keywords: YOLOv5, AWS, Deep Learning, Machine Learning, AWS EC2, YOLOv5 setup, D # YOLOv5 🚀 on AWS Deep Learning Instance: Your Complete Guide -Setting up a high-performance deep learning environment can be daunting for newcomers, but fear not! 🛠️ With this guide, we'll walk you through the process of getting YOLOv5 up and running on an AWS Deep Learning instance. By leveraging the power of Amazon Web Services (AWS), even those new to machine learning can get started quickly and cost-effectively. The AWS platform's scalability is perfect for both experimentation and production deployment. +Setting up a high-performance deep learning environment can be daunting for newcomers, but fear not! 🛠️ With this guide, we'll walk you through the process of getting YOLOv5 up and running on an AWS Deep Learning instance. By leveraging the power of Amazon Web Services (AWS), even those new to [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) can get started quickly and cost-effectively. The AWS platform's scalability is perfect for both experimentation and production deployment. Other quickstart options for YOLOv5 include our [Colab Notebook](https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb) Open In Colab Open In Kaggle, [GCP Deep Learning VM](./google_cloud_quickstart_tutorial.md), and our Docker image at [Docker Hub](https://hub.docker.com/r/ultralytics/yolov5) Docker Pulls. @@ -24,7 +24,7 @@ In the EC2 dashboard, you'll find the **Launch Instance** button which is your g ### Selecting the Right Amazon Machine Image (AMI) -Here's where you choose the operating system and software stack for your instance. Type 'Deep Learning' into the search field and select the latest Ubuntu-based Deep Learning AMI, unless your needs dictate otherwise. Amazon's Deep Learning AMIs come pre-installed with popular frameworks and GPU drivers to streamline your setup process. +Here's where you choose the operating system and software stack for your instance. Type '[Deep Learning](https://www.ultralytics.com/glossary/deep-learning-dl)' into the search field and select the latest Ubuntu-based Deep Learning AMI, unless your needs dictate otherwise. Amazon's Deep Learning AMIs come pre-installed with popular frameworks and GPU drivers to streamline your setup process. ![Choose AMI](https://github.com/ultralytics/docs/releases/download/0/choose-ami.avif) @@ -92,4 +92,4 @@ sudo swapon /swapfile # activate swap file free -h # verify swap memory ``` -And that's it! 🎉 You've successfully created an AWS Deep Learning instance and run YOLOv5. Whether you're just starting with object detection or scaling up for production, this setup can help you achieve your machine learning goals. Happy training, validating, and deploying! If you encounter any hiccups along the way, the robust AWS documentation and the active Ultralytics community are here to support you. +And that's it! 🎉 You've successfully created an AWS Deep Learning instance and run YOLOv5. Whether you're just starting with [object detection](https://www.ultralytics.com/glossary/object-detection) or scaling up for production, this setup can help you achieve your machine learning goals. Happy training, validating, and deploying! If you encounter any hiccups along the way, the robust AWS documentation and the active Ultralytics community are here to support you. diff --git a/docs/en/yolov5/environments/azureml_quickstart_tutorial.md b/docs/en/yolov5/environments/azureml_quickstart_tutorial.md index 2fd33a86..82a083d1 100644 --- a/docs/en/yolov5/environments/azureml_quickstart_tutorial.md +++ b/docs/en/yolov5/environments/azureml_quickstart_tutorial.md @@ -61,7 +61,7 @@ Train the YOLOv5 model: python train.py ``` -Validate the model for Precision, Recall, and mAP +Validate the model for [Precision](https://www.ultralytics.com/glossary/precision), [Recall](https://www.ultralytics.com/glossary/recall), and mAP ```bash python val.py --weights yolov5s.pt diff --git a/docs/en/yolov5/environments/docker_image_quickstart_tutorial.md b/docs/en/yolov5/environments/docker_image_quickstart_tutorial.md index 93c9f0a1..55b92316 100644 --- a/docs/en/yolov5/environments/docker_image_quickstart_tutorial.md +++ b/docs/en/yolov5/environments/docker_image_quickstart_tutorial.md @@ -36,7 +36,7 @@ sudo docker run --ipc=host -it ultralytics/yolov5:latest ### Container with local file access: -To run a container with access to local files (e.g., COCO training data in `/datasets`), use the `-v` flag: +To run a container with access to local files (e.g., COCO [training data](https://www.ultralytics.com/glossary/training-data) in `/datasets`), use the `-v` flag: ```bash sudo docker run --ipc=host -it -v "$(pwd)"/datasets:/usr/src/datasets ultralytics/yolov5:latest diff --git a/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md b/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md index cdd397dc..65ad9c3d 100644 --- a/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md +++ b/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md @@ -6,13 +6,13 @@ keywords: YOLOv5, Google Cloud Platform, GCP, Deep Learning VM, object detection # Mastering YOLOv5 🚀 Deployment on Google Cloud Platform (GCP) Deep Learning Virtual Machine (VM) ⭐ -Embarking on the journey of artificial intelligence and machine learning can be exhilarating, especially when you leverage the power and flexibility of a cloud platform. Google Cloud Platform (GCP) offers robust tools tailored for machine learning enthusiasts and professionals alike. One such tool is the Deep Learning VM that is preconfigured for data science and ML tasks. In this tutorial, we will navigate through the process of setting up YOLOv5 on a GCP Deep Learning VM. Whether you're taking your first steps in ML or you're a seasoned practitioner, this guide is designed to provide you with a clear pathway to implementing object detection models powered by YOLOv5. +Embarking on the journey of [artificial intelligence](https://www.ultralytics.com/glossary/artificial-intelligence-ai) and machine learning can be exhilarating, especially when you leverage the power and flexibility of a cloud platform. Google Cloud Platform (GCP) offers robust tools tailored for machine learning enthusiasts and professionals alike. One such tool is the Deep Learning VM that is preconfigured for data science and ML tasks. In this tutorial, we will navigate through the process of setting up YOLOv5 on a GCP Deep Learning VM. Whether you're taking your first steps in ML or you're a seasoned practitioner, this guide is designed to provide you with a clear pathway to implementing object detection models powered by YOLOv5. 🆓 Plus, if you're a fresh GCP user, you're in luck with a [$300 free credit offer](https://cloud.google.com/free/docs/free-cloud-features#free-trial) to kickstart your projects. In addition to GCP, explore other accessible quickstart options for YOLOv5, like our [Colab Notebook](https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb) Open In Colab for a browser-based experience, or the scalability of [Amazon AWS](./aws_quickstart_tutorial.md). Furthermore, container aficionados can utilize our official Docker image at [Docker Hub](https://hub.docker.com/r/ultralytics/yolov5) Docker Pulls for an encapsulated environment. -## Step 1: Create and Configure Your Deep Learning VM +## Step 1: Create and Configure Your [Deep Learning](https://www.ultralytics.com/glossary/deep-learning-dl) VM Let's begin by creating a virtual machine that's tuned for deep learning: @@ -42,7 +42,7 @@ cd yolov5 pip install -r requirements.txt ``` -This setup process ensures you're working with a Python environment version 3.8.0 or newer and PyTorch 1.8 or above. Our scripts smoothly download [models](https://github.com/ultralytics/yolov5/tree/master/models) and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) rending from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases), making it hassle-free to start model training. +This setup process ensures you're working with a Python environment version 3.8.0 or newer and [PyTorch](https://www.ultralytics.com/glossary/pytorch) 1.8 or above. Our scripts smoothly download [models](https://github.com/ultralytics/yolov5/tree/master/models) and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) rending from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases), making it hassle-free to start model training. ## Step 3: Train and Deploy Your YOLOv5 Models 🌐 @@ -62,7 +62,7 @@ python detect.py --weights yolov5s.pt --source path/to/images python export.py --weights yolov5s.pt --include onnx coreml tflite ``` -With just a few commands, YOLOv5 allows you to train custom object detection models tailored to your specific needs or utilize pre-trained weights for quick results on a variety of tasks. +With just a few commands, YOLOv5 allows you to train custom [object detection](https://www.ultralytics.com/glossary/object-detection) models tailored to your specific needs or utilize pre-trained weights for quick results on a variety of tasks. ![Terminal command image illustrating model training on a GCP Deep Learning VM](https://github.com/ultralytics/docs/releases/download/0/terminal-command-model-training.avif) @@ -80,7 +80,7 @@ free -h # confirm the memory increment ### Concluding Thoughts -Congratulations! You are now empowered to harness the capabilities of YOLOv5 with the computational prowess of Google Cloud Platform. This combination provides scalability, efficiency, and versatility for your object detection tasks. Whether for personal projects, academic research, or industrial applications, you have taken a pivotal step into the world of AI and machine learning on the cloud. +Congratulations! You are now empowered to harness the capabilities of YOLOv5 with the computational prowess of Google Cloud Platform. This combination provides scalability, efficiency, and versatility for your object detection tasks. Whether for personal projects, academic research, or industrial applications, you have taken a pivotal step into the world of AI and [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) on the cloud. Do remember to document your journey, share insights with the Ultralytics community, and leverage the collaborative arenas such as [GitHub discussions](https://github.com/ultralytics/yolov5/discussions) to grow further. Now, go forth and innovate with YOLOv5 and GCP! 🌟 diff --git a/docs/en/yolov5/index.md b/docs/en/yolov5/index.md index ba4e4e3a..36050584 100644 --- a/docs/en/yolov5/index.md +++ b/docs/en/yolov5/index.md @@ -22,11 +22,11 @@ keywords: YOLOv5, Ultralytics, object detection, computer vision, deep learning,

-Welcome to the Ultralytics' YOLOv5🚀 Documentation! YOLOv5, the fifth iteration of the revolutionary "You Only Look Once" object detection model, is designed to deliver high-speed, high-accuracy results in real-time. +Welcome to the Ultralytics' YOLOv5🚀 Documentation! YOLOv5, the fifth iteration of the revolutionary "You Only Look Once" [object detection](https://www.ultralytics.com/glossary/object-detection) model, is designed to deliver high-speed, high-accuracy results in real-time.

-Built on PyTorch, this powerful deep learning framework has garnered immense popularity for its versatility, ease of use, and high performance. Our documentation guides you through the installation process, explains the architectural nuances of the model, showcases various use-cases, and provides a series of detailed tutorials. These resources will help you harness the full potential of YOLOv5 for your computer vision projects. Let's get started! +Built on PyTorch, this powerful [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) framework has garnered immense popularity for its versatility, ease of use, and high performance. Our documentation guides you through the installation process, explains the architectural nuances of the model, showcases various use-cases, and provides a series of detailed tutorials. These resources will help you harness the full potential of YOLOv5 for your [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) projects. Let's get started! @@ -42,10 +42,10 @@ Here's a compilation of comprehensive tutorials that will guide you through diff - [Test-Time Augmentation (TTA)](tutorials/test_time_augmentation.md): Explore how to use TTA to improve your model's prediction accuracy. - [Model Ensembling](tutorials/model_ensembling.md): Learn the strategy of combining multiple models for improved performance. - [Model Pruning/Sparsity](tutorials/model_pruning_and_sparsity.md): Understand pruning and sparsity concepts, and how to create a more efficient model. -- [Hyperparameter Evolution](tutorials/hyperparameter_evolution.md): Discover the process of automated hyperparameter tuning for better model performance. -- [Transfer Learning with Frozen Layers](tutorials/transfer_learning_with_frozen_layers.md): Learn how to implement transfer learning by freezing layers in YOLOv5. +- [Hyperparameter Evolution](tutorials/hyperparameter_evolution.md): Discover the process of automated [hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning) for better model performance. +- [Transfer Learning with Frozen Layers](tutorials/transfer_learning_with_frozen_layers.md): Learn how to implement [transfer learning](https://www.ultralytics.com/glossary/transfer-learning) by freezing layers in YOLOv5. - [Architecture Summary](tutorials/architecture_description.md) 🌟 Delve into the structural details of the YOLOv5 model. -- [Roboflow for Datasets](tutorials/roboflow_datasets_integration.md): Understand how to utilize Roboflow for dataset management, labeling, and active learning. +- [Roboflow for Datasets](tutorials/roboflow_datasets_integration.md): Understand how to utilize Roboflow for dataset management, labeling, and [active learning](https://www.ultralytics.com/glossary/active-learning). - [ClearML Logging](tutorials/clearml_logging_integration.md) 🌟 Learn how to integrate ClearML for efficient logging during your model training. - [YOLOv5 with Neural Magic](tutorials/neural_magic_pruning_quantization.md) Discover how to use Neural Magic's Deepsparse to prune and quantize your YOLOv5 model. - [Comet Logging](tutorials/comet_logging_integration.md) 🌟 NEW: Explore how to utilize Comet for improved model training logging. @@ -95,7 +95,7 @@ We're excited to see the innovative ways you'll use YOLOv5. Dive in, experiment, ### What are the key features of Ultralytics YOLOv5? -Ultralytics YOLOv5 is renowned for its high-speed and high-accuracy object detection capabilities. Built on PyTorch, it is versatile and user-friendly, making it suitable for various computer vision projects. Key features include real-time inference, support for multiple training tricks like Test-Time Augmentation (TTA) and Model Ensembling, and compatibility with export formats such as TFLite, ONNX, CoreML, and TensorRT. To delve deeper into how Ultralytics YOLOv5 can elevate your project, explore our [TFLite, ONNX, CoreML, TensorRT Export guide](tutorials/model_export.md). +Ultralytics YOLOv5 is renowned for its high-speed and high-[accuracy](https://www.ultralytics.com/glossary/accuracy) object detection capabilities. Built on [PyTorch](https://www.ultralytics.com/glossary/pytorch), it is versatile and user-friendly, making it suitable for various computer vision projects. Key features include real-time inference, support for multiple training tricks like Test-Time Augmentation (TTA) and Model Ensembling, and compatibility with export formats such as TFLite, ONNX, CoreML, and TensorRT. To delve deeper into how Ultralytics YOLOv5 can elevate your project, explore our [TFLite, ONNX, CoreML, TensorRT Export guide](tutorials/model_export.md). ### How can I train a custom YOLOv5 model on my dataset? @@ -107,7 +107,7 @@ Ultralytics YOLOv5 is preferred over models like RCNN due to its superior speed ### How can I optimize YOLOv5 model performance during training? -Optimizing YOLOv5 model performance involves tuning various hyperparameters and incorporating techniques like data augmentation and transfer learning. Ultralytics provides comprehensive resources on hyperparameter evolution and pruning/sparsity to improve model efficiency. You can discover practical tips in our [Tips for Best Training Results guide](tutorials/tips_for_best_training_results.md), which offers actionable insights for achieving optimal performance during training. +Optimizing YOLOv5 model performance involves tuning various hyperparameters and incorporating techniques like [data augmentation](https://www.ultralytics.com/glossary/data-augmentation) and transfer learning. Ultralytics provides comprehensive resources on hyperparameter evolution and pruning/sparsity to improve model efficiency. You can discover practical tips in our [Tips for Best Training Results guide](tutorials/tips_for_best_training_results.md), which offers actionable insights for achieving optimal performance during training. ### What environments are supported for running YOLOv5 applications? diff --git a/docs/en/yolov5/quickstart_tutorial.md b/docs/en/yolov5/quickstart_tutorial.md index 582dfcbd..e6ddb8fd 100644 --- a/docs/en/yolov5/quickstart_tutorial.md +++ b/docs/en/yolov5/quickstart_tutorial.md @@ -6,7 +6,7 @@ keywords: YOLOv5, Quickstart, real-time object detection, AI, ML, PyTorch, infer # YOLOv5 Quickstart 🚀 -Embark on your journey into the dynamic realm of real-time object detection with YOLOv5! This guide is crafted to serve as a comprehensive starting point for AI enthusiasts and professionals aiming to master YOLOv5. From initial setup to advanced training techniques, we've got you covered. By the end of this guide, you'll have the knowledge to implement YOLOv5 into your projects confidently. Let's ignite the engines and soar into YOLOv5! +Embark on your journey into the dynamic realm of real-time [object detection](https://www.ultralytics.com/glossary/object-detection) with YOLOv5! This guide is crafted to serve as a comprehensive starting point for AI enthusiasts and professionals aiming to master YOLOv5. From initial setup to advanced training techniques, we've got you covered. By the end of this guide, you'll have the knowledge to implement YOLOv5 into your projects confidently. Let's ignite the engines and soar into YOLOv5! ## Install @@ -18,7 +18,7 @@ cd yolov5 pip install -r requirements.txt # install dependencies ``` -## Inference with PyTorch Hub +## Inference with [PyTorch](https://www.ultralytics.com/glossary/pytorch) Hub Experience the simplicity of YOLOv5 [PyTorch Hub](./tutorials/pytorch_hub_model_loading.md) inference, where [models](https://github.com/ultralytics/yolov5/tree/master/models) are seamlessly downloaded from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases). @@ -57,7 +57,7 @@ python detect.py --weights yolov5s.pt --source 0 # ## Training -Replicate the YOLOv5 [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) benchmarks with the instructions below. The necessary [models](https://github.com/ultralytics/yolov5/tree/master/models) and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) are pulled directly from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases). Training YOLOv5n/s/m/l/x on a V100 GPU should typically take 1/2/4/6/8 days respectively (note that [Multi-GPU](./tutorials/multi_gpu_training.md) setups work faster). Maximize performance by using the highest possible `--batch-size` or use `--batch-size -1` for the YOLOv5 [AutoBatch](https://github.com/ultralytics/yolov5/pull/5092) feature. The following batch sizes are ideal for V100-16GB GPUs. +Replicate the YOLOv5 [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) benchmarks with the instructions below. The necessary [models](https://github.com/ultralytics/yolov5/tree/master/models) and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) are pulled directly from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases). Training YOLOv5n/s/m/l/x on a V100 GPU should typically take 1/2/4/6/8 days respectively (note that [Multi-GPU](./tutorials/multi_gpu_training.md) setups work faster). Maximize performance by using the highest possible `--batch-size` or use `--batch-size -1` for the YOLOv5 [AutoBatch](https://github.com/ultralytics/yolov5/pull/5092) feature. The following [batch sizes](https://www.ultralytics.com/glossary/batch-size) are ideal for V100-16GB GPUs. ```bash python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov5n.yaml --batch-size 128 @@ -69,4 +69,4 @@ python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov5n.yaml - YOLO training curves -To conclude, YOLOv5 is not only a state-of-the-art tool for object detection but also a testament to the power of machine learning in transforming the way we interact with the world through visual understanding. As you progress through this guide and begin applying YOLOv5 to your projects, remember that you are at the forefront of a technological revolution, capable of achieving remarkable feats. Should you need further insights or support from fellow visionaries, you're invited to our [GitHub repository](https://github.com/ultralytics/yolov5) home to a thriving community of developers and researchers. Keep exploring, keep innovating, and enjoy the marvels of YOLOv5. Happy detecting! 🌠🔍 +To conclude, YOLOv5 is not only a state-of-the-art tool for object detection but also a testament to the power of [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) in transforming the way we interact with the world through visual understanding. As you progress through this guide and begin applying YOLOv5 to your projects, remember that you are at the forefront of a technological revolution, capable of achieving remarkable feats. Should you need further insights or support from fellow visionaries, you're invited to our [GitHub repository](https://github.com/ultralytics/yolov5) home to a thriving community of developers and researchers. Keep exploring, keep innovating, and enjoy the marvels of YOLOv5. Happy detecting! 🌠🔍 diff --git a/docs/en/yolov5/tutorials/architecture_description.md b/docs/en/yolov5/tutorials/architecture_description.md index bb9ade69..53788270 100644 --- a/docs/en/yolov5/tutorials/architecture_description.md +++ b/docs/en/yolov5/tutorials/architecture_description.md @@ -6,7 +6,7 @@ keywords: YOLOv5 architecture, object detection, Ultralytics, YOLO, model struct # Ultralytics YOLOv5 Architecture -YOLOv5 (v6.0/6.1) is a powerful object detection algorithm developed by Ultralytics. This article dives deep into the YOLOv5 architecture, data augmentation strategies, training methodologies, and loss computation techniques. This comprehensive understanding will help improve your practical application of object detection in various fields, including surveillance, autonomous vehicles, and image recognition. +YOLOv5 (v6.0/6.1) is a powerful object detection algorithm developed by Ultralytics. This article dives deep into the YOLOv5 architecture, [data augmentation](https://www.ultralytics.com/glossary/data-augmentation) strategies, training methodologies, and loss computation techniques. This comprehensive understanding will help improve your practical application of object detection in various fields, including surveillance, autonomous vehicles, and [image recognition](https://www.ultralytics.com/glossary/image-recognition). ## 1. Model Structure @@ -104,9 +104,9 @@ SPPF time: 0.20780706405639648 ## 2. Data Augmentation Techniques -YOLOv5 employs various data augmentation techniques to improve the model's ability to generalize and reduce overfitting. These techniques include: +YOLOv5 employs various data augmentation techniques to improve the model's ability to generalize and reduce [overfitting](https://www.ultralytics.com/glossary/overfitting). These techniques include: -- **Mosaic Augmentation**: An image processing technique that combines four training images into one in ways that encourage object detection models to better handle various object scales and translations. +- **Mosaic Augmentation**: An image processing technique that combines four training images into one in ways that encourage [object detection](https://www.ultralytics.com/glossary/object-detection) models to better handle various object scales and translations. ![mosaic](https://github.com/ultralytics/docs/releases/download/0/mosaic-augmentation.avif) @@ -138,9 +138,9 @@ YOLOv5 applies several sophisticated training strategies to enhance the model's - **Multiscale Training**: The input images are randomly rescaled within a range of 0.5 to 1.5 times their original size during the training process. - **AutoAnchor**: This strategy optimizes the prior anchor boxes to match the statistical characteristics of the ground truth boxes in your custom data. -- **Warmup and Cosine LR Scheduler**: A method to adjust the learning rate to enhance model performance. +- **Warmup and Cosine LR Scheduler**: A method to adjust the [learning rate](https://www.ultralytics.com/glossary/learning-rate) to enhance model performance. - **Exponential Moving Average (EMA)**: A strategy that uses the average of parameters over past steps to stabilize the training process and reduce generalization error. -- **Mixed Precision Training**: A method to perform operations in half-precision format, reducing memory usage and enhancing computational speed. +- **[Mixed Precision](https://www.ultralytics.com/glossary/mixed-precision) Training**: A method to perform operations in half-[precision](https://www.ultralytics.com/glossary/precision) format, reducing memory usage and enhancing computational speed. - **Hyperparameter Evolution**: A strategy to automatically tune hyperparameters to achieve optimal performance. ## 4. Additional Features @@ -153,7 +153,7 @@ The loss in YOLOv5 is computed as a combination of three individual loss compone - **Objectness Loss (BCE Loss)**: Another Binary Cross-Entropy loss, calculates the error in detecting whether an object is present in a particular grid cell or not. - **Location Loss (CIoU Loss)**: Complete IoU loss, measures the error in localizing the object within the grid cell. -The overall loss function is depicted by: +The overall [loss function](https://www.ultralytics.com/glossary/loss-function) is depicted by: ![loss](https://latex.codecogs.com/svg.image?Loss=\lambda_1L_{cls}+\lambda_2L_{obj}+\lambda_3L_{loc}) @@ -176,7 +176,7 @@ The YOLOv5 architecture makes some important changes to the box prediction strat However, in YOLOv5, the formula for predicting the box coordinates has been updated to reduce grid sensitivity and prevent the model from predicting unbounded box dimensions. -The revised formulas for calculating the predicted bounding box are as follows: +The revised formulas for calculating the predicted [bounding box](https://www.ultralytics.com/glossary/bounding-box) are as follows: ![bx]() ![by]() @@ -193,7 +193,7 @@ Compare the height and width scaling ratio(relative to anchor) before and after ### 4.4 Build Targets -The build target process in YOLOv5 is critical for training efficiency and model accuracy. It involves assigning ground truth boxes to the appropriate grid cells in the output map and matching them with the appropriate anchor boxes. +The build target process in YOLOv5 is critical for training efficiency and model [accuracy](https://www.ultralytics.com/glossary/accuracy). It involves assigning ground truth boxes to the appropriate grid cells in the output map and matching them with the appropriate anchor boxes. This process follows these steps: diff --git a/docs/en/yolov5/tutorials/clearml_logging_integration.md b/docs/en/yolov5/tutorials/clearml_logging_integration.md index 90012d19..f8ee5c34 100644 --- a/docs/en/yolov5/tutorials/clearml_logging_integration.md +++ b/docs/en/yolov5/tutorials/clearml_logging_integration.md @@ -14,7 +14,7 @@ keywords: ClearML, YOLOv5, machine learning, experiment tracking, data versionin 🔨 Track every YOLOv5 training run in the experiment manager -🔧 Version and easily access your custom training data with the integrated ClearML Data Versioning Tool +🔧 Version and easily access your custom [training data](https://www.ultralytics.com/glossary/training-data) with the integrated ClearML Data Versioning Tool 🔦 Remotely train and monitor your YOLOv5 training runs using ClearML Agent @@ -85,8 +85,8 @@ This will capture: - Console output - Scalars (mAP_0.5, mAP_0.5:0.95, precision, recall, losses, learning rates, ...) - General info such as machine details, runtime, creation date etc. -- All produced plots such as label correlogram and confusion matrix -- Images with bounding boxes per epoch +- All produced plots such as label correlogram and [confusion matrix](https://www.ultralytics.com/glossary/confusion-matrix) +- Images with bounding boxes per [epoch](https://www.ultralytics.com/glossary/epoch) - Mosaic per epoch - Validation images per epoch diff --git a/docs/en/yolov5/tutorials/comet_logging_integration.md b/docs/en/yolov5/tutorials/comet_logging_integration.md index 63608fc2..c5f20dda 100644 --- a/docs/en/yolov5/tutorials/comet_logging_integration.md +++ b/docs/en/yolov5/tutorials/comet_logging_integration.md @@ -12,7 +12,7 @@ This guide will cover how to use YOLOv5 with [Comet](https://bit.ly/yolov5-readm ## About Comet -Comet builds tools that help data scientists, engineers, and team leaders accelerate and optimize machine learning and deep learning models. +Comet builds tools that help data scientists, engineers, and team leaders accelerate and optimize [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) models. Track and visualize model metrics in real time, save your hyperparameters, datasets, and model checkpoints, and visualize your model predictions with [Comet Custom Panels](https://www.comet.com/docs/v2/guides/comet-dashboard/code-panels/about-panels/?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=github)! Comet makes sure you never lose track of your work and makes it easy to share results and collaborate across teams of all sizes! @@ -72,7 +72,7 @@ By default, Comet will log the following items ## Metrics -- Box Loss, Object Loss, Classification Loss for the training and validation data +- Box Loss, Object Loss, Classification Loss for the training and [validation data](https://www.ultralytics.com/glossary/validation-data) - mAP_0.5, mAP_0.5:0.95 metrics for the validation data. - Precision and Recall for the validation data @@ -83,7 +83,7 @@ By default, Comet will log the following items ## Visualizations -- Confusion Matrix of the model predictions on the validation data +- [Confusion Matrix](https://www.ultralytics.com/glossary/confusion-matrix) of the model predictions on the validation data - Plots for the PR and F1 curves across all classes - Correlogram of the Class Labels @@ -120,9 +120,9 @@ python train.py \ By default, model predictions (images, ground truth labels and bounding boxes) will be logged to Comet. -You can control the frequency of logged predictions and the associated images by passing the `bbox_interval` command line argument. Predictions can be visualized using Comet's Object Detection Custom Panel. This frequency corresponds to every Nth batch of data per epoch. In the example below, we are logging every 2nd batch of data for each epoch. +You can control the frequency of logged predictions and the associated images by passing the `bbox_interval` command line argument. Predictions can be visualized using Comet's [Object Detection](https://www.ultralytics.com/glossary/object-detection) Custom Panel. This frequency corresponds to every Nth batch of data per [epoch](https://www.ultralytics.com/glossary/epoch). In the example below, we are logging every 2nd batch of data for each epoch. -**Note:** The YOLOv5 validation dataloader will default to a batch size of 32, so you will have to set the logging frequency accordingly. +**Note:** The YOLOv5 validation dataloader will default to a [batch size](https://www.ultralytics.com/glossary/batch-size) of 32, so you will have to set the logging frequency accordingly. Here is an [example project using the Panel](https://www.comet.com/examples/comet-example-yolov5?shareable=YcwMiJaZSXfcEXpGOHDD12vA1&utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=github) @@ -152,7 +152,7 @@ env COMET_MAX_IMAGE_UPLOADS=200 python train.py \ ### Logging Class Level Metrics -Use the `COMET_LOG_PER_CLASS_METRICS` environment variable to log mAP, precision, recall, f1 for each class. +Use the `COMET_LOG_PER_CLASS_METRICS` environment variable to log mAP, [precision](https://www.ultralytics.com/glossary/precision), [recall](https://www.ultralytics.com/glossary/recall), f1 for each class. ```shell env COMET_LOG_PER_CLASS_METRICS=true python train.py \ diff --git a/docs/en/yolov5/tutorials/hyperparameter_evolution.md b/docs/en/yolov5/tutorials/hyperparameter_evolution.md index 8b2a1324..3db460b1 100644 --- a/docs/en/yolov5/tutorials/hyperparameter_evolution.md +++ b/docs/en/yolov5/tutorials/hyperparameter_evolution.md @@ -61,7 +61,7 @@ copy_paste: 0.0 # segment copy-paste (probability) ## 2. Define Fitness -Fitness is the value we seek to maximize. In YOLOv5 we define a default fitness function as a weighted combination of metrics: `mAP@0.5` contributes 10% of the weight and `mAP@0.5:0.95` contributes the remaining 90%, with [Precision `P` and Recall `R`](https://en.wikipedia.org/wiki/Precision_and_recall) absent. You may adjust these as you see fit or use the default fitness definition in utils/metrics.py (recommended). +Fitness is the value we seek to maximize. In YOLOv5 we define a default fitness function as a weighted combination of metrics: `mAP@0.5` contributes 10% of the weight and `mAP@0.5:0.95` contributes the remaining 90%, with [Precision `P` and [Recall](https://www.ultralytics.com/glossary/recall) `R`](https://en.wikipedia.org/wiki/Precision_and_recall) absent. You may adjust these as you see fit or use the default fitness definition in utils/metrics.py (recommended). ```python def fitness(x): @@ -72,7 +72,7 @@ def fitness(x): ## 3. Evolve -Evolution is performed about a base scenario which we seek to improve upon. The base scenario in this example is finetuning COCO128 for 10 epochs using pretrained YOLOv5s. The base scenario training command is: +Evolution is performed about a base scenario which we seek to improve upon. The base scenario in this example is [finetuning](https://www.ultralytics.com/glossary/fine-tuning) COCO128 for 10 [epochs](https://www.ultralytics.com/glossary/epoch) using pretrained YOLOv5s. The base scenario training command is: ```bash python train.py --epochs 10 --data coco128.yaml --weights yolov5s.pt --cache diff --git a/docs/en/yolov5/tutorials/model_ensembling.md b/docs/en/yolov5/tutorials/model_ensembling.md index f3581065..814c8969 100644 --- a/docs/en/yolov5/tutorials/model_ensembling.md +++ b/docs/en/yolov5/tutorials/model_ensembling.md @@ -4,11 +4,11 @@ description: Learn how to use YOLOv5 model ensembling during testing and inferen keywords: YOLOv5, model ensembling, testing, inference, mAP, Recall, Ultralytics, object detection, PyTorch --- -📚 This guide explains how to use YOLOv5 🚀 **model ensembling** during testing and inference for improved mAP and Recall. +📚 This guide explains how to use YOLOv5 🚀 **model ensembling** during testing and inference for improved mAP and [Recall](https://www.ultralytics.com/glossary/recall). From [https://en.wikipedia.org/wiki/Ensemble_learning](https://en.wikipedia.org/wiki/Ensemble_learning): -> Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different training data sets. The ensemble model then aggregates the prediction of each base model and results in once final prediction for the unseen data. The motivation for using ensemble models is to reduce the generalization error of the prediction. As long as the base models are diverse and independent, the prediction error of the model decreases when the ensemble approach is used. The approach seeks the wisdom of crowds in making a prediction. Even though the ensemble model has multiple base models within the model, it acts and performs as a single model. +> Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different [training data](https://www.ultralytics.com/glossary/training-data) sets. The ensemble model then aggregates the prediction of each base model and results in once final prediction for the unseen data. The motivation for using ensemble models is to reduce the generalization error of the prediction. As long as the base models are diverse and independent, the prediction error of the model decreases when the ensemble approach is used. The approach seeks the wisdom of crowds in making a prediction. Even though the ensemble model has multiple base models within the model, it acts and performs as a single model. ## Before You Start diff --git a/docs/en/yolov5/tutorials/model_export.md b/docs/en/yolov5/tutorials/model_export.md index dc68c84c..e5f0c730 100644 --- a/docs/en/yolov5/tutorials/model_export.md +++ b/docs/en/yolov5/tutorials/model_export.md @@ -6,7 +6,7 @@ keywords: YOLOv5 export, TFLite, ONNX, CoreML, TensorRT, model conversion, YOLOv # TFLite, ONNX, CoreML, TensorRT Export -📚 This guide explains how to export a trained YOLOv5 🚀 model from PyTorch to ONNX and TorchScript formats. +📚 This guide explains how to export a trained YOLOv5 🚀 model from [PyTorch](https://www.ultralytics.com/glossary/pytorch) to ONNX and TorchScript formats. ## Before You Start @@ -103,7 +103,7 @@ This command exports a pretrained YOLOv5s model to TorchScript and ONNX formats. python export.py --weights yolov5s.pt --include torchscript onnx ``` -💡 ProTip: Add `--half` to export models at FP16 half precision for smaller file sizes +💡 ProTip: Add `--half` to export models at FP16 half [precision](https://www.ultralytics.com/glossary/precision) for smaller file sizes Output: @@ -205,7 +205,7 @@ results.print() # or .show(), .save(), .crop(), .pandas(), etc. ## OpenCV DNN inference -OpenCV inference with ONNX models: +[OpenCV](https://www.ultralytics.com/glossary/opencv) inference with ONNX models: ```bash python export.py --weights yolov5s.pt --include onnx diff --git a/docs/en/yolov5/tutorials/multi_gpu_training.md b/docs/en/yolov5/tutorials/multi_gpu_training.md index 4a56570f..53f3a1c1 100644 --- a/docs/en/yolov5/tutorials/multi_gpu_training.md +++ b/docs/en/yolov5/tutorials/multi_gpu_training.md @@ -18,7 +18,7 @@ pip install -r requirements.txt # install 💡 ProTip! **Docker Image** is recommended for all Multi-GPU trainings. See [Docker Quickstart Guide](../environments/docker_image_quickstart_tutorial.md) Docker Pulls -💡 ProTip! `torch.distributed.run` replaces `torch.distributed.launch` in **PyTorch>=1.9**. See [docs](https://pytorch.org/docs/stable/distributed.html) for details. +💡 ProTip! `torch.distributed.run` replaces `torch.distributed.launch` in **[PyTorch](https://www.ultralytics.com/glossary/pytorch)>=1.9**. See [docs](https://pytorch.org/docs/stable/distributed.html) for details. ## Training @@ -69,7 +69,7 @@ python -m torch.distributed.run --nproc_per_node 2 train.py --batch 64 --data co

Use SyncBatchNorm (click to expand) -[SyncBatchNorm](https://pytorch.org/docs/master/generated/torch.nn.SyncBatchNorm.html) could increase accuracy for multiple gpu training, however, it will slow down training by a significant factor. It is **only** available for Multiple GPU DistributedDataParallel training. +[SyncBatchNorm](https://pytorch.org/docs/master/generated/torch.nn.SyncBatchNorm.html) could increase [accuracy](https://www.ultralytics.com/glossary/accuracy) for multiple gpu training, however, it will slow down training by a significant factor. It is **only** available for Multiple GPU DistributedDataParallel training. It is best used when the batch-size on **each** GPU is small (<= 8). @@ -121,7 +121,7 @@ python -m torch.distributed.run --master_port 1234 --nproc_per_node 2 ... ## Results -DDP profiling results on an [AWS EC2 P4d instance](../environments/aws_quickstart_tutorial.md) with 8x A100 SXM4-40GB for YOLOv5l for 1 COCO epoch. +DDP profiling results on an [AWS EC2 P4d instance](../environments/aws_quickstart_tutorial.md) with 8x A100 SXM4-40GB for YOLOv5l for 1 COCO [epoch](https://www.ultralytics.com/glossary/epoch).
Profiling code diff --git a/docs/en/yolov5/tutorials/neural_magic_pruning_quantization.md b/docs/en/yolov5/tutorials/neural_magic_pruning_quantization.md index 663a5d14..1d2a9bca 100644 --- a/docs/en/yolov5/tutorials/neural_magic_pruning_quantization.md +++ b/docs/en/yolov5/tutorials/neural_magic_pruning_quantization.md @@ -30,7 +30,7 @@ DeepSparse is an inference runtime with exceptional performance on CPUs. For ins YOLOv5 speed improvement

-For the first time, your deep learning workloads can meet the performance demands of production without the complexity and costs of hardware accelerators. Put simply, DeepSparse gives you the performance of GPUs and the simplicity of software: +For the first time, your [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) workloads can meet the performance demands of production without the complexity and costs of hardware accelerators. Put simply, DeepSparse gives you the performance of GPUs and the simplicity of software: - **Flexible Deployments**: Run consistently across cloud, data center, and edge with any hardware provider from Intel to AMD to ARM - **Infinite Scalability**: Scale vertically to 100s of cores, out with standard Kubernetes, or fully-abstracted with Serverless @@ -40,7 +40,7 @@ For the first time, your deep learning workloads can meet the performance demand DeepSparse takes advantage of model sparsity to gain its performance speedup. -Sparsification through pruning and quantization is a broadly studied technique, allowing order-of-magnitude reductions in the size and compute needed to execute a network, while maintaining high accuracy. DeepSparse is sparsity-aware, meaning it skips the zeroed out parameters, shrinking amount of compute in a forward pass. Since the sparse computation is now memory bound, DeepSparse executes the network depth-wise, breaking the problem into Tensor Columns, vertical stripes of computation that fit in cache. +Sparsification through pruning and quantization is a broadly studied technique, allowing order-of-magnitude reductions in the size and compute needed to execute a network, while maintaining high [accuracy](https://www.ultralytics.com/glossary/accuracy). DeepSparse is sparsity-aware, meaning it skips the zeroed out parameters, shrinking amount of compute in a forward pass. Since the sparse computation is now memory bound, DeepSparse executes the network depth-wise, breaking the problem into Tensor Columns, vertical stripes of computation that fit in cache.

YOLO model pruning @@ -122,7 +122,7 @@ apt-get install libgl1 #### HTTP Server -DeepSparse Server runs on top of the popular FastAPI web framework and Uvicorn web server. With just a single CLI command, you can easily setup a model service endpoint with DeepSparse. The Server supports any Pipeline from DeepSparse, including object detection with YOLOv5, enabling you to send raw images to the endpoint and receive the bounding boxes. +DeepSparse Server runs on top of the popular FastAPI web framework and Uvicorn web server. With just a single CLI command, you can easily setup a model service endpoint with DeepSparse. The Server supports any Pipeline from DeepSparse, including [object detection](https://www.ultralytics.com/glossary/object-detection) with YOLOv5, enabling you to send raw images to the endpoint and receive the bounding boxes. Spin up the Server with the pruned-quantized YOLOv5s: diff --git a/docs/en/yolov5/tutorials/pytorch_hub_model_loading.md b/docs/en/yolov5/tutorials/pytorch_hub_model_loading.md index b00d94db..27e26f14 100644 --- a/docs/en/yolov5/tutorials/pytorch_hub_model_loading.md +++ b/docs/en/yolov5/tutorials/pytorch_hub_model_loading.md @@ -4,7 +4,7 @@ description: Learn how to load YOLOv5 from PyTorch Hub for seamless model infere keywords: YOLOv5, PyTorch Hub, model loading, Ultralytics, object detection, machine learning, AI, tutorial, inference --- -📚 This guide explains how to load YOLOv5 🚀 from PyTorch Hub at [https://pytorch.org/hub/ultralytics_yolov5](https://pytorch.org/hub/ultralytics_yolov5/). +📚 This guide explains how to load YOLOv5 🚀 from [PyTorch](https://www.ultralytics.com/glossary/pytorch) Hub at [https://pytorch.org/hub/ultralytics_yolov5](https://pytorch.org/hub/ultralytics_yolov5/). ## Before You Start @@ -44,7 +44,7 @@ results.pandas().xyxy[0] ### Detailed Example -This example shows **batched inference** with **PIL** and **OpenCV** image sources. `results` can be **printed** to console, **saved** to `runs/hub`, **showed** to screen on supported environments, and returned as **tensors** or **pandas** dataframes. +This example shows **batched inference** with **PIL** and **[OpenCV](https://www.ultralytics.com/glossary/opencv)** image sources. `results` can be **printed** to console, **saved** to `runs/hub`, **showed** to screen on supported environments, and returned as **tensors** or **pandas** dataframes. ```python import cv2 diff --git a/docs/en/yolov5/tutorials/roboflow_datasets_integration.md b/docs/en/yolov5/tutorials/roboflow_datasets_integration.md index 3047e48c..55728f21 100644 --- a/docs/en/yolov5/tutorials/roboflow_datasets_integration.md +++ b/docs/en/yolov5/tutorials/roboflow_datasets_integration.md @@ -52,7 +52,7 @@ We have released a custom training tutorial demonstrating all of the above capab ## Active Learning -The real world is messy and your model will invariably encounter situations your dataset didn't anticipate. Using [active learning](https://blog.roboflow.com/what-is-active-learning/?ref=ultralytics) is an important strategy to iteratively improve your dataset and model. With the Roboflow and YOLOv5 integration, you can quickly make improvements on your model deployments by using a battle tested machine learning pipeline. +The real world is messy and your model will invariably encounter situations your dataset didn't anticipate. Using [active learning](https://blog.roboflow.com/what-is-active-learning/?ref=ultralytics) is an important strategy to iteratively improve your dataset and model. With the Roboflow and YOLOv5 integration, you can quickly make improvements on your [model deployments](https://www.ultralytics.com/glossary/model-deployment) by using a battle tested [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) pipeline.

Roboflow active learning

@@ -96,10 +96,10 @@ dataset = project.version("YOUR VERSION").download("yolov5") This code will download your dataset in a format compatible with YOLOv5, allowing you to quickly begin training your model. For more details, refer to the [Exporting Data](#exporting-data) section. -### What is active learning and how does it work with YOLOv5 and Roboflow? +### What is [active learning](https://www.ultralytics.com/glossary/active-learning) and how does it work with YOLOv5 and Roboflow? Active learning is a machine learning strategy that iteratively improves a model by intelligently selecting the most informative data points to label. With the Roboflow and YOLOv5 integration, you can implement active learning to continuously enhance your model's performance. This involves deploying a model, capturing new data, using the model to make predictions, and then manually verifying or correcting those predictions to further train the model. For more insights into active learning see the [Active Learning](#active-learning) section above. ### How can I use Ultralytics environments for training YOLOv5 models on different platforms? -Ultralytics provides ready-to-use environments with pre-installed dependencies like CUDA, CUDNN, Python, and PyTorch, making it easier to kickstart your training projects. These environments are available on various platforms such as Google Cloud, AWS, Azure, and Docker. You can also access free GPU notebooks via [Paperspace](https://bit.ly/yolov5-paperspace-notebook), [Google Colab](https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb), and [Kaggle](https://www.kaggle.com/ultralytics/yolov5). For specific setup instructions, visit the [Supported Environments](#supported-environments) section of the documentation. +Ultralytics provides ready-to-use environments with pre-installed dependencies like CUDA, CUDNN, Python, and [PyTorch](https://www.ultralytics.com/glossary/pytorch), making it easier to kickstart your training projects. These environments are available on various platforms such as Google Cloud, AWS, Azure, and Docker. You can also access free GPU notebooks via [Paperspace](https://bit.ly/yolov5-paperspace-notebook), [Google Colab](https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb), and [Kaggle](https://www.kaggle.com/ultralytics/yolov5). For specific setup instructions, visit the [Supported Environments](#supported-environments) section of the documentation. diff --git a/docs/en/yolov5/tutorials/test_time_augmentation.md b/docs/en/yolov5/tutorials/test_time_augmentation.md index d2b95917..336ad3f7 100644 --- a/docs/en/yolov5/tutorials/test_time_augmentation.md +++ b/docs/en/yolov5/tutorials/test_time_augmentation.md @@ -6,7 +6,7 @@ keywords: YOLOv5, Test-Time Augmentation, TTA, machine learning, deep learning, # Test-Time Augmentation (TTA) -📚 This guide explains how to use Test Time Augmentation (TTA) during testing and inference for improved mAP and Recall with YOLOv5 🚀. +📚 This guide explains how to use Test Time Augmentation (TTA) during testing and inference for improved mAP and [Recall](https://www.ultralytics.com/glossary/recall) with YOLOv5 🚀. ## Before You Start diff --git a/docs/en/yolov5/tutorials/tips_for_best_training_results.md b/docs/en/yolov5/tutorials/tips_for_best_training_results.md index c24435d9..63429720 100644 --- a/docs/en/yolov5/tutorials/tips_for_best_training_results.md +++ b/docs/en/yolov5/tutorials/tips_for_best_training_results.md @@ -8,7 +8,7 @@ keywords: YOLOv5 training, mAP, dataset best practices, model selection, trainin Most of the time good results can be obtained with no changes to the models or training settings, **provided your dataset is sufficiently large and well labelled**. If at first you don't get good results, there are steps you might be able to take to improve, but we always recommend users **first train with all default settings** before considering any changes. This helps establish a performance baseline and spot areas for improvement. -If you have questions about your training results **we recommend you provide the maximum amount of information possible** if you expect a helpful response, including results plots (train losses, val losses, P, R, mAP), PR curve, confusion matrix, training mosaics, test results and dataset statistics images such as labels.png. All of these are located in your `project/name` directory, typically `yolov5/runs/train/exp`. +If you have questions about your training results **we recommend you provide the maximum amount of information possible** if you expect a helpful response, including results plots (train losses, val losses, P, R, mAP), PR curve, [confusion matrix](https://www.ultralytics.com/glossary/confusion-matrix), training mosaics, test results and dataset statistics images such as labels.png. All of these are located in your `project/name` directory, typically `yolov5/runs/train/exp`. We've put together a full guide for users looking to get the best results on their YOLOv5 trainings below. @@ -18,7 +18,7 @@ We've put together a full guide for users looking to get the best results on the - **Instances per class.** ≥ 10000 instances (labeled objects) per class recommended - **Image variety.** Must be representative of deployed environment. For real-world use cases we recommend images from different times of day, different seasons, different weather, different lighting, different angles, different sources (scraped online, collected locally, different cameras) etc. - **Label consistency.** All instances of all classes in all images must be labelled. Partial labelling will not work. -- **Label accuracy.** Labels must closely enclose each object. No space should exist between an object and it's bounding box. No objects should be missing a label. +- **Label [accuracy](https://www.ultralytics.com/glossary/accuracy).** Labels must closely enclose each object. No space should exist between an object and it's [bounding box](https://www.ultralytics.com/glossary/bounding-box). No objects should be missing a label. - **Label verification.** View `train_batch*.jpg` on train start to verify your labels appear correct, i.e. see [example](./train_custom_data.md#local-logging) mosaic. - **Background images.** Background images are images with no objects that are added to a dataset to reduce False Positives (FP). We recommend about 0-10% background images to help reduce FPs (COCO has 1000 background images for reference, 1% of the total). No labels are required for background images. @@ -53,13 +53,13 @@ python train.py --data custom.yaml --weights '' --cfg yolov5s.yaml Before modifying anything, **first train with default settings to establish a performance baseline**. A full list of train.py settings can be found in the [train.py](https://github.com/ultralytics/yolov5/blob/master/train.py) argparser. -- **Epochs.** Start with 300 epochs. If this overfits early then you can reduce epochs. If overfitting does not occur after 300 epochs, train longer, i.e. 600, 1200 etc. epochs. +- **[Epochs](https://www.ultralytics.com/glossary/epoch).** Start with 300 epochs. If this overfits early then you can reduce epochs. If [overfitting](https://www.ultralytics.com/glossary/overfitting) does not occur after 300 epochs, train longer, i.e. 600, 1200 etc. epochs. - **Image size.** COCO trains at native resolution of `--img 640`, though due to the high amount of small objects in the dataset it can benefit from training at higher resolutions such as `--img 1280`. If there are many small objects then custom datasets will benefit from training at native or higher resolution. Best inference results are obtained at the same `--img` as the training was run at, i.e. if you train at `--img 1280` you should also test and detect at `--img 1280`. -- **Batch size.** Use the largest `--batch-size` that your hardware allows for. Small batch sizes produce poor batchnorm statistics and should be avoided. +- **[Batch size](https://www.ultralytics.com/glossary/batch-size).** Use the largest `--batch-size` that your hardware allows for. Small batch sizes produce poor batchnorm statistics and should be avoided. - **Hyperparameters.** Default hyperparameters are in [hyp.scratch-low.yaml](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-low.yaml). We recommend you train with default hyperparameters first before thinking of modifying any. In general, increasing augmentation hyperparameters will reduce and delay overfitting, allowing for longer trainings and higher final mAP. Reduction in loss component gain hyperparameters like `hyp['obj']` will help reduce overfitting in those specific loss components. For an automated method of optimizing these hyperparameters, see our [Hyperparameter Evolution Tutorial](./hyperparameter_evolution.md). ## Further Reading -If you'd like to know more, a good place to start is Karpathy's 'Recipe for Training Neural Networks', which has great ideas for training that apply broadly across all ML domains: [https://karpathy.github.io/2019/04/25/recipe/](https://karpathy.github.io/2019/04/25/recipe/) +If you'd like to know more, a good place to start is Karpathy's 'Recipe for Training [Neural Networks](https://www.ultralytics.com/glossary/neural-network-nn)', which has great ideas for training that apply broadly across all ML domains: [https://karpathy.github.io/2019/04/25/recipe/](https://karpathy.github.io/2019/04/25/recipe/) Good luck 🍀 and let us know if you have any other questions! diff --git a/docs/en/yolov5/tutorials/train_custom_data.md b/docs/en/yolov5/tutorials/train_custom_data.md index 6119bc3a..aa093e4b 100644 --- a/docs/en/yolov5/tutorials/train_custom_data.md +++ b/docs/en/yolov5/tutorials/train_custom_data.md @@ -77,7 +77,7 @@ Export in `YOLOv5 Pytorch` format, then copy the snippet into your training scri ### 2.1 Create `dataset.yaml` -[COCO128](https://www.kaggle.com/ultralytics/coco128) is an example small tutorial dataset composed of the first 128 images in [COCO](https://cocodataset.org/) train2017. These same 128 images are used for both training and validation to verify our training pipeline is capable of overfitting. [data/coco128.yaml](https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml), shown below, is the dataset config file that defines 1) the dataset root directory `path` and relative paths to `train` / `val` / `test` image directories (or `*.txt` files with image paths) and 2) a class `names` dictionary: +[COCO128](https://www.kaggle.com/ultralytics/coco128) is an example small tutorial dataset composed of the first 128 images in [COCO](https://cocodataset.org/) train2017. These same 128 images are used for both training and validation to verify our training pipeline is capable of [overfitting](https://www.ultralytics.com/glossary/overfitting). [data/coco128.yaml](https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml), shown below, is the dataset config file that defines 1) the dataset root directory `path` and relative paths to `train` / `val` / `test` image directories (or `*.txt` files with image paths) and 2) a class `names` dictionary: ```yaml # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] @@ -183,11 +183,11 @@ You can use ClearML Data to version your dataset and then pass it to YOLOv5 simp Training results are automatically logged with [Tensorboard](https://www.tensorflow.org/tensorboard) and [CSV](https://github.com/ultralytics/yolov5/pull/4148) loggers to `runs/train`, with a new experiment directory created for each new training as `runs/train/exp2`, `runs/train/exp3`, etc. -This directory contains train and val statistics, mosaics, labels, predictions and augmented mosaics, as well as metrics and charts including precision-recall (PR) curves and confusion matrices. +This directory contains train and val statistics, mosaics, labels, predictions and augmented mosaics, as well as metrics and charts including [precision](https://www.ultralytics.com/glossary/precision)-[recall](https://www.ultralytics.com/glossary/recall) (PR) curves and confusion matrices. Local logging results -Results file `results.csv` is updated after each epoch, and then plotted as `results.png` (below) after training completes. You can also plot any `results.csv` file manually: +Results file `results.csv` is updated after each [epoch](https://www.ultralytics.com/glossary/epoch), and then plotted as `results.png` (below) after training completes. You can also plot any `results.csv` file manually: ```python from utils.plots import plot_results @@ -202,8 +202,8 @@ plot_results("path/to/results.csv") # plot 'results.csv' as 'results.png' Once your model is trained you can use your best checkpoint `best.pt` to: - Run [CLI](https://github.com/ultralytics/yolov5#quick-start-examples) or [Python](./pytorch_hub_model_loading.md) inference on new images and videos -- [Validate](https://github.com/ultralytics/yolov5/blob/master/val.py) accuracy on train, val and test splits -- [Export](./model_export.md) to TensorFlow, Keras, ONNX, TFlite, TF.js, CoreML and TensorRT formats +- [Validate](https://github.com/ultralytics/yolov5/blob/master/val.py) [accuracy](https://www.ultralytics.com/glossary/accuracy) on train, val and test splits +- [Export](./model_export.md) to [TensorFlow](https://www.ultralytics.com/glossary/tensorflow), Keras, ONNX, TFlite, TF.js, CoreML and TensorRT formats - [Evolve](./hyperparameter_evolution.md) hyperparameters to improve performance - [Improve](https://docs.roboflow.com/adding-data/upload-api?ref=ultralytics) your model by sampling real-world images and adding them to your dataset diff --git a/docs/en/yolov5/tutorials/transfer_learning_with_frozen_layers.md b/docs/en/yolov5/tutorials/transfer_learning_with_frozen_layers.md index be6a0870..9e689ad3 100644 --- a/docs/en/yolov5/tutorials/transfer_learning_with_frozen_layers.md +++ b/docs/en/yolov5/tutorials/transfer_learning_with_frozen_layers.md @@ -4,7 +4,7 @@ description: Learn to freeze YOLOv5 layers for efficient transfer learning, redu keywords: YOLOv5, transfer learning, freeze layers, machine learning, deep learning, model training, PyTorch, Ultralytics --- -📚 This guide explains how to **freeze** YOLOv5 🚀 layers when **transfer learning**. Transfer learning is a useful way to quickly retrain a model on new data without having to retrain the entire network. Instead, part of the initial weights are frozen in place, and the rest of the weights are used to compute loss and are updated by the optimizer. This requires less resources than normal training and allows for faster training times, though it may also result in reductions to final trained accuracy. +📚 This guide explains how to **freeze** YOLOv5 🚀 layers when **[transfer learning](https://www.ultralytics.com/glossary/transfer-learning)**. Transfer learning is a useful way to quickly retrain a model on new data without having to retrain the entire network. Instead, part of the initial weights are frozen in place, and the rest of the weights are used to compute loss and are updated by the optimizer. This requires less resources than normal training and allows for faster training times, though it may also result in reductions to final trained accuracy. ## Before You Start @@ -121,7 +121,7 @@ train.py --batch 48 --weights yolov5m.pt --data voc.yaml --epochs 50 --cache --i ### Accuracy Comparison -The results show that freezing speeds up training, but reduces final accuracy slightly. +The results show that freezing speeds up training, but reduces final [accuracy](https://www.ultralytics.com/glossary/accuracy) slightly. ![Freezing training mAP50 results](https://github.com/ultralytics/docs/releases/download/0/freezing-training-map50-results.avif) From b4d544a0f9cddd3baa224ca8a562f7bb4a63b868 Mon Sep 17 00:00:00 2001 From: UltralyticsAssistant Date: Mon, 23 Sep 2024 21:48:53 +0000 Subject: [PATCH 61/80] Auto-update Ultralytics Docs by https://ultralytics.com/actions --- docs/mkdocs_github_authors.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml index bcf9cdb0..31526516 100644 --- a/docs/mkdocs_github_authors.yaml +++ b/docs/mkdocs_github_authors.yaml @@ -34,6 +34,9 @@ 40165666+berry-ding@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/40165666?v=4 username: berry-ding +46103969+inisis@users.noreply.github.com: + avatar: https://avatars.githubusercontent.com/u/46103969?v=4 + username: inisis 47978446+sergiuwaxmann@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/47978446?v=4 username: sergiuwaxmann From ba949830bfd232dccd3aa531f6e1d92583ad4dbd Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Tue, 24 Sep 2024 03:40:05 +0500 Subject: [PATCH 62/80] `ultralytics 8.2.100` new YOLOv8-OBB object counting (#16437) Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/solutions/object_counter.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index a1754a48..85944a54 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.99" +__version__ = "8.2.100" import os diff --git a/ultralytics/solutions/object_counter.py b/ultralytics/solutions/object_counter.py index ce6c1cb5..398629a8 100644 --- a/ultralytics/solutions/object_counter.py +++ b/ultralytics/solutions/object_counter.py @@ -127,10 +127,13 @@ def extract_and_process_tracks(self, tracks): # Draw region or line annotator.draw_region(reg_pts=self.reg_pts, color=(104, 0, 123), thickness=self.tf * 2) - if tracks[0].boxes.id is not None: - boxes = tracks[0].boxes.xyxy.cpu() - clss = tracks[0].boxes.cls.cpu().tolist() - track_ids = tracks[0].boxes.id.int().cpu().tolist() + # Extract tracks for OBB or object detection + track_data = tracks[0].obb or tracks[0].boxes + + if track_data and track_data.id is not None: + boxes = track_data.xyxy.cpu() + clss = track_data.cls.cpu().tolist() + track_ids = track_data.id.int().cpu().tolist() # Extract tracks for box, track_id, cls in zip(boxes, track_ids, clss): From 2f1e6e8fdc0ffc433f91a4e3eda7fbdcdb90d3bd Mon Sep 17 00:00:00 2001 From: Sergiu Waxmann <47978446+sergiuwaxmann@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:51:30 +0300 Subject: [PATCH 63/80] Docs: Inference API Updates (#16462) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- docs/en/hub/inference-api.md | 68 ++++++++++++++++++--------------- docs/mkdocs_github_authors.yaml | 3 ++ 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/docs/en/hub/inference-api.md b/docs/en/hub/inference-api.md index 0c79759b..b532e815 100644 --- a/docs/en/hub/inference-api.md +++ b/docs/en/hub/inference-api.md @@ -66,14 +66,14 @@ To access the [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API u ```python import requests -# API URL, use actual MODEL_ID -url = "https://api.ultralytics.com/v1/predict/MODEL_ID" +# API URL +url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} -# Inference arguments (optional) -data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} +# Inference arguments (use actual MODEL_ID) +data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: @@ -94,8 +94,9 @@ print(response.json()) To access the [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API using cURL, use the following code: ```bash -curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ - -H "x-api-key: API_KEY" \ +curl -X POST "https://predict.ultralytics.com" \ + -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -145,8 +146,9 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J === "cURL" ```bash - curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ + curl -X POST "https://predict.ultralytics.com" \ -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -158,14 +160,14 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J ```python import requests - # API URL, use actual MODEL_ID - url = "https://api.ultralytics.com/v1/predict/MODEL_ID" + # API URL + url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} - # Inference arguments (optional) - data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} + # Inference arguments (use actual MODEL_ID) + data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: @@ -225,8 +227,9 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J === "cURL" ```bash - curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ + curl -X POST "https://predict.ultralytics.com" \ -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -238,14 +241,14 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J ```python import requests - # API URL, use actual MODEL_ID - url = "https://api.ultralytics.com/v1/predict/MODEL_ID" + # API URL + url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} - # Inference arguments (optional) - data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} + # Inference arguments (use actual MODEL_ID) + data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: @@ -311,8 +314,9 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J === "cURL" ```bash - curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ + curl -X POST "https://predict.ultralytics.com" \ -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -324,14 +328,14 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J ```python import requests - # API URL, use actual MODEL_ID - url = "https://api.ultralytics.com/v1/predict/MODEL_ID" + # API URL + url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} - # Inference arguments (optional) - data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} + # Inference arguments (use actual MODEL_ID) + data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: @@ -401,8 +405,9 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J === "cURL" ```bash - curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ + curl -X POST "https://predict.ultralytics.com" \ -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -414,14 +419,14 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J ```python import requests - # API URL, use actual MODEL_ID - url = "https://api.ultralytics.com/v1/predict/MODEL_ID" + # API URL + url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} - # Inference arguments (optional) - data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} + # Inference arguments (use actual MODEL_ID) + data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: @@ -501,8 +506,9 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J === "cURL" ```bash - curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \ + curl -X POST "https://predict.ultralytics.com" \ -H "x-api-key: API_KEY" \ + -F "model=https://hub.ultralytics.com/models/MODEL_ID" \ -F "file=@/path/to/image.jpg" \ -F "imgsz=640" \ -F "conf=0.25" \ @@ -514,14 +520,14 @@ The [Ultralytics HUB](https://www.ultralytics.com/hub) Inference API returns a J ```python import requests - # API URL, use actual MODEL_ID - url = "https://api.ultralytics.com/v1/predict/MODEL_ID" + # API URL + url = "https://predict.ultralytics.com" # Headers, use actual API_KEY headers = {"x-api-key": "API_KEY"} - # Inference arguments (optional) - data = {"imgsz": 640, "conf": 0.25, "iou": 0.45} + # Inference arguments (use actual MODEL_ID) + data = {"model": "https://hub.ultralytics.com/models/MODEL_ID", "imgsz": 640, "conf": 0.25, "iou": 0.45} # Load image and send request with open("path/to/image.jpg", "rb") as image_file: diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml index 31526516..e76e6a2e 100644 --- a/docs/mkdocs_github_authors.yaml +++ b/docs/mkdocs_github_authors.yaml @@ -133,6 +133,9 @@ sometimesocrazy@gmail.com: stormsson@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/1133032?v=4 username: stormsson +waxmann.sergiu@me.com: + avatar: https://avatars.githubusercontent.com/u/47978446?v=4 + username: sergiuwaxmann web@ultralytics.com: avatar: https://avatars.githubusercontent.com/u/135830346?v=4 username: UltralyticsAssistant From f9c01500ebb166867d8175838aa330aa57a911c9 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 25 Sep 2024 18:11:17 +0500 Subject: [PATCH 64/80] Add https://youtu.be/5XYdm5CYODA to docs (#16482) --- docs/en/guides/analytics.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/guides/analytics.md b/docs/en/guides/analytics.md index 7519f032..08710f52 100644 --- a/docs/en/guides/analytics.md +++ b/docs/en/guides/analytics.md @@ -10,6 +10,17 @@ keywords: Ultralytics, YOLOv8, data visualization, line graphs, bar plots, pie c This guide provides a comprehensive overview of three fundamental types of [data visualizations](https://www.ultralytics.com/glossary/data-visualization): line graphs, bar plots, and pie charts. Each section includes step-by-step instructions and code snippets on how to create these visualizations using Python. +

+
+ +
+ Watch: How to generate Analytical Graphs using Ultralytics | Line Graphs, Bar Plots, Area and Pie Charts +

+ ### Visual Samples | Line Graph | Bar Plot | Pie Chart | From 4e825567a9757389db107dd4bb37be050ca7f590 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 25 Sep 2024 18:12:08 +0500 Subject: [PATCH 65/80] Add OBB Counting example in Docs (#16485) Co-authored-by: UltralyticsAssistant --- docs/en/guides/object-counting.md | 43 ++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/docs/en/guides/object-counting.md b/docs/en/guides/object-counting.md index bdec66e4..7c1367b2 100644 --- a/docs/en/guides/object-counting.md +++ b/docs/en/guides/object-counting.md @@ -90,6 +90,46 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly cv2.destroyAllWindows() ``` + === "OBB Object Counting" + + ```python + import cv2 + + from ultralytics import YOLO, solutions + + model = YOLO("yolov8n-obb.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)) + + # Init Object Counter + counter = solutions.ObjectCounter( + view_img=True, + reg_pts=region_points, + names=model.names, + 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() + ``` + === "Count in Polygon" ```python @@ -123,7 +163,6 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly 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) @@ -165,7 +204,6 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly 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) @@ -207,7 +245,6 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly 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) - im0 = counter.start_counting(im0, tracks) video_writer.write(im0) From 4bcc80c64642e376bfa8aa2a344ba8e03ff7c371 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 25 Sep 2024 15:17:25 +0200 Subject: [PATCH 66/80] `ultralytics 8.2.101` allow HUB public model downloads (#16488) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- pyproject.toml | 2 +- ultralytics/__init__.py | 2 +- ultralytics/engine/model.py | 2 +- ultralytics/hub/__init__.py | 2 +- ultralytics/hub/session.py | 14 ++++++++------ 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4e0b1cbe..f8cc5ec5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,7 +118,7 @@ logging = [ "dvclive>=2.12.0", ] extra = [ - "hub-sdk>=0.0.8", # Ultralytics HUB + "hub-sdk>=0.0.12", # Ultralytics HUB "ipython", # interactive notebook "albumentations>=1.4.6", # training augmentations "pycocotools>=2.0.7", # COCO mAP diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 85944a54..fd8570e3 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.100" +__version__ = "8.2.101" import os diff --git a/ultralytics/engine/model.py b/ultralytics/engine/model.py index 67751889..fcafc9f7 100644 --- a/ultralytics/engine/model.py +++ b/ultralytics/engine/model.py @@ -127,7 +127,7 @@ def __init__( # Check if Ultralytics HUB model from https://hub.ultralytics.com if self.is_hub_model(model): # Fetch model from HUB - checks.check_requirements("hub-sdk>=0.0.8") + checks.check_requirements("hub-sdk>=0.0.12") session = HUBTrainingSession.create_session(model) model = session.model_file if session.train_args: # training sent from HUB diff --git a/ultralytics/hub/__init__.py b/ultralytics/hub/__init__.py index 33b0c374..9c9c9dfa 100644 --- a/ultralytics/hub/__init__.py +++ b/ultralytics/hub/__init__.py @@ -38,7 +38,7 @@ def login(api_key: str = None, save=True) -> bool: Returns: (bool): True if authentication is successful, False otherwise. """ - checks.check_requirements("hub-sdk>=0.0.8") + checks.check_requirements("hub-sdk>=0.0.12") from hub_sdk import HUBClient api_key_url = f"{HUB_WEB_ROOT}/settings?tab=api+keys" # set the redirect URL diff --git a/ultralytics/hub/session.py b/ultralytics/hub/session.py index 170bb82b..89b5ddfc 100644 --- a/ultralytics/hub/session.py +++ b/ultralytics/hub/session.py @@ -63,22 +63,24 @@ def __init__(self, identifier): # Initialize client self.client = HUBClient(credentials) - # Load models if authenticated - if self.client.authenticated: + # Load models + try: if model_id: self.load_model(model_id) # load existing model else: self.model = self.client.model() # load empty model + except Exception: + if identifier.startswith(f"{HUB_WEB_ROOT}/models/") and not self.client.authenticated: + LOGGER.warning( + f"{PREFIX}WARNING ⚠️ Please log in using 'yolo login API_KEY'. " + "You can find your API Key at: https://hub.ultralytics.com/settings?tab=api+keys." + ) @classmethod def create_session(cls, identifier, args=None): """Class method to create an authenticated HUBTrainingSession or return None.""" try: session = cls(identifier) - if not session.client.authenticated: - if identifier.startswith(f"{HUB_WEB_ROOT}/models/"): - LOGGER.warning(f"{PREFIX}WARNING ⚠️ Login to Ultralytics HUB with 'yolo hub login API_KEY'.") - return None if args and not identifier.startswith(f"{HUB_WEB_ROOT}/models/"): # not a HUB model URL session.create_model(args) assert session.model.id, "HUB model not loaded correctly" From 38e95f33a568520a02a17d14f93e1daff9fd3877 Mon Sep 17 00:00:00 2001 From: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:41:38 +0200 Subject: [PATCH 67/80] Ultralytics Code Refactor https://ultralytics.com/actions (#16493) Co-authored-by: Glenn Jocher --- .../guides/data-collection-and-annotation.md | 4 +-- docs/en/guides/steps-of-a-cv-project.md | 4 +-- docs/en/integrations/weights-biases.md | 4 +-- ultralytics/models/sam/modules/sam.py | 4 +-- ultralytics/solutions/object_counter.py | 32 ++++++++++--------- ultralytics/solutions/parking_management.py | 15 ++++----- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/docs/en/guides/data-collection-and-annotation.md b/docs/en/guides/data-collection-and-annotation.md index 6ca20526..dce15e0a 100644 --- a/docs/en/guides/data-collection-and-annotation.md +++ b/docs/en/guides/data-collection-and-annotation.md @@ -88,7 +88,7 @@ Let's say you are ready to annotate now. There are several open-source tools ava - **[Label Studio](https://github.com/HumanSignal/label-studio)**: A flexible tool that supports a wide range of annotation tasks and includes features for managing projects and quality control. - **[CVAT](https://github.com/cvat-ai/cvat)**: A powerful tool that supports various annotation formats and customizable workflows, making it suitable for complex projects. -- **[Labelme](https://github.com/labelmeai/labelme)**: A simple and easy-to-use tool that allows for quick annotation of images with polygons, making it ideal for straightforward tasks. +- **[Labelme](https://github.com/wkentaro/labelme)**: A simple and easy-to-use tool that allows for quick annotation of images with polygons, making it ideal for straightforward tasks.

LabelMe Overview @@ -167,7 +167,7 @@ Several popular open-source tools can streamline the data annotation process: - **[Label Studio](https://github.com/HumanSignal/label-studio)**: A flexible tool supporting various annotation tasks, project management, and quality control features. - **[CVAT](https://www.cvat.ai/)**: Offers multiple annotation formats and customizable workflows, making it suitable for complex projects. -- **[Labelme](https://github.com/labelmeai/labelme)**: Ideal for quick and straightforward image annotation with polygons. +- **[Labelme](https://github.com/wkentaro/labelme)**: Ideal for quick and straightforward image annotation with polygons. These tools can help enhance the efficiency and accuracy of your annotation workflows. For extensive feature lists and guides, refer to our [data annotation tools documentation](../datasets/index.md). diff --git a/docs/en/guides/steps-of-a-cv-project.md b/docs/en/guides/steps-of-a-cv-project.md index bbdbef5f..7f50440a 100644 --- a/docs/en/guides/steps-of-a-cv-project.md +++ b/docs/en/guides/steps-of-a-cv-project.md @@ -100,7 +100,7 @@ However, if you choose to collect images or take your own pictures, you'll need Different Types of Image Annotation

-[Data collection and annotation](./data-collection-and-annotation.md) can be a time-consuming manual effort. Annotation tools can help make this process easier. Here are some useful open annotation tools: [LabeI Studio](https://github.com/HumanSignal/label-studio), [CVAT](https://github.com/cvat-ai/cvat), and [Labelme](https://github.com/labelmeai/labelme). +[Data collection and annotation](./data-collection-and-annotation.md) can be a time-consuming manual effort. Annotation tools can help make this process easier. Here are some useful open annotation tools: [LabeI Studio](https://github.com/HumanSignal/label-studio), [CVAT](https://github.com/cvat-ai/cvat), and [Labelme](https://github.com/wkentaro/labelme). ## Step 3: [Data Augmentation](https://www.ultralytics.com/glossary/data-augmentation) and Splitting Your Dataset @@ -215,7 +215,7 @@ Data annotation is vital for teaching your model to recognize patterns. The type - **Object Detection**: Bounding boxes drawn around objects. - **Image Segmentation**: Each pixel labeled according to the object it belongs to. -Tools like [Label Studio](https://github.com/HumanSignal/label-studio), [CVAT](https://github.com/cvat-ai/cvat), and [Labelme](https://github.com/labelmeai/labelme) can assist in this process. For more details, refer to our [data collection and annotation guide](./data-collection-and-annotation.md). +Tools like [Label Studio](https://github.com/HumanSignal/label-studio), [CVAT](https://github.com/cvat-ai/cvat), and [Labelme](https://github.com/wkentaro/labelme) can assist in this process. For more details, refer to our [data collection and annotation guide](./data-collection-and-annotation.md). ### What steps should I follow to augment and split my dataset effectively? diff --git a/docs/en/integrations/weights-biases.md b/docs/en/integrations/weights-biases.md index cb9dc951..b831f0b7 100644 --- a/docs/en/integrations/weights-biases.md +++ b/docs/en/integrations/weights-biases.md @@ -148,7 +148,7 @@ After running the usage code snippet, you can access the Weights & Biases (W&B) - **Model Artifacts Management**: Access and share model checkpoints, facilitating easy deployment and collaboration. -- **Viewing Inference Results with Image Overlay**: Visualize the prediction results on images using interactive overlays in Weights & Biases, providing a clear and detailed view of model performance on real-world data. For more detailed information on Weights & Biases' image overlay capabilities, check out this [link](https://docs.wandb.ai/guides/track/log/media#image-overlays). [See how Weights & Biases' image overlays helps visualize model inferences](https://imgur.com/a/UTSiufs). +- **Viewing Inference Results with Image Overlay**: Visualize the prediction results on images using interactive overlays in Weights & Biases, providing a clear and detailed view of model performance on real-world data. For more detailed information on Weights & Biases' image overlay capabilities, check out this [link](https://docs.wandb.ai/guides/track/log/media/#image-overlays). [See how Weights & Biases' image overlays helps visualize model inferences](https://imgur.com/a/UTSiufs). By using these features, you can effectively track, analyze, and optimize your YOLOv8 model's training, ensuring the best possible performance and efficiency. @@ -156,7 +156,7 @@ By using these features, you can effectively track, analyze, and optimize your Y This guide helped you explore Ultralytics' YOLOv8 integration with Weights & Biases. It illustrates the ability of this integration to efficiently track and visualize model training and prediction results. -For further details on usage, visit [Weights & Biases' official documentation](https://docs.wandb.ai/guides/integrations/ultralytics). +For further details on usage, visit [Weights & Biases' official documentation](https://docs.wandb.ai/guides/integrations/ultralytics/). Also, be sure to check out the [Ultralytics integration guide page](../integrations/index.md), to learn more about different exciting integrations. diff --git a/ultralytics/models/sam/modules/sam.py b/ultralytics/models/sam/modules/sam.py index c902153f..2728b0b4 100644 --- a/ultralytics/models/sam/modules/sam.py +++ b/ultralytics/models/sam/modules/sam.py @@ -645,9 +645,7 @@ def _prepare_memory_conditioned_features( # The case of `self.num_maskmem == 0` below is primarily used for reproducing SAM on images. # In this case, we skip the fusion with any memory. if self.num_maskmem == 0: # Disable memory and skip fusion - pix_feat = current_vision_feats[-1].permute(1, 2, 0).view(B, C, H, W) - return pix_feat - + return current_vision_feats[-1].permute(1, 2, 0).view(B, C, H, W) num_obj_ptr_tokens = 0 # Step 1: condition the visual features of the current frame on previous memories if not is_init_cond_frame: diff --git a/ultralytics/solutions/object_counter.py b/ultralytics/solutions/object_counter.py index 398629a8..cc7fe459 100644 --- a/ultralytics/solutions/object_counter.py +++ b/ultralytics/solutions/object_counter.py @@ -176,22 +176,24 @@ def extract_and_process_tracks(self, tracks): # Count objects using line elif len(self.reg_pts) == 2: - if prev_position is not None and track_id not in self.count_ids: - # Check if the object's movement segment intersects the counting line - if LineString([(prev_position[0], prev_position[1]), (box[0], box[1])]).intersects( + if ( + prev_position is not None + and track_id not in self.count_ids + and LineString([(prev_position[0], prev_position[1]), (box[0], box[1])]).intersects( self.counting_line_segment - ): - self.count_ids.append(track_id) - - # Determine the direction of movement (IN or OUT) - dx = (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) - dy = (box[1] - prev_position[1]) * (self.counting_region.centroid.y - prev_position[1]) - if dx > 0 and dy > 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 + ) + ): + self.count_ids.append(track_id) + + # Determine the direction of movement (IN or OUT) + dx = (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) + dy = (box[1] - prev_position[1]) * (self.counting_region.centroid.y - prev_position[1]) + if dx > 0 and dy > 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 labels_dict = {} diff --git a/ultralytics/solutions/parking_management.py b/ultralytics/solutions/parking_management.py index 61284933..ef58ad62 100644 --- a/ultralytics/solutions/parking_management.py +++ b/ultralytics/solutions/parking_management.py @@ -128,14 +128,13 @@ def save_to_json(self): rg_data = [] # regions data for box in self.rg_data: - rs_box = [] # rescaled box list - for x, y in box: - rs_box.append( - ( - int(x * self.imgw / self.canvas.winfo_width()), # width scaling - int(y * self.imgh / self.canvas.winfo_height()), - ) - ) # height scaling + rs_box = [ + ( + int(x * self.imgw / self.canvas.winfo_width()), # width scaling + int(y * self.imgh / self.canvas.winfo_height()), # height scaling + ) + for x, y in box + ] rg_data.append({"points": rs_box}) with open("bounding_boxes.json", "w") as f: json.dump(rg_data, f, indent=4) From f3d557e3f286b2de85a041276b63d599cb17731f Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Fri, 27 Sep 2024 02:40:25 +0200 Subject: [PATCH 68/80] Removed duplicate CUBLAS_WORKSPACE_CONFIG var (#16466) Co-authored-by: Glenn Jocher --- ultralytics/utils/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index b4cc312d..0423dfcd 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -111,7 +111,6 @@ np.set_printoptions(linewidth=320, formatter={"float_kind": "{:11.5g}".format}) # format short g, %precision=5 cv2.setNumThreads(0) # prevent OpenCV from multithreading (incompatible with PyTorch DataLoader) os.environ["NUMEXPR_MAX_THREADS"] = str(NUM_THREADS) # NumExpr max threads -os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8" # for deterministic training os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # suppress verbose TF compiler warnings in Colab os.environ["TORCH_CPP_LOG_LEVEL"] = "ERROR" # suppress "NNPACK.cpp could not initialize NNPACK" warnings os.environ["KINETO_LOG_LEVEL"] = "5" # suppress verbose PyTorch profiler output when computing FLOPs From 03dc859c8e99bd8acdc423fb56ce51ecc0bdbe79 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Fri, 27 Sep 2024 05:42:12 +0500 Subject: [PATCH 69/80] `ultralytics 8.2.102` new Hand-Keypoints Pose Estimation Dataset (#16489) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- docs/en/datasets/index.md | 1 + docs/en/datasets/pose/hand-keypoints.md | 108 +++++++++++++++++++ docs/en/datasets/pose/index.md | 9 ++ ultralytics/__init__.py | 2 +- ultralytics/cfg/datasets/hand-keypoints.yaml | 25 +++++ 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 docs/en/datasets/pose/hand-keypoints.md create mode 100644 ultralytics/cfg/datasets/hand-keypoints.yaml diff --git a/docs/en/datasets/index.md b/docs/en/datasets/index.md index 19e39530..a53d2040 100644 --- a/docs/en/datasets/index.md +++ b/docs/en/datasets/index.md @@ -69,6 +69,7 @@ Pose estimation is a technique used to determine the pose of the object relative - [COCO](pose/coco.md): A large-scale dataset with human pose annotations designed for pose estimation tasks. - [COCO8-pose](pose/coco8-pose.md): A smaller dataset for pose estimation tasks, containing a subset of 8 COCO images with human pose annotations. - [Tiger-pose](pose/tiger-pose.md): A compact dataset consisting of 263 images focused on tigers, annotated with 12 keypoints per tiger for pose estimation tasks. +- [Hand-Keypoints](pose/hand-keypoints.md): A concise dataset featuring over 26,000 images centered on human hands, annotated with 21 keypoints per hand, designed for pose estimation tasks. ## [Classification](classify/index.md) diff --git a/docs/en/datasets/pose/hand-keypoints.md b/docs/en/datasets/pose/hand-keypoints.md new file mode 100644 index 00000000..177ba4c8 --- /dev/null +++ b/docs/en/datasets/pose/hand-keypoints.md @@ -0,0 +1,108 @@ +--- +comments: true +description: Explore the hand keypoints estimation dataset for advanced pose estimation. Learn about datasets, pretrained models, metrics, and applications for training with YOLO. +keywords: Hand KeyPoints, pose estimation, dataset, keypoints, MediaPipe, YOLO, deep learning, computer vision +--- + +# Hand Keypoints Dataset + +## Introduction + +The hand-keypoints dataset contains 26,768 images of hands annotated with keypoints, making it suitable for training models like Ultralytics YOLO for pose estimation tasks. The annotations were generated using the Google MediaPipe library, ensuring high accuracy and consistency, and the dataset is compatible [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) formats. + +## Hand Landmarks + +![Hand Landmarks](https://github.com/ultralytics/docs/releases/download/0/hand_landmarks.jpg) + +## KeyPoints + +The dataset includes keypoints for hand detection. The keypoints are annotated as follows: + +1. Wrist +2. Thumb (4 points) +3. Index finger (4 points) +4. Middle finger (4 points) +5. Ring finger (4 points) +6. Little finger (4 points) + +Each hand has a total of 21 keypoints. + +## Key Features + +- **Large Dataset**: 26,768 images with hand keypoint annotations. +- **YOLOv8 Compatibility**: Ready for use with YOLOv8 models. +- **21 Keypoints**: Detailed hand pose representation. + +## Dataset Structure + +The hand keypoint dataset is split into two subsets: + +1. **Train**: This subset contains 18,776 images from the hand keypoints dataset, annotated for training pose estimation models. +2. **Val**: This subset contains 7992 images that can be used for validation purposes during model training. + +## Applications + +Hand keypoints can be used for gesture recognition, AR/VR controls, robotic manipulation, and hand movement analysis in healthcare. They can be also applied in animation for motion capture and biometric authentication systems for security. + +## Dataset YAML + +A YAML (Yet Another Markup Language) file is used to define the dataset configuration. It contains information about the dataset's paths, classes, and other relevant information. In the case of the Hand Keypoints dataset, the `hand-keypoints.yaml` file is maintained at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/hand-keypoints.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/hand-keypoints.yaml). + +!!! example "ultralytics/cfg/datasets/hand-keypoints.yaml" + + ```yaml + --8<-- "ultralytics/cfg/datasets/hand-keypoints.yaml" + ``` + +## Usage + +To train a YOLOv8n-pose model on the Hand Keypoints dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. + +!!! example "Train Example" + + === "Python" + + ```python + from ultralytics import YOLO + + # Load a model + model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training) + + # Train the model + results = model.train(data="hand-keypoints.yaml", epochs=100, imgsz=640) + ``` + + === "CLI" + + ```bash + # Start training from a pretrained *.pt model + yolo pose train data=hand-keypoints.yaml model=yolov8n-pose.pt epochs=100 imgsz=640 + ``` + +## Sample Images and Annotations + +The Hand keypoints dataset contains a diverse set of images with human hands annotated with keypoints. Here are some examples of images from the dataset, along with their corresponding annotations: + +![Dataset sample image](https://github.com/ultralytics/docs/releases/download/0/human-hand-pose.jpg) + +- **Mosaiced Image**: This image demonstrates a training batch composed of mosaiced dataset images. Mosaicing is a technique used during training that combines multiple images into a single image to increase the variety of objects and scenes within each training batch. This helps improve the model's ability to generalize to different object sizes, aspect ratios, and contexts. + +The example showcases the variety and complexity of the images in the Hand Keypoints dataset and the benefits of using mosaicing during the training process. + +## Citations and Acknowledgments + +If you use the hand-keypoints dataset in your research or development work, please acknowledge the following sources: + +!!! quote "" + + === "Credits" + + We would like to thank the following sources for providing the images used in this dataset: + + - [11k Hands](https://sites.google.com/view/11khands) + - [2000 Hand Gestures](https://www.kaggle.com/datasets/ritikagiridhar/2000-hand-gestures) + - [Gesture Recognition](https://www.kaggle.com/datasets/imsparsh/gesture-recognition) + + The images were collected and used under the respective licenses provided by each platform and are distributed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). + +We would also like to acknowledge the creator of this dataset, [Rion Dsilva](https://www.linkedin.com/in/rion-dsilva-043464229/), for his great contribution to Vision AI research. diff --git a/docs/en/datasets/pose/index.md b/docs/en/datasets/pose/index.md index 9a6b6d93..a8bfd222 100644 --- a/docs/en/datasets/pose/index.md +++ b/docs/en/datasets/pose/index.md @@ -118,6 +118,15 @@ This section outlines the datasets that are compatible with Ultralytics YOLO for - **Usage**: Great for animal pose or any other pose that is not human-based. - [Read more about Tiger-Pose](tiger-pose.md) +### Hand Keypoints + +- **Description**: Hand keypoints pose dataset comprises nearly 26K images, with 18776 images allocated for training and 7992 for validation. +- **Label Format**: Same as Ultralytics YOLO format as described above, but with 21 keypoints for human hand and visible dimension. +- **Number of Classes**: 1 (Hand). +- **Keypoints**: 21 keypoints. +- **Usage**: Great for human hand pose estimation. +- [Read more about Hand Keypoints](hand-keypoints.md) + ### Adding your own dataset If you have your own dataset and would like to use it for training pose estimation models with Ultralytics YOLO format, ensure that it follows the format specified above under "Ultralytics YOLO format". Convert your annotations to the required format and specify the paths, number of classes, and class names in the YAML configuration file. diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index fd8570e3..75f50978 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.101" +__version__ = "8.2.102" import os diff --git a/ultralytics/cfg/datasets/hand-keypoints.yaml b/ultralytics/cfg/datasets/hand-keypoints.yaml new file mode 100644 index 00000000..4608ffaf --- /dev/null +++ b/ultralytics/cfg/datasets/hand-keypoints.yaml @@ -0,0 +1,25 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# Hand Keypoints dataset by Ultralytics +# Documentation: https://docs.ultralytics.com/datasets/pose/hand-keypoints/ +# Example usage: yolo train data=hand-keypoints.yaml +# parent +# ├── ultralytics +# └── datasets +# └── hand-keypoints ← downloads here (369 MB) + +# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] +path: ../datasets/hand-keypoints # dataset root dir +train: train # train images (relative to 'path') 210 images +val: val # val images (relative to 'path') 53 images + +# Keypoints +kpt_shape: [21, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible) +flip_idx: + [0, 1, 2, 4, 3, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20] + +# Classes +names: + 0: hand + +# Download script/URL (optional) +download: https://github.com/ultralytics/assets/releases/download/v0.0.0/hand-keypoints.zip From 250eaa857a94f2612cbb1868a60e108812c3191f Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Sat, 28 Sep 2024 00:07:45 +0500 Subject: [PATCH 70/80] Update `mkdocs.yml` with Hand Keypoints link (#16515) Co-authored-by: UltralyticsAssistant --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 1ec7c9c2..4dcc94d0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -294,6 +294,7 @@ nav: - COCO: datasets/pose/coco.md - COCO8-pose: datasets/pose/coco8-pose.md - Tiger-pose: datasets/pose/tiger-pose.md + - Hand-keypoints: datasets/pose/hand-keypoints.md - Classification: - datasets/classify/index.md - Caltech 101: datasets/classify/caltech101.md From 538c8215f3f96adc13d19a8fdad5fdc10f00e9c4 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 28 Sep 2024 19:55:23 +0200 Subject: [PATCH 71/80] Update JSONDict for PosixPath to String (#16522) --- ultralytics/utils/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index 0423dfcd..02610b88 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -1091,10 +1091,17 @@ def _save(self): try: self.file_path.parent.mkdir(parents=True, exist_ok=True) with open(self.file_path, "w") as f: - json.dump(dict(self), f, indent=2) + json.dump(dict(self), f, indent=2, default=self._json_default) except Exception as e: print(f"Error writing to {self.file_path}: {e}") + @staticmethod + def _json_default(obj): + """Handle JSON serialization of Path objects.""" + if isinstance(obj, Path): + return str(obj) + raise TypeError(f"Object of type {type(obj).__name__} is not JSON serializable") + def __setitem__(self, key, value): """Store a key-value pair and persist to disk.""" with self.lock: @@ -1109,7 +1116,7 @@ def __delitem__(self, key): def __str__(self): """Return a pretty-printed JSON string representation of the dictionary.""" - return f'JSONDict("{self.file_path}"):\n{json.dumps(dict(self), indent=2, ensure_ascii=False)}' + return f'JSONDict("{self.file_path}"):\n{json.dumps(dict(self), indent=2, ensure_ascii=False, default=self._json_default)}' def update(self, *args, **kwargs): """Update the dictionary and persist changes.""" From 54eccccd1187877c157e34b77d33dc8587cf8e40 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Sat, 28 Sep 2024 20:07:03 +0200 Subject: [PATCH 72/80] Removing cpu-info persistence for Docker images (#16470) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- docker/Dockerfile | 5 +++-- docker/Dockerfile-arm64 | 2 ++ docker/Dockerfile-conda | 2 ++ docker/Dockerfile-cpu | 4 ++-- docker/Dockerfile-jetson-jetpack4 | 4 +++- docker/Dockerfile-jetson-jetpack5 | 3 ++- docker/Dockerfile-jetson-jetpack6 | 4 +++- docker/Dockerfile-python | 4 ++-- 8 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 44c84b00..aa34bf33 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -49,8 +49,9 @@ RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 RUN pip install "paddlepaddle>=2.6.0" x2paddle # Fix error: `np.bool` was a deprecated alias for the builtin `bool` segmentation error in Tests RUN pip install numpy==1.23.5 -# Remove exported models -RUN rm -rf tmp + +# Remove extra build files +RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index 7eeade10..786061e7 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -38,6 +38,8 @@ RUN pip install -e ".[export]" # Creates a symbolic link to make 'python' point to 'python3' RUN ln -sf /usr/bin/python3 /usr/bin/python +# Remove extra build files +RUN rm -rf /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-conda b/docker/Dockerfile-conda index c6a31f1c..343b8001 100644 --- a/docker/Dockerfile-conda +++ b/docker/Dockerfile-conda @@ -30,6 +30,8 @@ RUN conda config --set solver libmamba && \ conda install -c conda-forge ultralytics mkl # conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=12.1 ultralytics mkl +# Remove extra build files +RUN rm -rf /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-cpu b/docker/Dockerfile-cpu index fcd5336e..f6b691c5 100644 --- a/docker/Dockerfile-cpu +++ b/docker/Dockerfile-cpu @@ -38,12 +38,12 @@ RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991 # RUN pip install "paddlepaddle>=2.6.0" x2paddle -# Remove exported models -RUN rm -rf tmp # Creates a symbolic link to make 'python' point to 'python3' RUN ln -sf /usr/bin/python3 /usr/bin/python +# Remove extra build files +RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-jetson-jetpack4 b/docker/Dockerfile-jetson-jetpack4 index ca238b96..4ea29852 100644 --- a/docker/Dockerfile-jetson-jetpack4 +++ b/docker/Dockerfile-jetson-jetpack4 @@ -48,7 +48,9 @@ RUN pip install \ https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-1.11.0a0+gitbc2c6ed-cp38-cp38-linux_aarch64.whl \ https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.12.0a0+9b5a3fe-cp38-cp38-linux_aarch64.whl RUN pip install -e ".[export]" -RUN rm *.whl + +# Remove extra build files +RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-jetson-jetpack5 b/docker/Dockerfile-jetson-jetpack5 index 9ec2e64a..afd1f002 100644 --- a/docker/Dockerfile-jetson-jetpack5 +++ b/docker/Dockerfile-jetson-jetpack5 @@ -41,8 +41,9 @@ ADD https://nvidia.box.com/shared/static/mvdcltm9ewdy2d5nurkiqorofz1s53ww.whl on RUN python3 -m pip install --upgrade pip wheel RUN pip install onnxruntime_gpu-1.15.1-cp38-cp38-linux_aarch64.whl RUN pip install -e ".[export]" -RUN rm *.whl +# Remove extra build files +RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-jetson-jetpack6 b/docker/Dockerfile-jetson-jetpack6 index 3b53c31d..ccc87276 100644 --- a/docker/Dockerfile-jetson-jetpack6 +++ b/docker/Dockerfile-jetson-jetpack6 @@ -38,7 +38,9 @@ RUN pip install \ https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.3.0-cp310-cp310-linux_aarch64.whl \ https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.18.0a0+6043bc2-cp310-cp310-linux_aarch64.whl RUN pip install -e ".[export]" -RUN rm *.whl + +# Remove extra build files +RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-python b/docker/Dockerfile-python index f8a8611c..281d802b 100644 --- a/docker/Dockerfile-python +++ b/docker/Dockerfile-python @@ -38,9 +38,9 @@ RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991 RUN pip install "paddlepaddle>=2.6.0" x2paddle -# Remove exported models -RUN rm -rf tmp +# Remove extra build files +RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json # Usage Examples ------------------------------------------------------------------------------------------------------- From 25307552100e4c03c8fec7b0f7286b4244018e15 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 28 Sep 2024 20:31:21 +0200 Subject: [PATCH 73/80] `ultralytics 8.2.103` Windows Benchmarks CI (#16523) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- .github/workflows/ci.yaml | 2 +- ultralytics/__init__.py | 2 +- ultralytics/utils/benchmarks.py | 169 +++++++++++++++++++------------- 3 files changed, 105 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 55012832..0ba1cee5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -98,7 +98,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, windows-latest, macos-14] python-version: ["3.11"] model: [yolov8n] steps: diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 75f50978..a91448fc 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.102" +__version__ = "8.2.103" import os diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index 53ad62c5..b28ebee5 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -43,36 +43,40 @@ from ultralytics.utils.checks import IS_PYTHON_3_12, check_requirements, check_yolo from ultralytics.utils.downloads import safe_download from ultralytics.utils.files import file_size -from ultralytics.utils.torch_utils import select_device +from ultralytics.utils.torch_utils import get_cpu_info, select_device def benchmark( - model=WEIGHTS_DIR / "yolov8n.pt", data=None, imgsz=160, half=False, int8=False, device="cpu", verbose=False + model=WEIGHTS_DIR / "yolov8n.pt", + data=None, + imgsz=160, + half=False, + int8=False, + device="cpu", + verbose=False, + eps=1e-3, ): """ Benchmark a YOLO model across different formats for speed and accuracy. Args: - model (str | Path | optional): Path to the model file or directory. Default is - Path(SETTINGS['weights_dir']) / 'yolov8n.pt'. - data (str, optional): Dataset to evaluate on, inherited from TASK2DATA if not passed. Default is None. - imgsz (int, optional): Image size for the benchmark. Default is 160. - half (bool, optional): Use half-precision for the model if True. Default is False. - int8 (bool, optional): Use int8-precision for the model if True. Default is False. - device (str, optional): Device to run the benchmark on, either 'cpu' or 'cuda'. Default is 'cpu'. - verbose (bool | float | optional): If True or a float, assert benchmarks pass with given metric. - Default is False. + model (str | Path): Path to the model file or directory. + data (str | None): Dataset to evaluate on, inherited from TASK2DATA if not passed. + imgsz (int): Image size for the benchmark. + half (bool): Use half-precision for the model if True. + int8 (bool): Use int8-precision for the model if True. + device (str): Device to run the benchmark on, either 'cpu' or 'cuda'. + verbose (bool | float): If True or a float, assert benchmarks pass with given metric. + eps (float): Epsilon value for divide by zero prevention. Returns: - df (pandas.DataFrame): A pandas DataFrame with benchmark results for each format, including file size, - metric, and inference time. + (pandas.DataFrame): A pandas DataFrame with benchmark results for each format, including file size, metric, + and inference time. - Example: - ```python - from ultralytics.utils.benchmarks import benchmark - - benchmark(model="yolov8n.pt", imgsz=640) - ``` + Examples: + Benchmark a YOLO model with default settings: + >>> from ultralytics.utils.benchmarks import benchmark + >>> benchmark(model="yolov8n.pt", imgsz=640) """ import pandas as pd # scope for faster 'import ultralytics' @@ -106,6 +110,7 @@ def benchmark( if i in {11}: # Paddle assert not isinstance(model, YOLOWorld), "YOLOWorldv2 Paddle exports not supported yet" assert not is_end2end, "End-to-end models not supported by PaddlePaddle yet" + assert LINUX or MACOS, "Windows Paddle exports not supported yet" if i in {12}: # NCNN assert not isinstance(model, YOLOWorld), "YOLOWorldv2 NCNN exports not supported yet" if "cpu" in device.type: @@ -138,7 +143,7 @@ def benchmark( data=data, batch=1, imgsz=imgsz, plots=False, device=device, half=half, int8=int8, verbose=False ) metric, speed = results.results_dict[key], results.speed["inference"] - fps = round((1000 / speed), 2) # frames per second + fps = round(1000 / (speed + eps), 2) # frames per second y.append([name, "✅", round(file_size(filename), 1), round(metric, 4), round(speed, 2), fps]) except Exception as e: if verbose: @@ -165,10 +170,10 @@ def benchmark( class RF100Benchmark: - """Benchmark YOLO model performance across formats for speed and accuracy.""" + """Benchmark YOLO model performance across various formats for speed and accuracy.""" def __init__(self): - """Function for initialization of RF100Benchmark.""" + """Initialize the RF100Benchmark class for benchmarking YOLO model performance across various formats.""" self.ds_names = [] self.ds_cfg_list = [] self.rf = None @@ -180,6 +185,11 @@ def set_key(self, api_key): Args: api_key (str): The API key. + + Examples: + Set the Roboflow API key for accessing datasets: + >>> benchmark = RF100Benchmark() + >>> benchmark.set_key("your_roboflow_api_key") """ check_requirements("roboflow") from roboflow import Roboflow @@ -188,10 +198,15 @@ def set_key(self, api_key): def parse_dataset(self, ds_link_txt="datasets_links.txt"): """ - Parse dataset links and downloads datasets. + Parse dataset links and download datasets. Args: - ds_link_txt (str): Path to dataset_links file. + ds_link_txt (str): Path to the file containing dataset links. + + Examples: + >>> benchmark = RF100Benchmark() + >>> benchmark.set_key("api_key") + >>> benchmark.parse_dataset("datasets_links.txt") """ (shutil.rmtree("rf-100"), os.mkdir("rf-100")) if os.path.exists("rf-100") else os.mkdir("rf-100") os.chdir("rf-100") @@ -217,10 +232,13 @@ def parse_dataset(self, ds_link_txt="datasets_links.txt"): @staticmethod def fix_yaml(path): """ - Function to fix YAML train and val path. + Fixes the train and validation paths in a given YAML file. Args: - path (str): YAML file path. + path (str): Path to the YAML file to be fixed. + + Examples: + >>> RF100Benchmark.fix_yaml("path/to/data.yaml") """ with open(path) as file: yaml_data = yaml.safe_load(file) @@ -231,13 +249,21 @@ def fix_yaml(path): def evaluate(self, yaml_path, val_log_file, eval_log_file, list_ind): """ - Model evaluation on validation results. + Evaluate model performance on validation results. Args: - yaml_path (str): YAML file path. - val_log_file (str): val_log_file path. - eval_log_file (str): eval_log_file path. - list_ind (int): Index for current dataset. + yaml_path (str): Path to the YAML configuration file. + val_log_file (str): Path to the validation log file. + eval_log_file (str): Path to the evaluation log file. + list_ind (int): Index of the current dataset in the list. + + Returns: + (float): The mean average precision (mAP) value for the evaluated model. + + Examples: + Evaluate a model on a specific dataset + >>> benchmark = RF100Benchmark() + >>> benchmark.evaluate("path/to/data.yaml", "path/to/val_log.txt", "path/to/eval_log.txt", 0) """ skip_symbols = ["🚀", "⚠️", "💡", "❌"] with open(yaml_path) as stream: @@ -285,21 +311,23 @@ class ProfileModels: This class profiles the performance of different models, returning results such as model speed and FLOPs. Attributes: - paths (list): Paths of the models to profile. - num_timed_runs (int): Number of timed runs for the profiling. Default is 100. - num_warmup_runs (int): Number of warmup runs before profiling. Default is 10. - min_time (float): Minimum number of seconds to profile for. Default is 60. - imgsz (int): Image size used in the models. Default is 640. + paths (List[str]): Paths of the models to profile. + num_timed_runs (int): Number of timed runs for the profiling. + num_warmup_runs (int): Number of warmup runs before profiling. + min_time (float): Minimum number of seconds to profile for. + imgsz (int): Image size used in the models. + half (bool): Flag to indicate whether to use FP16 half-precision for TensorRT profiling. + trt (bool): Flag to indicate whether to profile using TensorRT. + device (torch.device): Device used for profiling. Methods: - profile(): Profiles the models and prints the result. + profile: Profiles the models and prints the result. - Example: - ```python - from ultralytics.utils.benchmarks import ProfileModels - - ProfileModels(["yolov8n.yaml", "yolov8s.yaml"], imgsz=640).profile() - ``` + Examples: + Profile models and print results + >>> from ultralytics.utils.benchmarks import ProfileModels + >>> profiler = ProfileModels(["yolov8n.yaml", "yolov8s.yaml"], imgsz=640) + >>> profiler.profile() """ def __init__( @@ -317,17 +345,23 @@ def __init__( Initialize the ProfileModels class for profiling models. Args: - paths (list): List of paths of the models to be profiled. - num_timed_runs (int, optional): Number of timed runs for the profiling. Default is 100. - num_warmup_runs (int, optional): Number of warmup runs before the actual profiling starts. Default is 10. - min_time (float, optional): Minimum time in seconds for profiling a model. Default is 60. - imgsz (int, optional): Size of the image used during profiling. Default is 640. - half (bool, optional): Flag to indicate whether to use FP16 half-precision for TensorRT profiling. - trt (bool, optional): Flag to indicate whether to profile using TensorRT. Default is True. - device (torch.device, optional): Device used for profiling. If None, it is determined automatically. + paths (List[str]): List of paths of the models to be profiled. + num_timed_runs (int): Number of timed runs for the profiling. + num_warmup_runs (int): Number of warmup runs before the actual profiling starts. + min_time (float): Minimum time in seconds for profiling a model. + imgsz (int): Size of the image used during profiling. + half (bool): Flag to indicate whether to use FP16 half-precision for TensorRT profiling. + trt (bool): Flag to indicate whether to profile using TensorRT. + device (torch.device | None): Device used for profiling. If None, it is determined automatically. Notes: - FP16 'half' argument option removed for ONNX as slower on CPU than FP32 + FP16 'half' argument option removed for ONNX as slower on CPU than FP32. + + Examples: + Initialize and profile models + >>> from ultralytics.utils.benchmarks import ProfileModels + >>> profiler = ProfileModels(["yolov8n.yaml", "yolov8s.yaml"], imgsz=640) + >>> profiler.profile() """ self.paths = paths self.num_timed_runs = num_timed_runs @@ -339,7 +373,7 @@ def __init__( self.device = device or torch.device(0 if torch.cuda.is_available() else "cpu") def profile(self): - """Logs the benchmarking results of a model, checks metrics against floor and returns the results.""" + """Profiles YOLO models for speed and accuracy across various formats including ONNX and TensorRT.""" files = self.get_files() if not files: @@ -404,7 +438,7 @@ def get_onnx_model_info(self, onnx_file: str): @staticmethod def iterative_sigma_clipping(data, sigma=2, max_iters=3): - """Applies an iterative sigma clipping algorithm to the given data times number of iterations.""" + """Applies iterative sigma clipping to data to remove outliers based on specified sigma and iteration count.""" data = np.array(data) for _ in range(max_iters): mean, std = np.mean(data), np.std(data) @@ -415,7 +449,7 @@ def iterative_sigma_clipping(data, sigma=2, max_iters=3): return data def profile_tensorrt_model(self, engine_file: str, eps: float = 1e-3): - """Profiles the TensorRT model, measuring average run time and standard deviation among runs.""" + """Profiles YOLO model performance with TensorRT, measuring average run time and standard deviation.""" if not self.trt or not Path(engine_file).is_file(): return 0.0, 0.0 @@ -499,7 +533,7 @@ def profile_onnx_model(self, onnx_file: str, eps: float = 1e-3): return np.mean(run_times), np.std(run_times) def generate_table_row(self, model_name, t_onnx, t_engine, model_info): - """Generates a formatted string for a table row that includes model performance and metric details.""" + """Generates a table row string with model performance metrics including inference times and model details.""" layers, params, gradients, flops = model_info return ( f"| {model_name:18s} | {self.imgsz} | - | {t_onnx[0]:.2f} ± {t_onnx[1]:.2f} ms | {t_engine[0]:.2f} ± " @@ -508,7 +542,7 @@ def generate_table_row(self, model_name, t_onnx, t_engine, model_info): @staticmethod def generate_results_dict(model_name, t_onnx, t_engine, model_info): - """Generates a dictionary of model details including name, parameters, GFLOPS and speed metrics.""" + """Generates a dictionary of profiling results including model name, parameters, GFLOPs, and speed metrics.""" layers, params, gradients, flops = model_info return { "model/name": model_name, @@ -520,16 +554,19 @@ def generate_results_dict(model_name, t_onnx, t_engine, model_info): @staticmethod def print_table(table_rows): - """Formats and prints a comparison table for different models with given statistics and performance data.""" + """Prints a formatted table of model profiling results, including speed and accuracy metrics.""" gpu = torch.cuda.get_device_name(0) if torch.cuda.is_available() else "GPU" - header = ( - f"| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | " - f"Speed
{gpu} TensorRT
(ms) | params
(M) | FLOPs
(B) |" - ) - separator = ( - "|-------------|---------------------|--------------------|------------------------------|" - "-----------------------------------|------------------|-----------------|" - ) + headers = [ + "Model", + "size
(pixels)", + "mAPval
50-95", + f"Speed
CPU ({get_cpu_info()}) ONNX
(ms)", + f"Speed
{gpu} TensorRT
(ms)", + "params
(M)", + "FLOPs
(B)", + ] + header = "|" + "|".join(f" {h} " for h in headers) + "|" + separator = "|" + "|".join("-" * (len(h) + 2) for h in headers) + "|" print(f"\n\n{header}") print(separator) From a4407a48343b03373839a81f4ef9d56fe6536be3 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 29 Sep 2024 00:57:41 +0200 Subject: [PATCH 74/80] Update test_exports.py (#16527) --- tests/test_exports.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_exports.py b/tests/test_exports.py index 98e4049d..e6e2ec15 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -40,7 +40,6 @@ def test_export_openvino(): @pytest.mark.slow -@pytest.mark.skipif(checks.IS_PYTHON_3_12, reason="OpenVINO not supported in Python 3.12") @pytest.mark.skipif(not TORCH_1_13, reason="OpenVINO requires torch>=1.13") @pytest.mark.parametrize( "task, dynamic, int8, half, batch", @@ -187,7 +186,7 @@ def test_export_pb(): YOLO(file)(SOURCE, imgsz=32) -@pytest.mark.skipif(True, reason="Test disabled as Paddle protobuf and ONNX protobuf requirementsk conflict.") +@pytest.mark.skipif(True, reason="Test disabled as Paddle protobuf and ONNX protobuf requirements conflict.") def test_export_paddle(): """Test YOLO exports to Paddle format, noting protobuf conflicts with ONNX.""" YOLO(MODEL).export(format="paddle", imgsz=32) From 6243c257786103141d7619182500807f5b03fa8b Mon Sep 17 00:00:00 2001 From: Jan Knobloch <116908874+jk4e@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:58:42 +0200 Subject: [PATCH 75/80] Fix `hand-keypoints.yaml` image counts (#16528) Co-authored-by: Glenn Jocher --- ultralytics/cfg/datasets/hand-keypoints.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ultralytics/cfg/datasets/hand-keypoints.yaml b/ultralytics/cfg/datasets/hand-keypoints.yaml index 4608ffaf..475a7c01 100644 --- a/ultralytics/cfg/datasets/hand-keypoints.yaml +++ b/ultralytics/cfg/datasets/hand-keypoints.yaml @@ -9,8 +9,8 @@ # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] path: ../datasets/hand-keypoints # dataset root dir -train: train # train images (relative to 'path') 210 images -val: val # val images (relative to 'path') 53 images +train: train # train images (relative to 'path') 18776 images +val: val # val images (relative to 'path') 7992 images # Keypoints kpt_shape: [21, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible) From 1fd21ca27e0670ae93be0ae3b132ebec3fc4ac82 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 29 Sep 2024 01:02:35 +0200 Subject: [PATCH 76/80] Update Dockerfile-python (#16529) --- docker/Dockerfile-python | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile-python b/docker/Dockerfile-python index 281d802b..56348dbb 100644 --- a/docker/Dockerfile-python +++ b/docker/Dockerfile-python @@ -2,8 +2,8 @@ # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics # Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLOv8 deployments -# Use the official Python 3.10 slim-bookworm as base image -FROM python:3.10-slim-bookworm +# Use official Python base image for reproducibility (3.11.10 for export and 3.12.6 for inference) +FROM python:3.11.10-slim-bookworm # Set environment variables ENV PYTHONUNBUFFERED=1 \ From efb0c17881eb613e1fe403eb3a629fe19b9b70ae Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 29 Sep 2024 13:28:36 +0200 Subject: [PATCH 77/80] Use `apt-get` in Dockerfiles (#16535) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docker/Dockerfile | 6 ++++-- docker/Dockerfile-arm64 | 6 ++++-- docker/Dockerfile-conda | 6 ++++-- docker/Dockerfile-cpu | 6 ++++-- docker/Dockerfile-jetson-jetpack4 | 6 ++++-- docker/Dockerfile-jetson-jetpack5 | 6 ++++-- docker/Dockerfile-jetson-jetpack6 | 6 ++++-- docker/Dockerfile-python | 6 ++++-- 8 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index aa34bf33..20184ebf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,8 +21,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # Install linux packages # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # libsm6 required by libqxcb to create QT-based windows for visualization; set 'QT_DEBUG_PLUGINS=1' to test in docker -RUN apt update \ - && apt install --no-install-recommends -y gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6 \ + && rm -rf /var/lib/apt/lists/* # Security updates # https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796 diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index 786061e7..81faee90 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -20,8 +20,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # Install linux packages # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package # pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' -RUN apt update \ - && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python3-pip git zip unzip wget curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* # Create working directory WORKDIR /ultralytics diff --git a/docker/Dockerfile-conda b/docker/Dockerfile-conda index 343b8001..fe7b91c7 100644 --- a/docker/Dockerfile-conda +++ b/docker/Dockerfile-conda @@ -17,8 +17,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ /root/.config/Ultralytics/ # Install linux packages -RUN apt update \ - && apt install --no-install-recommends -y libgl1 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libgl1 \ + && rm -rf /var/lib/apt/lists/* # Copy contents ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . diff --git a/docker/Dockerfile-cpu b/docker/Dockerfile-cpu index f6b691c5..bf0815d4 100644 --- a/docker/Dockerfile-cpu +++ b/docker/Dockerfile-cpu @@ -18,8 +18,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # Install linux packages # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package -RUN apt update \ - && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* # Create working directory WORKDIR /ultralytics diff --git a/docker/Dockerfile-jetson-jetpack4 b/docker/Dockerfile-jetson-jetpack4 index 4ea29852..c4b968a7 100644 --- a/docker/Dockerfile-jetson-jetpack4 +++ b/docker/Dockerfile-jetson-jetpack4 @@ -20,8 +20,10 @@ RUN wget -q -O - https://repo.download.nvidia.com/jetson/jetson-ota-public.asc | echo "deb https://repo.download.nvidia.com/jetson/t194 r32.7 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list # Install dependencies -RUN apt update && \ - apt install --no-install-recommends -y git python3.8 python3.8-dev python3-pip python3-libnvinfer libopenmpi-dev libopenblas-base libomp-dev gcc +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + git python3.8 python3.8-dev python3-pip python3-libnvinfer libopenmpi-dev libopenblas-base libomp-dev gcc \ + && rm -rf /var/lib/apt/lists/* # Create symbolic links for python3.8 and pip3 RUN ln -sf /usr/bin/python3.8 /usr/bin/python3 diff --git a/docker/Dockerfile-jetson-jetpack5 b/docker/Dockerfile-jetson-jetpack5 index afd1f002..35796372 100644 --- a/docker/Dockerfile-jetson-jetpack5 +++ b/docker/Dockerfile-jetson-jetpack5 @@ -20,8 +20,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # g++ required to build 'tflite_support' and 'lap' packages # libusb-1.0-0 required for 'tflite_support' package when exporting to TFLite # pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' -RUN apt update \ - && apt install --no-install-recommends -y gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* # Create working directory WORKDIR /ultralytics diff --git a/docker/Dockerfile-jetson-jetpack6 b/docker/Dockerfile-jetson-jetpack6 index ccc87276..3f465eda 100644 --- a/docker/Dockerfile-jetson-jetpack6 +++ b/docker/Dockerfile-jetson-jetpack6 @@ -17,8 +17,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ /root/.config/Ultralytics/ # Install dependencies -RUN apt update && \ - apt install --no-install-recommends -y git python3-pip libopenmpi-dev libopenblas-base libomp-dev +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + git python3-pip libopenmpi-dev libopenblas-base libomp-dev \ + && rm -rf /var/lib/apt/lists/* # Create working directory WORKDIR /ultralytics diff --git a/docker/Dockerfile-python b/docker/Dockerfile-python index 56348dbb..f89839dd 100644 --- a/docker/Dockerfile-python +++ b/docker/Dockerfile-python @@ -18,8 +18,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # Install linux packages # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package -RUN apt update \ - && apt install --no-install-recommends -y python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* # Create working directory WORKDIR /ultralytics From 6e43d1e1e5db72afbf686dee6745669bcb124b0a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 30 Sep 2024 02:59:20 +0200 Subject: [PATCH 78/80] `ultralytics 8.3.0` YOLO11 Models Release (#16539) Signed-off-by: UltralyticsAssistant Co-authored-by: Laughing-q <1185102784@qq.com> Co-authored-by: UltralyticsAssistant --- .github/workflows/ci.yaml | 29 ++- .github/workflows/merge-main-into-prs.yml | 1 - CITATION.cff | 8 +- README.md | 114 ++++----- README.zh-CN.md | 200 +++++++-------- docker/Dockerfile | 8 +- docker/Dockerfile-arm64 | 2 +- docker/Dockerfile-conda | 2 +- docker/Dockerfile-cpu | 8 +- docker/Dockerfile-jetson-jetpack4 | 4 +- docker/Dockerfile-jetson-jetpack5 | 4 +- docker/Dockerfile-jetson-jetpack6 | 4 +- docker/Dockerfile-python | 8 +- docker/Dockerfile-runner | 2 +- docs/en/datasets/pose/hand-keypoints.md | 67 +++++ docs/en/index.md | 3 +- docs/en/macros/augmentation-args.md | 39 +-- docs/en/models/index.md | 17 +- docs/en/models/yolo11.md | 228 +++++++++++++++++ docs/en/models/yolov8.md | 2 +- docs/en/reference/nn/modules/block.md | 24 ++ docs/mkdocs_github_authors.yaml | 3 + examples/YOLOv8-ONNXRuntime-CPP/inference.cpp | 6 +- examples/tutorial.ipynb | 2 +- mkdocs.yml | 1 + tests/__init__.py | 4 +- tests/conftest.py | 2 +- tests/test_cuda.py | 2 +- tests/test_engine.py | 10 +- tests/test_explorer.py | 6 +- tests/test_integrations.py | 18 +- tests/test_python.py | 22 +- tests/test_solutions.py | 6 +- ultralytics/__init__.py | 3 +- ultralytics/cfg/default.yaml | 1 + ultralytics/cfg/models/11/yolo11-cls.yaml | 30 +++ ultralytics/cfg/models/11/yolo11-obb.yaml | 47 ++++ ultralytics/cfg/models/11/yolo11-pose.yaml | 48 ++++ ultralytics/cfg/models/11/yolo11-seg.yaml | 47 ++++ ultralytics/cfg/models/11/yolo11.yaml | 47 ++++ ultralytics/data/augment.py | 181 ++++++++------ ultralytics/engine/trainer.py | 9 +- ultralytics/nn/modules/__init__.py | 8 +- ultralytics/nn/modules/block.py | 235 +++++++++++++++--- ultralytics/nn/modules/conv.py | 3 +- ultralytics/nn/modules/head.py | 11 +- ultralytics/nn/tasks.py | 27 +- ultralytics/utils/downloads.py | 5 +- ultralytics/utils/loss.py | 3 + ultralytics/utils/torch_utils.py | 2 +- 50 files changed, 1155 insertions(+), 408 deletions(-) create mode 100644 docs/en/models/yolo11.md create mode 100644 ultralytics/cfg/models/11/yolo11-cls.yaml create mode 100644 ultralytics/cfg/models/11/yolo11-obb.yaml create mode 100644 ultralytics/cfg/models/11/yolo11-pose.yaml create mode 100644 ultralytics/cfg/models/11/yolo11-seg.yaml create mode 100644 ultralytics/cfg/models/11/yolo11.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ba1cee5..d98402e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -100,7 +100,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-14] python-version: ["3.11"] - model: [yolov8n] + model: [yolo11n] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -116,24 +116,27 @@ jobs: run: | yolo checks pip list + - name: Benchmark DetectionModel + shell: bash + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}.pt' imgsz=160 verbose=0.309 - name: Benchmark ClassificationModel shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-cls.pt' imgsz=160 verbose=0.166 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-cls.pt' imgsz=160 verbose=0.249 - name: Benchmark YOLOWorld DetectionModel shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov8s-worldv2.pt' imgsz=160 verbose=0.318 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov8s-worldv2.pt' imgsz=160 verbose=0.337 - name: Benchmark SegmentationModel shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-seg.pt' imgsz=160 verbose=0.279 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-seg.pt' imgsz=160 verbose=0.195 - name: Benchmark PoseModel shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-pose.pt' imgsz=160 verbose=0.183 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-pose.pt' imgsz=160 verbose=0.197 - name: Benchmark OBBModel shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-obb.pt' imgsz=160 verbose=0.472 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-obb.pt' imgsz=160 verbose=0.597 - name: Benchmark YOLOv10Model shell: bash - run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov10n.pt' imgsz=160 verbose=0.178 + run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov10n.pt' imgsz=160 verbose=0.205 - name: Merge Coverage Reports run: | coverage xml -o coverage-benchmarks.xml @@ -251,17 +254,17 @@ jobs: - name: Pytest tests run: pytest --slow tests/ - name: Benchmark ClassificationModel - run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-cls.pt' imgsz=160 verbose=0.166 + run: python -m ultralytics.cfg.__init__ benchmark model='yolo11n-cls.pt' imgsz=160 verbose=0.249 - name: Benchmark YOLOWorld DetectionModel - run: python -m ultralytics.cfg.__init__ benchmark model='yolov8s-worldv2.pt' imgsz=160 verbose=0.318 + run: python -m ultralytics.cfg.__init__ benchmark model='yolo11s-worldv2.pt' imgsz=160 verbose=0.337 - name: Benchmark SegmentationModel - run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-seg.pt' imgsz=160 verbose=0.267 + run: python -m ultralytics.cfg.__init__ benchmark model='yolo11n-seg.pt' imgsz=160 verbose=0.195 - name: Benchmark PoseModel - run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-pose.pt' imgsz=160 verbose=0.179 + run: python -m ultralytics.cfg.__init__ benchmark model='yolo11n-pose.pt' imgsz=160 verbose=0.197 - name: Benchmark OBBModel - run: python -m ultralytics.cfg.__init__ benchmark model='yolov8n-obb.pt' imgsz=160 verbose=0.472 + run: python -m ultralytics.cfg.__init__ benchmark model='yolo11n-obb.pt' imgsz=160 verbose=0.597 - name: Benchmark YOLOv10Model - run: python -m ultralytics.cfg.__init__ benchmark model='yolov10n.pt' imgsz=160 verbose=0.178 + run: python -m ultralytics.cfg.__init__ benchmark model='yolov10n.pt' imgsz=160 verbose=0.205 - name: Benchmark Summary run: | cat benchmarks.log diff --git a/.github/workflows/merge-main-into-prs.yml b/.github/workflows/merge-main-into-prs.yml index cb4cfbb6..347ec1b9 100644 --- a/.github/workflows/merge-main-into-prs.yml +++ b/.github/workflows/merge-main-into-prs.yml @@ -85,4 +85,3 @@ jobs: print(f"Branches updated: {updated_branches}") print(f"Branches already up-to-date: {up_to_date_branches}") print(f"Total errors: {errors}") - diff --git a/CITATION.cff b/CITATION.cff index bee0abe2..6c294c0d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -11,14 +11,14 @@ authors: family-names: Jocher affiliation: Ultralytics orcid: 'https://orcid.org/0000-0001-5950-6979' - - given-names: Ayush - family-names: Chaurasia - affiliation: Ultralytics - orcid: 'https://orcid.org/0000-0002-7603-6750' - family-names: Qiu given-names: Jing affiliation: Ultralytics orcid: 'https://orcid.org/0000-0003-3783-7069' + - given-names: Ayush + family-names: Chaurasia + affiliation: Ultralytics + orcid: 'https://orcid.org/0000-0002-7603-6750' repository-code: 'https://github.com/ultralytics/ultralytics' url: 'https://ultralytics.com' license: AGPL-3.0 diff --git a/README.md b/README.md index 704c04b7..0137eba8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
Ultralytics CI - Ultralytics YOLOv8 Citation + Ultralytics YOLO Citation Ultralytics Docker Pulls Ultralytics Discord Ultralytics Forums @@ -20,13 +20,13 @@

-[Ultralytics](https://www.ultralytics.com/) [YOLOv8](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks. +[Ultralytics](https://www.ultralytics.com/) [YOLO11](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLO11 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks. -We hope that the resources here will help you get the most out of YOLOv8. Please browse the YOLOv8 Docs for details, raise an issue on GitHub for support, questions, or discussions, become a member of the Ultralytics Discord, Reddit and Forums! +We hope that the resources here will help you get the most out of YOLO. Please browse the Ultralytics Docs for details, raise an issue on GitHub for support, questions, or discussions, become a member of the Ultralytics Discord, Reddit and Forums! To request an Enterprise License please complete the form at [Ultralytics Licensing](https://www.ultralytics.com/license). -YOLOv8 performance plots +YOLO11 performance plots
Ultralytics GitHub @@ -47,7 +47,7 @@ To request an Enterprise License please complete the form at [Ultralytics Licens ##
Documentation
-See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com/) for full documentation on training, validation, prediction and deployment. +See below for a quickstart install and usage examples, and see our [Docs](https://docs.ultralytics.com/) for full documentation on training, validation, prediction and deployment.
Install @@ -71,23 +71,23 @@ For alternative installation methods including [Conda](https://anaconda.org/cond ### CLI -YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command: +YOLO may be used directly in the Command Line Interface (CLI) with a `yolo` command: ```bash -yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' +yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg' ``` -`yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See the YOLOv8 [CLI Docs](https://docs.ultralytics.com/usage/cli/) for examples. +`yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See the YOLO [CLI Docs](https://docs.ultralytics.com/usage/cli/) for examples. ### Python -YOLOv8 may also be used directly in a Python environment, and accepts the same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above: +YOLO may also be used directly in a Python environment, and accepts the same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above: ```python from ultralytics import YOLO # Load a model -model = YOLO("yolov8n.pt") +model = YOLO("yolo11n.pt") # Train the model train_results = model.train( @@ -108,26 +108,13 @@ results[0].show() path = model.export(format="onnx") # return path to exported model ``` -See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python/) for more examples. +See YOLO [Python Docs](https://docs.ultralytics.com/usage/python/) for more examples.
-### Notebooks - -Ultralytics provides interactive notebooks for YOLOv8, covering training, validation, tracking, and more. Each notebook is paired with a [YouTube](https://www.youtube.com/ultralytics?sub_confirmation=1) tutorial, making it easy to learn and implement advanced YOLOv8 features. - -| Docs | Notebook | YouTube | -| ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| YOLOv8 Train, Val, Predict and Export Modes | Open In Colab |
Ultralytics Youtube Video
| -| Ultralytics HUB QuickStart | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Multi-Object Tracking in Videos | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Object Counting in Videos | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Heatmaps in Videos | Open In Colab |
Ultralytics Youtube Video
| -| Ultralytics Datasets Explorer with SQL and OpenAI Integration 🚀 New | Open In Colab |
Ultralytics Youtube Video
| - ##
Models
-YOLOv8 [Detect](https://docs.ultralytics.com/tasks/detect/), [Segment](https://docs.ultralytics.com/tasks/segment/) and [Pose](https://docs.ultralytics.com/tasks/pose/) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco/) dataset are available here, as well as YOLOv8 [Classify](https://docs.ultralytics.com/tasks/classify/) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) dataset. [Track](https://docs.ultralytics.com/modes/track/) mode is available for all Detect, Segment and Pose models. +YOLO11 [Detect](https://docs.ultralytics.com/tasks/detect/), [Segment](https://docs.ultralytics.com/tasks/segment/) and [Pose](https://docs.ultralytics.com/tasks/pose/) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco/) dataset are available here, as well as YOLO11 [Classify](https://docs.ultralytics.com/tasks/classify/) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) dataset. [Track](https://docs.ultralytics.com/modes/track/) mode is available for all Detect, Segment and Pose models. Ultralytics YOLO supported tasks @@ -137,13 +124,13 @@ All [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cf See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examples with these models trained on [COCO](https://docs.ultralytics.com/datasets/detect/coco/), which include 80 pre-trained classes. -| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | -| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt) | 640 | 37.3 | 80.4 | 0.99 | 3.2 | 8.7 | -| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s.pt) | 640 | 44.9 | 128.4 | 1.20 | 11.2 | 28.6 | -| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m.pt) | 640 | 50.2 | 234.7 | 1.83 | 25.9 | 78.9 | -| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l.pt) | 640 | 52.9 | 375.2 | 2.39 | 43.7 | 165.2 | -| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x.pt) | 640 | 53.9 | 479.1 | 3.53 | 68.2 | 257.8 | +| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | +| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | +| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | +| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | +| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | +| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | +| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | - **mAPval** values are for single-model single-scale on [COCO val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val detect data=coco.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val detect data=coco.yaml batch=1 device=0|cpu` @@ -154,13 +141,13 @@ See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examp See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage examples with these models trained on [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/), which include 80 pre-trained classes. -| Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | -| [YOLOv8n-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-seg.pt) | 640 | 36.7 | 30.5 | 96.1 | 1.21 | 3.4 | 12.6 | -| [YOLOv8s-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-seg.pt) | 640 | 44.6 | 36.8 | 155.7 | 1.47 | 11.8 | 42.6 | -| [YOLOv8m-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-seg.pt) | 640 | 49.9 | 40.8 | 317.0 | 2.18 | 27.3 | 110.2 | -| [YOLOv8l-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-seg.pt) | 640 | 52.3 | 42.6 | 572.4 | 2.79 | 46.0 | 220.5 | -| [YOLOv8x-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-seg.pt) | 640 | 53.4 | 43.4 | 712.1 | 4.02 | 71.8 | 344.1 | +| Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | +| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | +| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | +| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | +| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | +| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | - **mAPval** values are for single-model single-scale on [COCO val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val segment data=coco-seg.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu` @@ -171,14 +158,13 @@ See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage e See [Pose Docs](https://docs.ultralytics.com/tasks/pose/) for usage examples with these models trained on [COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/), which include 1 pre-trained class, person. -| Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| ---------------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | -| [YOLOv8n-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-pose.pt) | 640 | 50.4 | 80.1 | 131.8 | 1.18 | 3.3 | 9.2 | -| [YOLOv8s-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-pose.pt) | 640 | 60.0 | 86.2 | 233.2 | 1.42 | 11.6 | 30.2 | -| [YOLOv8m-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-pose.pt) | 640 | 65.0 | 88.8 | 456.3 | 2.00 | 26.4 | 81.0 | -| [YOLOv8l-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-pose.pt) | 640 | 67.6 | 90.0 | 784.5 | 2.59 | 44.4 | 168.6 | -| [YOLOv8x-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-pose.pt) | 640 | 69.2 | 90.2 | 1607.1 | 3.73 | 69.4 | 263.2 | -| [YOLOv8x-pose-p6](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-pose-p6.pt) | 1280 | 71.6 | 91.2 | 4088.7 | 10.04 | 99.1 | 1066.4 | +| Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | +| ---------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | +| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | +| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | +| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | +| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | +| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | - **mAPval** values are for single-model single-scale on [COCO Keypoints val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val pose data=coco-pose.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu` @@ -189,13 +175,13 @@ See [Pose Docs](https://docs.ultralytics.com/tasks/pose/) for usage examples wit See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with these models trained on [DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/), which include 15 pre-trained classes. -| Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | -| [YOLOv8n-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-obb.pt) | 1024 | 78.0 | 204.77 | 3.57 | 3.1 | 23.3 | -| [YOLOv8s-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-obb.pt) | 1024 | 79.5 | 424.88 | 4.07 | 11.4 | 76.3 | -| [YOLOv8m-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-obb.pt) | 1024 | 80.5 | 763.48 | 7.61 | 26.4 | 208.6 | -| [YOLOv8l-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-obb.pt) | 1024 | 80.7 | 1278.42 | 11.83 | 44.5 | 433.8 | -| [YOLOv8x-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-obb.pt) | 1024 | 81.36 | 1759.10 | 13.23 | 69.5 | 676.7 | +| Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | +| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | +| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | +| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | +| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | +| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | - **mAPtest** values are for single-model multiscale on [DOTAv1](https://captain-whu.github.io/DOTA/index.html) dataset.
Reproduce by `yolo val obb data=DOTAv1.yaml device=0 split=test` and submit merged results to [DOTA evaluation](https://captain-whu.github.io/DOTA/evaluation.html). - **Speed** averaged over DOTAv1 val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu` @@ -206,13 +192,13 @@ See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with See [Classification Docs](https://docs.ultralytics.com/tasks/classify/) for usage examples with these models trained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/), which include 1000 pretrained classes. -| Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
A100 TensorRT
(ms) | params
(M) | FLOPs
(B) at 640 | -| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | ----------------------------------- | ------------------ | ------------------------ | -| [YOLOv8n-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-cls.pt) | 224 | 69.0 | 88.3 | 12.9 | 0.31 | 2.7 | 4.3 | -| [YOLOv8s-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-cls.pt) | 224 | 73.8 | 91.7 | 23.4 | 0.35 | 6.4 | 13.5 | -| [YOLOv8m-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-cls.pt) | 224 | 76.8 | 93.5 | 85.4 | 0.62 | 17.0 | 42.7 | -| [YOLOv8l-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-cls.pt) | 224 | 78.3 | 94.2 | 163.0 | 0.87 | 37.5 | 99.7 | -| [YOLOv8x-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-cls.pt) | 224 | 79.0 | 94.6 | 232.0 | 1.01 | 57.4 | 154.8 | +| Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) at 640 | +| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | --------------------------------------- | ------------------ | ------------------------ | +| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | +| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | +| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | +| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | +| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | - **acc** values are model accuracies on the [ImageNet](https://www.image-net.org/) dataset validation set.
Reproduce by `yolo val classify data=path/to/ImageNet device=0` - **Speed** averaged over ImageNet val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu` @@ -245,18 +231,18 @@ Our key integrations with leading AI platforms extend the functionality of Ultra | Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW | | :--------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: | -| Label and export your custom datasets directly to YOLOv8 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLOv8 using [ClearML](https://clear.ml/) (open-source!) | Free forever, [Comet](https://bit.ly/yolov8-readme-comet) lets you save YOLOv8 models, resume training, and interactively visualize and debug predictions | Run YOLOv8 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) | +| Label and export your custom datasets directly to YOLO11 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLO11 using [ClearML](https://clear.ml/) (open-source!) | Free forever, [Comet](https://bit.ly/yolov5-readme-comet) lets you save YOLO11 models, resume training, and interactively visualize and debug predictions | Run YOLO11 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) | ##
Ultralytics HUB
-Experience seamless AI with [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://www.ultralytics.com/app-install). Start your journey for **Free** now! +Experience seamless AI with [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐, the all-in-one solution for data visualization, YOLO11 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://www.ultralytics.com/app-install). Start your journey for **Free** now! Ultralytics HUB preview image ##
Contribute
-We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started, and fill out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you 🙏 to all our contributors! +We love your input! Ultralytics YOLO would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started, and fill out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you 🙏 to all our contributors! diff --git a/README.zh-CN.md b/README.zh-CN.md index 1e7b9727..159fec01 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -8,25 +8,25 @@
Ultralytics CI - YOLOv8 Citation - Docker Pulls - Discord + Ultralytics YOLO Citation + Ultralytics Docker Pulls + Ultralytics Discord Ultralytics Forums Ultralytics Reddit
- Run on Gradient - Open In Colab - Open In Kaggle + Run Ultralytics on Gradient + Open Ultralytics In Colab + Open Ultralytics In Kaggle

-[Ultralytics](https://www.ultralytics.com/) [YOLOv8](https://github.com/ultralytics/ultralytics) 是一款前沿、最先进(SOTA)的模型,基于先前 YOLO 版本的成功,引入了新功能和改进,进一步提升性能和灵活性。YOLOv8 设计快速、准确且易于使用,使其成为各种物体检测与跟踪、实例分割、图像分类和姿态估计任务的绝佳选择。 +[Ultralytics](https://www.ultralytics.com/) [YOLO11](https://github.com/ultralytics/ultralytics) 是一个尖端的、最先进(SOTA)的模型,基于之前 YOLO 版本的成功,并引入了新功能和改进以进一步提升性能和灵活性。YOLO11 被设计得快速、准确且易于使用,是进行广泛对象检测和跟踪、实例分割、图像分类和姿态估计任务的理想选择。 -我们希望这里的资源能帮助您充分利用 YOLOv8。请浏览 YOLOv8 的文档了解详情,如需支持、提问或讨论,请在 GitHub 上提出问题,成为 Ultralytics DiscordReddit论坛 的一员! +我们希望这里的资源能帮助你充分利用 YOLO。请浏览 Ultralytics 文档 以获取详细信息,在 GitHub 上提出问题或讨论,成为 Ultralytics DiscordReddit论坛 的成员! -如需申请企业许可,请在 [Ultralytics Licensing](https://www.ultralytics.com/license) 处填写表格 +想申请企业许可证,请完成 [Ultralytics Licensing](https://www.ultralytics.com/license) 上的表单。 -YOLOv8 performance plots +YOLO11 performance plots
Ultralytics GitHub @@ -45,16 +45,14 @@
-以下是提供的内容的中文翻译: - ##
文档
-请参阅下面的快速安装和使用示例,以及 [YOLOv8 文档](https://docs.ultralytics.com/) 上有关训练、验证、预测和部署的完整文档。 +请参阅下方的快速开始安装和使用示例,并查看我们的 [文档](https://docs.ultralytics.com/) 以获取有关训练、验证、预测和部署的完整文档。
安装 -使用Pip在一个[**Python>=3.8**](https://www.python.org/)环境中安装`ultralytics`包,此环境还需包含[**PyTorch>=1.8**](https://pytorch.org/get-started/locally/)。这也会安装所有必要的[依赖项](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml)。 +在 [**Python>=3.8**](https://www.python.org/) 环境中使用 [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/) 通过 pip 安装包含所有[依赖项](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) 的 ultralytics 包。 [![PyPI - Version](https://img.shields.io/pypi/v/ultralytics?logo=pypi&logoColor=white)](https://pypi.org/project/ultralytics/) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ultralytics?logo=python&logoColor=gold)](https://pypi.org/project/ultralytics/) @@ -62,168 +60,154 @@ pip install ultralytics ``` -如需使用包括[Conda](https://anaconda.org/conda-forge/ultralytics),[Docker](https://hub.docker.com/r/ultralytics/ultralytics)和Git在内的其他安装方法,请参考[快速入门指南](https://docs.ultralytics.com/quickstart/)。 +有关其他安装方法,包括 [Conda](https://anaconda.org/conda-forge/ultralytics)、[Docker](https://hub.docker.com/r/ultralytics/ultralytics) 和 Git,请参阅 [快速开始指南](https://docs.ultralytics.com/quickstart/)。 [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ultralytics?logo=condaforge)](https://anaconda.org/conda-forge/ultralytics) [![Docker Image Version](https://img.shields.io/docker/v/ultralytics/ultralytics?sort=semver&logo=docker)](https://hub.docker.com/r/ultralytics/ultralytics)
-Usage +使用 ### CLI -YOLOv8 可以在命令行界面(CLI)中直接使用,只需输入 `yolo` 命令: +YOLO 可以直接在命令行接口(CLI)中使用 `yolo` 命令: ```bash -yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' +yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg' ``` -`yolo` 可用于各种任务和模式,并接受其他参数,例如 `imgsz=640`。查看 YOLOv8 [CLI 文档](https://docs.ultralytics.com/usage/cli/)以获取示例。 +`yolo` 可以用于各种任务和模式,并接受额外参数,例如 `imgsz=640`。请参阅 YOLO [CLI 文档](https://docs.ultralytics.com/usage/cli/) 以获取示例。 ### Python -YOLOv8 也可以在 Python 环境中直接使用,并接受与上述 CLI 示例中相同的[参数](https://docs.ultralytics.com/usage/cfg/): +YOLO 也可以直接在 Python 环境中使用,并接受与上述 CLI 示例中相同的[参数](https://docs.ultralytics.com/usage/cfg/): ```python from ultralytics import YOLO # 加载模型 -model = YOLO("yolov8n.pt") +model = YOLO("yolo11n.pt") # 训练模型 train_results = model.train( - data="coco8.yaml", # 数据配置文件的路径 - epochs=100, # 训练的轮数 - imgsz=640, # 训练图像大小 - device="cpu", # 运行的设备,例如 device=0 或 device=0,1,2,3 或 device=cpu + data="coco8.yaml", # 数据集 YAML 路径 + epochs=100, # 训练轮次 + imgsz=640, # 训练图像尺寸 + device="cpu", # 运行设备,例如 device=0 或 device=0,1,2,3 或 device=cpu ) -# 在验证集上评估模型性能 +# 评估模型在验证集上的性能 metrics = model.val() -# 对图像进行目标检测 +# 在图像上执行对象检测 results = model("path/to/image.jpg") results[0].show() # 将模型导出为 ONNX 格式 -path = model.export(format="onnx") # 返回导出的模型路径 +path = model.export(format="onnx") # 返回导出模型的路径 ``` -查看 YOLOv8 [Python 文档](https://docs.ultralytics.com/usage/python/)以获取更多示例。 +请参阅 YOLO [Python 文档](https://docs.ultralytics.com/usage/python/) 以获取更多示例。
-### 笔记本 - -Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟踪等内容。每个笔记本都配有 [YouTube](https://www.youtube.com/ultralytics?sub_confirmation=1) 教程,使学习和实现高级 YOLOv8 功能变得简单。 - -| 文档 | 笔记本 | YouTube | -| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| YOLOv8 训练、验证、预测和导出模式 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| Ultralytics HUB 快速开始 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的多对象跟踪 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的对象计数 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的热图 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| Ultralytics 数据集浏览器,集成 SQL 和 OpenAI 🚀 New | 在 Colab 中打开 |
Ultralytics Youtube Video
| - ##
模型
-在[COCO](https://docs.ultralytics.com/datasets/detect/coco/)数据集上预训练的YOLOv8 [检测](https://docs.ultralytics.com/tasks/detect/),[分割](https://docs.ultralytics.com/tasks/segment/)和[姿态](https://docs.ultralytics.com/tasks/pose/)模型可以在这里找到,以及在[ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/)数据集上预训练的YOLOv8 [分类](https://docs.ultralytics.com/tasks/classify/)模型。所有的检测,分割和姿态模型都支持[追踪](https://docs.ultralytics.com/modes/track/)模式。 +YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://docs.ultralytics.com/tasks/segment/) 和 [姿态](https://docs.ultralytics.com/tasks/pose/) 模型在 [COCO](https://docs.ultralytics.com/datasets/detect/coco/) 数据集上进行预训练,这些模型可在此处获得,此外还有在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) 数据集上预训练的 YOLO11 [分类](https://docs.ultralytics.com/tasks/classify/) 模型。所有检测、分割和姿态模型均支持 [跟踪](https://docs.ultralytics.com/modes/track/) 模式。 Ultralytics YOLO supported tasks -所有[模型](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models)在首次使用时会自动从最新的Ultralytics [发布版本](https://github.com/ultralytics/assets/releases)下载。 +所有[模型](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models)在首次使用时自动从最新的 Ultralytics [发布](https://github.com/ultralytics/assets/releases)下载。
检测 (COCO) -查看[检测文档](https://docs.ultralytics.com/tasks/detect/)以获取这些在[COCO](https://docs.ultralytics.com/datasets/detect/coco/)上训练的模型的使用示例,其中包括80个预训练类别。 +请参阅 [检测文档](https://docs.ultralytics.com/tasks/detect/) 以获取使用这些在 [COCO](https://docs.ultralytics.com/datasets/detect/coco/) 数据集上训练的模型的示例,其中包含 80 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPval
50-95 | 速度
CPU ONNX
(ms) | 速度
A100 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| ------------------------------------------------------------------------------------ | ------------------- | -------------------- | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | -| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt) | 640 | 37.3 | 80.4 | 0.99 | 3.2 | 8.7 | -| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s.pt) | 640 | 44.9 | 128.4 | 1.20 | 11.2 | 28.6 | -| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m.pt) | 640 | 50.2 | 234.7 | 1.83 | 25.9 | 78.9 | -| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l.pt) | 640 | 52.9 | 375.2 | 2.39 | 43.7 | 165.2 | -| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x.pt) | 640 | 53.9 | 479.1 | 3.53 | 68.2 | 257.8 | +| 模型 | 尺寸
(像素) | mAPval
50-95 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | +| ------------------------------------------------------------------------------------ | ------------------- | -------------------- | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | +| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | +| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | +| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | +| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | +| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | -- **mAPval** 值是基于单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上的结果。
通过 `yolo val detect data=coco.yaml device=0` 复现 -- **速度** 是使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例对 COCO val 图像进行平均计算的。
通过 `yolo val detect data=coco.yaml batch=1 device=0|cpu` 复现 +- **mAPval** 值针对单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val detect data=coco.yaml device=0` +- **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val detect data=coco.yaml batch=1 device=0|cpu`
分割 (COCO) -查看[分割文档](https://docs.ultralytics.com/tasks/segment/)以获取这些在[COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/)上训练的模型的使用示例,其中包括80个预训练类别。 +请参阅 [分割文档](https://docs.ultralytics.com/tasks/segment/) 以获取使用这些在 [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/) 数据集上训练的模型的示例,其中包含 80 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPbox
50-95 | mAPmask
50-95 | 速度
CPU ONNX
(ms) | 速度
A100 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | ------------------- | -------------------- | --------------------- | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | -| [YOLOv8n-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-seg.pt) | 640 | 36.7 | 30.5 | 96.1 | 1.21 | 3.4 | 12.6 | -| [YOLOv8s-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-seg.pt) | 640 | 44.6 | 36.8 | 155.7 | 1.47 | 11.8 | 42.6 | -| [YOLOv8m-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-seg.pt) | 640 | 49.9 | 40.8 | 317.0 | 2.18 | 27.3 | 110.2 | -| [YOLOv8l-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-seg.pt) | 640 | 52.3 | 42.6 | 572.4 | 2.79 | 46.0 | 220.5 | -| [YOLOv8x-seg](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-seg.pt) | 640 | 53.4 | 43.4 | 712.1 | 4.02 | 71.8 | 344.1 | +| 模型 | 尺寸
(像素) | mAPbox
50-95 | mAPmask
50-95 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | ------------------- | -------------------- | --------------------- | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | +| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | +| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | +| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | +| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | +| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | -- **mAPval** 值是基于单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上的结果。
通过 `yolo val segment data=coco-seg.yaml device=0` 复现 -- **速度** 是使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例对 COCO val 图像进行平均计算的。
通过 `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu` 复现 +- **mAPval** 值针对单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val segment data=coco-seg.yaml device=0` +- **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu`
姿态 (COCO) -查看[姿态文档](https://docs.ultralytics.com/tasks/pose/)以获取这些在[COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/)上训练的模型的使用示例,其中包括1个预训练类别,即人。 +请参阅 [姿态文档](https://docs.ultralytics.com/tasks/pose/) 以获取使用这些在 [COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/) 数据集上训练的模型的示例,其中包含 1 个预训练类别(人)。 -| 模型 | 尺寸
(像素) | mAPpose
50-95 | mAPpose
50 | 速度
CPU ONNX
(ms) | 速度
A100 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| ---------------------------------------------------------------------------------------------------- | ------------------- | --------------------- | ------------------ | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | -| [YOLOv8n-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-pose.pt) | 640 | 50.4 | 80.1 | 131.8 | 1.18 | 3.3 | 9.2 | -| [YOLOv8s-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-pose.pt) | 640 | 60.0 | 86.2 | 233.2 | 1.42 | 11.6 | 30.2 | -| [YOLOv8m-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-pose.pt) | 640 | 65.0 | 88.8 | 456.3 | 2.00 | 26.4 | 81.0 | -| [YOLOv8l-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-pose.pt) | 640 | 67.6 | 90.0 | 784.5 | 2.59 | 44.4 | 168.6 | -| [YOLOv8x-pose](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-pose.pt) | 640 | 69.2 | 90.2 | 1607.1 | 3.73 | 69.4 | 263.2 | -| [YOLOv8x-pose-p6](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-pose-p6.pt) | 1280 | 71.6 | 91.2 | 4088.7 | 10.04 | 99.1 | 1066.4 | +| 模型 | 尺寸
(像素) | mAPpose
50-95 | mAPpose
50 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | +| ---------------------------------------------------------------------------------------------- | ------------------- | --------------------- | ------------------ | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | +| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | +| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | +| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | +| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | +| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | -- **mAPval** 值是基于单模型单尺度在 [COCO Keypoints val2017](https://cocodataset.org/) 数据集上的结果。
通过 `yolo val pose data=coco-pose.yaml device=0` 复现 -- **速度** 是使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例对 COCO val 图像进行平均计算的。
通过 `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu` 复现 +- **mAPval** 值针对单模型单尺度在 [COCO Keypoints val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val pose data=coco-pose.yaml device=0` +- **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu`
-
旋转检测 (DOTAv1) +
OBB (DOTAv1) -查看[旋转检测文档](https://docs.ultralytics.com/tasks/obb/)以获取这些在[DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/)上训练的模型的使用示例,其中包括15个预训练类别。 +请参阅 [OBB 文档](https://docs.ultralytics.com/tasks/obb/) 以获取使用这些在 [DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/) 数据集上训练的模型的示例,其中包含 15 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPtest
50 | 速度
CPU ONNX
(ms) | 速度
A100 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | ------------------- | ------------------ | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | -| [YOLOv8n-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-obb.pt) | 1024 | 78.0 | 204.77 | 3.57 | 3.1 | 23.3 | -| [YOLOv8s-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-obb.pt) | 1024 | 79.5 | 424.88 | 4.07 | 11.4 | 76.3 | -| [YOLOv8m-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-obb.pt) | 1024 | 80.5 | 763.48 | 7.61 | 26.4 | 208.6 | -| [YOLOv8l-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-obb.pt) | 1024 | 80.7 | 1278.42 | 11.83 | 44.5 | 433.8 | -| [YOLOv8x-obb](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-obb.pt) | 1024 | 81.36 | 1759.10 | 13.23 | 69.5 | 676.7 | +| 模型 | 尺寸
(像素) | mAPtest
50 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | ------------------- | ------------------ | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | +| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | +| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | +| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | +| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | +| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | -- **mAPval** 值是基于单模型多尺度在 [DOTAv1](https://captain-whu.github.io/DOTA/index.html) 数据集上的结果。
通过 `yolo val obb data=DOTAv1.yaml device=0 split=test` 复现 -- **速度** 是使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例对 COCO val 图像进行平均计算的。
通过 `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu` 复现 +- **mAPtest** 值针对单模型多尺度在 [DOTAv1](https://captain-whu.github.io/DOTA/index.html) 数据集上进行。
复制命令 `yolo val obb data=DOTAv1.yaml device=0 split=test` 并提交合并结果到 [DOTA 评估](https://captain-whu.github.io/DOTA/evaluation.html)。 +- **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 DOTAv1 验证图像上平均。
复制命令 `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu`
分类 (ImageNet) -查看[分类文档](https://docs.ultralytics.com/tasks/classify/)以获取这些在[ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/)上训练的模型的使用示例,其中包括1000个预训练类别。 +请参阅 [分类文档](https://docs.ultralytics.com/tasks/classify/) 以获取使用这些在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) 数据集上训练的模型的示例,其中包含 1000 个预训练类别。 -| 模型 | 尺寸
(像素) | acc
top1 | acc
top5 | 速度
CPU ONNX
(ms) | 速度
A100 TensorRT
(ms) | 参数
(M) | FLOPs
(B) at 640 | -| -------------------------------------------------------------------------------------------- | ------------------- | ---------------- | ---------------- | ----------------------------- | ---------------------------------- | ---------------- | ------------------------ | -| [YOLOv8n-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-cls.pt) | 224 | 69.0 | 88.3 | 12.9 | 0.31 | 2.7 | 4.3 | -| [YOLOv8s-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s-cls.pt) | 224 | 73.8 | 91.7 | 23.4 | 0.35 | 6.4 | 13.5 | -| [YOLOv8m-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-cls.pt) | 224 | 76.8 | 93.5 | 85.4 | 0.62 | 17.0 | 42.7 | -| [YOLOv8l-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-cls.pt) | 224 | 78.3 | 94.2 | 163.0 | 0.87 | 37.5 | 99.7 | -| [YOLOv8x-cls](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-cls.pt) | 224 | 79.0 | 94.6 | 232.0 | 1.01 | 57.4 | 154.8 | +| 模型 | 尺寸
(像素) | acc
top1 | acc
top5 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) at 640 | +| -------------------------------------------------------------------------------------------- | ------------------- | ---------------- | ---------------- | ----------------------------- | -------------------------------------- | ---------------- | ------------------------ | +| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | +| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | +| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | +| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | +| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | -- **acc** 值是模型在 [ImageNet](https://www.image-net.org/) 数据集验证集上的准确率。
通过 `yolo val classify data=path/to/ImageNet device=0` 复现 -- **速度** 是使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例对 ImageNet val 图像进行平均计算的。
通过 `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu` 复现 +- **acc** 值为在 [ImageNet](https://www.image-net.org/) 数据集验证集上的模型准确率。
复制命令 `yolo val classify data=path/to/ImageNet device=0` +- **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 ImageNet 验证图像上平均。
复制命令 `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu`
##
集成
-我们与领先的AI平台的关键整合扩展了Ultralytics产品的功能,增强了数据集标签化、训练、可视化和模型管理等任务。探索Ultralytics如何与[Roboflow](https://roboflow.com/?ref=ultralytics)、ClearML、[Comet](https://bit.ly/yolov8-readme-comet)、Neural Magic以及[OpenVINO](https://docs.ultralytics.com/integrations/openvino/)合作,优化您的AI工作流程。 +我们与领先的 AI 平台的关键集成扩展了 Ultralytics 产品的功能,增强了数据集标记、训练、可视化和模型管理等任务的能力。了解 Ultralytics 如何与 [Roboflow](https://roboflow.com/?ref=ultralytics)、ClearML、[Comet](https://bit.ly/yolov8-readme-comet)、Neural Magic 和 [OpenVINO](https://docs.ultralytics.com/integrations/openvino/) 合作,优化您的 AI 工作流程。
@@ -245,36 +229,36 @@ Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟 NeuralMagic logo -| Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW | -| :-------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: | -| 使用 [Roboflow](https://roboflow.com/?ref=ultralytics) 将您的自定义数据集直接标记并导出至 YOLOv8 进行训练 | 使用 [ClearML](https://clear.ml/)(开源!)自动跟踪、可视化,甚至远程训练 YOLOv8 | 免费且永久,[Comet](https://bit.ly/yolov8-readme-comet) 让您保存 YOLOv8 模型、恢复训练,并以交互式方式查看和调试预测 | 使用 [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) 使 YOLOv8 推理速度提高多达 6 倍 | +| Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW | +| :--------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: | +| Label and export your custom datasets directly to YOLO11 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLO11 using [ClearML](https://clear.ml/) (open-source!) | Free forever, [Comet](https://bit.ly/yolov5-readme-comet) lets you save YOLO11 models, resume training, and interactively visualize and debug predictions | Run YOLO11 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) | ##
Ultralytics HUB
-体验 [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐ 带来的无缝 AI,这是一个一体化解决方案,用于数据可视化、YOLOv5 和即将推出的 YOLOv8 🚀 模型训练和部署,无需任何编码。通过我们先进的平台和用户友好的 [Ultralytics 应用程序](https://www.ultralytics.com/app-install),轻松将图像转化为可操作的见解,并实现您的 AI 愿景。现在就开始您的**免费**之旅! +体验无缝 AI 使用 [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐,一个集数据可视化、YOLO11 🚀 模型训练和部署于一体的解决方案,无需编写代码。利用我们最先进的平台和用户友好的 [Ultralytics 应用](https://www.ultralytics.com/app-install),将图像转换为可操作见解,并轻松实现您的 AI 愿景。免费开始您的旅程! Ultralytics HUB preview image ##
贡献
-我们喜欢您的参与!没有社区的帮助,YOLOv5 和 YOLOv8 将无法实现。请参阅我们的[贡献指南](https://docs.ultralytics.com/help/contributing/)以开始使用,并填写我们的[调查问卷](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey)向我们提供您的使用体验反馈。感谢所有贡献者的支持!🙏 +我们欢迎您的意见!没有社区的帮助,Ultralytics YOLO 就不可能实现。请参阅我们的 [贡献指南](https://docs.ultralytics.com/help/contributing/) 开始,并填写我们的 [调查问卷](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) 向我们提供您体验的反馈。感谢所有贡献者 🙏! Ultralytics open-source contributors -##
许可证
+##
许可
-Ultralytics 提供两种许可证选项以适应各种使用场景: +Ultralytics 提供两种许可选项以适应各种用例: -- **AGPL-3.0 许可证**:这个[OSI 批准](https://opensource.org/license)的开源许可证非常适合学生和爱好者,可以推动开放的协作和知识分享。请查看[LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) 文件以了解更多细节。 -- **企业许可证**:专为商业用途设计,该许可证允许将 Ultralytics 的软件和 AI 模型无缝集成到商业产品和服务中,从而绕过 AGPL-3.0 的开源要求。如果您的场景涉及将我们的解决方案嵌入到商业产品中,请通过 [Ultralytics Licensing](https://www.ultralytics.com/license)与我们联系。 +- **AGPL-3.0 许可**:这是一个 [OSI 批准](https://opensource.org/license) 的开源许可,适合学生和爱好者,促进开放协作和知识共享。有关详细信息,请参阅 [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) 文件。 +- **企业许可**:专为商业使用设计,此许可允许将 Ultralytics 软件和 AI 模型无缝集成到商业产品和服务中,无需满足 AGPL-3.0 的开源要求。如果您的场景涉及将我们的解决方案嵌入到商业产品,请通过 [Ultralytics Licensing](https://www.ultralytics.com/license) 联系我们。 -##
联系方式
+##
联系
-有关 Ultralytics 错误报告和功能请求,请访问 [GitHub 问题](https://github.com/ultralytics/ultralytics/issues)。成为 Ultralytics [Discord](https://discord.com/invite/ultralytics)、[Reddit](https://www.reddit.com/r/ultralytics/) 或 [论坛](https://community.ultralytics.com/) 的成员 用于提出问题、共享项目、学习讨论或寻求有关 Ultralytics 的所有帮助! +如需 Ultralytics 的错误报告和功能请求,请访问 [GitHub Issues](https://github.com/ultralytics/ultralytics/issues)。成为 Ultralytics [Discord](https://discord.com/invite/ultralytics)、[Reddit](https://www.reddit.com/r/ultralytics/) 或 [论坛](https://community.ultralytics.com/) 的成员,提出问题、分享项目、探讨学习讨论,或寻求所有 Ultralytics 相关的帮助!
diff --git a/docker/Dockerfile b/docker/Dockerfile index 20184ebf..3283c650 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:latest image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Image is CUDA-optimized for YOLOv8 single/multi-GPU training and inference +# Image is CUDA-optimized for YOLO11 single/multi-GPU training and inference # Start FROM PyTorch image https://hub.docker.com/r/pytorch/pytorch or nvcr.io/nvidia/pytorch:23.03-py3 FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime @@ -36,7 +36,7 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Install pip packages RUN python3 -m pip install --upgrade pip wheel @@ -45,8 +45,8 @@ RUN pip install -e ".[export]" "tensorrt-cu12==10.1.0" "albumentations>=1.4.6" c # Run exports to AutoInstall packages # Edge TPU export fails the first time so is run twice here -RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 -RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32 # Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991 RUN pip install "paddlepaddle>=2.6.0" x2paddle # Fix error: `np.bool` was a deprecated alias for the builtin `bool` segmentation error in Tests diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index 81faee90..b5bdbb0f 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -31,7 +31,7 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Install pip packages RUN python3 -m pip install --upgrade pip wheel diff --git a/docker/Dockerfile-conda b/docker/Dockerfile-conda index fe7b91c7..aa1dff53 100644 --- a/docker/Dockerfile-conda +++ b/docker/Dockerfile-conda @@ -23,7 +23,7 @@ RUN apt-get update && \ && rm -rf /var/lib/apt/lists/* # Copy contents -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Install conda packages # mkl required to fix 'OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory' diff --git a/docker/Dockerfile-cpu b/docker/Dockerfile-cpu index bf0815d4..fe8d8852 100644 --- a/docker/Dockerfile-cpu +++ b/docker/Dockerfile-cpu @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLOv8 deployments +# Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLO11 deployments # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu FROM ubuntu:23.10 @@ -29,15 +29,15 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Install pip packages RUN python3 -m pip install --upgrade pip wheel RUN pip install -e ".[export]" --extra-index-url https://download.pytorch.org/whl/cpu # Run exports to AutoInstall packages -RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 -RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32 # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991 # RUN pip install "paddlepaddle>=2.6.0" x2paddle diff --git a/docker/Dockerfile-jetson-jetpack4 b/docker/Dockerfile-jetson-jetpack4 index c4b968a7..c1409748 100644 --- a/docker/Dockerfile-jetson-jetpack4 +++ b/docker/Dockerfile-jetson-jetpack4 @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:jetson-jetpack4 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Supports JetPack4.x for YOLOv8 on Jetson Nano, TX2, Xavier NX, AGX Xavier +# Supports JetPack4.x for YOLO11 on Jetson Nano, TX2, Xavier NX, AGX Xavier # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-cuda FROM nvcr.io/nvidia/l4t-cuda:10.2.460-runtime @@ -35,7 +35,7 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Download onnxruntime-gpu 1.8.0 and tensorrt 8.2.0.6 # Other versions can be seen in https://elinux.org/Jetson_Zoo and https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 diff --git a/docker/Dockerfile-jetson-jetpack5 b/docker/Dockerfile-jetson-jetpack5 index 35796372..9949d26b 100644 --- a/docker/Dockerfile-jetson-jetpack5 +++ b/docker/Dockerfile-jetson-jetpack5 @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:jetson-jetson-jetpack5 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Supports JetPack5.x for YOLOv8 on Jetson Xavier NX, AGX Xavier, AGX Orin, Orin Nano and Orin NX +# Supports JetPack5.x for YOLO11 on Jetson Xavier NX, AGX Xavier, AGX Orin, Orin Nano and Orin NX # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 @@ -31,7 +31,7 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Remove opencv-python from Ultralytics dependencies as it conflicts with opencv-python installed in base image RUN sed -i '/opencv-python/d' pyproject.toml diff --git a/docker/Dockerfile-jetson-jetpack6 b/docker/Dockerfile-jetson-jetpack6 index 3f465eda..e4da5461 100644 --- a/docker/Dockerfile-jetson-jetpack6 +++ b/docker/Dockerfile-jetson-jetpack6 @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:jetson-jetpack6 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Supports JetPack6.x for YOLOv8 on Jetson AGX Orin, Orin NX and Orin Nano Series +# Supports JetPack6.x for YOLO11 on Jetson AGX Orin, Orin NX and Orin Nano Series # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack FROM nvcr.io/nvidia/l4t-jetpack:r36.3.0 @@ -28,7 +28,7 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Download onnxruntime-gpu 1.18.0 from https://elinux.org/Jetson_Zoo and https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 ADD https://nvidia.box.com/shared/static/48dtuob7meiw6ebgfsfqakc9vse62sg4.whl onnxruntime_gpu-1.18.0-cp310-cp310-linux_aarch64.whl diff --git a/docker/Dockerfile-python b/docker/Dockerfile-python index f89839dd..c275dcd9 100644 --- a/docker/Dockerfile-python +++ b/docker/Dockerfile-python @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLOv8 deployments +# Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLO11 deployments # Use official Python base image for reproducibility (3.11.10 for export and 3.12.6 for inference) FROM python:3.11.10-slim-bookworm @@ -29,15 +29,15 @@ WORKDIR /ultralytics # Copy contents and configure git COPY . . RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config -ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt . +ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # Install pip packages RUN python3 -m pip install --upgrade pip wheel RUN pip install -e ".[export]" --extra-index-url https://download.pytorch.org/whl/cpu # Run exports to AutoInstall packages -RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 -RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 +RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32 # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991 RUN pip install "paddlepaddle>=2.6.0" x2paddle diff --git a/docker/Dockerfile-runner b/docker/Dockerfile-runner index 8f014772..642f1a1b 100644 --- a/docker/Dockerfile-runner +++ b/docker/Dockerfile-runner @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license # Builds GitHub actions CI runner image for deployment to DockerHub https://hub.docker.com/r/ultralytics/ultralytics -# Image is CUDA-optimized for YOLOv8 single/multi-GPU training and inference tests +# Image is CUDA-optimized for YOLO11 single/multi-GPU training and inference tests # Start FROM Ultralytics GPU image FROM ultralytics/ultralytics:latest diff --git a/docs/en/datasets/pose/hand-keypoints.md b/docs/en/datasets/pose/hand-keypoints.md index 177ba4c8..c14bd5c5 100644 --- a/docs/en/datasets/pose/hand-keypoints.md +++ b/docs/en/datasets/pose/hand-keypoints.md @@ -106,3 +106,70 @@ If you use the hand-keypoints dataset in your research or development work, plea The images were collected and used under the respective licenses provided by each platform and are distributed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). We would also like to acknowledge the creator of this dataset, [Rion Dsilva](https://www.linkedin.com/in/rion-dsilva-043464229/), for his great contribution to Vision AI research. + +## FAQ + +### How do I train a YOLOv8 model on the Hand Keypoints dataset? + +To train a YOLOv8 model on the Hand Keypoints dataset, you can use either Python or the command line interface (CLI). Here's an example for training a YOLOv8n-pose model for 100 epochs with an image size of 640: + +!!! Example + + === "Python" + + ```python + from ultralytics import YOLO + + # Load a model + model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training) + + # Train the model + results = model.train(data="hand-keypoints.yaml", epochs=100, imgsz=640) + ``` + + === "CLI" + + ```bash + # Start training from a pretrained *.pt model + yolo pose train data=hand-keypoints.yaml model=yolov8n-pose.pt epochs=100 imgsz=640 + ``` + +For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. + +### What are the key features of the Hand Keypoints dataset? + +The Hand Keypoints dataset is designed for advanced pose estimation tasks and includes several key features: + +- **Large Dataset**: Contains 26,768 images with hand keypoint annotations. +- **YOLOv8 Compatibility**: Ready for use with YOLOv8 models. +- **21 Keypoints**: Detailed hand pose representation, including wrist and finger joints. + +For more details, you can explore the [Hand Keypoints Dataset](#introduction) section. + +### What applications can benefit from using the Hand Keypoints dataset? + +The Hand Keypoints dataset can be applied in various fields, including: + +- **Gesture Recognition**: Enhancing human-computer interaction. +- **AR/VR Controls**: Improving user experience in augmented and virtual reality. +- **Robotic Manipulation**: Enabling precise control of robotic hands. +- **Healthcare**: Analyzing hand movements for medical diagnostics. +- **Animation**: Capturing motion for realistic animations. +- **Biometric Authentication**: Enhancing security systems. + +For more information, refer to the [Applications](#applications) section. + +### How is the Hand Keypoints dataset structured? + +The Hand Keypoints dataset is divided into two subsets: + +1. **Train**: Contains 18,776 images for training pose estimation models. +2. **Val**: Contains 7,992 images for validation purposes during model training. + +This structure ensures a comprehensive training and validation process. For more details, see the [Dataset Structure](#dataset-structure) section. + +### How do I use the dataset YAML file for training? + +The dataset configuration is defined in a YAML file, which includes paths, classes, and other relevant information. The `hand-keypoints.yaml` file can be found at [hand-keypoints.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/hand-keypoints.yaml). + +To use this YAML file for training, specify it in your training script or CLI command as shown in the training example above. For more details, refer to the [Dataset YAML](#dataset-yaml) section. diff --git a/docs/en/index.md b/docs/en/index.md index a25805c7..30bb1957 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -58,7 +58,7 @@ Explore the YOLOv8 Docs, a comprehensive resource designed to help you understan - **Predict** new images and videos with YOLOv8   [:octicons-image-16: Predict on Images](modes/predict.md){ .md-button } - **Train** a new YOLOv8 model on your own custom dataset   [:fontawesome-solid-brain: Train a Model](modes/train.md){ .md-button } - **Tasks** YOLOv8 tasks like segment, classify, pose and track   [:material-magnify-expand: Explore Tasks](tasks/index.md){ .md-button } -- **NEW 🚀 Explore** datasets with advanced semantic and SQL search   [:material-magnify-expand: Explore a Dataset](datasets/explorer/index.md){ .md-button } +- **[YOLO11](models/yolo11.md) NEW 🚀**: Ultralytics' latest SOTA models   [:material-magnify-expand: Explore a Dataset](models/yolo11.md){ .md-button }


@@ -84,6 +84,7 @@ Explore the YOLOv8 Docs, a comprehensive resource designed to help you understan - [YOLOv8](https://github.com/ultralytics/ultralytics) is the latest version of YOLO by Ultralytics. As a cutting-edge, state-of-the-art (SOTA) model, YOLOv8 builds on the success of previous versions, introducing new features and improvements for enhanced performance, flexibility, and efficiency. YOLOv8 supports a full range of vision AI tasks, including [detection](tasks/detect.md), [segmentation](tasks/segment.md), [pose estimation](tasks/pose.md), [tracking](modes/track.md), and [classification](tasks/classify.md). This versatility allows users to leverage YOLOv8's capabilities across diverse applications and domains. - [YOLOv9](models/yolov9.md) introduces innovative methods like Programmable Gradient Information (PGI) and the Generalized Efficient Layer Aggregation Network (GELAN). - [YOLOv10](models/yolov10.md) is created by researchers from [Tsinghua University](https://www.tsinghua.edu.cn/en/) using the [Ultralytics](https://www.ultralytics.com/) [Python package](https://pypi.org/project/ultralytics/). This version provides real-time [object detection](tasks/detect.md) advancements by introducing an End-to-End head that eliminates Non-Maximum Suppression (NMS) requirements. +- **[YOLO11](models/yolo11.md) NEW 🚀**: Ultralytics' latest YOLO models delivering state-of-the-art (SOTA) performance across multiple tasks. ## YOLO Licenses: How is Ultralytics YOLO licensed? diff --git a/docs/en/macros/augmentation-args.md b/docs/en/macros/augmentation-args.md index d8dbee85..b4d6c9df 100644 --- a/docs/en/macros/augmentation-args.md +++ b/docs/en/macros/augmentation-args.md @@ -1,19 +1,20 @@ -| Argument | Type | Default | Range | Description | -| --------------- | ------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. | -| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. | -| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. | -| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. | -| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. | -| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. | -| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. | -| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. | -| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. | -| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. | -| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. | -| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. | -| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. | -| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies objects from one image and pastes them onto another, useful for increasing object instances and learning object occlusion. | -| `auto_augment` | `str` | `randaugment` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. | -| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. | -| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. | +| Argument | Type | Default | Range | Description | +| ----------------- | ------- | ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. | +| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. | +| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. | +| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. | +| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. | +| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. | +| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. | +| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. | +| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. | +| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. | +| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. | +| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. | +| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. | +| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies objects from one image and pastes them onto another, useful for increasing object instances and learning object occlusion. | +| `copy_paste_mode` | `str` | `flip` | - | Copy-Paste augmentation method selection among the options of (`"flip"`, `"mixup"`). | +| `auto_augment` | `str` | `randaugment` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. | +| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. | +| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. | diff --git a/docs/en/models/index.md b/docs/en/models/index.md index c43af1f5..baa5c9b2 100644 --- a/docs/en/models/index.md +++ b/docs/en/models/index.md @@ -17,16 +17,17 @@ Here are some of the key models supported: 3. **[YOLOv5](yolov5.md)**: An improved version of the YOLO architecture by Ultralytics, offering better performance and speed trade-offs compared to previous versions. 4. **[YOLOv6](yolov6.md)**: Released by [Meituan](https://about.meituan.com/) in 2022, and in use in many of the company's autonomous delivery robots. 5. **[YOLOv7](yolov7.md)**: Updated YOLO models released in 2022 by the authors of YOLOv4. -6. **[YOLOv8](yolov8.md) NEW 🚀**: The latest version of the YOLO family, featuring enhanced capabilities such as [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), pose/keypoints estimation, and classification. +6. **[YOLOv8](yolov8.md)**: The latest version of the YOLO family, featuring enhanced capabilities such as [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), pose/keypoints estimation, and classification. 7. **[YOLOv9](yolov9.md)**: An experimental model trained on the Ultralytics [YOLOv5](yolov5.md) codebase implementing Programmable Gradient Information (PGI). 8. **[YOLOv10](yolov10.md)**: By Tsinghua University, featuring NMS-free training and efficiency-accuracy driven architecture, delivering state-of-the-art performance and latency. -9. **[Segment Anything Model (SAM)](sam.md)**: Meta's original Segment Anything Model (SAM). -10. **[Segment Anything Model 2 (SAM2)](sam-2.md)**: The next generation of Meta's Segment Anything Model (SAM) for videos and images. -11. **[Mobile Segment Anything Model (MobileSAM)](mobile-sam.md)**: MobileSAM for mobile applications, by Kyung Hee University. -12. **[Fast Segment Anything Model (FastSAM)](fast-sam.md)**: FastSAM by Image & Video Analysis Group, Institute of Automation, Chinese Academy of Sciences. -13. **[YOLO-NAS](yolo-nas.md)**: YOLO Neural Architecture Search (NAS) Models. -14. **[Realtime Detection Transformers (RT-DETR)](rtdetr.md)**: Baidu's PaddlePaddle Realtime Detection [Transformer](https://www.ultralytics.com/glossary/transformer) (RT-DETR) models. -15. **[YOLO-World](yolo-world.md)**: Real-time Open Vocabulary Object Detection models from Tencent AI Lab. +9. **[YOLO11](yolo11.md) NEW 🚀**: Ultralytics' latest YOLO models delivering state-of-the-art (SOTA) performance across multiple tasks. +10. **[Segment Anything Model (SAM)](sam.md)**: Meta's original Segment Anything Model (SAM). +11. **[Segment Anything Model 2 (SAM2)](sam-2.md)**: The next generation of Meta's Segment Anything Model (SAM) for videos and images. +12. **[Mobile Segment Anything Model (MobileSAM)](mobile-sam.md)**: MobileSAM for mobile applications, by Kyung Hee University. +13. **[Fast Segment Anything Model (FastSAM)](fast-sam.md)**: FastSAM by Image & Video Analysis Group, Institute of Automation, Chinese Academy of Sciences. +14. **[YOLO-NAS](yolo-nas.md)**: YOLO Neural Architecture Search (NAS) Models. +15. **[Realtime Detection Transformers (RT-DETR)](rtdetr.md)**: Baidu's PaddlePaddle Realtime Detection [Transformer](https://www.ultralytics.com/glossary/transformer) (RT-DETR) models. +16. **[YOLO-World](yolo-world.md)**: Real-time Open Vocabulary Object Detection models from Tencent AI Lab.


diff --git a/docs/en/models/yolo11.md b/docs/en/models/yolo11.md new file mode 100644 index 00000000..6827fdff --- /dev/null +++ b/docs/en/models/yolo11.md @@ -0,0 +1,228 @@ +--- +comments: true +description: Discover YOLO11, the latest advancement in state-of-the-art object detection, offering unmatched accuracy and efficiency for diverse computer vision tasks. +keywords: YOLO11, state-of-the-art object detection, YOLO series, Ultralytics, computer vision, AI, machine learning, deep learning +--- + +# Ultralytics YOLO11 + +## Overview + +YOLO11 is the latest iteration in the Ultralytics YOLO series of real-time object detectors, redefining what's possible with cutting-edge accuracy, speed, and efficiency. Building upon the impressive advancements of previous YOLO versions, YOLO11 introduces significant improvements in architecture and training methods, making it a versatile choice for a wide range of computer vision tasks. + +![Ultralytics YOLO11 Comparison Plots](https://github.com/user-attachments/assets/a311a4ed-bbf2-43b5-8012-5f183a28a845) + +

+
+ +
+ Watch: Ultralytics YOLO11 Announcement at #YV24 +

+ +## Key Features + +- **Enhanced Feature Extraction:** YOLO11 employs an improved backbone and neck architecture, which enhances [feature extraction](https://www.ultralytics.com/glossary/feature-extraction) capabilities for more precise object detection and complex task performance. +- **Optimized for Efficiency and Speed:** YOLO11 introduces refined architectural designs and optimized training pipelines, delivering faster processing speeds and maintaining an optimal balance between accuracy and performance. +- **Greater Accuracy with Fewer Parameters:** With advancements in model design, YOLO11m achieves a higher mean Average Precision (mAP) on the COCO dataset while using 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. +- **Adaptability Across Environments:** YOLO11 can be seamlessly deployed across various environments, including edge devices, cloud platforms, and systems supporting NVIDIA GPUs, ensuring maximum flexibility. +- **Broad Range of Supported Tasks:** Whether it's object detection, instance segmentation, image classification, pose estimation, or oriented object detection (OBB), YOLO11 is designed to cater to a diverse set of computer vision challenges. + +## Supported Tasks and Modes + +YOLO11 builds upon the versatile model range introduced in YOLOv8, offering enhanced support across various computer vision tasks: + +| Model | Filenames | Task | Inference | Validation | Training | Export | +| ----------- | ----------------------------------------------------------------------------------------- | -------------------------------------------- | --------- | ---------- | -------- | ------ | +| YOLO11 | `yolo11n.pt` `yolo11s.pt` `yolo11m.pt` `yolo11l.pt` `yolo11x.pt` | [Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ | +| YOLO11-seg | `yolo11n-seg.pt` `yolo11s-seg.pt` `yolo11m-seg.pt` `yolo11l-seg.pt` `yolo11x-seg.pt` | [Instance Segmentation](../tasks/segment.md) | ✅ | ✅ | ✅ | ✅ | +| YOLO11-pose | `yolo11n-pose.pt` `yolo11s-pose.pt` `yolo11m-pose.pt` `yolo11l-pose.pt` `yolo11x-pose.pt` | [Pose/Keypoints](../tasks/pose.md) | ✅ | ✅ | ✅ | ✅ | +| YOLO11-obb | `yolo11n-obb.pt` `yolo11s-obb.pt` `yolo11m-obb.pt` `yolo11l-obb.pt` `yolo11x-obb.pt` | [Oriented Detection](../tasks/obb.md) | ✅ | ✅ | ✅ | ✅ | +| YOLO11-cls | `yolo11n-cls.pt` `yolo11s-cls.pt` `yolo11m-cls.pt` `yolo11l-cls.pt` `yolo11x-cls.pt` | [Classification](../tasks/classify.md) | ✅ | ✅ | ✅ | ✅ | + +This table provides an overview of the YOLO11 model variants, showcasing their applicability in specific tasks and compatibility with operational modes such as Inference, Validation, Training, and Export. This flexibility makes YOLO11 suitable for a wide range of applications in computer vision, from real-time detection to complex segmentation tasks. + +## Performance Metrics + +!!! performance + + === "Detection (COCO)" + + See [Detection Docs](../tasks/detect.md) for usage examples with these models trained on [COCO](../datasets/detect/coco.md), which include 80 pre-trained classes. + + | Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | + | [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | + | [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | + | [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | + | [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | + | [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | + + === "Segmentation (COCO)" + + See [Segmentation Docs](../tasks/segment.md) for usage examples with these models trained on [COCO](../datasets/segment/coco.md), which include 80 pre-trained classes. + + | Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | + | [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | + | [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | + | [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | + | [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | + | [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | + + === "Classification (ImageNet)" + + See [Classification Docs](../tasks/classify.md) for usage examples with these models trained on [ImageNet](../datasets/classify/imagenet.md), which include 1000 pre-trained classes. + + | Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) at 640 | + | -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | --------------------------------------- | ------------------ | ------------------------ | + | [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | + | [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | + | [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | + | [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | + | [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | + + === "Pose (COCO)" + + See [Pose Estimation Docs](../tasks/pose.md) for usage examples with these models trained on [COCO](../datasets/pose/coco.md), which include 1 pre-trained class, 'person'. + + | Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | ---------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | + | [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | + | [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | + | [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | + | [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | + | [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | + + === "OBB (DOTAv1)" + + See [Oriented Detection Docs](../tasks/obb.md) for usage examples with these models trained on [DOTAv1](../datasets/obb/dota-v2.md#dota-v10), which include 15 pre-trained classes. + + | Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | + | [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | + | [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | + | [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | + | [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | + | [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | + +## Usage Examples + +This section provides simple YOLO11 training and inference examples. For full documentation on these and other [modes](../modes/index.md), see the [Predict](../modes/predict.md), [Train](../modes/train.md), [Val](../modes/val.md), and [Export](../modes/export.md) docs pages. + +Note that the example below is for YOLO11 [Detect](../tasks/detect.md) models for object detection. For additional supported tasks, see the [Segment](../tasks/segment.md), [Classify](../tasks/classify.md), [OBB](../tasks/obb.md), and [Pose](../tasks/pose.md) docs. + +!!! example + + === "Python" + + [PyTorch](https://www.ultralytics.com/glossary/pytorch) pretrained `*.pt` models as well as configuration `*.yaml` files can be passed to the `YOLO()` class to create a model instance in Python: + + ```python + from ultralytics import YOLO + + # Load a COCO-pretrained YOLO11n model + model = YOLO("yolo11n.pt") + + # Train the model on the COCO8 example dataset for 100 epochs + results = model.train(data="coco8.yaml", epochs=100, imgsz=640) + + # Run inference with the YOLO11n model on the 'bus.jpg' image + results = model("path/to/bus.jpg") + ``` + + === "CLI" + + CLI commands are available to directly run the models: + + ```bash + # Load a COCO-pretrained YOLO11n model and train it on the COCO8 example dataset for 100 epochs + yolo train model=yolo11n.pt data=coco8.yaml epochs=100 imgsz=640 + + # Load a COCO-pretrained YOLO11n model and run inference on the 'bus.jpg' image + yolo predict model=yolo11n.pt source=path/to/bus.jpg + ``` + +## Citations and Acknowledgements + +If you use YOLO11 or any other software from this repository in your work, please cite it using the following format: + +!!! quote "" + + === "BibTeX" + + ```bibtex + @software{yolo11_ultralytics, + author = {Glenn Jocher and Jing Qiu}, + title = {Ultralytics YOLO11}, + version = {11.0.0}, + year = {2024}, + url = {https://github.com/ultralytics/ultralytics}, + orcid = {0000-0001-5950-6979, 0000-0002-7603-6750, 0000-0003-3783-7069}, + license = {AGPL-3.0} + } + ``` + +Please note that the DOI is pending and will be added to the citation once it is available. YOLO11 models are provided under [AGPL-3.0](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) and [Enterprise](https://www.ultralytics.com/license) licenses. + +## FAQ + +### What are the key improvements in Ultralytics YOLO11 compared to previous versions? + +Ultralytics YOLO11 introduces several significant advancements over its predecessors. Key improvements include: + +- **Enhanced Feature Extraction:** YOLO11 employs an improved backbone and neck architecture, enhancing [feature extraction](https://www.ultralytics.com/glossary/feature-extraction) capabilities for more precise object detection. +- **Optimized Efficiency and Speed:** Refined architectural designs and optimized training pipelines deliver faster processing speeds while maintaining a balance between accuracy and performance. +- **Greater Accuracy with Fewer Parameters:** YOLO11m achieves higher mean Average Precision (mAP) on the COCO dataset with 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. +- **Adaptability Across Environments:** YOLO11 can be deployed across various environments, including edge devices, cloud platforms, and systems supporting NVIDIA GPUs. +- **Broad Range of Supported Tasks:** YOLO11 supports diverse computer vision tasks such as object detection, instance segmentation, image classification, pose estimation, and oriented object detection (OBB). + +### How do I train a YOLO11 model for object detection? + +Training a YOLO11 model for object detection can be done using Python or CLI commands. Below are examples for both methods: + +!!! Example + + === "Python" + + ```python + from ultralytics import YOLO + + # Load a COCO-pretrained YOLO11n model + model = YOLO("yolo11n.pt") + + # Train the model on the COCO8 example dataset for 100 epochs + results = model.train(data="coco8.yaml", epochs=100, imgsz=640) + ``` + + === "CLI" + + ```bash + # Load a COCO-pretrained YOLO11n model and train it on the COCO8 example dataset for 100 epochs + yolo train model=yolo11n.pt data=coco8.yaml epochs=100 imgsz=640 + ``` + +For more detailed instructions, refer to the [Train](../modes/train.md) documentation. + +### What tasks can YOLO11 models perform? + +YOLO11 models are versatile and support a wide range of computer vision tasks, including: + +- **Object Detection:** Identifying and locating objects within an image. +- **Instance Segmentation:** Detecting objects and delineating their boundaries. +- **Image Classification:** Categorizing images into predefined classes. +- **Pose Estimation:** Detecting and tracking keypoints on human bodies. +- **Oriented Object Detection (OBB):** Detecting objects with rotation for higher precision. + +For more information on each task, see the [Detection](../tasks/detect.md), [Instance Segmentation](../tasks/segment.md), [Classification](../tasks/classify.md), [Pose Estimation](../tasks/pose.md), and [Oriented Detection](../tasks/obb.md) documentation. + +### How does YOLO11 achieve greater accuracy with fewer parameters? + +YOLO11 achieves greater accuracy with fewer parameters through advancements in model design and optimization techniques. The improved architecture allows for efficient feature extraction and processing, resulting in higher mean Average Precision (mAP) on datasets like COCO while using 22% fewer parameters than YOLOv8m. This makes YOLO11 computationally efficient without compromising on accuracy, making it suitable for deployment on resource-constrained devices. + +### Can YOLO11 be deployed on edge devices? + +Yes, YOLO11 is designed for adaptability across various environments, including edge devices. Its optimized architecture and efficient processing capabilities make it suitable for deployment on edge devices, cloud platforms, and systems supporting NVIDIA GPUs. This flexibility ensures that YOLO11 can be used in diverse applications, from real-time detection on mobile devices to complex segmentation tasks in cloud environments. For more details on deployment options, refer to the [Export](../modes/export.md) documentation. diff --git a/docs/en/models/yolov8.md b/docs/en/models/yolov8.md index f7a32ef0..036cd305 100644 --- a/docs/en/models/yolov8.md +++ b/docs/en/models/yolov8.md @@ -4,7 +4,7 @@ description: Discover YOLOv8, the latest advancement in real-time object detecti keywords: YOLOv8, real-time object detection, YOLO series, Ultralytics, computer vision, advanced object detection, AI, machine learning, deep learning --- -# YOLOv8 +# Ultralytics YOLOv8 ## Overview diff --git a/docs/en/reference/nn/modules/block.md b/docs/en/reference/nn/modules/block.md index ed7a94ac..da0ca655 100644 --- a/docs/en/reference/nn/modules/block.md +++ b/docs/en/reference/nn/modules/block.md @@ -143,6 +143,18 @@ keywords: Ultralytics, YOLO, neural networks, block modules, DFL, Proto, HGStem,



+## ::: ultralytics.nn.modules.block.C3f + +



+ +## ::: ultralytics.nn.modules.block.C3k2 + +



+ +## ::: ultralytics.nn.modules.block.C3k + +



+ ## ::: ultralytics.nn.modules.block.RepVGGDW



@@ -159,10 +171,22 @@ keywords: Ultralytics, YOLO, neural networks, block modules, DFL, Proto, HGStem,



+## ::: ultralytics.nn.modules.block.PSABlock + +



+ ## ::: ultralytics.nn.modules.block.PSA



+## ::: ultralytics.nn.modules.block.C2PSA + +



+ +## ::: ultralytics.nn.modules.block.C2fPSA + +



+ ## ::: ultralytics.nn.modules.block.SCDown

diff --git a/docs/mkdocs_github_authors.yaml b/docs/mkdocs_github_authors.yaml index e76e6a2e..4f7f3b3a 100644 --- a/docs/mkdocs_github_authors.yaml +++ b/docs/mkdocs_github_authors.yaml @@ -1,6 +1,9 @@ 116908874+jk4e@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/116908874?v=4 username: jk4e +1185102784@qq.com: + avatar: null + username: null 130829914+IvorZhu331@users.noreply.github.com: avatar: https://avatars.githubusercontent.com/u/130829914?v=4 username: IvorZhu331 diff --git a/examples/YOLOv8-ONNXRuntime-CPP/inference.cpp b/examples/YOLOv8-ONNXRuntime-CPP/inference.cpp index 2ee993ee..a65391f5 100644 --- a/examples/YOLOv8-ONNXRuntime-CPP/inference.cpp +++ b/examples/YOLOv8-ONNXRuntime-CPP/inference.cpp @@ -238,9 +238,9 @@ char* YOLO_V8::TensorProcess(clock_t& starttime_1, cv::Mat& iImg, N& blob, std:: rawData = cv::Mat(signalResultNum, strideNum, CV_16F, output); rawData.convertTo(rawData, CV_32F); } - //Note: - //ultralytics add transpose operator to the output of yolov8 model.which make yolov8/v5/v7 has same shape - //https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt + // Note: + // ultralytics add transpose operator to the output of yolov8 model.which make yolov8/v5/v7 has same shape + // https://github.com/ultralytics/assets/releases/download/v8.3.0/yolov8n.pt rawData = rawData.t(); float* data = (float*)rawData.data; diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb index 8fbe02d0..996db092 100644 --- a/examples/tutorial.ipynb +++ b/examples/tutorial.ipynb @@ -114,7 +114,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to 'yolov8n.pt'...\n", + "Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolov8n.pt to 'yolov8n.pt'...\n", "100% 6.23M/6.23M [00:00<00:00, 83.2MB/s]\n", "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", "YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n", diff --git a/mkdocs.yml b/mkdocs.yml index 4dcc94d0..365508fe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -251,6 +251,7 @@ nav: - YOLOv8: models/yolov8.md - YOLOv9: models/yolov9.md - YOLOv10: models/yolov10.md + - YOLO11: models/yolo11.md - SAM (Segment Anything Model): models/sam.md - SAM 2 (Segment Anything Model 2): models/sam-2.md - MobileSAM (Mobile Segment Anything Model): models/mobile-sam.md diff --git a/tests/__init__.py b/tests/__init__.py index ea6b3982..ea8afff5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -3,8 +3,8 @@ from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks # Constants used in tests -MODEL = WEIGHTS_DIR / "path with spaces" / "yolov8n.pt" # test spaces in path -CFG = "yolov8n.yaml" +MODEL = WEIGHTS_DIR / "path with spaces" / "yolo11n.pt" # test spaces in path +CFG = "yolo11n.yaml" SOURCE = ASSETS / "bus.jpg" SOURCES_LIST = [ASSETS / "bus.jpg", ASSETS, ASSETS / "*", ASSETS / "**/*.jpg"] TMP = (ROOT / "../tests/tmp").resolve() # temp directory for test files diff --git a/tests/conftest.py b/tests/conftest.py index faba91b2..7b0539b4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -74,7 +74,7 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config): # Remove files models = [path for x in ["*.onnx", "*.torchscript"] for path in WEIGHTS_DIR.rglob(x)] - for file in ["bus.jpg", "yolov8n.onnx", "yolov8n.torchscript"] + models: + for file in ["bus.jpg", "yolo11n.onnx", "yolo11n.torchscript"] + models: Path(file).unlink(missing_ok=True) # Remove directories diff --git a/tests/test_cuda.py b/tests/test_cuda.py index 3c3ba174..0b3429d0 100644 --- a/tests/test_cuda.py +++ b/tests/test_cuda.py @@ -60,7 +60,7 @@ def test_train(): @pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason="CUDA is not available") def test_predict_multiple_devices(): """Validate model prediction consistency across CPU and CUDA devices.""" - model = YOLO("yolov8n.pt") + model = YOLO("yolo11n.pt") model = model.cpu() assert str(model.device) == "cpu" _ = model(SOURCE) # CPU inference diff --git a/tests/test_engine.py b/tests/test_engine.py index 92373044..aa4b671e 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -21,13 +21,13 @@ def test_export(): exporter = Exporter() exporter.add_callback("on_export_start", test_func) assert test_func in exporter.callbacks["on_export_start"], "callback test failed" - f = exporter(model=YOLO("yolov8n.yaml").model) + f = exporter(model=YOLO("yolo11n.yaml").model) YOLO(f)(ASSETS) # exported model inference def test_detect(): """Test YOLO object detection training, validation, and prediction functionality.""" - overrides = {"data": "coco8.yaml", "model": "yolov8n.yaml", "imgsz": 32, "epochs": 1, "save": False} + overrides = {"data": "coco8.yaml", "model": "yolo11n.yaml", "imgsz": 32, "epochs": 1, "save": False} cfg = get_cfg(DEFAULT_CFG) cfg.data = "coco8.yaml" cfg.imgsz = 32 @@ -66,7 +66,7 @@ def test_detect(): def test_segment(): """Tests image segmentation training, validation, and prediction pipelines using YOLO models.""" - overrides = {"data": "coco8-seg.yaml", "model": "yolov8n-seg.yaml", "imgsz": 32, "epochs": 1, "save": False} + overrides = {"data": "coco8-seg.yaml", "model": "yolo11n-seg.yaml", "imgsz": 32, "epochs": 1, "save": False} cfg = get_cfg(DEFAULT_CFG) cfg.data = "coco8-seg.yaml" cfg.imgsz = 32 @@ -88,7 +88,7 @@ def test_segment(): pred = segment.SegmentationPredictor(overrides={"imgsz": [64, 64]}) pred.add_callback("on_predict_start", test_func) assert test_func in pred.callbacks["on_predict_start"], "callback test failed" - result = pred(source=ASSETS, model=WEIGHTS_DIR / "yolov8n-seg.pt") + result = pred(source=ASSETS, model=WEIGHTS_DIR / "yolo11n-seg.pt") assert len(result), "predictor test failed" # Test resume @@ -105,7 +105,7 @@ def test_segment(): def test_classify(): """Test image classification including training, validation, and prediction phases.""" - overrides = {"data": "imagenet10", "model": "yolov8n-cls.yaml", "imgsz": 32, "epochs": 1, "save": False} + overrides = {"data": "imagenet10", "model": "yolo11n-cls.yaml", "imgsz": 32, "epochs": 1, "save": False} cfg = get_cfg(DEFAULT_CFG) cfg.data = "imagenet10" cfg.imgsz = 32 diff --git a/tests/test_explorer.py b/tests/test_explorer.py index b13bb868..45b0a31e 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -30,7 +30,7 @@ def test_similarity(): @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13") def test_det(): """Test detection functionalities and verify embedding table includes bounding boxes.""" - exp = Explorer(data="coco8.yaml", model="yolov8n.pt") + exp = Explorer(data="coco8.yaml", model="yolo11n.pt") exp.create_embeddings_table(force=True) assert len(exp.table.head()["bboxes"]) > 0 similar = exp.get_similar(idx=[1, 2], limit=10) @@ -44,7 +44,7 @@ def test_det(): @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13") def test_seg(): """Test segmentation functionalities and ensure the embedding table includes segmentation masks.""" - exp = Explorer(data="coco8-seg.yaml", model="yolov8n-seg.pt") + exp = Explorer(data="coco8-seg.yaml", model="yolo11n-seg.pt") exp.create_embeddings_table(force=True) assert len(exp.table.head()["masks"]) > 0 similar = exp.get_similar(idx=[1, 2], limit=10) @@ -57,7 +57,7 @@ def test_seg(): @pytest.mark.skipif(not TORCH_1_13, reason="Explorer requires torch>=1.13") def test_pose(): """Test pose estimation functionality and verify the embedding table includes keypoints.""" - exp = Explorer(data="coco8-pose.yaml", model="yolov8n-pose.pt") + exp = Explorer(data="coco8-pose.yaml", model="yolo11n-pose.pt") exp.create_embeddings_table(force=True) assert len(exp.table.head()["keypoints"]) > 0 similar = exp.get_similar(idx=[1, 2], limit=10) diff --git a/tests/test_integrations.py b/tests/test_integrations.py index 3a0d1b48..4c8e0669 100644 --- a/tests/test_integrations.py +++ b/tests/test_integrations.py @@ -17,7 +17,7 @@ @pytest.mark.skipif(not check_requirements("ray", install=False), reason="ray[tune] not installed") def test_model_ray_tune(): """Tune YOLO model using Ray for hyperparameter optimization.""" - YOLO("yolov8n-cls.yaml").tune( + YOLO("yolo11n-cls.yaml").tune( use_ray=True, data="imagenet10", grace_period=1, iterations=1, imgsz=32, epochs=1, plots=False, device="cpu" ) @@ -26,7 +26,7 @@ def test_model_ray_tune(): def test_mlflow(): """Test training with MLflow tracking enabled (see https://mlflow.org/ for details).""" SETTINGS["mlflow"] = True - YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=3, plots=False, device="cpu") + YOLO("yolo11n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=3, plots=False, device="cpu") SETTINGS["mlflow"] = False @@ -42,7 +42,7 @@ def test_mlflow_keep_run_active(): # Test with MLFLOW_KEEP_RUN_ACTIVE=True os.environ["MLFLOW_KEEP_RUN_ACTIVE"] = "True" - YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") + YOLO("yolo11n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") status = mlflow.active_run().info.status assert status == "RUNNING", "MLflow run should be active when MLFLOW_KEEP_RUN_ACTIVE=True" @@ -50,13 +50,13 @@ def test_mlflow_keep_run_active(): # Test with MLFLOW_KEEP_RUN_ACTIVE=False os.environ["MLFLOW_KEEP_RUN_ACTIVE"] = "False" - YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") + YOLO("yolo11n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") status = mlflow.get_run(run_id=run_id).info.status assert status == "FINISHED", "MLflow run should be ended when MLFLOW_KEEP_RUN_ACTIVE=False" # Test with MLFLOW_KEEP_RUN_ACTIVE not set os.environ.pop("MLFLOW_KEEP_RUN_ACTIVE", None) - YOLO("yolov8n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") + YOLO("yolo11n-cls.yaml").train(data="imagenet10", imgsz=32, epochs=1, plots=False, device="cpu") status = mlflow.get_run(run_id=run_id).info.status assert status == "FINISHED", "MLflow run should be ended by default when MLFLOW_KEEP_RUN_ACTIVE is not set" SETTINGS["mlflow"] = False @@ -126,23 +126,23 @@ def test_pycocotools(): from ultralytics.models.yolo.segment import SegmentationValidator # Download annotations after each dataset downloads first - url = "https://github.com/ultralytics/assets/releases/download/v8.2.0/" + url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/" - args = {"model": "yolov8n.pt", "data": "coco8.yaml", "save_json": True, "imgsz": 64} + args = {"model": "yolo11n.pt", "data": "coco8.yaml", "save_json": True, "imgsz": 64} validator = DetectionValidator(args=args) validator() validator.is_coco = True download(f"{url}instances_val2017.json", dir=DATASETS_DIR / "coco8/annotations") _ = validator.eval_json(validator.stats) - args = {"model": "yolov8n-seg.pt", "data": "coco8-seg.yaml", "save_json": True, "imgsz": 64} + args = {"model": "yolo11n-seg.pt", "data": "coco8-seg.yaml", "save_json": True, "imgsz": 64} validator = SegmentationValidator(args=args) validator() validator.is_coco = True download(f"{url}instances_val2017.json", dir=DATASETS_DIR / "coco8-seg/annotations") _ = validator.eval_json(validator.stats) - args = {"model": "yolov8n-pose.pt", "data": "coco8-pose.yaml", "save_json": True, "imgsz": 64} + args = {"model": "yolo11n-pose.pt", "data": "coco8-pose.yaml", "save_json": True, "imgsz": 64} validator = PoseValidator(args=args) validator() validator.is_coco = True diff --git a/tests/test_python.py b/tests/test_python.py index 55f087f0..117e6f80 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -211,7 +211,7 @@ def test_train_scratch(): def test_train_pretrained(): """Test training of the YOLO model starting from a pre-trained checkpoint.""" - model = YOLO(WEIGHTS_DIR / "yolov8n-seg.pt") + model = YOLO(WEIGHTS_DIR / "yolo11n-seg.pt") model.train(data="coco8-seg.yaml", epochs=1, imgsz=32, cache="ram", copy_paste=0.5, mixup=0.5, name=0) model(SOURCE) @@ -281,13 +281,13 @@ def test_results(model): def test_labels_and_crops(): """Test output from prediction args for saving YOLO detection labels and crops; ensures accurate saving.""" imgs = [SOURCE, ASSETS / "zidane.jpg"] - results = YOLO(WEIGHTS_DIR / "yolov8n.pt")(imgs, imgsz=160, save_txt=True, save_crop=True) + results = YOLO(WEIGHTS_DIR / "yolo11n.pt")(imgs, imgsz=160, save_txt=True, save_crop=True) save_path = Path(results[0].save_dir) for r in results: im_name = Path(r.path).stem cls_idxs = r.boxes.cls.int().tolist() # Check correct detections - assert cls_idxs == ([0, 0, 5, 0, 7] if r.path.endswith("bus.jpg") else [0, 0]) # bus.jpg and zidane.jpg classes + assert cls_idxs == ([0, 7, 0, 0] if r.path.endswith("bus.jpg") else [0, 0, 0]) # bus.jpg and zidane.jpg classes # Check label path labels = save_path / f"labels/{im_name}.txt" assert labels.exists() @@ -339,7 +339,7 @@ def test_data_annotator(): auto_annotate( ASSETS, - det_model=WEIGHTS_DIR / "yolov8n.pt", + det_model=WEIGHTS_DIR / "yolo11n.pt", sam_model=WEIGHTS_DIR / "mobile_sam.pt", output_dir=TMP / "auto_annotate_labels", ) @@ -393,7 +393,7 @@ def test_utils_benchmarks(): """Benchmark model performance using 'ProfileModels' from 'ultralytics.utils.benchmarks'.""" from ultralytics.utils.benchmarks import ProfileModels - ProfileModels(["yolov8n.yaml"], imgsz=32, min_time=1, num_timed_runs=3, num_warmup_runs=1).profile() + ProfileModels(["yolo11n.yaml"], imgsz=32, min_time=1, num_timed_runs=3, num_warmup_runs=1).profile() def test_utils_torchutils(): @@ -568,14 +568,14 @@ def test_classify_transforms_train(image, auto_augment, erasing, force_color_jit @pytest.mark.skipif(not ONLINE, reason="environment is offline") def test_model_tune(): """Tune YOLO model for performance improvement.""" - YOLO("yolov8n-pose.pt").tune(data="coco8-pose.yaml", plots=False, imgsz=32, epochs=1, iterations=2, device="cpu") - YOLO("yolov8n-cls.pt").tune(data="imagenet10", plots=False, imgsz=32, epochs=1, iterations=2, device="cpu") + YOLO("yolo11n-pose.pt").tune(data="coco8-pose.yaml", plots=False, imgsz=32, epochs=1, iterations=2, device="cpu") + YOLO("yolo11n-cls.pt").tune(data="imagenet10", plots=False, imgsz=32, epochs=1, iterations=2, device="cpu") def test_model_embeddings(): """Test YOLO model embeddings.""" model_detect = YOLO(MODEL) - model_segment = YOLO(WEIGHTS_DIR / "yolov8n-seg.pt") + model_segment = YOLO(WEIGHTS_DIR / "yolo11n-seg.pt") for batch in [SOURCE], [SOURCE, SOURCE]: # test batch size 1 and 2 assert len(model_detect.embed(source=batch, imgsz=32)) == len(batch) @@ -585,11 +585,11 @@ def test_model_embeddings(): @pytest.mark.skipif(checks.IS_PYTHON_3_12, reason="YOLOWorld with CLIP is not supported in Python 3.12") def test_yolo_world(): """Tests YOLO world models with CLIP support, including detection and training scenarios.""" - model = YOLO("yolov8s-world.pt") # no YOLOv8n-world model yet + model = YOLO("yolov8s-world.pt") # no YOLO11n-world model yet model.set_classes(["tree", "window"]) model(SOURCE, conf=0.01) - model = YOLO("yolov8s-worldv2.pt") # no YOLOv8n-world model yet + model = YOLO("yolov8s-worldv2.pt") # no YOLO11n-world model yet # Training from a pretrained model. Eval is included at the final stage of training. # Use dota8.yaml which has fewer categories to reduce the inference time of CLIP model model.train( @@ -603,7 +603,7 @@ def test_yolo_world(): # test WorWorldTrainerFromScratch from ultralytics.models.yolo.world.train_world import WorldTrainerFromScratch - model = YOLO("yolov8s-worldv2.yaml") # no YOLOv8n-world model yet + model = YOLO("yolov8s-worldv2.yaml") # no YOLO11n-world model yet model.train( data={"train": {"yolo_data": ["dota8.yaml"]}, "val": {"yolo_data": ["dota8.yaml"]}}, epochs=1, diff --git a/tests/test_solutions.py b/tests/test_solutions.py index fec1d74d..fabec621 100644 --- a/tests/test_solutions.py +++ b/tests/test_solutions.py @@ -14,7 +14,7 @@ def test_major_solutions(): """Test the object counting, heatmap, speed estimation and queue management solution.""" safe_download(url=MAJOR_SOLUTIONS_DEMO) - model = YOLO("yolov8n.pt") + model = YOLO("yolo11n.pt") names = model.names cap = cv2.VideoCapture("solutions_ci_demo.mp4") assert cap.isOpened(), "Error reading video file" @@ -41,7 +41,7 @@ def test_major_solutions(): def test_aigym(): """Test the workouts monitoring solution.""" safe_download(url=WORKOUTS_SOLUTION_DEMO) - model = YOLO("yolov8n-pose.pt") + model = YOLO("yolo11n-pose.pt") cap = cv2.VideoCapture("solution_ci_pose_demo.mp4") assert cap.isOpened(), "Error reading video file" gym_object = solutions.AIGym(line_thickness=2, pose_type="squat", kpts_to_check=[5, 11, 13]) @@ -60,7 +60,7 @@ def test_instance_segmentation(): """Test the instance segmentation solution.""" from ultralytics.utils.plotting import Annotator, colors - model = YOLO("yolov8n-seg.pt") + model = YOLO("yolo11n-seg.pt") names = model.names cap = cv2.VideoCapture("solutions_ci_demo.mp4") assert cap.isOpened(), "Error reading video file" diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index a91448fc..62505fbd 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,7 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.103" - +__version__ = "8.3.0" import os diff --git a/ultralytics/cfg/default.yaml b/ultralytics/cfg/default.yaml index a44f6094..da616d65 100644 --- a/ultralytics/cfg/default.yaml +++ b/ultralytics/cfg/default.yaml @@ -115,6 +115,7 @@ bgr: 0.0 # (float) image channel BGR (probability) mosaic: 1.0 # (float) image mosaic (probability) mixup: 0.0 # (float) image mixup (probability) copy_paste: 0.0 # (float) segment copy-paste (probability) +copy_paste_mode: "flip" # (str) the method to do copy_paste augmentation (flip, mixup) auto_augment: randaugment # (str) auto augmentation policy for classification (randaugment, autoaugment, augmix) erasing: 0.4 # (float) probability of random erasing during classification training (0-0.9), 0 means no erasing, must be less than 1.0. crop_fraction: 1.0 # (float) image crop fraction for classification (0.1-1), 1.0 means no crop, must be greater than 0. diff --git a/ultralytics/cfg/models/11/yolo11-cls.yaml b/ultralytics/cfg/models/11/yolo11-cls.yaml new file mode 100644 index 00000000..ea21e792 --- /dev/null +++ b/ultralytics/cfg/models/11/yolo11-cls.yaml @@ -0,0 +1,30 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# YOLO11-cls image classification model. For Usage examples see https://docs.ultralytics.com/tasks/classify + +# Parameters +nc: 80 # number of classes +scales: # model compound scaling constants, i.e. 'model=yolo11n-cls.yaml' will call yolo11-cls.yaml with scale 'n' + # [depth, width, max_channels] + n: [0.50, 0.25, 1024] # summary: 151 layers, 1633584 parameters, 1633584 gradients, 3.3 GFLOPs + s: [0.50, 0.50, 1024] # summary: 151 layers, 5545488 parameters, 5545488 gradients, 12.2 GFLOPs + m: [0.50, 1.00, 512] # summary: 187 layers, 10455696 parameters, 10455696 gradients, 39.7 GFLOPs + l: [1.00, 1.00, 512] # summary: 309 layers, 12937104 parameters, 12937104 gradients, 49.9 GFLOPs + x: [1.00, 1.50, 512] # summary: 309 layers, 28458544 parameters, 28458544 gradients, 111.1 GFLOPs + +# YOLO11n backbone +backbone: + # [from, repeats, module, args] + - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 + - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 + - [-1, 2, C3k2, [256, False, 0.25]] + - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 + - [-1, 2, C3k2, [512, False, 0.25]] + - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 + - [-1, 2, C3k2, [512, True]] + - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 + - [-1, 2, C3k2, [1024, True]] + - [-1, 2, C2PSA, [1024]] # 9 + +# YOLO11n head +head: + - [-1, 1, Classify, [nc]] # Classify diff --git a/ultralytics/cfg/models/11/yolo11-obb.yaml b/ultralytics/cfg/models/11/yolo11-obb.yaml new file mode 100644 index 00000000..5540ed75 --- /dev/null +++ b/ultralytics/cfg/models/11/yolo11-obb.yaml @@ -0,0 +1,47 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# YOLO11 Oriented Bounding Boxes (OBB) model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/obb + +# Parameters +nc: 80 # number of classes +scales: # model compound scaling constants, i.e. 'model=yolo11n-obb.yaml' will call yolo11-obb.yaml with scale 'n' + # [depth, width, max_channels] + n: [0.50, 0.25, 1024] # summary: 344 layers, 2695747 parameters, 2695731 gradients, 6.9 GFLOPs + s: [0.50, 0.50, 1024] # summary: 344 layers, 9744931 parameters, 9744915 gradients, 22.7 GFLOPs + m: [0.50, 1.00, 512] # summary: 434 layers, 20963523 parameters, 20963507 gradients, 72.2 GFLOPs + l: [1.00, 1.00, 512] # summary: 656 layers, 26220995 parameters, 26220979 gradients, 91.3 GFLOPs + x: [1.00, 1.50, 512] # summary: 656 layers, 58875331 parameters, 58875315 gradients, 204.3 GFLOPs + +# YOLO11n backbone +backbone: + # [from, repeats, module, args] + - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 + - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 + - [-1, 2, C3k2, [256, False, 0.25]] + - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 + - [-1, 2, C3k2, [512, False, 0.25]] + - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 + - [-1, 2, C3k2, [512, True]] + - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 + - [-1, 2, C3k2, [1024, True]] + - [-1, 1, SPPF, [1024, 5]] # 9 + - [-1, 2, C2PSA, [1024]] # 10 + +# YOLO11n head +head: + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 6], 1, Concat, [1]] # cat backbone P4 + - [-1, 2, C3k2, [512, False]] # 13 + + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 4], 1, Concat, [1]] # cat backbone P3 + - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small) + + - [-1, 1, Conv, [256, 3, 2]] + - [[-1, 13], 1, Concat, [1]] # cat head P4 + - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium) + + - [-1, 1, Conv, [512, 3, 2]] + - [[-1, 10], 1, Concat, [1]] # cat head P5 + - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large) + + - [[16, 19, 22], 1, OBB, [nc, 1]] # Detect(P3, P4, P5) diff --git a/ultralytics/cfg/models/11/yolo11-pose.yaml b/ultralytics/cfg/models/11/yolo11-pose.yaml new file mode 100644 index 00000000..a744a33b --- /dev/null +++ b/ultralytics/cfg/models/11/yolo11-pose.yaml @@ -0,0 +1,48 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# YOLO11-pose keypoints/pose estimation model. For Usage examples see https://docs.ultralytics.com/tasks/pose + +# Parameters +nc: 80 # number of classes +kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible) +scales: # model compound scaling constants, i.e. 'model=yolo11n-pose.yaml' will call yolo11.yaml with scale 'n' + # [depth, width, max_channels] + n: [0.50, 0.25, 1024] # summary: 344 layers, 2908507 parameters, 2908491 gradients, 7.7 GFLOPs + s: [0.50, 0.50, 1024] # summary: 344 layers, 9948811 parameters, 9948795 gradients, 23.5 GFLOPs + m: [0.50, 1.00, 512] # summary: 434 layers, 20973273 parameters, 20973257 gradients, 72.3 GFLOPs + l: [1.00, 1.00, 512] # summary: 656 layers, 26230745 parameters, 26230729 gradients, 91.4 GFLOPs + x: [1.00, 1.50, 512] # summary: 656 layers, 58889881 parameters, 58889865 gradients, 204.3 GFLOPs + +# YOLO11n backbone +backbone: + # [from, repeats, module, args] + - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 + - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 + - [-1, 2, C3k2, [256, False, 0.25]] + - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 + - [-1, 2, C3k2, [512, False, 0.25]] + - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 + - [-1, 2, C3k2, [512, True]] + - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 + - [-1, 2, C3k2, [1024, True]] + - [-1, 1, SPPF, [1024, 5]] # 9 + - [-1, 2, C2PSA, [1024]] # 10 + +# YOLO11n head +head: + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 6], 1, Concat, [1]] # cat backbone P4 + - [-1, 2, C3k2, [512, False]] # 13 + + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 4], 1, Concat, [1]] # cat backbone P3 + - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small) + + - [-1, 1, Conv, [256, 3, 2]] + - [[-1, 13], 1, Concat, [1]] # cat head P4 + - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium) + + - [-1, 1, Conv, [512, 3, 2]] + - [[-1, 10], 1, Concat, [1]] # cat head P5 + - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large) + + - [[16, 19, 22], 1, Pose, [nc, kpt_shape]] # Detect(P3, P4, P5) diff --git a/ultralytics/cfg/models/11/yolo11-seg.yaml b/ultralytics/cfg/models/11/yolo11-seg.yaml new file mode 100644 index 00000000..0f02d96c --- /dev/null +++ b/ultralytics/cfg/models/11/yolo11-seg.yaml @@ -0,0 +1,47 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# YOLO11-seg instance segmentation model. For Usage examples see https://docs.ultralytics.com/tasks/segment + +# Parameters +nc: 80 # number of classes +scales: # model compound scaling constants, i.e. 'model=yolo11n-seg.yaml' will call yolo11-seg.yaml with scale 'n' + # [depth, width, max_channels] + n: [0.50, 0.25, 1024] # summary: 355 layers, 2876848 parameters, 2876832 gradients, 10.5 GFLOPs + s: [0.50, 0.50, 1024] # summary: 355 layers, 10113248 parameters, 10113232 gradients, 35.8 GFLOPs + m: [0.50, 1.00, 512] # summary: 445 layers, 22420896 parameters, 22420880 gradients, 123.9 GFLOPs + l: [1.00, 1.00, 512] # summary: 667 layers, 27678368 parameters, 27678352 gradients, 143.0 GFLOPs + x: [1.00, 1.50, 512] # summary: 667 layers, 62142656 parameters, 62142640 gradients, 320.2 GFLOPs + +# YOLO11n backbone +backbone: + # [from, repeats, module, args] + - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 + - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 + - [-1, 2, C3k2, [256, False, 0.25]] + - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 + - [-1, 2, C3k2, [512, False, 0.25]] + - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 + - [-1, 2, C3k2, [512, True]] + - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 + - [-1, 2, C3k2, [1024, True]] + - [-1, 1, SPPF, [1024, 5]] # 9 + - [-1, 2, C2PSA, [1024]] # 10 + +# YOLO11n head +head: + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 6], 1, Concat, [1]] # cat backbone P4 + - [-1, 2, C3k2, [512, False]] # 13 + + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 4], 1, Concat, [1]] # cat backbone P3 + - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small) + + - [-1, 1, Conv, [256, 3, 2]] + - [[-1, 13], 1, Concat, [1]] # cat head P4 + - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium) + + - [-1, 1, Conv, [512, 3, 2]] + - [[-1, 10], 1, Concat, [1]] # cat head P5 + - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large) + + - [[16, 19, 22], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) diff --git a/ultralytics/cfg/models/11/yolo11.yaml b/ultralytics/cfg/models/11/yolo11.yaml new file mode 100644 index 00000000..8d06a129 --- /dev/null +++ b/ultralytics/cfg/models/11/yolo11.yaml @@ -0,0 +1,47 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# YOLO11 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect + +# Parameters +nc: 80 # number of classes +scales: # model compound scaling constants, i.e. 'model=yolo11n.yaml' will call yolo11.yaml with scale 'n' + # [depth, width, max_channels] + n: [0.50, 0.25, 1024] # summary: 319 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs + s: [0.50, 0.50, 1024] # summary: 319 layers, 9458752 parameters, 9458736 gradients, 21.7 GFLOPs + m: [0.50, 1.00, 512] # summary: 409 layers, 20114688 parameters, 20114672 gradients, 68.5 GFLOPs + l: [1.00, 1.00, 512] # summary: 631 layers, 25372160 parameters, 25372144 gradients, 87.6 GFLOPs + x: [1.00, 1.50, 512] # summary: 631 layers, 56966176 parameters, 56966160 gradients, 196.0 GFLOPs + +# YOLO11n backbone +backbone: + # [from, repeats, module, args] + - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 + - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 + - [-1, 2, C3k2, [256, False, 0.25]] + - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 + - [-1, 2, C3k2, [512, False, 0.25]] + - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 + - [-1, 2, C3k2, [512, True]] + - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 + - [-1, 2, C3k2, [1024, True]] + - [-1, 1, SPPF, [1024, 5]] # 9 + - [-1, 2, C2PSA, [1024]] # 10 + +# YOLO11n head +head: + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 6], 1, Concat, [1]] # cat backbone P4 + - [-1, 2, C3k2, [512, False]] # 13 + + - [-1, 1, nn.Upsample, [None, 2, "nearest"]] + - [[-1, 4], 1, Concat, [1]] # cat backbone P3 + - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small) + + - [-1, 1, Conv, [256, 3, 2]] + - [[-1, 13], 1, Concat, [1]] # cat head P4 + - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium) + + - [-1, 1, Conv, [512, 3, 2]] + - [[-1, 10], 1, Concat, [1]] # cat head P5 + - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large) + + - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) diff --git a/ultralytics/data/augment.py b/ultralytics/data/augment.py index a20f85a0..49bdc922 100644 --- a/ultralytics/data/augment.py +++ b/ultralytics/data/augment.py @@ -1628,92 +1628,105 @@ def _update_labels(self, labels, ratio, padw, padh): return labels -class CopyPaste: +class CopyPaste(BaseMixTransform): """ - Implements Copy-Paste augmentation as described in https://arxiv.org/abs/2012.07177. + CopyPaste class for applying Copy-Paste augmentation to image datasets. - This class applies Copy-Paste augmentation on images and their corresponding instances. + This class implements the Copy-Paste augmentation technique as described in the paper "Simple Copy-Paste is a Strong + Data Augmentation Method for Instance Segmentation" (https://arxiv.org/abs/2012.07177). It combines objects from + different images to create new training samples. Attributes: - p (float): Probability of applying the Copy-Paste augmentation. Must be between 0 and 1. + dataset (Any): The dataset to which Copy-Paste augmentation will be applied. + pre_transform (Callable | None): Optional transform to apply before Copy-Paste. + p (float): Probability of applying Copy-Paste augmentation. Methods: - __call__: Applies Copy-Paste augmentation to given image and instances. + get_indexes: Returns a random index from the dataset. + _mix_transform: Applies Copy-Paste augmentation to the input labels. + __call__: Applies the Copy-Paste transformation to images and annotations. Examples: - >>> copypaste = CopyPaste(p=0.5) - >>> augmented_labels = copypaste(labels) - >>> augmented_image = augmented_labels["img"] + >>> from ultralytics.data.augment import CopyPaste + >>> dataset = YourDataset(...) # Your image dataset + >>> copypaste = CopyPaste(dataset, p=0.5) + >>> augmented_labels = copypaste(original_labels) """ - def __init__(self, p=0.5) -> None: - """ - Initializes the CopyPaste augmentation object. + def __init__(self, dataset=None, pre_transform=None, p=0.5, mode="flip") -> None: + """Initializes CopyPaste object with dataset, pre_transform, and probability of applying MixUp.""" + super().__init__(dataset=dataset, pre_transform=pre_transform, p=p) + assert mode in {"flip", "mixup"}, f"Expected `mode` to be `flip` or `mixup`, but got {mode}." + self.mode = mode - This class implements the Copy-Paste augmentation as described in the paper "Simple Copy-Paste is a Strong Data - Augmentation Method for Instance Segmentation" (https://arxiv.org/abs/2012.07177). It applies the Copy-Paste - augmentation on images and their corresponding instances with a given probability. + def get_indexes(self): + """Returns a list of random indexes from the dataset for CopyPaste augmentation.""" + return random.randint(0, len(self.dataset) - 1) - Args: - p (float): The probability of applying the Copy-Paste augmentation. Must be between 0 and 1. + def _mix_transform(self, labels): + """Applies Copy-Paste augmentation to combine objects from another image into the current image.""" + labels2 = labels["mix_labels"][0] + return self._transform(labels, labels2) - Attributes: - p (float): Stores the probability of applying the augmentation. + def __call__(self, labels): + """Applies Copy-Paste augmentation to an image and its labels.""" + if len(labels["instances"].segments) == 0 or self.p == 0: + return labels + if self.mode == "flip": + return self._transform(labels) - Examples: - >>> augment = CopyPaste(p=0.7) - >>> augmented_data = augment(original_data) - """ - self.p = p + # Get index of one or three other images + indexes = self.get_indexes() + if isinstance(indexes, int): + indexes = [indexes] - def __call__(self, labels): - """ - Applies Copy-Paste augmentation to an image and its instances. + # Get images information will be used for Mosaic or MixUp + mix_labels = [self.dataset.get_image_and_label(i) for i in indexes] - Args: - labels (Dict): A dictionary containing: - - 'img' (np.ndarray): The image to augment. - - 'cls' (np.ndarray): Class labels for the instances. - - 'instances' (ultralytics.engine.results.Instances): Object containing bounding boxes, segments, etc. + if self.pre_transform is not None: + for i, data in enumerate(mix_labels): + mix_labels[i] = self.pre_transform(data) + labels["mix_labels"] = mix_labels - Returns: - (Dict): Dictionary with augmented image and updated instances under 'img', 'cls', and 'instances' keys. + # Update cls and texts + labels = self._update_label_text(labels) + # Mosaic or MixUp + labels = self._mix_transform(labels) + labels.pop("mix_labels", None) + return labels - Examples: - >>> labels = {"img": np.random.rand(640, 640, 3), "cls": np.array([0, 1, 2]), "instances": Instances(...)} - >>> augmenter = CopyPaste(p=0.5) - >>> augmented_labels = augmenter(labels) - """ - im = labels["img"] - cls = labels["cls"] + def _transform(self, labels1, labels2={}): + """Applies Copy-Paste augmentation to combine objects from another image into the current image.""" + im = labels1["img"] + cls = labels1["cls"] h, w = im.shape[:2] - instances = labels.pop("instances") + instances = labels1.pop("instances") instances.convert_bbox(format="xyxy") instances.denormalize(w, h) - if self.p and len(instances.segments): - _, w, _ = im.shape # height, width, channels - im_new = np.zeros(im.shape, np.uint8) - - # Calculate ioa first then select indexes randomly - ins_flip = deepcopy(instances) - ins_flip.fliplr(w) - - ioa = bbox_ioa(ins_flip.bboxes, instances.bboxes) # intersection over area, (N, M) - indexes = np.nonzero((ioa < 0.30).all(1))[0] # (N, ) - n = len(indexes) - for j in random.sample(list(indexes), k=round(self.p * n)): - cls = np.concatenate((cls, cls[[j]]), axis=0) - instances = Instances.concatenate((instances, ins_flip[[j]]), axis=0) - cv2.drawContours(im_new, instances.segments[[j]].astype(np.int32), -1, (1, 1, 1), cv2.FILLED) - - result = cv2.flip(im, 1) # augment segments (flip left-right) - i = cv2.flip(im_new, 1).astype(bool) - im[i] = result[i] - - labels["img"] = im - labels["cls"] = cls - labels["instances"] = instances - return labels + + im_new = np.zeros(im.shape, np.uint8) + instances2 = labels2.pop("instances", None) + if instances2 is None: + instances2 = deepcopy(instances) + instances2.fliplr(w) + ioa = bbox_ioa(instances2.bboxes, instances.bboxes) # intersection over area, (N, M) + indexes = np.nonzero((ioa < 0.30).all(1))[0] # (N, ) + n = len(indexes) + sorted_idx = np.argsort(ioa.max(1)[indexes]) + indexes = indexes[sorted_idx] + for j in indexes[: round(self.p * n)]: + cls = np.concatenate((cls, labels2.get("cls", cls)[[j]]), axis=0) + instances = Instances.concatenate((instances, instances2[[j]]), axis=0) + cv2.drawContours(im_new, instances2.segments[[j]].astype(np.int32), -1, (1, 1, 1), cv2.FILLED) + + result = labels2.get("img", cv2.flip(im, 1)) # augment segments + i = im_new.astype(bool) + im[i] = result[i] + + labels1["img"] = im + labels1["cls"] = cls + labels1["instances"] = instances + return labels1 class Albumentations: @@ -2259,9 +2272,9 @@ def __call__(self, labels: dict) -> dict: def v8_transforms(dataset, imgsz, hyp, stretch=False): """ - Applies a series of image transformations for YOLOv8 training. + Applies a series of image transformations for training. - This function creates a composition of image augmentation techniques to prepare images for YOLOv8 training. + This function creates a composition of image augmentation techniques to prepare images for YOLO training. It includes operations such as mosaic, copy-paste, random perspective, mixup, and various color adjustments. Args: @@ -2280,20 +2293,28 @@ def v8_transforms(dataset, imgsz, hyp, stretch=False): >>> transforms = v8_transforms(dataset, imgsz=640, hyp=hyp) >>> augmented_data = transforms(dataset[0]) """ - pre_transform = Compose( - [ - Mosaic(dataset, imgsz=imgsz, p=hyp.mosaic), - CopyPaste(p=hyp.copy_paste), - RandomPerspective( - degrees=hyp.degrees, - translate=hyp.translate, - scale=hyp.scale, - shear=hyp.shear, - perspective=hyp.perspective, - pre_transform=None if stretch else LetterBox(new_shape=(imgsz, imgsz)), - ), - ] + mosaic = Mosaic(dataset, imgsz=imgsz, p=hyp.mosaic) + affine = RandomPerspective( + degrees=hyp.degrees, + translate=hyp.translate, + scale=hyp.scale, + shear=hyp.shear, + perspective=hyp.perspective, + pre_transform=None if stretch else LetterBox(new_shape=(imgsz, imgsz)), ) + + pre_transform = Compose([mosaic, affine]) + if hyp.copy_paste_mode == "flip": + pre_transform.insert(1, CopyPaste(p=hyp.copy_paste, mode=hyp.copy_paste_mode)) + else: + pre_transform.append( + CopyPaste( + dataset, + pre_transform=Compose([Mosaic(dataset, imgsz=imgsz, p=hyp.mosaic), affine]), + p=hyp.copy_paste, + mode=hyp.copy_paste_mode, + ) + ) flip_idx = dataset.data.get("flip_idx", []) # for keypoints augmentation if dataset.use_keypoints: kpt_shape = dataset.data.get("kpt_shape", None) diff --git a/ultralytics/engine/trainer.py b/ultralytics/engine/trainer.py index ae98540b..169f4bdf 100644 --- a/ultralytics/engine/trainer.py +++ b/ultralytics/engine/trainer.py @@ -538,6 +538,8 @@ def save_model(self): self.best.write_bytes(serialized_ckpt) # save best.pt if (self.save_period > 0) and (self.epoch % self.save_period == 0): (self.wdir / f"epoch{self.epoch}.pt").write_bytes(serialized_ckpt) # save epoch, i.e. 'epoch3.pt' + # if self.args.close_mosaic and self.epoch == (self.epochs - self.args.close_mosaic - 1): + # (self.wdir / "last_mosaic.pt").write_bytes(serialized_ckpt) # save mosaic checkpoint def get_dataset(self): """ @@ -698,7 +700,12 @@ def check_resume(self, overrides): resume = True self.args = get_cfg(ckpt_args) self.args.model = self.args.resume = str(last) # reinstate model - for k in "imgsz", "batch", "device": # allow arg updates to reduce memory or update device on resume + for k in ( + "imgsz", + "batch", + "device", + "close_mosaic", + ): # allow arg updates to reduce memory or update device on resume if k in overrides: setattr(self.args, k, overrides[k]) diff --git a/ultralytics/nn/modules/__init__.py b/ultralytics/nn/modules/__init__.py index 2071a289..a840c5a7 100644 --- a/ultralytics/nn/modules/__init__.py +++ b/ultralytics/nn/modules/__init__.py @@ -20,6 +20,7 @@ from .block import ( C1, C2, + C2PSA, C3, C3TR, CIB, @@ -38,7 +39,9 @@ C2f, C2fAttn, C2fCIB, + C2fPSA, C3Ghost, + C3k2, C3x, CBFuse, CBLinear, @@ -110,6 +113,10 @@ "C2", "C3", "C2f", + "C3k2", + "SCDown", + "C2fPSA", + "C2PSA", "C2fAttn", "C3x", "C3TR", @@ -149,5 +156,4 @@ "C2fCIB", "Attention", "PSA", - "SCDown", ) diff --git a/ultralytics/nn/modules/block.py b/ultralytics/nn/modules/block.py index 07be2b88..7208ea63 100644 --- a/ultralytics/nn/modules/block.py +++ b/ultralytics/nn/modules/block.py @@ -40,6 +40,9 @@ "SPPELAN", "CBFuse", "CBLinear", + "C3k2", + "C2fPSA", + "C2PSA", "RepVGGDW", "CIB", "C2fCIB", @@ -696,6 +699,49 @@ def forward(self, xs): return torch.sum(torch.stack(res + xs[-1:]), dim=0) +class C3f(nn.Module): + """Faster Implementation of CSP Bottleneck with 2 convolutions.""" + + def __init__(self, c1, c2, n=1, shortcut=False, g=1, e=0.5): + """Initialize CSP bottleneck layer with two convolutions with arguments ch_in, ch_out, number, shortcut, groups, + expansion. + """ + super().__init__() + c_ = int(c2 * e) # hidden channels + self.cv1 = Conv(c1, c_, 1, 1) + self.cv2 = Conv(c1, c_, 1, 1) + self.cv3 = Conv((2 + n) * c_, c2, 1) # optional act=FReLU(c2) + self.m = nn.ModuleList(Bottleneck(c_, c_, shortcut, g, k=((3, 3), (3, 3)), e=1.0) for _ in range(n)) + + def forward(self, x): + """Forward pass through C2f layer.""" + y = [self.cv2(x), self.cv1(x)] + y.extend(m(y[-1]) for m in self.m) + return self.cv3(torch.cat(y, 1)) + + +class C3k2(C2f): + """Faster Implementation of CSP Bottleneck with 2 convolutions.""" + + def __init__(self, c1, c2, n=1, c3k=False, e=0.5, g=1, shortcut=True): + """Initializes the C3k2 module, a faster CSP Bottleneck with 2 convolutions and optional C3k blocks.""" + super().__init__(c1, c2, n, shortcut, g, e) + self.m = nn.ModuleList( + C3k(self.c, self.c, 2, shortcut, g) if c3k else Bottleneck(self.c, self.c, shortcut, g) for _ in range(n) + ) + + +class C3k(C3): + """C3k is a CSP bottleneck module with customizable kernel sizes for feature extraction in neural networks.""" + + def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, k=3): + """Initializes the C3k module with specified channels, number of layers, and configurations.""" + super().__init__(c1, c2, n, shortcut, g, e) + c_ = int(c2 * e) # hidden channels + # self.m = nn.Sequential(*(RepBottleneck(c_, c_, shortcut, g, k=(k, k), e=1.0) for _ in range(n))) + self.m = nn.Sequential(*(Bottleneck(c_, c_, shortcut, g, k=(k, k), e=1.0) for _ in range(n))) + + class RepVGGDW(torch.nn.Module): """RepVGGDW is a class that represents a depth wise separable convolutional block in RepVGG architecture.""" @@ -873,25 +919,69 @@ def forward(self, x): return x +class PSABlock(nn.Module): + """ + PSABlock class implementing a Position-Sensitive Attention block for neural networks. + + This class encapsulates the functionality for applying multi-head attention and feed-forward neural network layers + with optional shortcut connections. + + Attributes: + attn (Attention): Multi-head attention module. + ffn (nn.Sequential): Feed-forward neural network module. + add (bool): Flag indicating whether to add shortcut connections. + + Methods: + forward: Performs a forward pass through the PSABlock, applying attention and feed-forward layers. + + Examples: + Create a PSABlock and perform a forward pass + >>> psablock = PSABlock(c=128, attn_ratio=0.5, num_heads=4, shortcut=True) + >>> input_tensor = torch.randn(1, 128, 32, 32) + >>> output_tensor = psablock(input_tensor) + """ + + def __init__(self, c, attn_ratio=0.5, num_heads=4, shortcut=True) -> None: + """Initializes the PSABlock with attention and feed-forward layers for enhanced feature extraction.""" + super().__init__() + + self.attn = Attention(c, attn_ratio=attn_ratio, num_heads=num_heads) + self.ffn = nn.Sequential(Conv(c, c * 2, 1), Conv(c * 2, c, 1, act=False)) + self.add = shortcut + + def forward(self, x): + """Executes a forward pass through PSABlock, applying attention and feed-forward layers to the input tensor.""" + x = x + self.attn(x) if self.add else self.attn(x) + x = x + self.ffn(x) if self.add else self.ffn(x) + return x + + class PSA(nn.Module): """ - Position-wise Spatial Attention module. + PSA class for implementing Position-Sensitive Attention in neural networks. - Args: - c1 (int): Number of input channels. - c2 (int): Number of output channels. - e (float): Expansion factor for the intermediate channels. Default is 0.5. + This class encapsulates the functionality for applying position-sensitive attention and feed-forward networks to + input tensors, enhancing feature extraction and processing capabilities. Attributes: - c (int): Number of intermediate channels. + c (int): Number of hidden channels after applying the initial convolution. cv1 (Conv): 1x1 convolution layer to reduce the number of input channels to 2*c. cv2 (Conv): 1x1 convolution layer to reduce the number of output channels to c. - attn (Attention): Attention module for spatial attention. - ffn (nn.Sequential): Feed-forward network module. + attn (Attention): Attention module for position-sensitive attention. + ffn (nn.Sequential): Feed-forward network for further processing. + + Methods: + forward: Applies position-sensitive attention and feed-forward network to the input tensor. + + Examples: + Create a PSA module and apply it to an input tensor + >>> psa = PSA(c1=128, c2=128, e=0.5) + >>> input_tensor = torch.randn(1, 128, 64, 64) + >>> output_tensor = psa.forward(input_tensor) """ def __init__(self, c1, c2, e=0.5): - """Initializes convolution layers, attention module, and feed-forward network with channel reduction.""" + """Initializes the PSA module with input/output channels and attention mechanism for feature extraction.""" super().__init__() assert c1 == c2 self.c = int(c1 * e) @@ -902,46 +992,117 @@ def __init__(self, c1, c2, e=0.5): self.ffn = nn.Sequential(Conv(self.c, self.c * 2, 1), Conv(self.c * 2, self.c, 1, act=False)) def forward(self, x): - """ - Forward pass of the PSA module. - - Args: - x (torch.Tensor): Input tensor. - - Returns: - (torch.Tensor): Output tensor. - """ + """Executes forward pass in PSA module, applying attention and feed-forward layers to the input tensor.""" a, b = self.cv1(x).split((self.c, self.c), dim=1) b = b + self.attn(b) b = b + self.ffn(b) return self.cv2(torch.cat((a, b), 1)) +class C2PSA(nn.Module): + """ + C2PSA module with attention mechanism for enhanced feature extraction and processing. + + This module implements a convolutional block with attention mechanisms to enhance feature extraction and processing + capabilities. It includes a series of PSABlock modules for self-attention and feed-forward operations. + + Attributes: + c (int): Number of hidden channels. + cv1 (Conv): 1x1 convolution layer to reduce the number of input channels to 2*c. + cv2 (Conv): 1x1 convolution layer to reduce the number of output channels to c. + m (nn.Sequential): Sequential container of PSABlock modules for attention and feed-forward operations. + + Methods: + forward: Performs a forward pass through the C2PSA module, applying attention and feed-forward operations. + + Notes: + This module essentially is the same as PSA module, but refactored to allow stacking more PSABlock modules. + + Examples: + >>> c2psa = C2PSA(c1=256, c2=256, n=3, e=0.5) + >>> input_tensor = torch.randn(1, 256, 64, 64) + >>> output_tensor = c2psa(input_tensor) + """ + + def __init__(self, c1, c2, n=1, e=0.5): + """Initializes the C2PSA module with specified input/output channels, number of layers, and expansion ratio.""" + super().__init__() + assert c1 == c2 + self.c = int(c1 * e) + self.cv1 = Conv(c1, 2 * self.c, 1, 1) + self.cv2 = Conv(2 * self.c, c1, 1) + + self.m = nn.Sequential(*(PSABlock(self.c, attn_ratio=0.5, num_heads=self.c // 64) for _ in range(n))) + + def forward(self, x): + """Processes the input tensor 'x' through a series of PSA blocks and returns the transformed tensor.""" + a, b = self.cv1(x).split((self.c, self.c), dim=1) + b = self.m(b) + return self.cv2(torch.cat((a, b), 1)) + + +class C2fPSA(C2f): + """ + C2fPSA module with enhanced feature extraction using PSA blocks. + + This class extends the C2f module by incorporating PSA blocks for improved attention mechanisms and feature extraction. + + Attributes: + c (int): Number of hidden channels. + cv1 (Conv): 1x1 convolution layer to reduce the number of input channels to 2*c. + cv2 (Conv): 1x1 convolution layer to reduce the number of output channels to c. + m (nn.ModuleList): List of PSA blocks for feature extraction. + + Methods: + forward: Performs a forward pass through the C2fPSA module. + forward_split: Performs a forward pass using split() instead of chunk(). + + Examples: + >>> import torch + >>> from ultralytics.models.common import C2fPSA + >>> model = C2fPSA(c1=64, c2=64, n=3, e=0.5) + >>> x = torch.randn(1, 64, 128, 128) + >>> output = model(x) + >>> print(output.shape) + """ + + def __init__(self, c1, c2, n=1, e=0.5): + """Initializes the C2fPSA module, a variant of C2f with PSA blocks for enhanced feature extraction.""" + assert c1 == c2 + super().__init__(c1, c2, n=n, e=e) + self.m = nn.ModuleList(PSABlock(self.c, attn_ratio=0.5, num_heads=self.c // 64) for _ in range(n)) + + class SCDown(nn.Module): - """Spatial Channel Downsample (SCDown) module for reducing spatial and channel dimensions.""" + """ + SCDown module for downsampling with separable convolutions. - def __init__(self, c1, c2, k, s): - """ - Spatial Channel Downsample (SCDown) module. + This module performs downsampling using a combination of pointwise and depthwise convolutions, which helps in + efficiently reducing the spatial dimensions of the input tensor while maintaining the channel information. - Args: - c1 (int): Number of input channels. - c2 (int): Number of output channels. - k (int): Kernel size for the convolutional layer. - s (int): Stride for the convolutional layer. - """ + Attributes: + cv1 (Conv): Pointwise convolution layer that reduces the number of channels. + cv2 (Conv): Depthwise convolution layer that performs spatial downsampling. + + Methods: + forward: Applies the SCDown module to the input tensor. + + Examples: + >>> import torch + >>> from ultralytics import SCDown + >>> model = SCDown(c1=64, c2=128, k=3, s=2) + >>> x = torch.randn(1, 64, 128, 128) + >>> y = model(x) + >>> print(y.shape) + torch.Size([1, 128, 64, 64]) + """ + + def __init__(self, c1, c2, k, s): + """Initializes the SCDown module with specified input/output channels, kernel size, and stride.""" super().__init__() self.cv1 = Conv(c1, c2, 1, 1) self.cv2 = Conv(c2, c2, k=k, s=s, g=c2, act=False) def forward(self, x): - """ - Forward pass of the SCDown module. - - Args: - x (torch.Tensor): Input tensor. - - Returns: - (torch.Tensor): Output tensor after applying the SCDown module. - """ + """Applies convolution and downsampling to the input tensor in the SCDown module.""" return self.cv2(self.cv1(x)) diff --git a/ultralytics/nn/modules/conv.py b/ultralytics/nn/modules/conv.py index 2d9c7c06..aaa70f57 100644 --- a/ultralytics/nn/modules/conv.py +++ b/ultralytics/nn/modules/conv.py @@ -209,7 +209,8 @@ def get_equivalent_kernel_bias(self): kernelid, biasid = self._fuse_bn_tensor(self.bn) return kernel3x3 + self._pad_1x1_to_3x3_tensor(kernel1x1) + kernelid, bias3x3 + bias1x1 + biasid - def _pad_1x1_to_3x3_tensor(self, kernel1x1): + @staticmethod + def _pad_1x1_to_3x3_tensor(kernel1x1): """Pads a 1x1 tensor to a 3x3 tensor.""" if kernel1x1 is None: return 0 diff --git a/ultralytics/nn/modules/head.py b/ultralytics/nn/modules/head.py index 1a02e2b2..5f293177 100644 --- a/ultralytics/nn/modules/head.py +++ b/ultralytics/nn/modules/head.py @@ -11,7 +11,7 @@ from ultralytics.utils.tal import TORCH_1_10, dist2bbox, dist2rbox, make_anchors from .block import DFL, BNContrastiveHead, ContrastiveHead, Proto -from .conv import Conv +from .conv import Conv, DWConv from .transformer import MLP, DeformableTransformerDecoder, DeformableTransformerDecoderLayer from .utils import bias_init_with_prob, linear_init @@ -41,7 +41,14 @@ def __init__(self, nc=80, ch=()): self.cv2 = nn.ModuleList( nn.Sequential(Conv(x, c2, 3), Conv(c2, c2, 3), nn.Conv2d(c2, 4 * self.reg_max, 1)) for x in ch ) - self.cv3 = nn.ModuleList(nn.Sequential(Conv(x, c3, 3), Conv(c3, c3, 3), nn.Conv2d(c3, self.nc, 1)) for x in ch) + self.cv3 = nn.ModuleList( + nn.Sequential( + nn.Sequential(DWConv(x, x, 3), Conv(x, c3, 1)), + nn.Sequential(DWConv(c3, c3, 3), Conv(c3, c3, 1)), + nn.Conv2d(c3, self.nc, 1), + ) + for x in ch + ) self.dfl = DFL(self.reg_max) if self.reg_max > 1 else nn.Identity() if self.end2end: diff --git a/ultralytics/nn/tasks.py b/ultralytics/nn/tasks.py index ad860e93..4ae6dba7 100644 --- a/ultralytics/nn/tasks.py +++ b/ultralytics/nn/tasks.py @@ -13,6 +13,7 @@ AIFI, C1, C2, + C2PSA, C3, C3TR, ELAN1, @@ -28,7 +29,9 @@ C2f, C2fAttn, C2fCIB, + C2fPSA, C3Ghost, + C3k2, C3x, CBFuse, CBLinear, @@ -968,12 +971,15 @@ def parse_model(d, ch, verbose=True): # model_dict, input_channels(3) GhostBottleneck, SPP, SPPF, + C2fPSA, + C2PSA, DWConv, Focus, BottleneckCSP, C1, C2, C2f, + C3k2, RepNCSPELAN4, ELAN1, ADown, @@ -1001,9 +1007,26 @@ def parse_model(d, ch, verbose=True): # model_dict, input_channels(3) ) # num heads args = [c1, c2, *args[1:]] - if m in {BottleneckCSP, C1, C2, C2f, C2fAttn, C3, C3TR, C3Ghost, C3x, RepC3, C2fCIB}: + if m in { + BottleneckCSP, + C1, + C2, + C2f, + C3k2, + C2fAttn, + C3, + C3TR, + C3Ghost, + C3x, + RepC3, + C2fPSA, + C2fCIB, + C2PSA, + }: args.insert(2, n) # number of repeats n = 1 + if m is C3k2 and scale in "mlx": # for M/L/X sizes + args[3] = True elif m is AIFI: args = [ch[f], *args] elif m in {HGStem, HGBlock}: @@ -1080,7 +1103,7 @@ def guess_model_scale(model_path): with contextlib.suppress(AttributeError): import re - return re.search(r"yolov\d+([nslmx])", Path(model_path).stem).group(1) # n, s, m, l, or x + return re.search(r"yolo[v]?\d+([nslmx])", Path(model_path).stem).group(1) # n, s, m, l, or x return "" diff --git a/ultralytics/utils/downloads.py b/ultralytics/utils/downloads.py index 79c3f6b0..5cbc868a 100644 --- a/ultralytics/utils/downloads.py +++ b/ultralytics/utils/downloads.py @@ -18,6 +18,7 @@ GITHUB_ASSETS_REPO = "ultralytics/assets" GITHUB_ASSETS_NAMES = ( [f"yolov8{k}{suffix}.pt" for k in "nsmlx" for suffix in ("", "-cls", "-seg", "-pose", "-obb", "-oiv7")] + + [f"yolo11{k}{suffix}.pt" for k in "nsmlx" for suffix in ("", "-cls", "-seg", "-pose", "-obb")] + [f"yolov5{k}{resolution}u.pt" for k in "nsmlx" for resolution in ("", "6")] + [f"yolov3{k}u.pt" for k in ("", "-spp", "-tiny")] + [f"yolov8{k}-world.pt" for k in "smlx"] @@ -408,7 +409,7 @@ def get_github_assets(repo="ultralytics/assets", version="latest", retry=False): return data["tag_name"], [x["name"] for x in data["assets"]] # tag, assets i.e. ['yolov8n.pt', 'yolov8s.pt', ...] -def attempt_download_asset(file, repo="ultralytics/assets", release="v8.2.0", **kwargs): +def attempt_download_asset(file, repo="ultralytics/assets", release="v8.3.0", **kwargs): """ Attempt to download a file from GitHub release assets if it is not found locally. The function checks for the file locally first, then tries to download it from the specified GitHub repository release. @@ -416,7 +417,7 @@ def attempt_download_asset(file, repo="ultralytics/assets", release="v8.2.0", ** Args: file (str | Path): The filename or file path to be downloaded. repo (str, optional): The GitHub repository in the format 'owner/repo'. Defaults to 'ultralytics/assets'. - release (str, optional): The specific release version to be downloaded. Defaults to 'v8.2.0'. + release (str, optional): The specific release version to be downloaded. Defaults to 'v8.3.0'. **kwargs (any): Additional keyword arguments for the download process. Returns: diff --git a/ultralytics/utils/loss.py b/ultralytics/utils/loss.py index 15bf92f9..94038aef 100644 --- a/ultralytics/utils/loss.py +++ b/ultralytics/utils/loss.py @@ -228,8 +228,11 @@ def __call__(self, preds, batch): # Pboxes pred_bboxes = self.bbox_decode(anchor_points, pred_distri) # xyxy, (b, h*w, 4) + # dfl_conf = pred_distri.view(batch_size, -1, 4, self.reg_max).detach().softmax(-1) + # dfl_conf = (dfl_conf.amax(-1).mean(-1) + dfl_conf.amax(-1).amin(-1)) / 2 _, target_bboxes, target_scores, fg_mask, _ = self.assigner( + # pred_scores.detach().sigmoid() * 0.8 + dfl_conf.unsqueeze(-1) * 0.2, pred_scores.detach().sigmoid(), (pred_bboxes.detach() * stride_tensor).type(gt_bboxes.dtype), anchor_points * stride_tensor, diff --git a/ultralytics/utils/torch_utils.py b/ultralytics/utils/torch_utils.py index a3996929..e7fcca0a 100644 --- a/ultralytics/utils/torch_utils.py +++ b/ultralytics/utils/torch_utils.py @@ -159,7 +159,7 @@ def select_device(device="", batch=0, newline=False, verbose=True): if isinstance(device, torch.device): return device - s = f"Ultralytics YOLOv{__version__} 🚀 Python-{PYTHON_VERSION} torch-{torch.__version__} " + s = f"Ultralytics {__version__} 🚀 Python-{PYTHON_VERSION} torch-{torch.__version__} " device = str(device).lower() for remove in "cuda:", "none", "(", ")", "[", "]", "'", " ": device = device.replace(remove, "") # to string, 'cuda:0' -> '0' and '(0, 1)' -> '0,1' From ccee8533c190beb7a8f5174f120b47cc7f55cace Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 30 Sep 2024 03:20:57 +0200 Subject: [PATCH 79/80] Fix YOLO11 YouTube link (#16542) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- README.md | 70 +++++++++---------- README.zh-CN.md | 70 +++++++++---------- docs/en/models/yolo11.md | 26 +++---- docs/en/models/yolov6.md | 4 +- .../google_cloud_quickstart_tutorial.md | 2 +- examples/heatmaps.ipynb | 2 +- examples/hub.ipynb | 2 +- examples/object_counting.ipynb | 2 +- examples/object_tracking.ipynb | 2 +- examples/tutorial.ipynb | 10 +-- 10 files changed, 95 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 0137eba8..851d6a2d 100644 --- a/README.md +++ b/README.md @@ -124,13 +124,13 @@ All [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cf See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examples with these models trained on [COCO](https://docs.ultralytics.com/datasets/detect/coco/), which include 80 pre-trained classes. -| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | -| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | -| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | -| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | -| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | -| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | +| Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | +| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | +| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | +| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | +| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | +| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | +| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | - **mAPval** values are for single-model single-scale on [COCO val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val detect data=coco.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val detect data=coco.yaml batch=1 device=0|cpu` @@ -141,13 +141,13 @@ See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examp See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage examples with these models trained on [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/), which include 80 pre-trained classes. -| Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | -| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | -| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | -| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | -| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | -| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | +| Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | +| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | +| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | +| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | +| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | +| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | - **mAPval** values are for single-model single-scale on [COCO val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val segment data=coco-seg.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu` @@ -158,13 +158,13 @@ See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage e See [Pose Docs](https://docs.ultralytics.com/tasks/pose/) for usage examples with these models trained on [COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/), which include 1 pre-trained class, person. -| Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| ---------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | -| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | -| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | -| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | -| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | -| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | +| Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | +| ---------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | +| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | +| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | +| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | +| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | +| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | - **mAPval** values are for single-model single-scale on [COCO Keypoints val2017](https://cocodataset.org/) dataset.
Reproduce by `yolo val pose data=coco-pose.yaml device=0` - **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu` @@ -175,13 +175,13 @@ See [Pose Docs](https://docs.ultralytics.com/tasks/pose/) for usage examples wit See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with these models trained on [DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/), which include 15 pre-trained classes. -| Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | -| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | -| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | -| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | -| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | -| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | +| Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | +| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | +| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | +| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | +| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | +| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | - **mAPtest** values are for single-model multiscale on [DOTAv1](https://captain-whu.github.io/DOTA/index.html) dataset.
Reproduce by `yolo val obb data=DOTAv1.yaml device=0 split=test` and submit merged results to [DOTA evaluation](https://captain-whu.github.io/DOTA/evaluation.html). - **Speed** averaged over DOTAv1 val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu` @@ -192,13 +192,13 @@ See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with See [Classification Docs](https://docs.ultralytics.com/tasks/classify/) for usage examples with these models trained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/), which include 1000 pretrained classes. -| Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) at 640 | -| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | --------------------------------------- | ------------------ | ------------------------ | -| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | -| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | -| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | -| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | -| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | +| Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) at 640 | +| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | ----------------------------------- | ------------------ | ------------------------ | +| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | +| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | +| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | +| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | +| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | - **acc** values are model accuracies on the [ImageNet](https://www.image-net.org/) dataset validation set.
Reproduce by `yolo val classify data=path/to/ImageNet device=0` - **Speed** averaged over ImageNet val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance.
Reproduce by `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu` diff --git a/README.zh-CN.md b/README.zh-CN.md index 159fec01..fe45efb8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -124,13 +124,13 @@ YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://d 请参阅 [检测文档](https://docs.ultralytics.com/tasks/detect/) 以获取使用这些在 [COCO](https://docs.ultralytics.com/datasets/detect/coco/) 数据集上训练的模型的示例,其中包含 80 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPval
50-95 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| ------------------------------------------------------------------------------------ | ------------------- | -------------------- | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | -| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | -| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | -| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | -| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | -| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | +| 模型 | 尺寸
(像素) | mAPval
50-95 | 速度
CPU ONNX
(ms) | 速度
T4 TensorRT10
(ms) | 参数
(M) | FLOPs
(B) | +| ------------------------------------------------------------------------------------ | ------------------- | -------------------- | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | +| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | +| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | +| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.20 ± 2.04 ms | 4.70 ± 0.06 ms | 20.1 | 68.0 | +| [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt) | 640 | 53.4 | 238.64 ± 1.39 ms | 6.16 ± 0.08 ms | 25.3 | 86.9 | +| [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt) | 640 | 54.7 | 462.78 ± 6.66 ms | 11.31 ± 0.24 ms | 56.9 | 194.9 | - **mAPval** 值针对单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val detect data=coco.yaml device=0` - **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val detect data=coco.yaml batch=1 device=0|cpu` @@ -141,13 +141,13 @@ YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://d 请参阅 [分割文档](https://docs.ultralytics.com/tasks/segment/) 以获取使用这些在 [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/) 数据集上训练的模型的示例,其中包含 80 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPbox
50-95 | mAPmask
50-95 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | ------------------- | -------------------- | --------------------- | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | -| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | -| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | -| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | -| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | -| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | +| 模型 | 尺寸
(像素) | mAPbox
50-95 | mAPmask
50-95 | 速度
CPU ONNX
(ms) | 速度
T4 TensorRT10
(ms) | 参数
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | ------------------- | -------------------- | --------------------- | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | +| [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | +| [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | +| [YOLO11m-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-seg.pt) | 640 | 51.5 | 41.5 | 281.63 ± 1.16 ms | 6.31 ± 0.09 ms | 22.4 | 123.3 | +| [YOLO11l-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-seg.pt) | 640 | 53.4 | 42.9 | 344.16 ± 3.17 ms | 7.78 ± 0.16 ms | 27.6 | 142.2 | +| [YOLO11x-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-seg.pt) | 640 | 54.7 | 43.8 | 664.50 ± 3.24 ms | 15.75 ± 0.67 ms | 62.1 | 319.0 | - **mAPval** 值针对单模型单尺度在 [COCO val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val segment data=coco-seg.yaml device=0` - **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu` @@ -158,13 +158,13 @@ YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://d 请参阅 [姿态文档](https://docs.ultralytics.com/tasks/pose/) 以获取使用这些在 [COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/) 数据集上训练的模型的示例,其中包含 1 个预训练类别(人)。 -| 模型 | 尺寸
(像素) | mAPpose
50-95 | mAPpose
50 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| ---------------------------------------------------------------------------------------------- | ------------------- | --------------------- | ------------------ | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | -| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | -| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | -| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | -| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | -| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | +| 模型 | 尺寸
(像素) | mAPpose
50-95 | mAPpose
50 | 速度
CPU ONNX
(ms) | 速度
T4 TensorRT10
(ms) | 参数
(M) | FLOPs
(B) | +| ---------------------------------------------------------------------------------------------- | ------------------- | --------------------- | ------------------ | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | +| [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | +| [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | +| [YOLO11m-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-pose.pt) | 640 | 64.9 | 89.4 | 187.28 ± 0.77 ms | 4.94 ± 0.05 ms | 20.9 | 71.7 | +| [YOLO11l-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-pose.pt) | 640 | 66.1 | 89.9 | 247.69 ± 1.10 ms | 6.42 ± 0.13 ms | 26.2 | 90.7 | +| [YOLO11x-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-pose.pt) | 640 | 69.5 | 91.1 | 487.97 ± 13.91 ms | 12.06 ± 0.20 ms | 58.8 | 203.3 | - **mAPval** 值针对单模型单尺度在 [COCO Keypoints val2017](https://cocodataset.org/) 数据集上进行。
复制命令 `yolo val pose data=coco-pose.yaml device=0` - **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 COCO 验证图像上平均。
复制命令 `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu` @@ -175,13 +175,13 @@ YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://d 请参阅 [OBB 文档](https://docs.ultralytics.com/tasks/obb/) 以获取使用这些在 [DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/) 数据集上训练的模型的示例,其中包含 15 个预训练类别。 -| 模型 | 尺寸
(像素) | mAPtest
50 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) | -| -------------------------------------------------------------------------------------------- | ------------------- | ------------------ | ----------------------------- | -------------------------------------- | ---------------- | ----------------- | -| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | -| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | -| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | -| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | -| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | +| 模型 | 尺寸
(像素) | mAPtest
50 | 速度
CPU ONNX
(ms) | 速度
T4 TensorRT10
(ms) | 参数
(M) | FLOPs
(B) | +| -------------------------------------------------------------------------------------------- | ------------------- | ------------------ | ----------------------------- | ---------------------------------- | ---------------- | ----------------- | +| [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | +| [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | +| [YOLO11m-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-obb.pt) | 1024 | 80.9 | 562.81 ± 2.87 ms | 10.07 ± 0.38 ms | 20.9 | 183.5 | +| [YOLO11l-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-obb.pt) | 1024 | 81.0 | 712.49 ± 4.98 ms | 13.46 ± 0.55 ms | 26.2 | 232.0 | +| [YOLO11x-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-obb.pt) | 1024 | 81.3 | 1408.63 ± 7.67 ms | 28.59 ± 0.96 ms | 58.8 | 520.2 | - **mAPtest** 值针对单模型多尺度在 [DOTAv1](https://captain-whu.github.io/DOTA/index.html) 数据集上进行。
复制命令 `yolo val obb data=DOTAv1.yaml device=0 split=test` 并提交合并结果到 [DOTA 评估](https://captain-whu.github.io/DOTA/evaluation.html)。 - **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 DOTAv1 验证图像上平均。
复制命令 `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu` @@ -192,13 +192,13 @@ YOLO11 [检测](https://docs.ultralytics.com/tasks/detect/)、[分割](https://d 请参阅 [分类文档](https://docs.ultralytics.com/tasks/classify/) 以获取使用这些在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) 数据集上训练的模型的示例,其中包含 1000 个预训练类别。 -| 模型 | 尺寸
(像素) | acc
top1 | acc
top5 | 速度
CPU ONNX
(ms) | 速度
Tesla T4 TensorRT
(ms) | 参数
(M) | FLOPs
(B) at 640 | -| -------------------------------------------------------------------------------------------- | ------------------- | ---------------- | ---------------- | ----------------------------- | -------------------------------------- | ---------------- | ------------------------ | -| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | -| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | -| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | -| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | -| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | +| 模型 | 尺寸
(像素) | acc
top1 | acc
top5 | 速度
CPU ONNX
(ms) | 速度
T4 TensorRT10
(ms) | 参数
(M) | FLOPs
(B) at 640 | +| -------------------------------------------------------------------------------------------- | ------------------- | ---------------- | ---------------- | ----------------------------- | ---------------------------------- | ---------------- | ------------------------ | +| [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | +| [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | +| [YOLO11m-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m-cls.pt) | 224 | 77.3 | 93.9 | 17.17 ± 0.40 ms | 1.95 ± 0.00 ms | 10.4 | 39.3 | +| [YOLO11l-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l-cls.pt) | 224 | 78.3 | 94.3 | 23.17 ± 0.29 ms | 2.76 ± 0.00 ms | 12.9 | 49.4 | +| [YOLO11x-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x-cls.pt) | 224 | 79.5 | 94.9 | 41.41 ± 0.94 ms | 3.82 ± 0.00 ms | 28.4 | 110.4 | - **acc** 值为在 [ImageNet](https://www.image-net.org/) 数据集验证集上的模型准确率。
复制命令 `yolo val classify data=path/to/ImageNet device=0` - **速度**在使用 [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) 实例的 ImageNet 验证图像上平均。
复制命令 `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu` diff --git a/docs/en/models/yolo11.md b/docs/en/models/yolo11.md index 6827fdff..d96abd9f 100644 --- a/docs/en/models/yolo11.md +++ b/docs/en/models/yolo11.md @@ -8,26 +8,26 @@ keywords: YOLO11, state-of-the-art object detection, YOLO series, Ultralytics, c ## Overview -YOLO11 is the latest iteration in the Ultralytics YOLO series of real-time object detectors, redefining what's possible with cutting-edge accuracy, speed, and efficiency. Building upon the impressive advancements of previous YOLO versions, YOLO11 introduces significant improvements in architecture and training methods, making it a versatile choice for a wide range of computer vision tasks. +YOLO11 is the latest iteration in the [Ultralytics](https://www.ultralytics.com) YOLO series of real-time object detectors, redefining what's possible with cutting-edge [accuracy](https://www.ultralytics.com/glossary/accuracy), speed, and efficiency. Building upon the impressive advancements of previous YOLO versions, YOLO11 introduces significant improvements in architecture and training methods, making it a versatile choice for a wide range of [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks. ![Ultralytics YOLO11 Comparison Plots](https://github.com/user-attachments/assets/a311a4ed-bbf2-43b5-8012-5f183a28a845)


-
- Watch: Ultralytics YOLO11 Announcement at #YV24 + Watch: Ultralytics YOLO11 Announcement at [YOLO Vision 2024](https://www.ultralytics.com/events/yolovision)

## Key Features - **Enhanced Feature Extraction:** YOLO11 employs an improved backbone and neck architecture, which enhances [feature extraction](https://www.ultralytics.com/glossary/feature-extraction) capabilities for more precise object detection and complex task performance. - **Optimized for Efficiency and Speed:** YOLO11 introduces refined architectural designs and optimized training pipelines, delivering faster processing speeds and maintaining an optimal balance between accuracy and performance. -- **Greater Accuracy with Fewer Parameters:** With advancements in model design, YOLO11m achieves a higher mean Average Precision (mAP) on the COCO dataset while using 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. +- **Greater Accuracy with Fewer Parameters:** With advancements in model design, YOLO11m achieves a higher [mean Average Precision](https://www.ultralytics.com/glossary/mean-average-precision-map) (mAP) on the COCO dataset while using 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. - **Adaptability Across Environments:** YOLO11 can be seamlessly deployed across various environments, including edge devices, cloud platforms, and systems supporting NVIDIA GPUs, ensuring maximum flexibility. - **Broad Range of Supported Tasks:** Whether it's object detection, instance segmentation, image classification, pose estimation, or oriented object detection (OBB), YOLO11 is designed to cater to a diverse set of computer vision challenges. @@ -53,7 +53,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a See [Detection Docs](../tasks/detect.md) for usage examples with these models trained on [COCO](../datasets/detect/coco.md), which include 80 pre-trained classes. - | Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | Model | size
(pixels) | mAPval
50-95 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | | ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | | [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.12 ± 0.82 ms | 1.55 ± 0.01 ms | 2.6 | 6.5 | | [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.01 ± 1.17 ms | 2.46 ± 0.00 ms | 9.4 | 21.5 | @@ -65,7 +65,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a See [Segmentation Docs](../tasks/segment.md) for usage examples with these models trained on [COCO](../datasets/segment/coco.md), which include 80 pre-trained classes. - | Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | Model | size
(pixels) | mAPbox
50-95 | mAPmask
50-95 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | | -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | | [YOLO11n-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-seg.pt) | 640 | 38.9 | 32.0 | 65.90 ± 1.14 ms | 1.84 ± 0.00 ms | 2.9 | 10.4 | | [YOLO11s-seg](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-seg.pt) | 640 | 46.6 | 37.8 | 117.56 ± 4.89 ms | 2.94 ± 0.01 ms | 10.1 | 35.5 | @@ -77,7 +77,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a See [Classification Docs](../tasks/classify.md) for usage examples with these models trained on [ImageNet](../datasets/classify/imagenet.md), which include 1000 pre-trained classes. - | Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) at 640 | + | Model | size
(pixels) | acc
top1 | acc
top5 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) at 640 | | -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | --------------------------------------- | ------------------ | ------------------------ | | [YOLO11n-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-cls.pt) | 224 | 70.0 | 89.4 | 5.03 ± 0.32 ms | 1.10 ± 0.01 ms | 1.6 | 3.3 | | [YOLO11s-cls](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-cls.pt) | 224 | 75.4 | 92.7 | 7.89 ± 0.18 ms | 1.34 ± 0.01 ms | 5.5 | 12.1 | @@ -89,7 +89,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a See [Pose Estimation Docs](../tasks/pose.md) for usage examples with these models trained on [COCO](../datasets/pose/coco.md), which include 1 pre-trained class, 'person'. - | Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | Model | size
(pixels) | mAPpose
50-95 | mAPpose
50 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | | ---------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | | [YOLO11n-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-pose.pt) | 640 | 50.0 | 81.0 | 52.40 ± 0.51 ms | 1.72 ± 0.01 ms | 2.9 | 7.6 | | [YOLO11s-pose](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-pose.pt) | 640 | 58.9 | 86.3 | 90.54 ± 0.59 ms | 2.57 ± 0.00 ms | 9.9 | 23.2 | @@ -101,7 +101,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a See [Oriented Detection Docs](../tasks/obb.md) for usage examples with these models trained on [DOTAv1](../datasets/obb/dota-v2.md#dota-v10), which include 15 pre-trained classes. - | Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
Tesla T4 TensorRT
(ms) | params
(M) | FLOPs
(B) | + | Model | size
(pixels) | mAPtest
50 | Speed
CPU ONNX
(ms) | Speed
T4 TensorRT10
(ms) | params
(M) | FLOPs
(B) | | -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | --------------------------------------- | ------------------ | ----------------- | | [YOLO11n-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n-obb.pt) | 1024 | 78.4 | 117.56 ± 0.80 ms | 4.43 ± 0.01 ms | 2.7 | 17.2 | | [YOLO11s-obb](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s-obb.pt) | 1024 | 79.5 | 219.41 ± 4.00 ms | 5.13 ± 0.02 ms | 9.7 | 57.5 | @@ -113,7 +113,7 @@ This table provides an overview of the YOLO11 model variants, showcasing their a This section provides simple YOLO11 training and inference examples. For full documentation on these and other [modes](../modes/index.md), see the [Predict](../modes/predict.md), [Train](../modes/train.md), [Val](../modes/val.md), and [Export](../modes/export.md) docs pages. -Note that the example below is for YOLO11 [Detect](../tasks/detect.md) models for object detection. For additional supported tasks, see the [Segment](../tasks/segment.md), [Classify](../tasks/classify.md), [OBB](../tasks/obb.md), and [Pose](../tasks/pose.md) docs. +Note that the example below is for YOLO11 [Detect](../tasks/detect.md) models for [object detection](https://www.ultralytics.com/glossary/object-detection). For additional supported tasks, see the [Segment](../tasks/segment.md), [Classify](../tasks/classify.md), [OBB](../tasks/obb.md), and [Pose](../tasks/pose.md) docs. !!! example @@ -176,9 +176,9 @@ Ultralytics YOLO11 introduces several significant advancements over its predeces - **Enhanced Feature Extraction:** YOLO11 employs an improved backbone and neck architecture, enhancing [feature extraction](https://www.ultralytics.com/glossary/feature-extraction) capabilities for more precise object detection. - **Optimized Efficiency and Speed:** Refined architectural designs and optimized training pipelines deliver faster processing speeds while maintaining a balance between accuracy and performance. -- **Greater Accuracy with Fewer Parameters:** YOLO11m achieves higher mean Average Precision (mAP) on the COCO dataset with 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. +- **Greater Accuracy with Fewer Parameters:** YOLO11m achieves higher mean Average [Precision](https://www.ultralytics.com/glossary/precision) (mAP) on the COCO dataset with 22% fewer parameters than YOLOv8m, making it computationally efficient without compromising accuracy. - **Adaptability Across Environments:** YOLO11 can be deployed across various environments, including edge devices, cloud platforms, and systems supporting NVIDIA GPUs. -- **Broad Range of Supported Tasks:** YOLO11 supports diverse computer vision tasks such as object detection, instance segmentation, image classification, pose estimation, and oriented object detection (OBB). +- **Broad Range of Supported Tasks:** YOLO11 supports diverse computer vision tasks such as object detection, [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), image classification, pose estimation, and oriented object detection (OBB). ### How do I train a YOLO11 model for object detection? @@ -213,7 +213,7 @@ YOLO11 models are versatile and support a wide range of computer vision tasks, i - **Object Detection:** Identifying and locating objects within an image. - **Instance Segmentation:** Detecting objects and delineating their boundaries. -- **Image Classification:** Categorizing images into predefined classes. +- **[Image Classification](https://www.ultralytics.com/glossary/image-classification):** Categorizing images into predefined classes. - **Pose Estimation:** Detecting and tracking keypoints on human bodies. - **Oriented Object Detection (OBB):** Detecting objects with rotation for higher precision. diff --git a/docs/en/models/yolov6.md b/docs/en/models/yolov6.md index b670d58d..c41b40c8 100644 --- a/docs/en/models/yolov6.md +++ b/docs/en/models/yolov6.md @@ -24,7 +24,7 @@ keywords: Meituan YOLOv6, object detection, real-time applications, BiC module, YOLOv6 provides various pre-trained models with different scales: -- YOLOv6-N: 37.5% AP on COCO val2017 at 1187 FPS with NVIDIA Tesla T4 GPU. +- YOLOv6-N: 37.5% AP on COCO val2017 at 1187 FPS with NVIDIA T4 GPU. - YOLOv6-S: 45.0% AP at 484 FPS. - YOLOv6-M: 50.0% AP at 226 FPS. - YOLOv6-L: 52.8% AP at 116 FPS. @@ -151,7 +151,7 @@ YOLOv6 offers multiple versions, each optimized for different performance requir - YOLOv6-L: 52.8% AP at 116 FPS - YOLOv6-L6: State-of-the-art accuracy in real-time scenarios -These models are evaluated on the COCO dataset using an NVIDIA Tesla T4 GPU. For more on performance metrics, see the [Performance Metrics](#performance-metrics) section. +These models are evaluated on the COCO dataset using an NVIDIA T4 GPU. For more on performance metrics, see the [Performance Metrics](#performance-metrics) section. ### How does the Anchor-Aided Training (AAT) strategy benefit YOLOv6? diff --git a/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md b/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md index 65ad9c3d..69e2fa80 100644 --- a/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md +++ b/docs/en/yolov5/environments/google_cloud_quickstart_tutorial.md @@ -18,7 +18,7 @@ Let's begin by creating a virtual machine that's tuned for deep learning: 1. Head over to the [GCP marketplace](https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning) and select the **Deep Learning VM**. 2. Opt for a **n1-standard-8** instance; it offers a balance of 8 vCPUs and 30 GB of memory, ideally suited for our needs. -3. Next, select a GPU. This depends on your workload; even a basic one like the Tesla T4 will markedly accelerate your model training. +3. Next, select a GPU. This depends on your workload; even a basic one like the T4 will markedly accelerate your model training. 4. Tick the box for 'Install NVIDIA GPU driver automatically on first startup?' for hassle-free setup. 5. Allocate a 300 GB SSD Persistent Disk to ensure you don't bottleneck on I/O operations. 6. Hit 'Deploy' and let GCP do its magic in provisioning your custom Deep Learning VM. diff --git a/examples/heatmaps.ipynb b/examples/heatmaps.ipynb index 1f590b8c..c8064cc7 100644 --- a/examples/heatmaps.ipynb +++ b/examples/heatmaps.ipynb @@ -56,7 +56,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n" ] } diff --git a/examples/hub.ipynb b/examples/hub.ipynb index ee6f3cae..e86b795e 100644 --- a/examples/hub.ipynb +++ b/examples/hub.ipynb @@ -54,7 +54,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 28.8/78.2 GB disk)\n" ] } diff --git a/examples/object_counting.ipynb b/examples/object_counting.ipynb index 8c3d0ba6..988bc326 100644 --- a/examples/object_counting.ipynb +++ b/examples/object_counting.ipynb @@ -56,7 +56,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Ultralytics YOLOv8.2.18 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.18 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n" ] } diff --git a/examples/object_tracking.ipynb b/examples/object_tracking.ipynb index 17c27c0e..af43cc51 100644 --- a/examples/object_tracking.ipynb +++ b/examples/object_tracking.ipynb @@ -56,7 +56,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n" ] } diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb index 996db092..1ecb2d98 100644 --- a/examples/tutorial.ipynb +++ b/examples/tutorial.ipynb @@ -78,7 +78,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 28.8/78.2 GB disk)\n" ] } @@ -116,7 +116,7 @@ "text": [ "Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolov8n.pt to 'yolov8n.pt'...\n", "100% 6.23M/6.23M [00:00<00:00, 83.2MB/s]\n", - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n", "\n", "Downloading https://ultralytics.com/images/zidane.jpg to 'zidane.jpg'...\n", @@ -182,7 +182,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n", "\n", "Dataset 'coco8.yaml' images not found ⚠️, missing path '/content/datasets/coco8/images/val'\n", @@ -261,7 +261,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "\u001b[34m\u001b[1mengine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8n.pt, data=coco8.yaml, epochs=3, time=None, patience=100, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=train, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train\n", "\n", " from n params module arguments \n", @@ -330,7 +330,7 @@ "Optimizer stripped from runs/detect/train/weights/best.pt, 6.5MB\n", "\n", "Validating runs/detect/train/weights/best.pt...\n", - "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n", + "Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (T4, 15102MiB)\n", "Model summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n", " Class Images Instances Box(P R mAP50 mAP50-95): 100% 1/1 [00:00<00:00, 18.23it/s]\n", " all 4 17 0.617 0.884 0.888 0.622\n", From 792d6afe67b716ac4471769fbae4e52850547539 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 30 Sep 2024 03:57:35 +0200 Subject: [PATCH 80/80] Update YOLO11 Docs page (#16543) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- docs/en/index.md | 24 +++++++++---------- docs/en/models/yolo11.md | 2 +- docs/en/quickstart.md | 52 ++++++++++++++++++++-------------------- pyproject.toml | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/en/index.md b/docs/en/index.md index 30bb1957..71abe212 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -1,7 +1,7 @@ --- comments: true -description: Discover Ultralytics YOLOv8 - the latest in real-time object detection and image segmentation. Learn its features and maximize its potential in your projects. -keywords: Ultralytics, YOLOv8, object detection, image segmentation, deep learning, computer vision, AI, machine learning, documentation, tutorial +description: Discover Ultralytics YOLO - the latest in real-time object detection and image segmentation. Learn its features and maximize its potential in your projects. +keywords: Ultralytics, YOLO, YOLO11, object detection, image segmentation, deep learning, computer vision, AI, machine learning, documentation, tutorial ---
@@ -20,7 +20,7 @@ keywords: Ultralytics, YOLOv8, object detection, image segmentation, deep learni

Ultralytics CI -YOLOv8 Citation +YOLO Citation Docker Pulls Discord Ultralytics Forums @@ -31,9 +31,9 @@ keywords: Ultralytics, YOLOv8, object detection, image segmentation, deep learni Open In Kaggle
-Introducing [Ultralytics](https://www.ultralytics.com/) [YOLOv8](https://github.com/ultralytics/ultralytics), the latest version of the acclaimed real-time object detection and image segmentation model. YOLOv8 is built on cutting-edge advancements in [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv), offering unparalleled performance in terms of speed and [accuracy](https://www.ultralytics.com/glossary/accuracy). Its streamlined design makes it suitable for various applications and easily adaptable to different hardware platforms, from edge devices to cloud APIs. +Introducing [Ultralytics](https://www.ultralytics.com/) [YOLO11](https://github.com/ultralytics/ultralytics), the latest version of the acclaimed real-time object detection and image segmentation model. YOLO11 is built on cutting-edge advancements in [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) and [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv), offering unparalleled performance in terms of speed and [accuracy](https://www.ultralytics.com/glossary/accuracy). Its streamlined design makes it suitable for various applications and easily adaptable to different hardware platforms, from edge devices to cloud APIs. -Explore the YOLOv8 Docs, a comprehensive resource designed to help you understand and utilize its features and capabilities. Whether you are a seasoned [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) practitioner or new to the field, this hub aims to maximize YOLOv8's potential in your projects +Explore the Ultralytics Docs, a comprehensive resource designed to help you understand and utilize its features and capabilities. Whether you are a seasoned [machine learning](https://www.ultralytics.com/glossary/machine-learning-ml) practitioner or new to the field, this hub aims to maximize YOLO's potential in your projects

@@ -55,9 +55,9 @@ Explore the YOLOv8 Docs, a comprehensive resource designed to help you understan ## Where to Start - **Install** `ultralytics` with pip and get up and running in minutes   [:material-clock-fast: Get Started](quickstart.md){ .md-button } -- **Predict** new images and videos with YOLOv8   [:octicons-image-16: Predict on Images](modes/predict.md){ .md-button } -- **Train** a new YOLOv8 model on your own custom dataset   [:fontawesome-solid-brain: Train a Model](modes/train.md){ .md-button } -- **Tasks** YOLOv8 tasks like segment, classify, pose and track   [:material-magnify-expand: Explore Tasks](tasks/index.md){ .md-button } +- **Predict** new images and videos with YOLO   [:octicons-image-16: Predict on Images](modes/predict.md){ .md-button } +- **Train** a new YOLO model on your own custom dataset   [:fontawesome-solid-brain: Train a Model](modes/train.md){ .md-button } +- **Tasks** YOLO tasks like segment, classify, pose and track   [:material-magnify-expand: Explore Tasks](tasks/index.md){ .md-button } - **[YOLO11](models/yolo11.md) NEW 🚀**: Ultralytics' latest SOTA models   [:material-magnify-expand: Explore a Dataset](models/yolo11.md){ .md-button }

@@ -68,7 +68,7 @@ Explore the YOLOv8 Docs, a comprehensive resource designed to help you understan allowfullscreen>
- Watch: How to Train a YOLOv8 model on Your Custom Dataset in Google Colab. + Watch: How to Train a YOLO model on Your Custom Dataset in Google Colab.

## YOLO: A Brief History @@ -99,7 +99,7 @@ Our licensing strategy is designed to ensure that any improvements to our open-s ### What is Ultralytics YOLO and how does it improve object detection? -Ultralytics YOLO is the latest advancement in the acclaimed YOLO (You Only Look Once) series for real-time object detection and image segmentation. It builds on previous versions by introducing new features and improvements for enhanced performance, flexibility, and efficiency. YOLOv8 supports various [vision AI tasks](tasks/index.md) such as detection, segmentation, pose estimation, tracking, and classification. Its state-of-the-art architecture ensures superior speed and accuracy, making it suitable for diverse applications, including edge devices and cloud APIs. +Ultralytics YOLO is the latest advancement in the acclaimed YOLO (You Only Look Once) series for real-time object detection and image segmentation. It builds on previous versions by introducing new features and improvements for enhanced performance, flexibility, and efficiency. YOLO supports various [vision AI tasks](tasks/index.md) such as detection, segmentation, pose estimation, tracking, and classification. Its state-of-the-art architecture ensures superior speed and accuracy, making it suitable for diverse applications, including edge devices and cloud APIs. ### How can I get started with YOLO installation and setup? @@ -122,7 +122,7 @@ Training a custom YOLO model on your dataset involves a few detailed steps: Here's an example command: ```bash -yolo train model=yolov8n.pt data=coco128.yaml epochs=100 imgsz=640 +yolo train model=yolo11n.pt data=coco128.yaml epochs=100 imgsz=640 ``` For a detailed walkthrough, check out our [Train a Model](modes/train.md) guide, which includes examples and tips for optimizing your training process. @@ -141,7 +141,7 @@ For more details, visit our [Licensing](https://www.ultralytics.com/license) pag Ultralytics YOLO supports efficient and customizable multi-object tracking. To utilize tracking capabilities, you can use the `yolo track` command as shown below: ```bash -yolo track model=yolov8n.pt source=video.mp4 +yolo track model=yolo11n.pt source=video.mp4 ``` For a detailed guide on setting up and running object tracking, check our [tracking mode](modes/track.md) documentation, which explains the configuration and practical applications in real-time scenarios. diff --git a/docs/en/models/yolo11.md b/docs/en/models/yolo11.md index d96abd9f..fcda8726 100644 --- a/docs/en/models/yolo11.md +++ b/docs/en/models/yolo11.md @@ -20,7 +20,7 @@ YOLO11 is the latest iteration in the [Ultralytics](https://www.ultralytics.com) allowfullscreen>
- Watch: Ultralytics YOLO11 Announcement at [YOLO Vision 2024](https://www.ultralytics.com/events/yolovision) + Watch: Ultralytics YOLO11 Announcement at YOLO Vision 2024

## Key Features diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md index 7b5a3a27..204623cc 100644 --- a/docs/en/quickstart.md +++ b/docs/en/quickstart.md @@ -1,12 +1,12 @@ --- comments: true -description: Learn how to install Ultralytics using pip, conda, or Docker. Follow our step-by-step guide for a seamless setup of YOLOv8 with thorough instructions. -keywords: Ultralytics, YOLOv8, Install Ultralytics, pip, conda, Docker, GitHub, machine learning, object detection +description: Learn how to install Ultralytics using pip, conda, or Docker. Follow our step-by-step guide for a seamless setup of YOLO with thorough instructions. +keywords: Ultralytics, YOLO11, Install Ultralytics, pip, conda, Docker, GitHub, machine learning, object detection --- ## Install Ultralytics -Ultralytics provides various installation methods including pip, conda, and Docker. Install YOLOv8 via the `ultralytics` pip package for the latest stable release or by cloning the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) for the most up-to-date version. Docker can be used to execute the package in an isolated container, avoiding local installation. +Ultralytics provides various installation methods including pip, conda, and Docker. Install YOLO via the `ultralytics` pip package for the latest stable release or by cloning the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) for the most up-to-date version. Docker can be used to execute the package in an isolated container, avoiding local installation.


@@ -151,7 +151,7 @@ See the `ultralytics` [pyproject.toml](https://github.com/ultralytics/ultralytic ## Use Ultralytics with CLI -The Ultralytics command line interface (CLI) allows for simple single-line commands without the need for a Python environment. CLI requires no customization or Python code. You can simply run all tasks from the terminal with the `yolo` command. Check out the [CLI Guide](usage/cli.md) to learn more about using YOLOv8 from the command line. +The Ultralytics command line interface (CLI) allows for simple single-line commands without the need for a Python environment. CLI requires no customization or Python code. You can simply run all tasks from the terminal with the `yolo` command. Check out the [CLI Guide](usage/cli.md) to learn more about using YOLO from the command line. !!! example @@ -172,28 +172,28 @@ The Ultralytics command line interface (CLI) allows for simple single-line comma Train a detection model for 10 [epochs](https://www.ultralytics.com/glossary/epoch) with an initial learning_rate of 0.01 ```bash - yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 + yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01 ``` === "Predict" Predict a YouTube video using a pretrained segmentation model at image size 320: ```bash - yolo predict model=yolov8n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320 + yolo predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320 ``` === "Val" Val a pretrained detection model at batch-size 1 and image size 640: ```bash - yolo val model=yolov8n.pt data=coco8.yaml batch=1 imgsz=640 + yolo val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640 ``` === "Export" - Export a YOLOv8n classification model to ONNX format at image size 224 by 128 (no TASK required) + Export a yolo11n classification model to ONNX format at image size 224 by 128 (no TASK required) ```bash - yolo export model=yolov8n-cls.pt format=onnx imgsz=224,128 + yolo export model=yolo11n-cls.pt format=onnx imgsz=224,128 ``` === "Special" @@ -212,18 +212,18 @@ The Ultralytics command line interface (CLI) allows for simple single-line comma Arguments must be passed as `arg=val` pairs, split by an equals `=` sign and delimited by spaces between pairs. Do not use `--` argument prefixes or commas `,` between arguments. - - `yolo predict model=yolov8n.pt imgsz=640 conf=0.25` ✅ - - `yolo predict model yolov8n.pt imgsz 640 conf 0.25` ❌ (missing `=`) - - `yolo predict model=yolov8n.pt, imgsz=640, conf=0.25` ❌ (do not use `,`) - - `yolo predict --model yolov8n.pt --imgsz 640 --conf 0.25` ❌ (do not use `--`) + - `yolo predict model=yolo11n.pt imgsz=640 conf=0.25` ✅ + - `yolo predict model yolo11n.pt imgsz 640 conf 0.25` ❌ (missing `=`) + - `yolo predict model=yolo11n.pt, imgsz=640, conf=0.25` ❌ (do not use `,`) + - `yolo predict --model yolo11n.pt --imgsz 640 --conf 0.25` ❌ (do not use `--`) [CLI Guide](usage/cli.md){ .md-button } ## Use Ultralytics with Python -YOLOv8's Python interface allows for seamless integration into your Python projects, making it easy to load, run, and process the model's output. Designed with simplicity and ease of use in mind, the Python interface enables users to quickly implement [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification in their projects. This makes YOLOv8's Python interface an invaluable tool for anyone looking to incorporate these functionalities into their Python projects. +YOLO's Python interface allows for seamless integration into your Python projects, making it easy to load, run, and process the model's output. Designed with simplicity and ease of use in mind, the Python interface enables users to quickly implement [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification in their projects. This makes YOLO's Python interface an invaluable tool for anyone looking to incorporate these functionalities into their Python projects. -For example, users can load a model, train it, evaluate its performance on a validation set, and even export it to ONNX format with just a few lines of code. Check out the [Python Guide](usage/python.md) to learn more about using YOLOv8 within your Python projects. +For example, users can load a model, train it, evaluate its performance on a validation set, and even export it to ONNX format with just a few lines of code. Check out the [Python Guide](usage/python.md) to learn more about using YOLO within your Python projects. !!! example @@ -231,10 +231,10 @@ For example, users can load a model, train it, evaluate its performance on a val from ultralytics import YOLO # Create a new YOLO model from scratch - model = YOLO("yolov8n.yaml") + model = YOLO("yolo11n.yaml") # Load a pretrained YOLO model (recommended for training) - model = YOLO("yolov8n.pt") + model = YOLO("yolo11n.pt") # Train the model using the 'coco8.yaml' dataset for 3 epochs results = model.train(data="coco8.yaml", epochs=3) @@ -345,9 +345,9 @@ As you navigate through your projects or experiments, be sure to revisit these s ## FAQ -### How do I install Ultralytics YOLOv8 using pip? +### How do I install Ultralytics using pip? -To install Ultralytics YOLOv8 with pip, execute the following command: +To install Ultralytics with pip, execute the following command: ```bash pip install ultralytics @@ -363,9 +363,9 @@ pip install git+https://github.com/ultralytics/ultralytics.git Make sure to have the Git command-line tool installed on your system. -### Can I install Ultralytics YOLOv8 using conda? +### Can I install Ultralytics YOLO using conda? -Yes, you can install Ultralytics YOLOv8 using conda by running: +Yes, you can install Ultralytics YOLO using conda by running: ```bash conda install -c conda-forge ultralytics @@ -379,9 +379,9 @@ conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cu For more instructions, visit the [Conda quickstart guide](guides/conda-quickstart.md). -### What are the advantages of using Docker to run Ultralytics YOLOv8? +### What are the advantages of using Docker to run Ultralytics YOLO? -Using Docker to run Ultralytics YOLOv8 provides an isolated and consistent environment, ensuring smooth performance across different systems. It also eliminates the complexity of local installation. Official Docker images from Ultralytics are available on [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics), with different variants tailored for GPU, CPU, ARM64, NVIDIA Jetson, and Conda environments. Below are the commands to pull and run the latest image: +Using Docker to run Ultralytics YOLO provides an isolated and consistent environment, ensuring smooth performance across different systems. It also eliminates the complexity of local installation. Official Docker images from Ultralytics are available on [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics), with different variants tailored for GPU, CPU, ARM64, NVIDIA Jetson, and Conda environments. Below are the commands to pull and run the latest image: ```bash # Pull the latest ultralytics image from Docker Hub @@ -410,9 +410,9 @@ pip install -e . This approach allows you to contribute to the project or experiment with the latest source code. For more details, visit the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics). -### Why should I use Ultralytics YOLOv8 CLI? +### Why should I use Ultralytics YOLO CLI? -The Ultralytics YOLOv8 command line interface (CLI) simplifies running object detection tasks without requiring Python code. You can execute single-line commands for tasks like training, validation, and prediction straight from your terminal. The basic syntax for `yolo` commands is: +The Ultralytics YOLO command line interface (CLI) simplifies running object detection tasks without requiring Python code. You can execute single-line commands for tasks like training, validation, and prediction straight from your terminal. The basic syntax for `yolo` commands is: ```bash yolo TASK MODE ARGS @@ -421,7 +421,7 @@ yolo TASK MODE ARGS For example, to train a detection model with specified parameters: ```bash -yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 +yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01 ``` Check out the full [CLI Guide](usage/cli.md) to explore more commands and usage examples. diff --git a/pyproject.toml b/pyproject.toml index f8cc5ec5..00c42a74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ description = "Ultralytics YOLO for SOTA object detection, multi-object tracking readme = "README.md" requires-python = ">=3.8" license = { "text" = "AGPL-3.0" } -keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "YOLOv9", "YOLOv10", "HUB", "Ultralytics"] +keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "YOLOv9", "YOLOv10", "YOLO11", "HUB", "Ultralytics"] authors = [ { name = "Glenn Jocher", email = "glenn.jocher@ultralytics.com"}, { name = "Jing Qiu", email = "jing.qiu@ultralytics.com"},