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:
Glenn Jocher 2024-09-06 17:17:33 +02:00 committed by GitHub
parent 6f5c3c8cea
commit ce24c7273e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 767 additions and 744 deletions

View file

@ -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 |

View file

@ -91,7 +91,7 @@ To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an i
!!! Example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
@ -103,7 +103,7 @@ To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an i
```
=== "CLI"
```bash
yolo pose train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```

View file

@ -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.
@ -142,7 +142,7 @@ This conversion tool can be used to convert the COCO dataset or any dataset in t
### What is the Ultralytics YOLO format for pose estimation?
The Ultralytics YOLO format for pose estimation datasets involves labeling each image with a corresponding text file. Each row of the text file stores information about an object instance:
The Ultralytics YOLO format for pose estimation datasets involves labeling each image with a corresponding text file. Each row of the text file stores information about an object instance:
- Object class index
- Object center coordinates (normalized x and y)
@ -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:
@ -164,12 +165,13 @@ To use the COCO-Pose dataset with Ultralytics YOLO:
model = YOLO("yolov8n-pose.pt") # load pretrained model
results = model.train(data="coco-pose.yaml", epochs=100, imgsz=640)
```
For more information, visit [COCO-Pose](coco.md) and [train](../../modes/train.md) sections.
### 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:
@ -180,7 +182,7 @@ To add your dataset:
model = YOLO("yolov8n-pose.pt")
results = model.train(data="your-dataset.yaml", epochs=100, imgsz=640)
```
For complete steps, check the [Adding your own dataset](#adding-your-own-dataset) section.
### What is the purpose of the dataset YAML file in Ultralytics YOLO?
@ -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).

View file

@ -110,7 +110,7 @@ To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 epochs with an i
!!! Example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
@ -120,10 +120,10 @@ To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 epochs with an i
# Train the model
results = model.train(data="tiger-pose.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
# Start training from a pretrained *.pt model
yolo task=pose mode=train data=tiger-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
@ -140,7 +140,7 @@ To perform inference using a YOLOv8 model trained on the Tiger-Pose dataset, you
!!! Example "Inference Example"
=== "Python"
```python
from ultralytics import YOLO
@ -150,10 +150,10 @@ To perform inference using a YOLOv8 model trained on the Tiger-Pose dataset, you
# Run inference
results = model.predict(source="https://youtu.be/MIBAT6BGE6U", show=True)
```
=== "CLI"
```bash
# Run inference using a tiger-pose trained model
yolo task=pose mode=predict source="https://youtu.be/MIBAT6BGE6U" show=True model="path/to/best.pt"