跳至内容

COCO8 Pose 数据集

导言

UltralyticsCOCO8-Pose 是一个小型但用途广泛的姿态检测数据集,由 COCO 训练 2017 年集的前 8 幅图像组成,其中 4 幅用于训练,4 幅用于验证。该数据集非常适合测试和调试物体检测模型,或试验新的检测方法。该数据集由 8 幅图像组成,规模较小,易于管理,但种类繁多,足以测试训练管道是否存在错误,并在训练较大数据集之前进行合理性检查。

该数据集用于Ultralytics HUB 和 YOLOv8.

数据集 YAML

YAML(另一种标记语言)文件用于定义数据集配置。它包含数据集的路径、类和其他相关信息。就 COCO8-Pose 数据集而言,YAML 文件中的 coco8-pose.yaml 文件保存在 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco8-pose.yaml.

ultralytics/cfg/datasets/coco8-pose.yaml

# Ultralytics YOLO 🚀, AGPL-3.0 license
# COCO8-pose dataset (first 8 images from COCO train2017) by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/pose/coco8-pose/
# Example usage: yolo train data=coco8-pose.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── coco8-pose  ← downloads here (1 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/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)
flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]

# Classes
names:
  0: person

# Download script/URL (optional)
download: https://ultralytics.com/assets/coco8-pose.zip

使用方法

要在图像大小为 640 的 COCO8-Pose 数据集上训练YOLOv8n-pose 模型 100 次,可以使用以下代码片段。有关可用参数的完整列表,请参阅模型训练页面。

列车示例

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='coco8-pose.yaml', epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=coco8-pose.yaml model=yolov8n.pt epochs=100 imgsz=640

图片和注释示例

下面是 COCO8-Pose 数据集中的一些图像示例及其相应的注释:

数据集样本图像

  • 镶嵌图像:该图像展示了由马赛克数据集图像组成的训练批次。马赛克是一种在训练过程中使用的技术,可将多幅图像合并为单幅图像,以增加每个训练批次中物体和场景的多样性。这有助于提高模型对不同物体尺寸、长宽比和环境的泛化能力。

该示例展示了 COCO8-Pose 数据集中图像的多样性和复杂性,以及在训练过程中使用镶嵌技术的好处。

引文和致谢

如果您在研究或开发工作中使用 COCO 数据集,请引用以下论文:

@misc{lin2015microsoft,
      title={Microsoft COCO: Common Objects in Context},
      author={Tsung-Yi Lin and Michael Maire and Serge Belongie and Lubomir Bourdev and Ross Girshick and James Hays and Pietro Perona and Deva Ramanan and C. Lawrence Zitnick and Piotr Dollár},
      year={2015},
      eprint={1405.0312},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

我们衷心感谢 COCO 联盟为计算机视觉界创建并维护这一宝贵资源。有关 COCO 数据集及其创建者的更多信息,请访问COCO 数据集网站



创建于 2023-11-12,更新于 2024-01-07
作者:glenn-jocher(4),Laughing-q(1)

评论