diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index c533e33..15c13bf 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -64,6 +64,6 @@ jobs:
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
- mkdocs gh-deploy || true
- git checkout gh-pages
- git push https://$PERSONAL_ACCESS_TOKEN@github.com/ultralytics/docs gh-pages --force
+ mkdocs gh-deploy --force || true
+ # git checkout gh-pages
+ # git push https://$PERSONAL_ACCESS_TOKEN@github.com/ultralytics/docs gh-pages --force
diff --git a/README.md b/README.md
index 88e0cd8..cf6d9b0 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ yolo predict model=yolov8n.pt source="https://ultralytics.com/images/bus.jpg"
#### Python
YOLOv8 may also be used directly in a Python environment, and accepts the
-same [arguments](https://docs.ultralytics.com/cfg/) as in the CLI example above:
+same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above:
```python
from ultralytics import YOLO
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 42822e4..7911d71 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -75,7 +75,7 @@ yolo predict model=yolov8n.pt source="https://ultralytics.com/images/bus.jpg"
```
`yolo`可以用于各种任务和模式,并接受额外的参数,例如 `imgsz=640`。参见 YOLOv8 [文档](https://docs.ultralytics.com)
-中可用`yolo`[参数](https://docs.ultralytics.com/cfg/)的完整列表。
+中可用`yolo`[参数](https://docs.ultralytics.com/usage/cfg/)的完整列表。
```bash
yolo task=detect mode=train model=yolov8n.pt args...
@@ -84,7 +84,7 @@ yolo task=detect mode=train model=yolov8n.pt args...
export yolov8n.pt format=onnx args...
```
-YOLOv8 也可以在 Python 环境中直接使用,并接受与上面 CLI 例子中相同的[参数](https://docs.ultralytics.com/cfg/):
+YOLOv8 也可以在 Python 环境中直接使用,并接受与上面 CLI 例子中相同的[参数](https://docs.ultralytics.com/usage/cfg/):
```python
from ultralytics import YOLO
diff --git a/docs/modes/predict.md b/docs/modes/predict.md
index ed60327..ffc8722 100644
--- a/docs/modes/predict.md
+++ b/docs/modes/predict.md
@@ -59,18 +59,18 @@ For images, YOLOv8 supports a variety of image formats defined
in [yolo/data/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/yolo/data/utils.py). The
following suffixes are valid for images:
-| Image Suffixes | Example Predict Command | Reference |
-|----------------|----------------------------------|--------------------------------------------------------------------------------------|
-| bmp | `yolo predict source=image.bmp` | [Microsoft](https://docs.microsoft.com/en-us/windows/win32/gdi/bitmap-file-format) |
-| dng | `yolo predict source=image.dng` | [Adobe](https://helpx.adobe.com/photoshop/using/digital-negative.html) |
-| jpeg | `yolo predict source=image.jpeg` | [Joint Photographic Experts Group](https://jpeg.org/jpeg/) |
-| jpg | `yolo predict source=image.jpg` | [Joint Photographic Experts Group](https://jpeg.org/jpeg/) |
-| mpo | `yolo predict source=image.mpo` | [CIPA](https://www.cipa.jp/std/documents/e/DC-007-Translation-2018-E.pdf) |
-| png | `yolo predict source=image.png` | [Portable Network Graphics](https://www.w3.org/TR/PNG/) |
-| tif | `yolo predict source=image.tif` | [Adobe](https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/tiff6.pdf) |
-| tiff | `yolo predict source=image.tiff` | [Adobe](https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/tiff6.pdf) |
-| webp | `yolo predict source=image.webp` | [Google Developers](https://developers.google.com/speed/webp) |
-| pfm | `yolo predict source=image.pfm` | [HDR Labs](http://hdrlabs.com/tools/pfrenchy/) |
+| Image Suffixes | Example Predict Command | Reference |
+|----------------|----------------------------------|-------------------------------------------------------------------------------|
+| .bmp | `yolo predict source=image.bmp` | [Microsoft BMP File Format](https://en.wikipedia.org/wiki/BMP_file_format) |
+| .dng | `yolo predict source=image.dng` | [Adobe DNG](https://www.adobe.com/products/photoshop/extend.displayTab2.html) |
+| .jpeg | `yolo predict source=image.jpeg` | [JPEG](https://en.wikipedia.org/wiki/JPEG) |
+| .jpg | `yolo predict source=image.jpg` | [JPEG](https://en.wikipedia.org/wiki/JPEG) |
+| .mpo | `yolo predict source=image.mpo` | [Multi Picture Object](https://fileinfo.com/extension/mpo) |
+| .png | `yolo predict source=image.png` | [Portable Network Graphics](https://en.wikipedia.org/wiki/PNG) |
+| .tif | `yolo predict source=image.tif` | [Tag Image File Format](https://en.wikipedia.org/wiki/TIFF) |
+| .tiff | `yolo predict source=image.tiff` | [Tag Image File Format](https://en.wikipedia.org/wiki/TIFF) |
+| .webp | `yolo predict source=image.webp` | [WebP](https://en.wikipedia.org/wiki/WebP) |
+| .pfm | `yolo predict source=image.pfm` | [Portable FloatMap](https://en.wikipedia.org/wiki/Netpbm#File_formats) |
## Video Formats
@@ -78,20 +78,20 @@ For videos, YOLOv8 also supports a variety of video formats defined
in [yolo/data/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/yolo/data/utils.py). The
following suffixes are valid for videos:
-| Video Suffixes | Example Predict Command | Reference |
-|----------------|----------------------------------|----------------------------------------------------------------------------------------------------------------|
-| asf | `yolo predict source=video.asf` | [Microsoft](https://docs.microsoft.com/en-us/windows/win32/wmformat/asf-file-structure) |
-| avi | `yolo predict source=video.avi` | [Microsoft](https://docs.microsoft.com/en-us/windows/win32/directshow/avi-riff-file-reference) |
-| gif | `yolo predict source=video.gif` | [CompuServe](https://www.w3.org/Graphics/GIF/spec-gif89a.txt) |
-| m4v | `yolo predict source=video.m4v` | [Apple](https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html) |
-| mkv | `yolo predict source=video.mkv` | [Matroska](https://matroska.org/technical/specs/index.html) |
-| mov | `yolo predict source=video.mov` | [Apple](https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html) |
-| mp4 | `yolo predict source=video.mp4` | [ISO 68939](https://www.iso.org/standard/68939.html) |
-| mpeg | `yolo predict source=video.mpeg` | [ISO 56021](https://www.iso.org/standard/56021.html) |
-| mpg | `yolo predict source=video.mpg` | [ISO 56021](https://www.iso.org/standard/56021.html) |
-| ts | `yolo predict source=video.ts` | [MPEG Transport Stream](https://en.wikipedia.org/wiki/MPEG_transport_stream) |
-| wmv | `yolo predict source=video.wmv` | [Microsoft](https://docs.microsoft.com/en-us/windows/win32/wmformat/wmv-file-structure) |
-| webm | `yolo predict source=video.webm` | [Google Developers](https://developers.google.com/media/vp9/getting-started/webm-file-format) |
+| Video Suffixes | Example Predict Command | Reference |
+|----------------|----------------------------------|----------------------------------------------------------------------------------|
+| .asf | `yolo predict source=video.asf` | [Advanced Systems Format](https://en.wikipedia.org/wiki/Advanced_Systems_Format) |
+| .avi | `yolo predict source=video.avi` | [Audio Video Interleave](https://en.wikipedia.org/wiki/Audio_Video_Interleave) |
+| .gif | `yolo predict source=video.gif` | [Graphics Interchange Format](https://en.wikipedia.org/wiki/GIF) |
+| .m4v | `yolo predict source=video.m4v` | [MPEG-4 Part 14](https://en.wikipedia.org/wiki/M4V) |
+| .mkv | `yolo predict source=video.mkv` | [Matroska](https://en.wikipedia.org/wiki/Matroska) |
+| .mov | `yolo predict source=video.mov` | [QuickTime File Format](https://en.wikipedia.org/wiki/QuickTime_File_Format) |
+| .mp4 | `yolo predict source=video.mp4` | [MPEG-4 Part 14 - Wikipedia](https://en.wikipedia.org/wiki/MPEG-4_Part_14) |
+| .mpeg | `yolo predict source=video.mpeg` | [MPEG-1 Part 2](https://en.wikipedia.org/wiki/MPEG-1) |
+| .mpg | `yolo predict source=video.mpg` | [MPEG-1 Part 2](https://en.wikipedia.org/wiki/MPEG-1) |
+| .ts | `yolo predict source=video.ts` | [MPEG Transport Stream](https://en.wikipedia.org/wiki/MPEG_transport_stream) |
+| .wmv | `yolo predict source=video.wmv` | [Windows Media Video](https://en.wikipedia.org/wiki/Windows_Media_Video) |
+| .webm | `yolo predict source=video.webm` | [WebM Project](https://en.wikipedia.org/wiki/WebM) |
## Working with Results
@@ -163,7 +163,7 @@ Class reference documentation for `Results` module and its components can be fou
## Plotting results
You can use `plot()` function of `Result` object to plot results on in image object. It plots all components(boxes,
-masks, classification logits, etc) found in the results object
+masks, classification logits, etc.) found in the results object
```python
res = model(img)
diff --git a/docs/modes/track.md b/docs/modes/track.md
index 551c502..c1dd5c3 100644
--- a/docs/modes/track.md
+++ b/docs/modes/track.md
@@ -52,7 +52,7 @@ do is loading the corresponding (detection or segmentation) model.
### Tracking
Tracking shares the configuration with predict, i.e `conf`, `iou`, `show`. More configurations please refer
-to [predict page](https://docs.ultralytics.com/cfg/#prediction).
+to [predict page](https://docs.ultralytics.com/usage/cfg/#prediction).
!!! example ""
=== "Python"
diff --git a/docs/stylesheets/style.css b/docs/stylesheets/style.css
index fc10c4f..4bed4e1 100644
--- a/docs/stylesheets/style.css
+++ b/docs/stylesheets/style.css
@@ -1,31 +1,14 @@
th, td {
- border: 1px solid var(--md-typeset-table-color);
- border-spacing: 0px;
- border-bottom: none;
- border-left: none;
- border-top: none;
+ border: 0.5px solid var(--md-typeset-table-color);
+ border-spacing: 0px;
+ border-bottom: none;
+ border-left: none;
+ border-top: none;
}
-
.md-typeset__table {
- line-height: 1;
+ min-width: 100%;
+ line-height: 1;
}
-
-.md-typeset__table table:not([class]) {
- font-size: .74rem;
- border-right: none;
+.md-typeset table:not([class]) {
+ display: table;
}
-
-.md-typeset__table table:not([class]) td,
-.md-typeset__table table:not([class]) th {
- padding: 15px;
-}
-
-/* light mode alternating table bg colors */
-.md-typeset__table tr:nth-child(2n) {
- background-color: #f8f8f8;
-}
-
-/* dark mode alternating table bg colors */
-[data-md-color-scheme="slate"] .md-typeset__table tr:nth-child(2n) {
- background-color: hsla(var(--md-hue),25%,25%,1)
-}
\ No newline at end of file
diff --git a/docs/tasks/classify.md b/docs/tasks/classify.md
index b2da5b8..f0d518c 100644
--- a/docs/tasks/classify.md
+++ b/docs/tasks/classify.md
@@ -91,7 +91,7 @@ Use a trained YOLOv8n-cls model to run predictions on images.
yolo classify predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
-Read more details of `predict` in our [Predict](https://docs.ultralytics.com/predict/) page.
+Read more details of `predict` in our [Predict](https://docs.ultralytics.com/modes/predict/) page.
## Export
diff --git a/docs/tasks/detect.md b/docs/tasks/detect.md
index 5b5e545..442c2f3 100644
--- a/docs/tasks/detect.md
+++ b/docs/tasks/detect.md
@@ -93,7 +93,7 @@ Use a trained YOLOv8n model to run predictions on images.
yolo detect predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
-Read more details of `predict` in our [Predict](https://docs.ultralytics.com/predict/) page.
+Read more details of `predict` in our [Predict](https://docs.ultralytics.com/modes/predict/) page.
## Export
diff --git a/docs/tasks/keypoints.md b/docs/tasks/keypoints.md
index 6c4c74d..14cd9f5 100644
--- a/docs/tasks/keypoints.md
+++ b/docs/tasks/keypoints.md
@@ -95,7 +95,7 @@ Use a trained YOLOv8n model to run predictions on images.
yolo detect predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
-Read more details of `predict` in our [Predict](https://docs.ultralytics.com/predict/) page.
+Read more details of `predict` in our [Predict](https://docs.ultralytics.com/modes/predict/) page.
## Export TODO
diff --git a/docs/tasks/segment.md b/docs/tasks/segment.md
index d38f317..47a03d5 100644
--- a/docs/tasks/segment.md
+++ b/docs/tasks/segment.md
@@ -97,7 +97,7 @@ Use a trained YOLOv8n-seg model to run predictions on images.
yolo segment predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
-Read more details of `predict` in our [Predict](https://docs.ultralytics.com/predict/) page.
+Read more details of `predict` in our [Predict](https://docs.ultralytics.com/modes/predict/) page.
## Export
diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb
index 2a22bad..91f69ac 100644
--- a/examples/tutorial.ipynb
+++ b/examples/tutorial.ipynb
@@ -86,7 +86,7 @@
"source": [
"# 1. Predict\n",
"\n",
- "YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See a full list of available `yolo` [arguments](https://docs.ultralytics.com/cfg/) in the YOLOv8 [Docs](https://docs.ultralytics.com).\n"
+ "YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See a full list of available `yolo` [arguments](https://docs.ultralytics.com/usage/cfg/) in the YOLOv8 [Docs](https://docs.ultralytics.com).\n"
]
},
{
diff --git a/mkdocs.yml b/mkdocs.yml
index 8d07614..296822d 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -51,6 +51,20 @@ extra:
analytics:
provider: google
property: G-2M5EHKC0BH
+ feedback:
+ title: Was this page helpful?
+ ratings:
+ - icon: material/heart
+ name: This page was helpful
+ data: 1
+ note: Thanks for your feedback!
+ - icon: material/heart-broken
+ name: This page could be improved
+ data: 0
+ note: >-
+ Thanks for your feedback!
+ Tell us what we can improve.
+
social:
- icon: fontawesome/brands/github
link: https://github.com/ultralytics
diff --git a/ultralytics/datasets/Argoverse.yaml b/ultralytics/datasets/Argoverse.yaml
index 0be17c8..98cafc6 100644
--- a/ultralytics/datasets/Argoverse.yaml
+++ b/ultralytics/datasets/Argoverse.yaml
@@ -2,7 +2,7 @@
# Argoverse-HD dataset (ring-front-center camera) http://www.cs.cmu.edu/~mengtial/proj/streaming/ by Argo AI
# Example usage: yolo train data=Argoverse.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── Argoverse ← downloads here (31.3 GB)
diff --git a/ultralytics/datasets/GlobalWheat2020.yaml b/ultralytics/datasets/GlobalWheat2020.yaml
index c41cb4f..10df6c4 100644
--- a/ultralytics/datasets/GlobalWheat2020.yaml
+++ b/ultralytics/datasets/GlobalWheat2020.yaml
@@ -2,7 +2,7 @@
# Global Wheat 2020 dataset http://www.global-wheat.com/ by University of Saskatchewan
# Example usage: yolo train data=GlobalWheat2020.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── GlobalWheat2020 ← downloads here (7.0 GB)
diff --git a/ultralytics/datasets/ImageNet.yaml b/ultralytics/datasets/ImageNet.yaml
index 87cf6f1..2775809 100644
--- a/ultralytics/datasets/ImageNet.yaml
+++ b/ultralytics/datasets/ImageNet.yaml
@@ -3,7 +3,7 @@
# Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
# Example usage: yolo train task=classify data=imagenet
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── imagenet ← downloads here (144 GB)
diff --git a/ultralytics/datasets/Objects365.yaml b/ultralytics/datasets/Objects365.yaml
index ad9e925..db4a892 100644
--- a/ultralytics/datasets/Objects365.yaml
+++ b/ultralytics/datasets/Objects365.yaml
@@ -2,7 +2,7 @@
# Objects365 dataset https://www.objects365.org/ by Megvii
# Example usage: yolo train data=Objects365.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── Objects365 ← downloads here (712 GB = 367G data + 345G zips)
diff --git a/ultralytics/datasets/SKU-110K.yaml b/ultralytics/datasets/SKU-110K.yaml
index 6052177..da9595f 100644
--- a/ultralytics/datasets/SKU-110K.yaml
+++ b/ultralytics/datasets/SKU-110K.yaml
@@ -2,7 +2,7 @@
# SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19 by Trax Retail
# Example usage: yolo train data=SKU-110K.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── SKU-110K ← downloads here (13.6 GB)
diff --git a/ultralytics/datasets/VOC.yaml b/ultralytics/datasets/VOC.yaml
index 8e5d68c..6c6b3d5 100644
--- a/ultralytics/datasets/VOC.yaml
+++ b/ultralytics/datasets/VOC.yaml
@@ -2,7 +2,7 @@
# PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC by University of Oxford
# Example usage: yolo train data=VOC.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── VOC ← downloads here (2.8 GB)
diff --git a/ultralytics/datasets/VisDrone.yaml b/ultralytics/datasets/VisDrone.yaml
index 141b568..a481066 100644
--- a/ultralytics/datasets/VisDrone.yaml
+++ b/ultralytics/datasets/VisDrone.yaml
@@ -2,7 +2,7 @@
# VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset by Tianjin University
# Example usage: yolo train data=VisDrone.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── VisDrone ← downloads here (2.3 GB)
diff --git a/ultralytics/datasets/coco.yaml b/ultralytics/datasets/coco.yaml
index 6c4bc20..4734643 100644
--- a/ultralytics/datasets/coco.yaml
+++ b/ultralytics/datasets/coco.yaml
@@ -2,7 +2,7 @@
# COCO 2017 dataset http://cocodataset.org by Microsoft
# Example usage: yolo train data=coco.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco ← downloads here (20.1 GB)
diff --git a/ultralytics/datasets/coco128-seg.yaml b/ultralytics/datasets/coco128-seg.yaml
index 4240387..7c2145f 100644
--- a/ultralytics/datasets/coco128-seg.yaml
+++ b/ultralytics/datasets/coco128-seg.yaml
@@ -2,7 +2,7 @@
# COCO128-seg dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
# Example usage: yolo train data=coco128.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco128-seg ← downloads here (7 MB)
diff --git a/ultralytics/datasets/coco128.yaml b/ultralytics/datasets/coco128.yaml
index 0e02812..fe093d5 100644
--- a/ultralytics/datasets/coco128.yaml
+++ b/ultralytics/datasets/coco128.yaml
@@ -2,7 +2,7 @@
# COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
# Example usage: yolo train data=coco128.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco128 ← downloads here (7 MB)
diff --git a/ultralytics/datasets/coco8-seg.yaml b/ultralytics/datasets/coco8-seg.yaml
index 0dfa376..e05951a 100644
--- a/ultralytics/datasets/coco8-seg.yaml
+++ b/ultralytics/datasets/coco8-seg.yaml
@@ -2,7 +2,7 @@
# COCO8-seg dataset (first 8 images from COCO train2017) by Ultralytics
# Example usage: yolo train data=coco8-seg.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco8-seg ← downloads here (1 MB)
diff --git a/ultralytics/datasets/coco8.yaml b/ultralytics/datasets/coco8.yaml
index cb80516..56e8151 100644
--- a/ultralytics/datasets/coco8.yaml
+++ b/ultralytics/datasets/coco8.yaml
@@ -2,7 +2,7 @@
# COCO8 dataset (first 8 images from COCO train2017) by Ultralytics
# Example usage: yolo train data=coco8.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco8 ← downloads here (1 MB)
diff --git a/ultralytics/datasets/xView.yaml b/ultralytics/datasets/xView.yaml
index e2ffca6..1448cff 100644
--- a/ultralytics/datasets/xView.yaml
+++ b/ultralytics/datasets/xView.yaml
@@ -3,7 +3,7 @@
# -------- DOWNLOAD DATA MANUALLY and jar xf val_images.zip to 'datasets/xView' before running train command! --------
# Example usage: yolo train data=xView.yaml
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── xView ← downloads here (20.7 GB)
diff --git a/ultralytics/models/README.md b/ultralytics/models/README.md
index 074c418..5c88b88 100644
--- a/ultralytics/models/README.md
+++ b/ultralytics/models/README.md
@@ -24,7 +24,7 @@ yolo task=detect mode=train model=yolov8n.yaml data=coco128.yaml epochs=100
```
They may also be used directly in a Python environment, and accepts the same
-[arguments](https://docs.ultralytics.com/cfg/) as in the CLI example above:
+[arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above:
```python
from ultralytics import YOLO
diff --git a/ultralytics/yolo/data/scripts/get_coco.sh b/ultralytics/yolo/data/scripts/get_coco.sh
index 8648f7f..0cae5ad 100755
--- a/ultralytics/yolo/data/scripts/get_coco.sh
+++ b/ultralytics/yolo/data/scripts/get_coco.sh
@@ -3,7 +3,7 @@
# Download COCO 2017 dataset http://cocodataset.org
# Example usage: bash data/scripts/get_coco.sh
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco ← downloads here
diff --git a/ultralytics/yolo/data/scripts/get_coco128.sh b/ultralytics/yolo/data/scripts/get_coco128.sh
index be3ccaf..6002a63 100755
--- a/ultralytics/yolo/data/scripts/get_coco128.sh
+++ b/ultralytics/yolo/data/scripts/get_coco128.sh
@@ -3,7 +3,7 @@
# Download COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017)
# Example usage: bash data/scripts/get_coco128.sh
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── coco128 ← downloads here
diff --git a/ultralytics/yolo/data/scripts/get_imagenet.sh b/ultralytics/yolo/data/scripts/get_imagenet.sh
index b0e4a6d..4428b23 100755
--- a/ultralytics/yolo/data/scripts/get_imagenet.sh
+++ b/ultralytics/yolo/data/scripts/get_imagenet.sh
@@ -3,7 +3,7 @@
# Download ILSVRC2012 ImageNet dataset https://image-net.org
# Example usage: bash data/scripts/get_imagenet.sh
# parent
-# ├── yolov5
+# ├── ultralytics
# └── datasets
# └── imagenet ← downloads here
diff --git a/ultralytics/yolo/engine/results.py b/ultralytics/yolo/engine/results.py
index bd23fcc..8f80a36 100644
--- a/ultralytics/yolo/engine/results.py
+++ b/ultralytics/yolo/engine/results.py
@@ -2,7 +2,7 @@
"""
Ultralytics Results, Boxes and Masks classes for handling inference results
-Usage: See https://docs.ultralytics.com/predict/
+Usage: See https://docs.ultralytics.com/modes/predict/
"""
import pprint
diff --git a/ultralytics/yolo/v8/detect/predict.py b/ultralytics/yolo/v8/detect/predict.py
index 6443585..98210f6 100644
--- a/ultralytics/yolo/v8/detect/predict.py
+++ b/ultralytics/yolo/v8/detect/predict.py
@@ -63,15 +63,14 @@ class DetectionPredictor(BasePredictor):
# write
for d in reversed(det):
- cls, conf = d.cls.squeeze(), d.conf.squeeze()
+ cls, conf, id = d.cls.squeeze(), d.conf.squeeze(), None if d.id is None else int(d.id.item())
if self.args.save_txt: # Write to file
- line = (cls, *(d.xywhn.view(-1).tolist()), conf) \
- if self.args.save_conf else (cls, *(d.xywhn.view(-1).tolist())) # label format
+ line = (cls, *d.xywhn.view(-1)) + (conf, ) * self.args.save_conf + (() if id is None else (id, ))
with open(f'{self.txt_path}.txt', 'a') as f:
f.write(('%g ' * len(line)).rstrip() % line + '\n')
if self.args.save or self.args.save_crop or self.args.show: # Add bbox to image
c = int(cls) # integer class
- name = f'id:{int(d.id.item())} {self.model.names[c]}' if d.id is not None else self.model.names[c]
+ name = ('' if id is None else f'id:{id} ') + self.model.names[c]
label = None if self.args.hide_labels else (name if self.args.hide_conf else f'{name} {conf:.2f}')
self.annotator.box_label(d.xyxy.squeeze(), label, color=colors(c, True))
if self.args.save_crop:
diff --git a/ultralytics/yolo/v8/segment/predict.py b/ultralytics/yolo/v8/segment/predict.py
index 41b436d..ef5a8d8 100644
--- a/ultralytics/yolo/v8/segment/predict.py
+++ b/ultralytics/yolo/v8/segment/predict.py
@@ -76,17 +76,15 @@ class SegmentationPredictor(DetectionPredictor):
# Write results
for j, d in enumerate(reversed(det)):
- cls, conf = d.cls.squeeze(), d.conf.squeeze()
+ cls, conf, id = d.cls.squeeze(), d.conf.squeeze(), None if d.id is None else int(d.id.item())
if self.args.save_txt: # Write to file
- seg = mask.segments[len(det) - j - 1].copy() # reversed mask.segments
- seg = seg.reshape(-1) # (n,2) to (n*2)
- line = (cls, *seg, conf) if self.args.save_conf else (cls, *seg) # label format
+ seg = mask.segments[len(det) - j - 1].copy().reshape(-1) # reversed mask.segments, (n,2) to (n*2)
+ line = (cls, *seg) + (conf, ) * self.args.save_conf + (() if id is None else (id, ))
with open(f'{self.txt_path}.txt', 'a') as f:
f.write(('%g ' * len(line)).rstrip() % line + '\n')
-
if self.args.save or self.args.save_crop or self.args.show: # Add bbox to image
c = int(cls) # integer class
- name = f'id:{int(d.id.item())} {self.model.names[c]}' if d.id is not None else self.model.names[c]
+ name = ('' if id is None else f'id:{id} ') + self.model.names[c]
label = None if self.args.hide_labels else (name if self.args.hide_conf else f'{name} {conf:.2f}')
self.annotator.box_label(d.xyxy.squeeze(), label, color=colors(c, True)) if self.args.boxes else None
if self.args.save_crop: