8000 GitHub - shenwenhao01/ADHMR: Official Code for ICML 2025 paper "ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization"
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Official Code for ICML 2025 paper "ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization"

License

Notifications You must be signed in to change notification settings

shenwenhao01/ADHMR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization

ICML 2025

Install

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"

Preparation

HMR-Scorer

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/
  • follow ScoreHypo to prepare data.

Pretrained Models

  • download ckeckpoint of HMR-Scorer from OneDrive
    • put it under HMR-Scorer/output/
  • download checkpoint of ADHMR from OneDrive
    • put them under ADHMR/experiment/hyponet

Evaluation

HMR-Scorer

# 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}
  • NUM_GPU = 1 is recommended for testing

ADHMR

# 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
  • NUM_GPU = 1 is recommended for testing

Citation

If you find our work useful for your research, please consider citing the paper:

@inproceedings{
  title={ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization},
  author={},
  booktitle={ICML},
  year={2025}
}

License

Distributed under the S-Lab License. See LICENSE for more information.

Acknowledgement

This repo is built on the excellent work SMPLer-X, ScoreHypo. Thanks for their greate projects.

About

Official Code for ICML 2025 paper "ADHMR: Aligning Diffusion-based Human Mesh Recovery via Direct Preference Optimization"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0