Link to this sectionCOCO-Pose 数据集#
COCO-Pose 数据集将 COCO (Common Objects in Context) 适配用于 姿态估计:包含来自 COCO Keypoints 2017 的 58,945 张图像,并使用 17 个关键点模式标注了 156,165 个人。它是训练和基准测试 Ultralytics YOLO26 等关键点模型的标准数据集,而包含 8 张图像的 COCO8-Pose 子集则沿用了其格式以便进行快速验证。

Link to this sectionCOCO-Pose 预训练模型#
| 模型 | 尺寸 (像素) | mAPpose 50-95(e2e) | mAPpose 50(e2e) | 速度 CPU ONNX (ms) | 速度 T4 TensorRT10 (ms) | 参数量 (M) | FLOPs (B) |
|---|---|---|---|---|---|---|---|
| YOLO26n-pose | 640 | 57.2 | 83.3 | 40.3 ± 0.5 | 1.8 ± 0.0 | 2.9 | 7.5 |
| YOLO26s-pose | 640 | 63.0 | 86.6 | 85.3 ± 0.9 | 2.7 ± 0.0 | 10.4 | 23.9 |
| YOLO26m-pose | 640 | 68.8 | 89.6 | 218.0 ± 1.5 | 5.0 ± 0.1 | 21.5 | 73.1 |
| YOLO26l-pose | 640 | 70.4 | 90.5 | 275.4 ± 2.4 | 6.5 ± 0.1 | 25.9 | 91.3 |
| YOLO26x-pose | 640 | 71.6 | 91.6 | 565.4 ± 3.0 | 12.2 ± 0.2 | 57.6 | 201.7 |
Link to this section主要特性#
- COCO-Pose 基于 COCO Keypoints 2017 挑战赛构建,该挑战赛为 156,165 个标注人物标记了 1,710,498 个独立的关键点。
- 每个人物标注使用 17 种关键点类型——鼻子、眼睛、耳朵、肩膀、手肘、手腕、臀部、膝盖和脚踝——并以
(x, y, visibility)三元组形式存储。 - 与 COCO 一样,它提供了标准化的评估指标,包括用于姿态估计任务的对象关键点相似度 (OKS),使其适合比较模型性能。
- 下载大小:首次使用时约为 20.2 GB(
train2017.zip+val2017.zip+ 标签)。7 GB 的test2017.zip不会自动获取,因为这些图像未公开真实标签,仅在进行 test-dev2017 提交 时需要。
Link to this section数据集结构#
对于训练和验证,COCO-Pose 仅包含带有关键点标注人物的 COCO 2017 图像,因此其标注拆分比完整 COCO 数据集更小。其 YAML 定义了三个子集:
- Train2017:此子集包含来自 COCO 数据集的 56,599 张图像,用于训练姿态估计模型。
- Val2017:此子集包含 2,346 张图像,用于模型训练期间的验证。
- Test-dev2017:这是完整 40,670 张 test2017 图像子集中的 20,288 张图像,其真实标签(ground truth)未公开。数据集 YAML 将此拆分链接到 COCO test-dev 关键点评估服务器。
在此规模下进行训练正是 Ultralytics Platform 最能发挥作用的地方——它负责管理计算资源,让你无需自行配置 GPU 即可启动并监控任务运行。
Link to this section应用#
COCO-Pose 数据集专门用于训练和评估深度学习模型在关键点检测和姿态估计任务上的表现。该数据集拥有大量标注图像和标准化的评估指标,是计算机视觉研究人员和从业者进行人体姿态相关工作的重要资源。
Link to this section数据集 YAML#
YAML 文件用于定义数据集配置。它包含有关数据集路径、类别和其他相关信息。对于 COCO-Pose 数据集,coco-pose.yaml 文件维护在 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco-pose.yaml。
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# COCO 2017 Keypoints dataset https://cocodataset.org by Microsoft
# Documentation: https://docs.ultralytics.com/datasets/pose/coco
# Example usage: yolo train data=coco-pose.yaml
# parent
# ├── ultralytics
# └── datasets
# └── coco-pose ← downloads here (20.2 GB)
# 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: coco-pose # dataset root dir
train: train2017.txt # train images (relative to 'path') 56599 images
val: val2017.txt # val images (relative to 'path') 2346 images
test: test-dev2017.txt # 20288 of 40670 images, submit to https://codalab.lisn.upsaclay.fr/competitions/7403
# 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
# Keypoint names per class
kpt_names:
0:
- nose
- left_eye
- right_eye
- left_ear
- right_ear
- left_shoulder
- right_shoulder
- left_elbow
- right_elbow
- left_wrist
- right_wrist
- left_hip
- right_hip
- left_knee
- right_knee
- left_ankle
- right_ankle
# Download script/URL (optional)
download: |
from pathlib import Path
from ultralytics.utils import ASSETS_URL
from ultralytics.utils.downloads import download
# Download labels
dir = Path(yaml["path"]) # dataset root dir
urls = [f"{ASSETS_URL}/coco2017labels-pose.zip"]
download(urls, dir=dir.parent)
# Download data (test2017.zip excluded: ground truth is withheld, only used for the CodaLab test-dev split)
urls = [
"http://images.cocodataset.org/zips/train2017.zip", # 19G, 118k images
"http://images.cocodataset.org/zips/val2017.zip", # 1G, 5k images
]
download(urls, dir=dir / "images", threads=3)Link to this section用法#
要在 COCO-Pose 数据集上训练 YOLO26n-pose 模型 100 个 轮次,且图像大小为 640,你可以使用以下代码片段。有关可用参数的完整列表,请参阅模型 训练 页面。
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-pose.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="coco-pose.yaml", epochs=100, imgsz=640)Link to this section样本图像和标注#
COCO-Pose 数据集包含一组多样化的图像,其中的人体图形带有关键点标注。以下是该数据集中的一些图像及其对应标注的示例:

