【多人姿态估计】AlphaPose_yolov4推理demo复现

代码:https://github.com/WildflowerSchools/AlphaPose

此处环境与yolov3不同,注意。

1.环境

cuda101

torch==1.6.0
torchvision==0.3.0
opencv-python==4.1.0.25
tqdm
natsort
Cython
pycocotools
python setup.py build develop --user
apt-get update
apt-get -y install python3.6-tk

对于python setup.py build develop --user,python库安装过程中慢的,使用:

pip --default-time=1000 install -i https://pypi.tuna.tsinghua.edu.cn/simple ***

2.模型准备与数据准备

参考:https://blog.csdn.net/qq_35975447/article/details/114654804

不一样的地方就是下载的是yolov4.weigts。或者此处:https://github.com/AlexeyAB/darknet

3.demo--跟踪

python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_2x-dcn.yaml --checkpoint pretrained_models/fast_dcn_res50_256x192.pth --indir examples/demo/ --vis --showbox --save_img --pose_track --sp

跟踪轨迹可以参考deep-sort-yolov3中画轨迹。或者参考https://xiaorun.blog.csdn.net/article/details/80572523

跟踪哪个关节点,就将对应的关节点坐标加入到deque中。

keypoints中的0-17分别代表

0 noise
1 left_eye
2 right_eye
3 left_ear
4 right_ear
5 left_shoulder
6 right_shoulder
7 left_elbow
8 right_elbow
9 left_wrist
10 right_wrist
11 left_hip
12 right_hip
13 left_knee
14 right_knee
15 left_ankle
16 right_ankle

此处参考:https://zhuanlan.zhihu.com/p/121452714

猜你喜欢

转载自blog.csdn.net/qq_35975447/article/details/114933828