Skip to content

amathislab/musclemimic

Repository files navigation

Banner License MuscleMimic Blog Preprint Hugging Face Space

MuscleMimic: Unlocking full-body musculoskeletal motor learning at scale

MuscleMimic is a JAX-based motion imitation learning benchmark for biomechanically accurate, muscle-actuated models. It targets full-body locomotion and manipulation with GPU-parallel training, MuJoCo/MJWarp dynamics, and retargeted motion datasets.

MuscleMimic teaser

News

  • 2026-06: Added C3D browser tooling for fitting motion-capture markers, exporting AMASS/SMPL-H-compatible motion, and retargeting to MuscleMimic trajectories. See the web viewer guide.
  • 2026-03: MuscleMimic preprint released on arXiv.
  • 2026-02: MuscleMimic blog post released at https://cnai.epfl.ch/mm-blog/.

Highlights

  • Muscle-actuated dynamics: Hill-type muscle models with physiological activation dynamics.
  • Accelerated training: JAX JIT compilation with the MuJoCo Warp backend, supporting thousands of parallel environments.
  • Generalist imitation policies: DeepMimic-style rewards and validation metrics for diverse motion datasets.
  • Retargeting tools: GMR-Fit support for AMASS/SMPL motions and C3D marker data.

Available Models

Model Type Joints Muscles DoFs Focus
MyoBimanualArm Fixed-base 76 (36*) 126 (64*) 54 (14*) Upper-body manipulation
MyoFullBody Free-root 123 (83*) 416 (354*) 72 (32*) Locomotion and manipulation

*Configurations with finger muscles disabled.

Quick Start

Training requires Linux with an NVIDIA GPU. Inference and evaluation are supported on Linux and macOS.

curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/amathislab/musclemimic
cd musclemimic
uv sync --extra cuda

Run a Demo

The first-time path uses pre-retargeted demo motions, so no AMASS download is needed. The demo dataset is gated on Hugging Face: amathislab/demo_dataset.

uv run hf auth login
uv run python -c "from musclemimic.utils.demo_cache import setup_demo_for_bimanual; setup_demo_for_bimanual()"
uv run python -c "from musclemimic.utils.demo_cache import setup_demo_for_myo_fullbody; setup_demo_for_myo_fullbody()"

Start a short demo training run. These configs log to Weights & Biases with wandb.mode=online by default:

uv run bimanual/experiment.py --config-name=conf_bimanual_demo
uv run fullbody/experiment.py --config-name=conf_fullbody_demo

Evaluate a released MyoFullBody checkpoint with the MuJoCo viewer:

uv run mjpython fullbody/eval.py \
  --path hf://amathislab/mm-10m-2 \
  --motion_path KIT/314/walking_medium09_poses \
  --use_mujoco \
  --stochastic \
  --eval_seed 0 \
  --n_steps 1000 \
  --mujoco_viewer

On Linux, a regular python entrypoint is sufficient for viewer-based MuJoCo commands. On macOS, use mjpython.

Data and Checkpoints

Model Checkpoints Retargeted dataset
MyoBimanualArm amathislab/mm-bimanual-v0 amathislab/musclemimic-bimanual-retargeted
MyoFullBody amathislab/mm-fullbody-base amathislab/musclemimic-retargeted

Pre-retargeted GMR caches can be downloaded directly:

uv run musclemimic-download-gmr-caches --dataset-group KIT_KINESIS_TRAINING_MOTIONS
uv run musclemimic-download-gmr-caches --dataset-group AMASS_BIMANUAL_TRAIN_MOTIONS --env-name MyoBimanualArm

For full AMASS setup, C3D conversion, finetuning from checkpoints, and viewer workflows, see Detailed Workflows.

Retargeting example

Guides

  • Detailed workflows: demo cache, evaluation variants, GMR caches, full AMASS retargeting, finetuning, and Viser visualization.
  • C3D web viewer: C3D marker viewing, SMPL-X/SMPL-H fitting, cache layout, and browser retargeting.
  • Contributing: local development, testing, and review guidelines.

Development

make install-dev
make precommit-install
make ci

pre-commit currently targets a curated subset of files while the repository is being migrated toward broader coverage. make lint and make format follow that same scoped set rather than reformatting the whole repository.

Citation

If you use this code in your research, please cite:

@article{Li2026MuscleMimic,
  title={Towards Embodied AI with MuscleMimic: Unlocking full-body musculoskeletal motor learning at scale},
  author={Li, Chengkun and Wang, Cheryl and Ziliotto, Bianca and Simos, Merkourios and Kovecses, Jozsef and Durandau, Guillaume and Mathis, Alexander},
  journal={arXiv preprint arXiv:2603.25544},
  year={2026}
}

License

This project is licensed under the Apache License. Model checkpoints, datasets, SMPL-family assets, and other third-party software may be licensed separately; review each provider's terms before use.

Acknowledgments

Inspired by and built on MyoSuite, MuJoCo Warp, Kinesis, LocoMuJoCo, SMPL-X, PureJaxRL, and MuJoCo Playground.

About

Official repo of Towards Embodied AI with MuscleMimic: Unlocking full-body musculoskeletal motor learning at scale

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages