Zhengyuan Li1
Zeyun Deng1
Yifan Shen3
Liangyan Gui3
Miaolan Xie1
Joseph Campbell1
Xifeng Gao2
Kui Wu2
Zherong Pan2
Aniket Bera1
1Purdue University
2LightSpeed Studios
3University of Illinois Urbana-Champaign
PoseShield is a post-hoc self-collision resolver for SMPL-H poses and human motion sequences. It uses a learned neural collision field as a differentiable constraint, so existing poses and motions can be repaired as a post-processing step without even knowing the upstream system that produced them.
- Quick pose and motion demos with released checkpoints.
- Humans with Collisions (HwC) data for training, evaluation, and the 500-pose benchmark.
- Exact-FCL validation plus recommended Blender visualization and legacy HTML fallback.
- Experimental shape-aware SAField demo that resolves a fixed sample and exports OBJ meshes.
PoseShield treats self-collision correction as a post-hoc optimization problem: given a self-intersecting SMPL-H pose or motion, find a nearby collision-free result while preserving the original pose semantics and motion dynamics. The input can come from a generative model, motion capture cleanup pipeline, dataset preprocessing workflow, or any other source that can be represented in the public SMPL-H/HY-Motion-compatible layouts below.
The core component is a neural collision field defined directly in SMPL-H pose space. The field is trained to be positive for collision-free poses and negative for self-intersecting poses, so it can be used as a differentiable collision constraint. We regularize this field with an Eikonal-style objective, encouraging non-vanishing gradients near the collision boundary and making gradient-based optimization more stable.
At inference time, PoseShield uses this learned field in two ways:
- For single poses, it solves a constrained optimization problem that minimally changes the input SMPL-H body rotations while moving the pose into the collision-free region.
- For motion sequences, it reuses the same learned collision field inside a two-stage latent optimization pipeline: Stage 1 fits the motion model latent to the input sequence, and Stage 2 resolves self-collisions while preserving hand motion, temporal dynamics, and the original global translation.
The main method studied in the paper assumes the neutral SMPL-H body model with
betas=None; subject-specific body-shape parameters are not passed to the
SMPL-H layer. To apply the method to other SMPL body shapes, character-specific
SMPL humans, Momentum Human Rig, or other human parametric models, users may
need to build a custom collision dataset for the target body model and retrain
the collision field. In this release, we include a preliminary experimental
shape-aware collision-field feature as an initial step beyond the paper setting.
conda env create -f environment.yml
conda activate poseshield
pip install -e .We test the code on Python 3.10 and PyTorch with CUDA. The release
environment.yml pins the dependency versions that are most likely to affect
reproducibility, including PyTorch, NumPy, python-fcl, transformers, and
diffusers.
Register and download the Extended SMPL+H model from the MANO website.
mkdir -p deps/body_models/smplh
cp smplh/neutral/model.npz deps/body_models/smplh/SMPLH_NEUTRAL.npzPoseShield currently uses the neutral SMPL-H model.
Download and extract the PoseShield external assets at the repository root:
unzip PoseShield_release_dependencies_20260628.zip -d .
unzip PoseShield_release_pose_data_20260628.zip -d .
unzip PoseShield_release_motion_data_20260708.zip -d .
unzip PoseShield_release_safield_demo_20260703.zip -d . # optional experimental SAField demoThe release asset packages are available from the PoseShield Google Drive folder.
Validate the asset layout with:
python tools/check_assets.pyRelease Asset Contents and Expected Layout
The dependency package provides PoseShield checkpoints and HY-Motion normalization statistics. The compact exact-FCL mesh topology cache is included directly in this repository.
| File | Destination | Description |
|---|---|---|
model.pth |
ckpts/poseshield/ |
Collision field checkpoint |
config.yaml |
ckpts/poseshield/ |
Collision field config |
model_elu.pth |
ckpts/poseshield/ |
ELU collision field for motion resolution |
config_elu.yaml |
ckpts/poseshield/ |
ELU collision field config |
Mean.npy, Std.npy |
ckpts/tencent/HY-Motion-1.0-Lite/stats/ |
HY-Motion normalization statistics |
For motion-level resolution, also download
HY-Motion-1.0-Lite.
Its checkpoint and config are not included in the PoseShield asset zip and
should be placed under ckpts/tencent/HY-Motion-1.0-Lite/.
The pose data package provides the released Humans with Collisions (HwC)
pose dataset. data/dataset/ is used for collision-field training and
classification evaluation. data/dataset_test/ contains the 500 self-colliding
pose benchmark subset used by the pose-level collision-resolution script.
The motion data package provides 100 canonical MotionFix motion samples under
data/motion_canonical/. The optional SAField package provides the experimental
shape-aware checkpoint under experimental/safield_demo/; the matching config
is included in the repository.
After downloading the release assets, the main required files should look like:
deps/
+-- body_models/
| +-- smplh/
| +-- SMPLH_NEUTRAL.npz
+-- topology_distances_30_60.npz
data/
+-- dataset/ # Humans with Collisions (HwC) train/test data
| +-- train_list.csv
| +-- test_list.csv
| +-- augmented_data/
| | +-- *.npz
| +-- gt_data/
| +-- *.npz
+-- dataset_test/ # HwC 500-pose collision-resolution benchmark
| +-- *.pkl
| +-- *.obj
| +-- *.png
+-- motion_canonical/ # 100 canonical MotionFix motion sequences
+-- motionfix_*_135.npy
ckpts/
+-- poseshield/
| +-- config.yaml
| +-- config_elu.yaml
| +-- model.pth
| +-- model_elu.pth
+-- tencent/
+-- HY-Motion-1.0-Lite/
+-- latest.ckpt
+-- config.yaml # or config.yml
+-- stats/
+-- Mean.npy
+-- Std.npy
experimental/
+-- safield_demo/ # optional experimental shape-aware demo
+-- sa_model.pth
+-- sa_config.yaml
tools/check_assets.py prints present and missing asset groups, and exits with
a non-zero status if any required asset is missing.
Small demo inputs are provided in demo_asset/.
python demos/demo_pose.pyOutputs are written to demos/output/.
Run the interactive demo:
bash demos/demo_motion.shRun the Two Motion Stages Explicitly
SAMPLE=motion_sample2.npy
STEM=${SAMPLE%.npy}
python -m poseshield.hymotion.dno.run_dno_stage1 \
--model_path ckpts/tencent/HY-Motion-1.0-Lite \
--motion_file demo_asset/$SAMPLE \
--output_dir demos/output_motion/$STEM
python -m poseshield.hymotion.dno.run_dno_stage2 \
--model_path ckpts/tencent/HY-Motion-1.0-Lite \
--motion_file demo_asset/$SAMPLE \
--stage1_z demos/output_motion/$STEM/stage1_z.pt \
--output_dir demos/output_motion/${STEM}_stage2The demo scripts use validated release defaults for motion optimization and final collision validation.
Stage 2 writes:
optimized_motion.npy
optimized_z.pt
summary.json
args.json
The optimized motion copies the original absolute translation trajectory and updates only the pose rotations.
Motion Data Format
PoseShield uses different public representations for pose-level and motion-level code:
- Pose-level detection, training, and optimization operate on a single SMPL-H
body pose represented as 21 joints × 6D rotations, i.e. shape
[21, 6]or a flattened 126D vector. - Motion-level inference, evaluation, and visualization operate on a canonical HY-Motion-compatible motion array:
shape: [frames, 135]
[0:132] 22 joints × 6D rotations, HY-Motion column-interleaved layout
[132:135] absolute global translation [x, y_up, z_forward]
Internal coordinate convention:
Y-up
X = right
Y = height/up
Z = forward
frame 0 human facing +Z
The demo motions in demo_asset/ and the bundled canonical MotionFix motions
under data/motion_canonical/ are already in this exact public format. The
release loader reads public-format motion by default: root-first joint order
and absolute [x, y_up, z_forward] translation. Legacy/source-layout artifacts
must be passed with explicit conversion flags before evaluation.
The optimized motion keeps the original absolute translation trajectory and updates the pose rotations.
Exact Mesh/FCL Collision Check
python tools/evaluate_exact_fcl.py \
--motion demos/output_motion/${STEM}_stage2/optimized_motion.npy \
--output-dir demos/output_motion/${STEM}_stage2/exact_fclIf exact mesh collisions remain, the tool exits with a non-zero status after writing exact_fcl_results.json.
This exact-FCL check is the core geometry-level validation for motion outputs.
A successful demo run should exit with status 0 and report no remaining exact
mesh self-collisions.
Blender MP4 Rendering
Use Blender rendering for the clearest visual inspection of PoseShield motion outputs. The renderer exports a side-by-side video with the original motion in red, the PoseShield output in green, and precomputed exact-contact patches in yellow:
A small ready-to-render validation pair is included in
demos/contact_render_demo/:
bash demos/demo_blender_contact_render.shThe demo README also includes a public-format motion-to-mesh render path using
demos/demo_motion_to_mesh_contact_render.sh.
HTML Visualization (Legacy)
python tools/generate_motion_html.py \
--sequence $STEM \
--original demo_asset/$SAMPLE \
--optimized demos/output_motion/${STEM}_stage2/optimized_motion.npy \
--output-dir demos/output_motion/${STEM}_stage2/visualizationOpen the generated *_vis.html file in a browser.
This legacy path is a lightweight fallback when Blender rendering is not
available.
python poseshield/pose/resolve_dataset_test_slsqp.py \
--config-path ckpts/poseshield/config.yaml \
--model-path ckpts/poseshield/model.pth \
--n-samples 500 \
--cost-type weighted \
--threshold 0.1 \
--max-itr 300 \
--savePose-level SLSQP logs report three separate statuses:
solver_success: whether SciPy SLSQP terminated with its success flag.constraint_satisfied: whether the learned collision-field constraint meets the requested threshold.exact_collision_free: whether the final SMPL-H mesh is collision-free under exact-FCL validation.
The default SLSQP iteration budget is --max-itr 300.
python poseshield/pose/evaluate.py \
--config-path ckpts/poseshield/config.yaml \
--model-path ckpts/poseshield/model.pthTrain the collision field from scratch:
python -m poseshield.pose.train --config-path config_files/basic_config.yamlCheckpoints and logs are saved to experiments/<EXP_NAME>/.
We also include a minimal standalone SAField demo that conditions the collision field on SMPL body-shape coefficients. Starting from a fixed colliding pose, the demo loads the released experimental checkpoint, resolves the pose for two body shapes, and can export the input and resolved meshes as OBJ files.
This component is provided as an experimental extension rather than the primary
PoseShield release path. See experimental/safield_demo/ for the model config,
fixed sample, and command to reproduce the OBJ outputs.
If you find our work useful in your research, please consider citing:
@article{li2026poseshield,
title={PoseShield: Neural Collision Fields for Human Self-Collision Resolution},
author={Li, Zhengyuan and Deng, Zeyun and Shen, Yifan and Gui, Liangyan and Xie, Miaolan and Campbell, Joseph and Gao, Xifeng and Wu, Kui and Pan, Zherong and Bera, Aniket},
journal={arXiv preprint arXiv:2606.29686},
year={2026}
}This project builds upon SMPL-X, HY-Motion-1.0, python-fcl, Diffusion-Noise-Optimization, and the MotionFix dataset.
This project is licensed under the MIT License. External body models, datasets, and upstream model checkpoints may be subject to their own licenses.