Welcome to our repository, a dedicated space offering an innovative tool designed to minimize foot skating in human motion sequences. This tool is user-friendly and introduces no additional artifacts.
In addition, we provide versatile tools capable of converting various representations into SMPL parameters, further enhancing user convenience.
Our method eliminates foot skating when the person is standing on one foot.
Our method eliminates foot skating in continuous walking motions.Create conda environment
conda create python=3.9 --name hmotion
conda activate hmotion
Install PyTorch 2.0.0.
Install packages in requirements.txt
pip install -r requirements.txt
python foot_optim.py --mode file --input_path path/to/motion/file
or
python foot_optim.py --mode dir --input_path path/to/motion/dir
Some Optional Parameters
--render_motion
whether to render the motion before and after optimization.--save_mesh
save the smpl mesh before and after optimization.--render_path PATH
specifies the folder where results are put in.--mode
specifies whether to optimize all motion files in a directory
Have a try with:
python foot_optim.py --mode file --input_path ./assets/sample_rot.npy --render_motion
Please check the input and output formats in the code.
HumanML3D representation to SMPL parameters
python -m repr_conversion.humanml2joints --input_path path/to/humanml3d/file
Joints to SMPL parameters
python -m repr_conversion.simplify_loc2rot --input_path path/to/joint/file
or
python -m repr_conversion.simplify_loc2rot --input_path path/to/joint/dir --mode dir
Smpl parameters to mesh
python -m repr_conversion.rot2mesh --input_path path/to/smpl/file
python -m visualize.plot_smpl --input_path assets/smpl_sample.npy
Please refer to TEMOS
We provide visualize/process_mesh.py
to convert the generated mesh to their format.
Our code is based on: GMD, joints2smpl, text-to-motion
This code is distributed under an MIT LICENSE.
Note that our code depends on other libraries, including SMPL, SMPL-X, PyTorch3D, and uses datasets that each have their own respective licenses that must also be followed.