Label软件调研和使用

注释 2D 人体姿势的任务涉及在图像中识别和标记人体上的关键点。

首先进行一个人体数据集格式的调研

有几个人体数据集比如coco17点,coco-wholebody133点,Halpe136点,然后对应每种数据集格式有不同的model权重,和不同的config文件,即用什么估计,估计出来几个点,然后经过我的调研,17个点就足以描述项目了,腰部的旋转就是脖子和腰部的夹角角度嘛,所以我现在要找一个做coco数据集标注的软件,其实市面上大多数还是coco数据集的,然后只不过一开始我觉得骨架不一致给吓倒了。

PoseAnnotation(真难用)

https://github.com/MiraPurkrabek/PoseAnnotator

该工具主要针对 COCO 样式的注释实现,因此需要其文件结构。每个数据集应有 3 个子文件夹 annotationsval2017 和可选的 train2017

但我们为我们的用例创建了一些自定义姿势格式。如果您使用 option --pose-format coco_with_thumbs ,则可以查看此类自定义格式的示例。

1
2
3
4
5
6
7
8
9
10
# install
pip install -r requirements.txt

# 标注Bboxes
# 当您切换到其他图像或退出应用程序时,应用程序会自动保存您的进度。默认情况下,关键点保存在 *_kpts.json 文件中,bboxes 保存在 *.json 中
python annotate_bboxes.py test_data/RePoGen_bbox_test

# keypoint 有了bbox之后直接用json文件读取图片,在bbox上标注关键点
# 如果你想对 bbox 进行注释,则不需要任何注释文件。如果你想同时对两者进行注释,请先对 bboxes 进行注释,然后使用另一个脚本进行关键点注释。
python annotate_pose.py test_data/RePoGen_kpts_test/annotations/person_keypoints_val2017.json
快捷键Shortcut Description
u Next unannotated pose
m Save the current annotation progress and move to the next one
n Save the current annotation progress and move to the previous one
,/. Jump by 10 backward/forward.
x Random annotation. Useful for random quality check.
v Change the visibility of the currently selected keypoint (works only while holding the mouse button)
d Delete the currently selected keypoint (works only while holding the mouse button)
a Add a new kypoint, if any is missing
z Undo the previous step (works only untill save)
r Reset the pose to the original (in the last save)
g Generate a new pose
l Flip L/R of the pose
o / p Zoom the image in and out pose
q Quit the program (with save)
1
export annot='cd $pose_annotation_tool && python main.py'
1
annot seq1` or `annot seq2

human-pose-annotation-tool(针对的是深度图)

trainYOLO(吊你老母,还要收费,我做一个也要收费,妈的)

ViTPose(前任真神)

ClickPose(今世新好,记得切cuda!)

我们提出了第一个神经交互式关键点检测框架 Click-Pose,这是一个端到端基线,重要的是,它显著减轻了域外注释(例如,在 Human-Art 上)中的模型偏差,用于在给定图像的情况下注释多人 2D 关键点。与手动校正的最先进的模型注释 (ViTPose) 相比,所需时间减少了 83%。

工作流程 :🤖模型定位所有关键点 -> 👨 用户纠正几个错误的关键点 -> 🤖 模型优化其他关键点

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
先切cuda!!!!!!!!!!!
# 又装了这些,算了,直接新建了个环境
numpy
cython
git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI&egg=pycocotools
submitit
torch>=1.5.0
torchvision>=0.6.0
git+https://github.com/cocodataset/panopticapi.git#egg=panopticapi
scipy
termcolor
addict
yapf
timm
# 注意,克了两个东西到/tmp
Collecting pycocotools
Cloning https://github.com/cocodataset/cocoapi.git to /tmp/pip-install-vk0qur8a/pycocotools_88d9096af52b4a628d1b12ac37cfd8c4
Running command git clone --filter=blob:none --quiet https://github.com/cocodataset/cocoapi.git /tmp/pip-install-vk0qur8a/pycocotools_88d9096af52b4a628d1b12ac37cfd8c4
Resolved https://github.com/cocodataset/cocoapi.git to commit 8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9
Preparing metadata (setup.py) ... done
Collecting panopticapi
Cloning https://github.com/cocodataset/panopticapi.git to /tmp/pip-install-vk0qur8a/panopticapi_ed5d40e7b732405f9ce3c407ee04b281
Running command git clone --filter=blob:none --quiet https://github.com/cocodataset/panopticapi.git /tmp/pip-install-vk0qur8a/panopticapi_ed5d40e7b732405f9ce3c407ee04b281
fatal: 无法访问 'https://github.com/cocodataset/panopticapi.git/':gnutls_handshake() failed: Error in the pull function.
# 然后又下载了个东西
pip uninstall nvidia_cublas_cu11
  1. Compiling CUDA operators
1
2
3
4
5
cd models/clickpose/ops
python setup.py build install
# unit test (should see all checking is True)
python test.py
cd ../../..

Labelme(全能但是不使用)