X-Pose: Detecting Any Keypoints
项目主页 | 论文 | UniKPT 数据集 |视频
Jie Yang1,2, Ailing Zeng1, Ruimao Zhang2, Lei Zhang1
1International Digital Economy Academy 2The Chinese University of Hong Kong, Shenzhen
🤩 新闻
-
2024.07.12: X-Pose 支持可控的动物面部动画。详情见 此处。

-
2024.07.02: X-Pose 被 ECCV24 接收(我们将模型名称从 UniPose 更改为 X-Pose,以避免与同名先前工作混淆)。
-
2024.02.14: 我们更新了一个 file 以突出显示 UNIKPT 数据集中的所有类别(1237 个类别)。
-
2023.11.28: 我们很高兴通过此 figure 突出显示 X-Pose 在任意类别中检测 68 个面部关键点的能力。面部关键点的定义遵循此 dataset。
-
2023.11.9: 感谢 OpenXLab,您可以尝试一个快速的 online demo。期待您的反馈!
-
2023.11.1: 我们发布了推理代码、演示、检查点以及 UniKPT 数据集的标注。
-
2023.10.13: 我们发布了 arxiv 版本。
通过 X-Pose 进行的野外测试
X-Pose 在不同图像风格、类别和姿态中均具有强大的细粒度定位和泛化能力。
检测任意面部关键点:
🗒 待办事项
- 发布推理代码和演示。
- 发布检查点。
- 发布 UniKPT 标注.
- 发布训练代码。
💡 概述
• X-Pose 是首个基于提示的端到端关键点检测框架。
• 它支持多模态提示,包括文本和视觉提示,以检测任意关键点(例如,来自铰接、刚性和软体对象)。
视觉提示作为输入:
文本提示作为输入:
🔨 环境配置
- 克隆此仓库
git clone https://github.com/IDEA-Rensearch/X-Pose.git
cd X-Pose
-
安装所需的软件包
pip install -r requirements.txt -
编译 CUDA 算子
cd models/UniPose/ops python setup.py build install # unit test (should see all checking is True) python test.py cd ../../..
▶ 演示
1. 指南
• 我们已发布基于文本提示的推理分支。由于视觉提示涉及大量用户输入,我们目前正在探索更用户友好的平台以支持此功能。
• 由于 X-Pose 已学习到强结构先验,最好使用预定义骨架作为关键点文本提示,这些提示显示在 predefined_keypoints.py。
• 如果用户未提供关键点提示,我们将尝试根据用户的实例类别匹配相应的骨架。如果匹配失败,我们将默认使用动物骨架,该骨架涵盖更广泛的类别和测试需求。
2. 运行
在以下命令中,将 {GPU ID}、image_you_want_to_test.jpg 和 "dir you want to save the output" 替换为适当的值
CUDA_VISIBLE_DEVICES={GPU ID} python inference_on_a_image.py \
-c config/UniPose_SwinT.py \
-p weights/unipose_swint.pth \
-i image_you_want_to_test.jpg \
-o "dir you want to save the output" \
-t "instance categories" \ (e.g., "person", "face", "left hand", "horse", "car", "skirt", "table")
-k "keypoint_skeleton_text" (If necessary, please select an option from the 'predefined_keypoints.py' file.)
我们也支持使用 gradio 进行推理。
python app.py
Checkpoints
| name | backbone | Keypoint AP on COCO | Checkpoint | Config | |
|---|---|---|---|---|---|
| 1 | X-Pose | Swin-T | 74.4 | Google Drive / OpenXLab | GitHub Link |
| 2 | X-Pose | Swin-L | 76.8 | Coming Soon | Coming Soon |
UniKPT 数据集
| 数据集 | KPT | 类别 | 图像数 | 实例数 | 统一图像数 | 统一实例数 |
|---|---|---|---|---|---|---|
| COCO | 17 | 1 | 58,945 | 156,165 | 58,945 | 156,165 |
| 300W-Face | 68 | 1 | 3,837 | 4,437 | 3,837 | 4,437 |
| OneHand10K | 21 | 1 | 11,703 | 11,289 | 2,000 | 2000 |
| Human-Art | 17 | 1 | 50,000 | 123,131 | 50,000 | 123,131 |
| AP-10K | 17 | 54 | 10,015 | 13,028 | 10,015 | 13,028 |
| APT-36K | 17 | 30 | 36,000 | 53,006 | 36,000 | 53,006 |
| MacaquePose | 17 | 1 | 13,083 | 16,393 | 2,000 | 2,320 |
| Animal Kingdom | 23 | 850 | 33,099 | 33,099 | 33,099 | 33,099 |
| AnimalWeb | 9 | 332 | 22,451 | 21,921 | 22,451 | 21,921 |
| Vinegar Fly | 31 | 1 | 1,500 | 1,500 | 1,500 | 1,500 |
| Desert Locust | 34 | 1 | 700 | 700 | 700 | 700 |
| Keypoint-5 | 55/31 | 5 | 8,649 | 8,649 | 2,000 | 2,000 |
| MP-100 | 561/293 | 100 | 16,943 | 18,000 | 16,943 | 18,000 |
| UniKPT | 338 | 1237 | - | - | 226,547 | 418,487 |
• UniKPT 是一个由 13 个现有数据集组成的统一数据集,仅用于非商业研究目的。
• UniKPT 数据集中包含的所有图像均源自上表中列出的数据集。要访问这些图像,请从原始仓库下载。
• 我们提供了 annotations,其中包含精确的关键点文本描述,以便进行有效训练。更方便的是,您可以在 link 中找到文本注释。
引用 X-Pose
如果您发现此仓库对您的工作有用,请考虑按以下方式引用:
@article{xpose,
title={X-Pose: Detection Any Keypoints},
author={Yang, Jie and Zeng, Ailing and Zhang, Ruimao and Zhang, Lei},
journal={ECCV},
year={2024}
}
@inproceedings{yang2023neural,
title={Neural Interactive Keypoint Detection},
author={Yang, Jie and Zeng, Ailing and Li, Feng and Liu, Shilong and Zhang, Ruimao and Zhang, Lei},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={15122--15132},
year={2023}
}
@inproceedings{yang2022explicit,
title={Explicit Box Detection Unifies End-to-End Multi-Person Pose Estimation},
author={Yang, Jie and Zeng, Ailing and Liu, Shilong and Li, Feng and Zhang, Ruimao and Zhang, Lei},
booktitle={The Eleventh International Conference on Learning Representations},
year={2022}
}