- 马赛克图像:此图像展示了一个由马赛克数据集图像组成的训练批次。马赛克是一种在训练期间使用的技术,它将多张图像合并为单张图像,以增加每个训练批次中物体和场景的多样性。这有助于提高模型对不同物体尺寸、宽高比和上下文的泛化能力。
该示例展示了 COCO-Pose 数据集中图像的多样性和复杂性,以及在训练过程中使用马赛克增强的优势。
Link to this section引用与致谢#
如果你在研究或开发工作中使用了 COCO-Pose 数据集,请引用以下论文:
@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-Pose 数据集及其创建者的更多信息,请访问 COCO 数据集网站。
Link to this section常见问题解答#
Link to this section什么是 COCO-Pose 数据集,以及它如何与 Ultralytics YOLO 一起用于姿态估计?#
COCO-Pose 提供已转换为 YOLO 关键点格式的 COCO Keypoints 2017 图像和标注,在 58,945 张图像上使用 17 关键点模式。只需通过 data=coco-pose.yaml 将其指向任何 Ultralytics YOLO 姿态模型即可,训练 页面文档记录了你从此处可以调整的所有参数。
Link to this section我该如何在 COCO-Pose 数据集上训练 YOLO26 模型?#
加载 yolo26n-pose.pt 并调用 model.train(data="coco-pose.yaml", epochs=100, imgsz=640) ——请参阅上方的 训练示例 获取完整的 Python 和 CLI 代码片段,并查看 训练页面 获取全面的参数列表。
Link to this sectionCOCO-Pose 数据集提供哪些不同的指标来评估模型性能?#
COCO-Pose 数据集为姿态估计任务提供了几种标准化的评估指标,类似于原始的 COCO 数据集。关键指标包括对象关键点相似度 (OKS),它评估预测的关键点与真实标注之间的 准确率。这些指标允许在不同模型之间进行全面的性能比较。例如,COCO-Pose 预训练模型(如 YOLO26n-pose、YOLO26s-pose 等)在文档中列出了具体的性能指标,如 mAPpose50-95 和 mAPpose50。
Link to this sectionCOCO-Pose 数据集的结构和划分是怎样的?#
COCO-Pose ships two labeled splits: 56,599 train2017 images and 2,346 val2017 images. A third split, test-dev2017 (20,288 of the full 40,670 test2017 images), keeps its ground truth private; the dataset YAML links it to the COCO test-dev keypoints evaluation server. See the Dataset Structure section, or the coco-pose.yaml file on GitHub for the exact split paths.
Link to this sectionCOCO-Pose 数据集的主要功能和应用是什么?#
COCO-Pose 使用 17 种人体关键点类型,并继承了 COCO 的标准化指标(包括对象关键点相似度 OKS)来比较模型。这种组合非常适合运动分析、医疗保健和人机交互等人体姿态应用。预训练的 YOLO26-pose 权重列在 COCO-Pose 预训练模型 下。
有关关键点模型的更多信息,请参阅 姿态估计 任务文档。