Skip to content

Commit

Permalink
Update YOLOv3 and YOLOv5 YAMLs (ultralytics#7574)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher authored Jan 14, 2024
1 parent 596c068 commit d762496
Show file tree
Hide file tree
Showing 51 changed files with 299 additions and 319 deletions.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ To stop the serve command and terminate the local server, you can use the `CTRL+

For multi-language MkDocs sites use the following additional steps:

1. Add all new language *.md files to git commit: `git add docs/**/*.md -f`
1. Add all new language `*.md` files to git commit: `git add docs/**/*.md -f`
2. Build all languages to the `/site` directory. Verify that the top-level `/site` directory contains `CNAME`, `robots.txt` and `sitemap.xml` files, if applicable.

```bash
# Remove existing /site directory
rm -rf site
# Loop through all *.yml files in the docs directory
# Loop through all YAML files in the docs directory
mkdocs build -f docs/mkdocs.yml
for file in docs/mkdocs_*.yml; do
echo "Building MkDocs site with configuration file: $file"
Expand Down
2 changes: 1 addition & 1 deletion docs/ar/datasets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ keywords: الرؤية الحاسوبية ، مجموعات البيانات ،

2. **وضع تعليقات على الصور**: قم بإضافة تعليقات على هذه الصور مع صناديق الحدود أو الشرائح أو النقاط التي تعتمد على المهمة.

3. **تصدير التعليقات**: قم بتحويل هذه التعليقات إلى تنسيق الملف *.txt *.txt المدعوم من Ultralytics.
3. **تصدير التعليقات**: قم بتحويل هذه التعليقات إلى تنسيق الملف `*.txt` `*.txt` المدعوم من Ultralytics.

4. **تنظيم مجموعة البيانات**: قم بترتيب مجموعة البيانات الخاصة بك في البنية المجلدات الصحيحة. يجب أن تحتوي على مجلدات أعلى المستوى `train/` و `val/` ، وداخل كل منهما ، مجلدات فرعية للـ `images/` و `labels/`.

Expand Down
2 changes: 1 addition & 1 deletion docs/de/datasets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Das Bereitstellen eines neuen Datensatzes umfasst mehrere Schritte, um sicherzus

2. **Bilder annotieren**: Annotieren Sie diese Bilder mit Bounding Boxen, Segmenten oder Schlüsselpunkten, je nach Aufgabe.

3. **Annotationen exportieren**: Konvertieren Sie diese Annotationen in das von Ultralytics unterstützte YOLO *.txt-Dateiformat.
3. **Annotationen exportieren**: Konvertieren Sie diese Annotationen in das von Ultralytics unterstützte YOLO `*.txt`-Dateiformat.

4. **Datensatz organisieren**: Ordnen Sie Ihren Datensatz in die richtige Ordnerstruktur an. Sie sollten übergeordnete Verzeichnisse `train/` und `val/` haben, und innerhalb dieser je ein Unterverzeichnis `images/` und `labels/`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/datasets/detect/argoverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The [Argoverse](https://www.argoverse.org/) dataset is a collection of data desi

!!! Note

The Argoverse dataset *.zip file required for training was removed from Amazon S3 after the shutdown of Argo AI by Ford, but we have made it available for manual download on [Google Drive](https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link).
The Argoverse dataset `*.zip` file required for training was removed from Amazon S3 after the shutdown of Argo AI by Ford, but we have made it available for manual download on [Google Drive](https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link).

## Key Features

Expand Down
2 changes: 1 addition & 1 deletion docs/en/datasets/detect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Training a robust and accurate object detection model requires a comprehensive d

### Ultralytics YOLO format

The Ultralytics YOLO format is a dataset configuration format that allows you to define the dataset root directory, the relative paths to training/validation/testing image directories or *.txt files containing image paths, and a dictionary of class names. Here is an example:
The Ultralytics YOLO format is a dataset configuration format that allows you to define the dataset root directory, the relative paths to training/validation/testing image directories or `*.txt` files containing image paths, and a dictionary of class names. Here is an example:

```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, ..]
Expand Down
3 changes: 1 addition & 2 deletions docs/en/datasets/detect/voc.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ To train a YOLOv8n model on the VOC dataset for 100 epochs with an image size of
=== "CLI"

```bash
# Start training from
a pretrained *.pt model
# Start training from a pretrained *.pt model
yolo detect train data=VOC.yaml model=yolov8n.pt epochs=100 imgsz=640
```

Expand Down
2 changes: 1 addition & 1 deletion docs/en/datasets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Contributing a new dataset involves several steps to ensure that it aligns well

2. **Annotate Images**: Annotate these images with bounding boxes, segments, or keypoints, depending on the task.

3. **Export Annotations**: Convert these annotations into the YOLO *.txt file format which Ultralytics supports.
3. **Export Annotations**: Convert these annotations into the YOLO `*.txt` file format which Ultralytics supports.

4. **Organize Dataset**: Arrange your dataset into the correct folder structure. You should have `train/` and `val/` top-level directories, and within each, an `images/` and `labels/` subdirectory.

Expand Down
30 changes: 15 additions & 15 deletions docs/en/guides/isolating-segmentation-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

## Recipe Walk Through

1. Begin with the necessary imports
1. Begin with the necessary imports

```py
from pathlib import Path
Expand All @@ -28,9 +28,9 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

See the Ultralytics [Quickstart](../quickstart.md/#install-ultralytics) Installation section for a quick walkthrough on installing the required libraries.

---
***

2. Load a model and run `predict()` method on a source.
2. Load a model and run `predict()` method on a source.

```py
from ultralytics import YOLO
Expand All @@ -55,11 +55,11 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

For additional information about Segmentation Models, visit the [Segment Task](../tasks/segment.md#models) page. To learn more about `predict()` method, see [Predict Mode](../modes/predict.md) section of the Documentation.

---
***

3. Now iterate over the results and the contours. For workflows that want to save an image to file, the source image `base-name` and the detection `class-label` are retrieved for later use (optional).
3. Now iterate over the results and the contours. For workflows that want to save an image to file, the source image `base-name` and the detection `class-label` are retrieved for later use (optional).

``` { .py .annotate }
```{ .py .annotate }
# (2) Iterate detection results (helpful for multiple images)
for r in res:
img = np.copy(r.orig_img)
Expand All @@ -79,13 +79,13 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

A single image will only iterate the first loop once. A single image with only a single detection will iterate each loop _only_ once.

---
***

4. Start with generating a binary mask from the source image and then draw a filled contour onto the mask. This will allow the object to be isolated from the other parts of the image. An example from `bus.jpg` for one of the detected `person` class objects is shown on the right.
4. Start with generating a binary mask from the source image and then draw a filled contour onto the mask. This will allow the object to be isolated from the other parts of the image. An example from `bus.jpg` for one of the detected `person` class objects is shown on the right.

![Binary Mask Image](https://github.com/ultralytics/ultralytics/assets/62214284/59bce684-fdda-4b17-8104-0b4b51149aca){ width="240", align="right" }

``` { .py .annotate }
```{ .py .annotate }
# Create binary mask
b_mask = np.zeros(img.shape[:2], np.uint8)

Expand Down Expand Up @@ -116,7 +116,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
<summary> Expand to understand what is happening when defining the <code>contour</code> variable.</summary>
<p>

- `c.masks.xy` :: Provides the coordinates of the mask contour points in the format `(x, y)`. For more details, refer to the [Masks Section from Predict Mode](../modes/predict.md#masks).
- `c.masks.xy` :: Provides the coordinates of the mask contour points in the format `(x, y)`. For more details, refer to the [Masks Section from Predict Mode](../modes/predict.md#masks).

- `.pop()` :: As `masks.xy` is a list containing a single element, this element is extracted using the `pop()` method.

Expand All @@ -143,9 +143,9 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
</details>
<p></p>

---
***

5. Next the there are 2 options for how to move forward with the image from this point and a subsequent option for each.
5. Next the there are 2 options for how to move forward with the image from this point and a subsequent option for each.

### Object Isolation Options

Expand Down Expand Up @@ -256,9 +256,9 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

This is a built in feature for the Ultralytics library. See the `save_crop` argument for [Predict Mode Inference Arguments](../modes/predict.md/#inference-arguments) for details.

---
***

6. <u>What to do next is entirely left to you as the developer.</u> A basic example of one possible next step (saving the image to file for future use) is shown.
6. <u>What to do next is entirely left to you as the developer.</u> A basic example of one possible next step (saving the image to file for future use) is shown.

- **NOTE:** this step is optional and can be skipped if not required for your specific use case.

Expand All @@ -275,7 +275,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab

Here, all steps from the previous section are combined into a single block of code. For repeated use, it would be optimal to define a function to do some or all commands contained in the `for`-loops, but that is an exercise left to the reader.
``` { .py .annotate }
```{ .py .annotate }
from pathlib import Path
import cv2 as cv
Expand Down
2 changes: 1 addition & 1 deletion docs/en/guides/model-deployment-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords: YOLOv8, Deployment, PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, Co

## Introduction

*Setting the Scene:* You've come a long way on your journey with YOLOv8. You've diligently collected data, meticulously annotated it, and put in the hours to train and rigorously evaluate your custom YOLOv8 model. Now, it’s time to put your model to work for your specific application, use case, or project. But there's a critical decision that stands before you: how to export and deploy your model effectively.
You've come a long way on your journey with YOLOv8. You've diligently collected data, meticulously annotated it, and put in the hours to train and rigorously evaluate your custom YOLOv8 model. Now, it’s time to put your model to work for your specific application, use case, or project. But there's a critical decision that stands before you: how to export and deploy your model effectively.

This guide walks you through YOLOv8’s deployment options and the essential factors to consider to choose the right option for your project.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/guides/object-blurring.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords: Ultralytics, YOLOv8, Object Detection, Object Blurring, Privacy Protec

## What is Object Blurring?

Object blurring with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves applying a blurring effect to specific detected objects in an image or video. This can be achieved using the YOLOv8 model capabilities to identify and manipulate objects within a given scene.
Object blurring with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves applying a blurring effect to specific detected objects in an image or video. This can be achieved using the YOLOv8 model capabilities to identify and manipulate objects within a given scene.

## Advantages of Object Blurring?

Expand Down
4 changes: 2 additions & 2 deletions docs/en/hub/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ We hope that the resources here will help you get the most out of HUB. Please br
- [**Models: Training and Exporting**](models.md). Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
- [**Integrations: Options**](integrations.md). Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
- [**Ultralytics HUB App**](app/index.md). Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
* [**iOS**](app/ios.md). Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
* [**Android**](app/android.md). Explore TFLite acceleration on mobile devices.
- [**iOS**](app/ios.md). Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
- [**Android**](app/android.md). Explore TFLite acceleration on mobile devices.
- [**Inference API**](inference_api.md). Understand how to use the Inference API for running your trained models in the cloud to generate predictions.
2 changes: 1 addition & 1 deletion docs/en/integrations/comet.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import comet_ml
comet_ml.init(project_name="comet-example-yolov8-coco128")
```

*Note:* If you are using a Google Colab notebook, the code above will prompt you to enter your API key for initialization.
If you are using a Google Colab notebook, the code above will prompt you to enter your API key for initialization.

## Usage

Expand Down
38 changes: 22 additions & 16 deletions docs/en/models/fast-sam.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,20 @@ FastSAM is also available directly from the [https://github.com/CASIA-IVA-Lab/Fa
### Installation

1. Clone the FastSAM repository:

```shell
git clone https://github.com/CASIA-IVA-Lab/FastSAM.git
```

2. Create and activate a Conda environment with Python 3.9:

```shell
conda create -n FastSAM python=3.9
conda activate FastSAM
```

3. Navigate to the cloned repository and install the required packages:

```shell
cd FastSAM
pip install -r requirements.txt
Expand All @@ -149,25 +152,28 @@ FastSAM is also available directly from the [https://github.com/CASIA-IVA-Lab/Fa

2. Use FastSAM for inference. Example commands:

- Segment everything in an image:
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg
```
- Segment everything in an image:

- Segment specific objects using text prompt:
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --text_prompt "the yellow dog"
```
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg
```

- Segment objects within a bounding box (provide box coordinates in xywh format):
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --box_prompt "[570,200,230,400]"
```
- Segment specific objects using text prompt:

- Segment objects near specific points:
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --point_prompt "[[520,360],[620,300]]" --point_label "[1,0]"
```
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --text_prompt "the yellow dog"
```

- Segment objects within a bounding box (provide box coordinates in xywh format):

```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --box_prompt "[570,200,230,400]"
```

- Segment objects near specific points:
```shell
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --point_prompt "[[520,360],[620,300]]" --point_label "[1,0]"
```

Additionally, you can try FastSAM through a [Colab demo](https://colab.research.google.com/drive/1oX14f6IneGGw612WgVlAiy91UHwFAvr9?usp=sharing) or on the [HuggingFace web demo](https://huggingface.co/spaces/An-619/FastSAM) for a visual experience.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/models/rtdetr.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ If you use Baidu's RT-DETR in your research or development work, please cite the

We would like to acknowledge Baidu and the [PaddlePaddle](https://github.com/PaddlePaddle/PaddleDetection) team for creating and maintaining this valuable resource for the computer vision community. Their contribution to the field with the development of the Vision Transformers-based real-time object detector, RT-DETR, is greatly appreciated.

*Keywords: RT-DETR, Transformer, ViT, Vision Transformers, Baidu RT-DETR, PaddlePaddle, Paddle Paddle RT-DETR, real-time object detection, Vision Transformers-based object detection, pre-trained PaddlePaddle RT-DETR models, Baidu's RT-DETR usage, Ultralytics Python API*
_Keywords: RT-DETR, Transformer, ViT, Vision Transformers, Baidu RT-DETR, PaddlePaddle, Paddle Paddle RT-DETR, real-time object detection, Vision Transformers-based object detection, pre-trained PaddlePaddle RT-DETR models, Baidu's RT-DETR usage, Ultralytics Python API_
2 changes: 1 addition & 1 deletion docs/en/models/sam.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,4 @@ If you find SAM useful in your research or development work, please consider cit

We would like to express our gratitude to Meta AI for creating and maintaining this valuable resource for the computer vision community.

*keywords: Segment Anything, Segment Anything Model, SAM, Meta SAM, image segmentation, promptable segmentation, zero-shot performance, SA-1B dataset, advanced architecture, auto-annotation, Ultralytics, pre-trained models, SAM base, SAM large, instance segmentation, computer vision, AI, artificial intelligence, machine learning, data annotation, segmentation masks, detection model, YOLO detection model, bibtex, Meta AI.*
_keywords: Segment Anything, Segment Anything Model, SAM, Meta SAM, image segmentation, promptable segmentation, zero-shot performance, SA-1B dataset, advanced architecture, auto-annotation, Ultralytics, pre-trained models, SAM base, SAM large, instance segmentation, computer vision, AI, artificial intelligence, machine learning, data annotation, segmentation masks, detection model, YOLO detection model, bibtex, Meta AI._
2 changes: 1 addition & 1 deletion docs/en/models/yolo-nas.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ If you employ YOLO-NAS in your research or development work, please cite SuperGr

We express our gratitude to Deci AI's [SuperGradients](https://github.com/Deci-AI/super-gradients/) team for their efforts in creating and maintaining this valuable resource for the computer vision community. We believe YOLO-NAS, with its innovative architecture and superior object detection capabilities, will become a critical tool for developers and researchers alike.

*Keywords: YOLO-NAS, Deci AI, object detection, deep learning, neural architecture search, Ultralytics Python API, YOLO model, SuperGradients, pre-trained models, quantization-friendly basic block, advanced training schemes, post-training quantization, AutoNAC optimization, COCO, Objects365, Roboflow 100*
_Keywords: YOLO-NAS, Deci AI, object detection, deep learning, neural architecture search, Ultralytics Python API, YOLO model, SuperGradients, pre-trained models, quantization-friendly basic block, advanced training schemes, post-training quantization, AutoNAC optimization, COCO, Objects365, Roboflow 100_
2 changes: 0 additions & 2 deletions docs/en/modes/predict.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,5 @@ Here's a Python script using OpenCV (`cv2`) and YOLOv8 to run inference on video
This script will run predictions on each frame of the video, visualize the results, and display them in a window. The loop can be exited by pressing 'q'.

[car spare parts]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a0f802a8-0776-44cf-8f17-93974a4a28a1

[football player detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/7d320e1f-fc57-4d7f-a691-78ee579c3442

[human fall detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/86437c4a-3227-4eee-90ef-9efb697bdb43
2 changes: 0 additions & 2 deletions docs/en/modes/track.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,5 @@ To initiate your contribution, please refer to our [Contributing Guide](https://
Together, let's enhance the tracking capabilities of the Ultralytics YOLO ecosystem 🙏!

[fish track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a5146d0f-bfa8-4e0a-b7df-3c1446cd8142

[people track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/93bb4ee2-77a0-4e4e-8eb6-eb8f527f0527

[vehicle track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/ee6e6038-383b-4f21-ac29-b2a1c7d386ab
Loading

0 comments on commit d762496

Please sign in to comment.