Giter VIP home page Giter VIP logo

3d-pose-2d-keypoints's Introduction

3d Human Pose Estimation from 2d Keypoints

Overview

While humans can generally estimate with ease the 3d pose of a human in a 2d image, 3d pose estimation remains a challenging problem for machines. This project improves an algorithm that estimates 3d keypoints of human poses with 2d keypoints as the only input.

I pursue three key interventions to improve reconstruction acurracy over the entire dataset as well as a subset of poses with particularly high error in the benchmark model: a) modify the data normalization technique in preprocessing, b) modify the neural network architecture from a simple densely connected network to a multi-stage network modeled after state-of-the-art 2d pose estimation models, and c) generate synthetic data to augment training sets.

The interventions successfully reduced reconstruction error over the entire testing set (from Carnegie Mellon's Motion Capture Database) by 40%, and that of targetted high-error poses by 87%.

Full Paper: 3d Human Pose Estimation from 2d Keypoints (pdf)

Before After

Dependencies

Training and Testing

Training

  • Run prep_data.py
  • Run train.py, commenting out any model settings you don't want to train. A datetime is appended to these files. To use these in the subsequent step, archive the existing files and remove the datetime suffix of your new files.

Testing

Test results can be seen in model_analysis.ipynb. This notebook is not formatted with the intent of presenting the data (the research paper is), but the results can be seen there.

Prepping Data from Scratch

For the instructions in the sub-sections above, the data has already been downloaded and converted into 3d coordinates. If you want to start from scratch and convert the data from bvh files to 3d coordinates, you can proceed as follows with Blender installed:

  • The program uses CMU Motion Capture Subjects 86 for training and 13-15 for testing. Download the following groups of bvh files: Subjects 10-14, Subjects 15-19, Subjects 86-94. (main site)

  • Unzip and move folders 13, 14, 15, and 86 to directory logs/cmu_files/raw/

  • Run standardize_bvh.py to apply consistent header to each file and keep only one in every ten frames. (saved as .bvh in logs/cmu_files/standardized/)

  • Run the following to save the 3d coordinates for each frame of each corresponding animation. Blender runs the animations defined in the bvh files in the background to determine the 3d coordinates to save:

    • blender --background --python blender/save_blender_3d_points.py #Original training and testing data
    • blender --background --python blender/save_blender_mirrored.py #Bilateral mirror of Subject 86 for augmentation
    • blender logs/blender_animations/seated_animation.blend --background --python save_seated.py #Animation of seated poses for augmentation (saved as pickle dictionary in logs/blender_dicts/)

Reference

  @InProceedings{Zhao_2017,
  author = {Ruiqi Zhao, Yan Wang, and Aleix M Martines},
  title = {A Simple, Fast, and Highly-Accurate Algorithm to Recover 3D Shape from 2D Landmarks on a Single Image},
  booktitle = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  month = {November},
  year = {2017}
  }

3d-pose-2d-keypoints's People

Contributors

rludlow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

3d-pose-2d-keypoints's Issues

Output format?

Hi! Nice project, I am thinking about the same things now (creating 3d skeleton motion for blender from 2d image). Can you tell me please what is the output of your implementation? 3d key-points? There is a paragraph about .bvh to 3d-key-points conversion... But I'm not sure is it possible to have the output as bvh? Can't find any info about that in the pdf.

Draw_poses not found

ModuleNotFoundError: No module named 'draw_poses'
Plz help me for the above error

bvh_header file missing

Hi Thank you for your contribution.
I am interested in converting bvh file data to 3d coordinate data and
I wonder where is the bvh_head.txt? you mentioned in README.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.