Fix gitignore to format Docs datasets (#16071)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
6f5c3c8cea
commit
ce24c7273e
41 changed files with 767 additions and 744 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -130,7 +130,6 @@ venv.bak/
|
|||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
mkdocs_github_authors.yaml
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
|
@ -140,8 +139,8 @@ dmypy.json
|
|||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# datasets and projects
|
||||
datasets/
|
||||
# datasets and projects (ignore /datasets dir at root only to allow for docs/en/datasets dir)
|
||||
/datasets
|
||||
runs/
|
||||
wandb/
|
||||
.DS_Store
|
||||
|
|
|
|||
|
|
@ -110,11 +110,13 @@ To train an Ultralytics YOLO model on the Caltech-101 dataset, you can use the p
|
|||
# Start training from a pretrained *.pt model
|
||||
yolo classify train data=caltech101 model=yolov8n-cls.pt epochs=100 imgsz=416
|
||||
```
|
||||
|
||||
For more detailed arguments and options, refer to the model [Training](../../modes/train.md) page.
|
||||
|
||||
### What are the key features of the Caltech-101 dataset?
|
||||
|
||||
The Caltech-101 dataset includes:
|
||||
|
||||
- Around 9,000 color images across 101 categories.
|
||||
- Categories covering a diverse range of objects, including animals, vehicles, and household items.
|
||||
- Variable number of images per category, typically between 40 and 800.
|
||||
|
|
@ -142,6 +144,7 @@ Citing the Caltech-101 dataset in your research acknowledges the creators' contr
|
|||
publisher={Elsevier}
|
||||
}
|
||||
```
|
||||
|
||||
Citing helps in maintaining the integrity of academic work and assists peers in locating the original resource.
|
||||
|
||||
### Can I use Ultralytics HUB for training models on the Caltech-101 dataset?
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ keywords: ImageNet, deep learning, visual recognition, computer vision, pretrain
|
|||
## ImageNet Pretrained Models
|
||||
|
||||
| Model | size<br><sup>(pixels) | acc<br><sup>top1 | acc<br><sup>top5 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ The [COCO](https://cocodataset.org/#home) (Common Objects in Context) dataset is
|
|||
## COCO Pretrained Models
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
|
|||
|
|
@ -16,20 +16,20 @@ The Ultralytics YOLO format is a dataset configuration format that allows you to
|
|||
|
||||
```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, ..]
|
||||
path: ../datasets/coco8 # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
path: ../datasets/coco8 # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
|
||||
# Classes (80 COCO classes)
|
||||
names:
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
77: teddy bear
|
||||
78: hair drier
|
||||
79: toothbrush
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
77: teddy bear
|
||||
78: hair drier
|
||||
79: toothbrush
|
||||
```
|
||||
|
||||
Labels for this format should be exported to YOLO format with one `*.txt` file per image. If there are no objects in an image, no `*.txt` file is required. The `*.txt` file should be formatted with one row per object in `class x_center y_center width height` format. Box coordinates must be in **normalized xywh** format (from 0 to 1). If your boxes are in pixels, you should divide `x_center` and `width` by image width, and `y_center` and `height` by image height. Class numbers should be zero-indexed (start with 0).
|
||||
|
|
@ -121,15 +121,15 @@ Remember to double-check if the dataset you want to use is compatible with your
|
|||
The Ultralytics YOLO format is a structured configuration for defining datasets in your training projects. It involves setting paths to your training, validation, and testing images and corresponding labels. For example:
|
||||
|
||||
```yaml
|
||||
path: ../datasets/coco8 # dataset root directory
|
||||
train: images/train # training images (relative to 'path')
|
||||
val: images/val # validation images (relative to 'path')
|
||||
test: # optional test images
|
||||
path: ../datasets/coco8 # dataset root directory
|
||||
train: images/train # training images (relative to 'path')
|
||||
val: images/val # validation images (relative to 'path')
|
||||
test: # optional test images
|
||||
names:
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
```
|
||||
|
||||
Labels are saved in `*.txt` files with one file per image, formatted as `class x_center y_center width height` with normalized coordinates. For a detailed guide, see the [COCO8 dataset example](coco8.md).
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ Refer to the [Training](../../modes/train.md) page for a comprehensive list of a
|
|||
### Why should I use the Objects365 dataset for my object detection projects?
|
||||
|
||||
The Objects365 dataset offers several advantages for object detection tasks:
|
||||
|
||||
1. **Diversity**: It includes 2 million images with objects in diverse scenarios, covering 365 categories.
|
||||
2. **High-quality Annotations**: Over 30 million bounding boxes provide comprehensive ground truth data.
|
||||
3. **Performance**: Models pre-trained on Objects365 significantly outperform those trained on datasets like ImageNet, leading to better generalization.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ keywords: Open Images V7, Google dataset, computer vision, YOLOv8 models, object
|
|||
## Open Images V7 Pretrained Models
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
@ -142,7 +142,6 @@ To train a YOLOv8 model on the Open Images V7 dataset, you can use both Python a
|
|||
|
||||
!!! Example "Train Example"
|
||||
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
|
|
@ -168,6 +167,7 @@ For more details on arguments and settings, refer to the [Training](../../modes/
|
|||
### What are some key features of the Open Images V7 dataset?
|
||||
|
||||
The Open Images V7 dataset includes approximately 9 million images with various annotations:
|
||||
|
||||
- **Bounding Boxes**: 16 million bounding boxes across 600 object classes.
|
||||
- **Segmentation Masks**: Masks for 2.8 million objects across 350 classes.
|
||||
- **Visual Relationships**: 3.3 million annotations indicating relationships, properties, and actions.
|
||||
|
|
@ -179,17 +179,18 @@ The Open Images V7 dataset includes approximately 9 million images with various
|
|||
|
||||
Ultralytics provides several YOLOv8 pretrained models for the Open Images V7 dataset, each with different sizes and performance metrics:
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
||||
### What applications can the Open Images V7 dataset be used for?
|
||||
|
||||
The Open Images V7 dataset supports a variety of computer vision tasks including:
|
||||
|
||||
- **Image Classification**
|
||||
- **Object Detection**
|
||||
- **Instance Segmentation**
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ We would like to acknowledge the AISKYEYE team at the Lab of Machine Learning an
|
|||
### What is the VisDrone Dataset and what are its key features?
|
||||
|
||||
The [VisDrone Dataset](https://github.com/VisDrone/VisDrone-Dataset) is a large-scale benchmark created by the AISKYEYE team at Tianjin University, China. It is designed for various computer vision tasks related to drone-based image and video analysis. Key features include:
|
||||
|
||||
- **Composition**: 288 video clips with 261,908 frames and 10,209 static images.
|
||||
- **Annotations**: Over 2.6 million bounding boxes for objects like pedestrians, cars, bicycles, and tricycles.
|
||||
- **Diversity**: Collected across 14 cities, in urban and rural settings, under different weather and lighting conditions.
|
||||
|
|
@ -142,6 +143,7 @@ For additional configuration options, please refer to the model [Training](../..
|
|||
### What are the main subsets of the VisDrone dataset and their applications?
|
||||
|
||||
The VisDrone dataset is divided into five main subsets, each tailored for a specific computer vision task:
|
||||
|
||||
1. **Task 1**: Object detection in images.
|
||||
2. **Task 2**: Object detection in videos.
|
||||
3. **Task 3**: Single-object tracking.
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ For detailed arguments and settings, refer to the model [Training](../../modes/t
|
|||
### What are the key features of the xView dataset?
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -342,14 +342,17 @@ The Ultralytics Explorer API is designed for comprehensive dataset exploration.
|
|||
### How do I install the Ultralytics Explorer API?
|
||||
|
||||
To install the Ultralytics Explorer API along with its dependencies, use the following command:
|
||||
|
||||
```bash
|
||||
pip install ultralytics[explorer]
|
||||
```
|
||||
|
||||
This will automatically install all necessary external libraries for the Explorer API functionality. For additional setup details, refer to the [installation section](#installation) of our documentation.
|
||||
|
||||
### How can I use the Ultralytics Explorer API for similarity search?
|
||||
|
||||
You can use the Ultralytics Explorer API to perform similarity searches by creating an embeddings table and querying it for similar images. Here's a basic example:
|
||||
|
||||
```python
|
||||
from ultralytics import Explorer
|
||||
|
||||
|
|
@ -361,6 +364,7 @@ explorer.create_embeddings_table()
|
|||
similar_images_df = explorer.get_similar(img="path/to/image.jpg")
|
||||
print(similar_images_df.head())
|
||||
```
|
||||
|
||||
For more details, please visit the [Similarity Search section](#1-similarity-search).
|
||||
|
||||
### What are the benefits of using LanceDB with Ultralytics Explorer?
|
||||
|
|
|
|||
|
|
@ -40,11 +40,13 @@ Semantic search is a technique for finding similar images to a given image. It i
|
|||
|
||||
For example:
|
||||
In this VOC Exploration dashboard, user selects a couple airplane images like this:
|
||||
|
||||
<p>
|
||||
<img width="1710" alt="Explorer Dashboard Screenshot 2" src="https://github.com/ultralytics/docs/releases/download/0/explorer-dashboard-screenshot-2.avif">
|
||||
</p>
|
||||
|
||||
On performing similarity search, you should see a similar result:
|
||||
|
||||
<p>
|
||||
<img width="1710" alt="Explorer Dashboard Screenshot 3" src="https://github.com/ultralytics/docs/releases/download/0/explorer-dashboard-screenshot-3.avif">
|
||||
</p>
|
||||
|
|
@ -52,6 +54,7 @@ On performing similarity search, you should see a similar result:
|
|||
## Ask AI
|
||||
|
||||
This allows you to write how you want to filter your dataset using natural language. You don't have to be proficient in writing SQL queries. Our AI powered query generator will automatically do that under the hood. For example - you can say - "show me 100 images with exactly one person and 2 dogs. There can be other objects too" and it'll internally generate the query and show you those results. Here's an example output when asked to "Show 10 images with exactly 5 persons" and you'll see a result like this:
|
||||
|
||||
<p>
|
||||
<img width="1709" alt="Explorer Dashboard Screenshot 4" src="https://github.com/ultralytics/docs/releases/download/0/explorer-dashboard-screenshot-4.avif">
|
||||
</p>
|
||||
|
|
@ -113,6 +116,7 @@ For more details, refer to the [SQL Queries Section](#run-sql-queries-on-your-cv
|
|||
### What are the benefits of using Ultralytics Explorer GUI for data exploration?
|
||||
|
||||
Ultralytics Explorer GUI enhances data exploration with features like semantic search, SQL querying, and natural language interactions through the Ask AI feature. These capabilities allow users to:
|
||||
|
||||
- Efficiently find visually similar images.
|
||||
- Filter datasets using complex SQL queries.
|
||||
- Utilize AI to perform natural language searches, eliminating the need for advanced SQL expertise.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -155,6 +155,7 @@ By following these steps, you can contribute a new dataset that integrates well
|
|||
### What datasets does Ultralytics support for object detection?
|
||||
|
||||
Ultralytics supports a wide variety of datasets for object detection, including:
|
||||
|
||||
- [COCO](detect/coco.md): A large-scale object detection, segmentation, and captioning dataset with 80 object categories.
|
||||
- [LVIS](detect/lvis.md): An extensive dataset with 1203 object categories, designed for more fine-grained object detection and segmentation.
|
||||
- [Argoverse](detect/argoverse.md): A dataset containing 3D tracking and motion forecasting data from urban environments with rich annotations.
|
||||
|
|
@ -166,6 +167,7 @@ These datasets facilitate training robust models for various object detection ap
|
|||
### How do I contribute a new dataset to Ultralytics?
|
||||
|
||||
Contributing a new dataset involves several steps:
|
||||
|
||||
1. **Collect Images**: Gather images from public databases or personal collections.
|
||||
2. **Annotate Images**: Apply bounding boxes, segments, or keypoints, depending on the task.
|
||||
3. **Export Annotations**: Convert annotations into the YOLO `*.txt` format.
|
||||
|
|
@ -180,6 +182,7 @@ Visit [Contribute New Datasets](#contribute-new-datasets) for a comprehensive gu
|
|||
### Why should I use Ultralytics Explorer for my dataset?
|
||||
|
||||
Ultralytics Explorer offers powerful features for dataset analysis, including:
|
||||
|
||||
- **Embeddings Generation**: Create vector embeddings for images.
|
||||
- **Semantic Search**: Search for similar images using embeddings or AI.
|
||||
- **SQL Queries**: Run advanced SQL queries for detailed data analysis.
|
||||
|
|
@ -190,6 +193,7 @@ Explore the [Ultralytics Explorer](explorer/index.md) for more information and t
|
|||
### What are the unique features of Ultralytics YOLO models for computer vision?
|
||||
|
||||
Ultralytics YOLO models provide several unique features:
|
||||
|
||||
- **Real-time Performance**: High-speed inference and training.
|
||||
- **Versatility**: Suitable for detection, segmentation, classification, and pose estimation tasks.
|
||||
- **Pretrained Models**: Access to high-performing, pretrained models for various applications.
|
||||
|
|
|
|||
|
|
@ -195,9 +195,7 @@ For more details on how to split and preprocess the DOTA images, refer to the [s
|
|||
### What are the differences between DOTA-v1.0, DOTA-v1.5, and DOTA-v2.0?
|
||||
|
||||
- **DOTA-v1.0**: Includes 15 common categories across 2,806 images with 188,282 instances. The dataset is split into training, validation, and testing sets.
|
||||
|
||||
- **DOTA-v1.5**: Builds upon DOTA-v1.0 by annotating very small instances (less than 10 pixels) and adding a new category, "container crane," totaling 403,318 instances.
|
||||
|
||||
- **DOTA-v2.0**: Expands further with annotations from Google Earth and GF-2 Satellite, featuring 11,268 images and 1,793,658 instances. It includes new categories like "airport" and "helipad."
|
||||
|
||||
For a detailed comparison and additional specifics, check the [dataset versions section](#dataset-versions).
|
||||
|
|
|
|||
|
|
@ -120,7 +120,6 @@ Training a YOLOv8 model with OBBs involves ensuring your dataset is in the YOLO
|
|||
results = model.train(data="your_dataset.yaml", epochs=100, imgsz=640)
|
||||
```
|
||||
|
||||
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ The [COCO-Pose](https://cocodataset.org/#keypoints-2017) dataset is a specialize
|
|||
## COCO-Pose Pretrained Models
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>pose<br>50-95 | mAP<sup>pose<br>50 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
|
|||
|
|
@ -42,18 +42,18 @@ The Ultralytics framework uses a YAML file format to define the dataset and mode
|
|||
|
||||
```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, ..]
|
||||
path: ../datasets/coco8-pose # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
path: ../datasets/coco8-pose # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
|
||||
# Keypoints
|
||||
kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
||||
kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
||||
flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
|
||||
|
||||
# Classes dictionary
|
||||
names:
|
||||
0: person
|
||||
0: person
|
||||
```
|
||||
|
||||
The `train` and `val` fields specify the paths to the directories containing the training and validation images, respectively.
|
||||
|
|
@ -154,6 +154,7 @@ For 2D poses, keypoints include pixel coordinates. For 3D, each keypoint also ha
|
|||
### How do I use the COCO-Pose dataset with Ultralytics YOLO?
|
||||
|
||||
To use the COCO-Pose dataset with Ultralytics YOLO:
|
||||
|
||||
1. Download the dataset and prepare your label files in the YOLO format.
|
||||
2. Create a YAML configuration file specifying paths to training and validation images, keypoint shape, and class names.
|
||||
3. Use the configuration file for training:
|
||||
|
|
@ -170,6 +171,7 @@ To use the COCO-Pose dataset with Ultralytics YOLO:
|
|||
### How can I add my own dataset for pose estimation in Ultralytics YOLO?
|
||||
|
||||
To add your dataset:
|
||||
|
||||
1. Convert your annotations to the Ultralytics YOLO format.
|
||||
2. Create a YAML configuration file specifying the dataset paths, number of classes, and class names.
|
||||
3. Use the configuration file to train your model:
|
||||
|
|
@ -192,7 +194,7 @@ path: ../datasets/coco8-pose
|
|||
train: images/train
|
||||
val: images/val
|
||||
names:
|
||||
0: person
|
||||
0: person
|
||||
```
|
||||
|
||||
Read more about creating YAML configuration files in [Dataset YAML format](#dataset-yaml-format).
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ For more details, refer to the [Training](../../modes/train.md) documentation.
|
|||
### What are some applications of Carparts Segmentation?
|
||||
|
||||
Carparts Segmentation can be widely applied in various fields such as:
|
||||
|
||||
- **Automotive quality control**
|
||||
- **Auto repair and maintenance**
|
||||
- **E-commerce cataloging**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ The [COCO-Seg](https://cocodataset.org/#home) dataset, an extension of the COCO
|
|||
## COCO-Seg Pretrained Models
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
@ -148,7 +148,7 @@ The COCO-Seg dataset includes several key features:
|
|||
The COCO-Seg dataset supports multiple pretrained YOLOv8 segmentation models with varying performance metrics. Here's a summary of the available models and their key metrics:
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(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 |
|
||||
|
|
|
|||
|
|
@ -44,20 +44,20 @@ The Ultralytics framework uses a YAML file format to define the dataset and mode
|
|||
|
||||
```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, ..]
|
||||
path: ../datasets/coco8-seg # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
path: ../datasets/coco8-seg # dataset root dir
|
||||
train: images/train # train images (relative to 'path') 4 images
|
||||
val: images/val # val images (relative to 'path') 4 images
|
||||
test: # test images (optional)
|
||||
|
||||
# Classes (80 COCO classes)
|
||||
names:
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
77: teddy bear
|
||||
78: hair drier
|
||||
79: toothbrush
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
77: teddy bear
|
||||
78: hair drier
|
||||
79: toothbrush
|
||||
```
|
||||
|
||||
The `train` and `val` fields specify the paths to the directories containing the training and validation images, respectively.
|
||||
|
|
@ -141,7 +141,7 @@ To auto-annotate your dataset using the Ultralytics framework, you can use the `
|
|||
```
|
||||
|
||||
| Argument | Type | Description | Default |
|
||||
|--------------|-------------------------|-------------------------------------------------------------------------------------------------------------|----------------|
|
||||
| ------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------- | -------------- |
|
||||
| `data` | `str` | Path to a folder containing images to be annotated. | `None` |
|
||||
| `det_model` | `str, optional` | Pre-trained YOLO detection model. Defaults to `'yolov8x.pt'`. | `'yolov8x.pt'` |
|
||||
| `sam_model` | `str, optional` | Pre-trained SAM segmentation model. Defaults to `'sam_b.pt'`. | `'sam_b.pt'` |
|
||||
|
|
@ -175,15 +175,15 @@ This script converts your COCO dataset annotations to the required YOLO format,
|
|||
To prepare a YAML file for training YOLO models with Ultralytics, you need to define the dataset paths and class names. Here's an example YAML configuration:
|
||||
|
||||
```yaml
|
||||
path: ../datasets/coco8-seg # dataset root dir
|
||||
train: images/train # train images (relative to 'path')
|
||||
val: images/val # val images (relative to 'path')
|
||||
path: ../datasets/coco8-seg # dataset root dir
|
||||
train: images/train # train images (relative to 'path')
|
||||
val: images/val # val images (relative to 'path')
|
||||
|
||||
names:
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
0: person
|
||||
1: bicycle
|
||||
2: car
|
||||
# ...
|
||||
```
|
||||
|
||||
Ensure you update the paths and class names according to your dataset. For more information, check the [Dataset YAML Format](#dataset-yaml-format) section.
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ Refer to the model [Training](../../modes/train.md) page for more details.
|
|||
### What are the components of the Package Segmentation Dataset, and how is it structured?
|
||||
|
||||
The dataset is structured into three main components:
|
||||
|
||||
- **Training set**: Contains 1920 images with annotations.
|
||||
- **Testing set**: Comprises 89 images with corresponding annotations.
|
||||
- **Validation set**: Includes 188 images with annotations.
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ def convert_segment_masks_to_yolo_seg(masks_dir, output_dir, classes):
|
|||
continue # Skip background
|
||||
class_index = pixel_to_class_mapping.get(value, -1)
|
||||
if class_index == -1:
|
||||
LOGGER.warning(f"Unknown class for pixel value {value} in file {mask_filename}, skipping.")
|
||||
LOGGER.warning(f"Unknown class for pixel value {value} in file {mask_path}, skipping.")
|
||||
continue
|
||||
|
||||
# Create a binary mask for the current class and find contours
|
||||
|
|
@ -403,7 +403,7 @@ def convert_segment_masks_to_yolo_seg(masks_dir, output_dir, classes):
|
|||
yolo_format.append(round(point[1] / img_height, 6))
|
||||
yolo_format_data.append(yolo_format)
|
||||
# Save Ultralytics YOLO format data to file
|
||||
output_path = Path(output_dir) / f"{Path(mask_filename).stem}.txt"
|
||||
output_path = Path(output_dir) / f"{mask_path.stem}.txt"
|
||||
with open(output_path, "w") as file:
|
||||
for item in yolo_format_data:
|
||||
line = " ".join(map(str, item))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue