<a href='https://shenwenhao01.github.io/' target='_blank'>Wenhao Shen</a> 
<a href='https://scholar.google.com/citations?user=zlIJwBEAAAAJ&hl=en' target='_blank'>Wanqi Yin</a> 
<a href='https://xfyang.net/' target='_blank'>Xiaofeng Yang</a> 
<a href='https://scholar.google.com/citations?user=nNQU71kAAAAJ&hl=zh-CN' target='_blank'>Cheng Chen</a> 
<a href='https://chaoyuesong.github.io/' target='_blank'>Chaoyue Song</a> 
<a href='https://caizhongang.github.io/' target='_blank'>Zhongang Cai</a> 
<a href='https://yanglei.me/' target='_blank'>Lei Yang</a> 
<a href='https://wanghao.tech/' target='_blank'>Hao Wang</a> 
<a href='https://guosheng.github.io/' target='_blank'>Guosheng Lin</a> 

Set up the environment
conda create -n adhmr python=3.8 -y
conda activate adhmr
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch -y
pip install mmcv-full==1.7.1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.0/index.html
pip install -r requirements.txt
# install pytorch3d
pip install "git+https://github.com/facebookresearch/pytorch3d.git"
# install mmpose
cd HMR-Scorer/main/transformer_utils
pip install -v -e .
cd -
HMR-Scorer
cd HMR-Scorer/dataset/cache_scorer_eval.The file structure should be like:
HMR-Scorer/
├── common/
│ └── utils/
│ └── human_model_files/ # body model
│ ├── smpl/
│ │ ├──SMPL_NEUTRAL.pkl
│ │ ├──SMPL_MALE.pkl
│ │ └──SMPL_FEMALE.pkl
│ └── smplx/
│ ├──MANO_SMPLX_vertex_ids.pkl
│ ├──SMPL-X__FLAME_vertex_ids.npy
│ ├──SMPLX_NEUTRAL.pkl
│ ├──SMPLX_to_J14.pkl
│ ├──SMPLX_NEUTRAL.npz
│ ├──SMPLX_MALE.npz
│ └──SMPLX_FEMALE.npz
├── data/
├── main/
├── output/
├── pretrained_models/ # pretrained ViT-Pose, SMPLer_X and mmdet models
│ ├── smpler_x_s32.pth.tar
│ ├── smpler_x_b32.pth.tar
│ ├── smpler_x_l32.pth.tar
│ ├── smpler_x_h32.pth.tar
│ ├── vitpose_small.pth
│ ├── vitpose_base.pth
│ ├── vitpose_large.pth
│ └── vitpose_huge.pth
└── dataset/
├── 3DPW/
├── Human36M/
├── HI4D
├── BEDLAM/
├── RenBody/
├── GTA_Human2/
├── CHI3D/
├── InstaVariety/
├── SPEC/
├── cache_scorer_eval/ # HMR-Scorer test datasets
└── preprocessed_datasets/ # HumanData files
ADHMR
cd ADHMR/HMR-Scorer/output/ADHMR/experiment/hyponet# To eval the model HMR-Scorer/output/{TRAIN_OUTPUT_DIR}
export PYTHONPATH=$PYTHONPATH:/path/to/ADHMR/HMR-Scorer
cd ./HMR-Scorer/main/
JOB_NAME=GTA_Human2 / RenBody_HiRes
torchrun test_scorer.py --num_gpus 1 --exp_name output/scorer_test_${JOB_NAME} --result_path train_scorer_b5_2d_1118_all_loss_20241120_144943 --ckpt_idx 20 --testset ${JOB_NAME}
# To eval on 3DPW
torchrun --nproc_per_node=2 --master_port=23452 main/main.py --config config/test/test-3dpw-custom.yaml --exp experiment/scorenet --doc 3dpw --validate --multihypo_n 100 --batch_size 80
# To eval on Human3.6M
torchrun --nproc_per_node=2 --master_port=23452 main/main.py --config config/test/test-h36m-custom.yaml --exp experiment/scorenet --doc h36m --validate --multihypo_n 100 --batch_size 80
# To train on 3DPW
torchrun main/main.py --config config/train/hyponet/instavariety-dpo-scorer.yaml --exp experiment/hyponet --doc instavariety-dpo
# To train on Human3.6M
torchrun main/main.py --config config/train/hyponet/h36m-dpo.yaml --exp experiment/hyponet --doc h36m-dpo
If you find our work useful for your research, please consider citing the paper:
@inproceedings{shen2025adhmr,
title={ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization},
author={Shen, Wenhao and Yin, Wanqi and Yang, Xiaofeng and Chen, Cheng and Song, Chaoyue and Cai, Zhongang and Yang, Lei and Wang, Hao and Lin, Guosheng},
booktitle={International Conference on Machine Learning},
year={2025},
organization={PMLR}
}
This repo is built on the excellent work SMPLer-X, ScoreHypo. Thanks for their great projects.
$ claude mcp add ADHMR \
-- python -m otcore.mcp_server <graph>