• Stars
    star
    169
  • Rank 224,453 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert a video file to animated humanIK skeletons for Maya.

video2mocap ( NOT SUPPORTED )

Convert a video file to animated humanIK skeletons for maya.

This project never had to intention of being used in a professional capacity nor were the results ever anything that can be used in production. Extracting skeletal animation from video has moved in a lot since the 4 years this project was created and are a better source for learning.

Updated: 28/12/2022

Click for video

Installation

Clone repository

git clone https://github.com/robertjoosten/video2mocap.git

In order for this tool to work a couple of 3rd party application will have to be installed. To make this an easy process bat files are located in the 3rdparty directory and can be used to download/extract and install the necessary applications.

  • Run 3rdparty/getFFmpeg.bat

    • Download and extract FFmpeg ( 20180630-9f0077c ).
  • Run 3rdparty/getOpenPose.bat

    • Download and extract OpenPose ( 1.3.0 ).
    • Download models for OpenPose
  • Run 3rdparty/getHMR.bat ( Requires python3 + pip3 accessible in PATH )

    • Pull the latest custom fork of the HMR repository.
    • Download models for HMR
    • Pip install requirements.txt

Usage

From the command line:

cd video2mocap/
python video2mocap.py --video_path <VIDEO> --output_dir <OUTPUT>

Available Arguments:

  • --video_path: Path to video

  • --output_dir: Directory to output the maya files too

  • --keep_temp: Keep temp files for debugging ( False by default )

  • --mayapy_exe: Overwrite mayapy.exe ( Default requires accessible in PATH )

  • --python2_exe: Overwrite python.exe ( Default requires accessible in PATH )

  • --python3_exe: Overwrite python3.exe ( Default requires accessible in PATH )

The exe files can be overwritten in case the python interpreters are not accessible through the PATH variable and a relative path cannot be provided.

Limitations

  • No camera tracking ( static camera advised )
  • No partial body ( full body in view each frame advised )
  • Limited depth adjustment

Logs

As loads of things are running in process it is quite simple for something to go wrong. For this reason a log file is implemented that gets saved into the output_dir. If the desired result is unexpected these logs can be investigated to find out what and where something went wrong.

Keypoint matching example:

2018/07/05/ 12:31:40 | INFO | ---- Match Keypoints Over Multiple Frames ----
2018/07/05/ 12:31:40 | DEBUG | New Person:            Frame 276
2018/07/05/ 12:31:40 | DEBUG | Omit Person:           Presence Percentage 0.01

Versions

More Repositories

1

maya-transfer-blend-shape

Transfer your blend shapes between meshes with the same topology.
Python
134
star
2

maya-keyframe-reduction

Keyframe Reduction for Maya using least-squares method.
Python
92
star
3

maya-dem-bones

DemBones python bindings for use in Maya.
Mathematica
79
star
4

unity-another-auto-rigger

Unity scripts for the Another Auto Rigger system.
C#
70
star
5

maya-skinning-tools

Skinning tools for maya.
Python
69
star
6

maya-timeline-marker

Create coloured markers on top of Maya's native timeline. Comments can be added to each marker that appear as tool tips.
Python
63
star
7

maya-module-installer

Module template for easy drag-and-drop installation using provided mel script.
Python
53
star
8

maya-spline-ik

Create a Spline IK setup on a curve. The setup features variable stretch and squash, variable rotation and sliding on curve.
Python
47
star
9

maya-command-search

Read all buttons in Maya's native menu and make them searchable and executable.
Python
35
star
10

maya-anchor-transform

Anchor transforms to world or object space in Maya.
Python
25
star
11

maya-reorder-attributes

Reorder attributes in Maya.
Python
25
star
12

maya-module-manager

Module manager for Maya.
Python
25
star
13

maya-quality-assurance

Quality assurance framework for Maya.
Python
24
star
14

maya-channel-box-plus

Extend the maya channel box with searchability and colour
Python
17
star
15

img2ply

Convert an image sequence to a PLY point cloud.
Python
15
star
16

maya-surface-attract

Maya surface attract deformer
C++
15
star
17

maya-weighted-blend-matrix

Maya weighted blend matrix node
C++
13
star
18

maya-curve-attract

Maya curve attract deformer
C++
11
star
19

maya-raycast

Maya raycast node
C++
10
star
20

maya-orm

Django inspired framework for Maya
Python
9
star
21

maya-bake-instancer

Bake an instancer node to individual animated pieces of geometry.
Python
6
star
22

robertjoosten.github.io

Portfolio website.
SCSS
2
star
23

maya-unittest

Unittest subset for specific use in Maya.
Python
2
star