# VideoPose3D project with detectron2
## Problem Statement
Human Pose Estimation is about estimating 2D and 3D localization of human joints in images or videos.
Generally this process can be divided into 2 parts: 1. 2D keypoint detection from 2D
videos; 2. 3D Pose estimation from 2D keypoints. Temporal RNN is widely used to solve this problem.
However, it can not parallelly process multiple frames. Temporal CNN has been proved competitively in some areas
like neural machine translation, language modeling and speed generation. So this project use Temporal CNN for 3D Pose estimation.
Moreover, with the pre-trainded model, can we estimate human 3D pose from arbitrary 2D video?
In this project,firstly we use the Detectron2 to detect the 2D joint keypoints from an arbitrary 2D video. Then a pre-trained
model is applied for predicting 3D joint keypoints from 2D keypoints.
*: This project is mainly about how to implement video-pose-3D project of facebook research
for inference in the wild in your own computer. Instead of detectron, we use detectron2 here.
![Alt Text](https://github.com/DarrenJiang13/VideoPose3DwithDetectron2/blob/master/images/example.gif)
## Input & Output
**Input:**
An arbitrary `.mp4` video file. Recommend: one person in an empty field.
**Output:**
A video combining the original video and 3D human joint keypoints drawn in a 3D coordinate. Like the "girl playing taiji" picture shown above.
## Configure your computer
0. Install ffmpeg imgMagick, see [this](./documents/VideoProcessConfiguration.md)
1. Install Nvidia Driver,CUDA10.1,cuDNN 7.6.5,pytorch, see [this](./documents/GPUConfiguration.md)
2. Install detectron2, see [this](./documents/Detectron2Installation.md)
## Model setup
1. download model for 2D detection(detectron2)
cd detectron2/detectron2-infer
wget https://dl.fbaipublicfiles.com/detectron2/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x/139686956/model_final_5ad38f.pkl
2. download model for 3D prediction
# in the root directory, make a folder called checkpoint
mkdir checkpoint
cd checkpoint
wget https://dl.fbaipublicfiles.com/video-pose-3d/pretrained_h36m_detectron_coco.bin
## How to train the model
As we use the model provide by [dariopavllo](https://github.com/facebookresearch/VideoPose3D/blob/master/INFERENCE.md),
there is no better way to retrain the model. The input keypoints is in COCO format. And output 3D joint positions in Human3.6M format.
For how to use the pre-trained model, please see the next step.
## Estimate your arbitrary 2D video
- Firstly, you should put the video you want into the `detectron2/detectron2-infer/videos` folder;
- Then:
cd detectron2/detectron2-infer
- Run the `.sh` file:
sh infer.sh videos/[your-video-name] [output-video-name-you-want]
- You shall see the output video in the `output` folder of the root directory.
## Docker:
You can directly run the dockerfile as all the files needed in dockerfile can be download online.
For the dockerfile and more details about dockerizing this project.
Please go to [docker](./docker.md)
To pull this docker image from docker hub:
sudo docker pull yjjiang1996/video_pose_3d_detectron2_test1:latest
In the docker image:
- Copy your video to the `videos` folder
cd detectron2/detectron2-infer/videos
[download your videos here]
# you can also use the videos we provided: taiji.mp4, taiji2.mp4, video.mp4
- Go back the the `detectron2/detectron2-infer` folder and run the `.sh` file.
cd ..
sh infer.sh videos/[your-video-name] [output-video-name-you-want]
# for example: sh infer.sh videos/taiji.mp4 taiji
- You shall see the output video in the `output` folder of the root directory.
- As you cannot see the video in the docker, you can copy the videos out to your current directory.
Now turn on a new terminal and input:
sudo docker cp [container_id]:/home/appuser/video_pose_repo/output/[you_video_name].mp4 .
没有合适的资源?快使用搜索试试~ 我知道了~
3D人体姿态估计-从2D视频中通过检测人体关键点来估计3D人体姿态实现-优质项目实战.zip
共57个文件
py:22个
pyc:13个
md:9个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 168 浏览量
2024-03-27
09:55:22
上传
评论
收藏 23.86MB ZIP 举报
温馨提示
3D人体姿态估计_从2D视频中通过检测人体关键点来估计3D人体姿态实现_优质项目实战
资源推荐
资源详情
资源评论
收起资源包目录
3D人体姿态估计_从2D视频中通过检测人体关键点来估计3D人体姿态实现_优质项目实战.zip (57个子文件)
3D人体姿态估计_从2D视频中通过检测人体关键点来估计3D人体姿态实现_优质项目实战
docker.md 5KB
data
ConvertHumanEva.m 7KB
prepare_data_2d_custom.py 3KB
prepare_data_h36m.py 5KB
prepare_data_2d_h36m_sh.py 4KB
convert_cdf_to_mat.m 597B
prepare_data_2d_h36m_generic.py 3KB
prepare_data_humaneva.py 9KB
__pycache__
data_utils.cpython-36.pyc 2KB
data_utils.py 3KB
docker
Dockerfile 2KB
DOCKER.md 5KB
output
taiji2.mp4 11.14MB
documents
GPUConfiguration.md 5KB
Detectron2Installation.md 858B
VideoProcessConfiguration.md 797B
AWS
AWSConfiguration.md 3KB
ProjectConfiguration.md 2KB
README.md 373B
run.py 40KB
common
utils.py 1KB
camera.py 3KB
humaneva_dataset.py 4KB
generators.py 11KB
loss.py 3KB
custom_dataset.py 2KB
mocap_dataset.py 1KB
quaternion.py 1001B
skeleton.py 3KB
visualization.py 8KB
model.py 8KB
h36m_dataset.py 11KB
arguments.py 6KB
__pycache__
quaternion.cpython-36.pyc 1002B
h36m_dataset.cpython-36.pyc 7KB
skeleton.cpython-36.pyc 2KB
mocap_dataset.cpython-36.pyc 2KB
generators.cpython-36.pyc 8KB
model.cpython-36.pyc 7KB
arguments.cpython-36.pyc 4KB
visualization.cpython-36.pyc 6KB
camera.cpython-36.pyc 3KB
loss.cpython-36.pyc 3KB
custom_dataset.cpython-36.pyc 2KB
utils.cpython-36.pyc 1KB
images
example.gif 3.93MB
README.md 4KB
detectron2
Base-RCNN-FPN.yaml 1KB
detectron2-infer
Base-Keypoint-RCNN-FPN.yaml 527B
infer.sh 415B
Base-RCNN-FPN.yaml 1KB
keypoint_rcnn_X_101_32x8d_FPN_3x.yaml 317B
visualization.py 4KB
videos
taiji.mp4 1.32MB
taiji2.mp4 5.57MB
video.mp4 1.91MB
detectron_pose_predictor.py 5KB
共 57 条
- 1
资源评论
- Dxl06242024-05-20资源不错,很实用,内容全面,介绍详细,很好用,谢谢分享。
- 2301_763260492024-05-03怎么能有这么好的资源!只能用感激涕零来形容TAT...
极智视界
- 粉丝: 2w+
- 资源: 1459
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功