Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 2.82 KB

project_joints_vertices.md

File metadata and controls

75 lines (49 loc) · 2.82 KB

Project Joints and Vertices using Camera Parameters

If you just want to project the joints and vertices using the SMPL/SMPL-X parameter file and Camera information then you need to run project_joints. Following page will guide you through it.

Prerequisites

Create and activate a Python 3.8 virtual environment:

python3.8 -m venv path_to_virtual_env
source path_to_virtual_env/bin/activate

Installation

First, checkout the code smplx:

$ git clone https://github.com/vchoutas/smplx.git

and install both packages with pip:

$ pip install .
$ pip install ./smplx

Download

Download the AGORA Images:

Download the Images and extract them in demo/images

Download the AGORA Camera dataframe:

Download the Camera dataframe and extract in demo/Cam

For SMPL-X projection:

Download the SMPL-X fits and extract it in demo/GT_fits

Download the SMPL-X model and place it in demo/model/smplx. Download the npz version and rename the models to SMPLX_MALE.npz, SMPLX_FEMALE.npz and SMPLX_NEUTRAL.npz

Download the kid template vertices from AGORA and place them in utils.

For SMPL projection:

Download the SMPL fits model and extract it in demo/GT_fits

Download the SMPL model and place it in demo/model/smpl. Download the npz version and rename the models to SMPL_MALE.npz, SMPL_FEMALE.npz, SMPL_NEUTRAL.npz

Download the kid template vertices from AGORA and place them in utils.

Run

Once you have finished installing and downloaded the data, you can run project_joints executable. This will add following fields in all the .pkl files in the demo/Cam folder.

gt_joints_2d : projected 2d SMPL -X/SMPL keypoints/joints in image

gt_joints_3d : 3d SMPL-X/SMPL joints in camera coordinates

gt_verts : 3d SMPL-X/SMPL vertices in camera coordinates

SMPL-X

project_joints --imgFolder demo/images --loadPrecomputed demo/Cam --modeltype SMPLX --kid_template_path utils/smplx_kid_template.npy  --modelFolder demo/model --gt_model_path demo/GT_fits/ --imgWidth 3840 --imgHeight 2160

SMPL

project_joints --imgFolder demo/images --loadPrecomputed demo/Cam --modeltype SMPL --kid_template_path utils/smpl_kid_template.npy  --modelFolder demo/model --gt_model_path demo/GT_fits/ --imgWidth 3840 --imgHeight 2160

For 1280x720:

Just replace the --imgWidth and --imgHeight with 1280 and 720 in above commands.

Debug:

If you need to debug the projection, use --debug boolean flag and provide --debug_path to store output images. This will generate images with projected ground truth 2d keypoints.