Add SMPL-X (GRAB) and MJCF humanoid importers#20
Conversation
GRABImporter: loads a GRAB sequence (SMPL-X body + grasped object + table) into the ModelImporter contract via SMPL-X forward kinematics, with per-finger surface-to-surface contact detection (downsampled hand verts vs object mesh). MJCFImporter: generic MuJoCo MJCF importer (nested body tree; capsule/box/sphere geoms tessellated), used to load the InterMimic SMPL-X humanoid (omomo.xml). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Hi @xz6014! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Overview
This PR adds two model importers that bring SMPL-X grasping data and an articulated SMPL-X humanoid into AI4Animation, so captured hand–object interaction can be loaded, visualized, and retargeted within the framework.
The motivating use case: load a GRAB sequence (a subject grasping an object) and reproduce the same grasp on the InterMimic/InterPrior SMPL-X humanoid (
omomo.xml), preserving the per-finger spatial–temporal contact.Demo
Captured SMPL-X (GRAB) grasp (left) vs. the same motion retargeted onto the omomo SMPL-X humanoid (right), camera following the body:
Full-resolution clip:
docs/media/grasp_compare_smplx_omomo.mp4What's added
GRABImporter(ai4animation/Import/GRABImporter.py) — loads a GRAB sequence (SMPL-X body + grasped object + table) into the framework via SMPL-X forward kinematics: the subject body mesh is skinned to the 55 SMPL-X joints, and the object/table are appended as rigid meshes on their captured trajectories. Includes per-finger surface-to-surface contact detection (downsampled hand mesh vertices vs. the object mesh, via a KD-tree) with a soft contact-weight ramp.MJCFImporter(ai4animation/Import/MJCFImporter.py) — a generic MuJoCo MJCF importer that parses the nested<body>tree and tessellates capsule/box/sphere geoms into meshes; used to load the articulated SMPL-X humanoid.Both conform to the existing
ModelImportercontract (JointNames/JointParents/JointMatrices/Meshes/Skin) and were verified to import and instantiate against a clean checkout ofmain.Dependencies
Runtime:
smplx,trimesh,scipy.Co-authored-by: Claude Opus 4.8 noreply@anthropic.com