Skip to content

gobunu/OSDHuman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Body Restoration with
One-Step Diffusion Model and A New Benchmark

🚩 Accepted by ICML 2025

Jue Gong, Jingkai Wang, Zheng Chen, Xing Liu, Hong Gu, Yulun Zhang, Xiaokang Yang

"A new benchmark and the first one-step diffusion model for human body restoration.", 2025

🔥🔥🔥 News

  • 2025-02-05: The OSDHuman repository was released.
  • 2025-05-01: OSDHuman was accepted to ICML 2025.
  • 2025-05-04: Released the PERSONA test and validation sets.
  • 2026-04-18: Released the public inference code and inference instructions.

Abstract: Human body restoration, as a specific application of image restoration, is widely applied in practice and plays a vital role across diverse fields. However, thorough research remains difficult, particularly due to the lack of benchmark datasets. In this study, we propose a high-quality dataset automated cropping and filtering (HQ-ACF) pipeline. This pipeline leverages existing object detection datasets and other unlabeled images to automatically crop and filter high-quality human images. Using this pipeline, we constructed a person-based restoration with sophisticated objects and natural activities (PERSONA) dataset, which includes training, validation, and test sets. The dataset significantly surpasses other human-related datasets in both quality and content richness. Finally, we propose OSDHuman, a novel one-step diffusion model for human body restoration. Specifically, we propose a high-fidelity image embedder (HFIE) as the prompt generator to better guide the model with low-quality human image information, effectively avoiding misleading prompts. Experimental results show that OSDHuman outperforms existing methods in both visual quality and quantitative metrics.



⚒️ TODO

  • Release inference code
  • Release PERSONA test and validation sets
  • Release training code
  • Release PERSONA training set

🔗 Contents

🚀 Inference

This repository provides the public OSDHuman inference code. The entry point is run_inference.py, and sample inputs are included under test_set/.

Environment Installation

conda create -n osdhuman python=3.10 -y
conda activate osdhuman
pip install --upgrade pip
pip install -r requirements.txt

Prepare Checkpoints

Create local runtime folders if needed:

mkdir -p weights preset outputs

Place the following OSDHuman checkpoints under weights/:

  • weights/model.pkl
  • weights/model_embedding_change.pkl

Download source:

Place the following external base models locally:

Quick Start

Run inference on the bundled sample set:

python run_inference.py \
  -i test_set \
  -o outputs \
  --osediff_path weights/model.pkl \
  --pretrained_model_name_or_path preset/stable-diffusion-2-1-base \
  --ram_path preset/ram_swin_large_14m.pth \
  --ram_img_only

run_inference.py accepts either a single image path or a directory and writes restored images into outputs/ by default.

🎭 PERSONA Test and Validation Set

We provide three sets for evaluation, including both high-quality and degraded validation images and a real-world test set.

Dataset Description Download Link
PERSONA-Val HQ High-quality validation set Google Drive
PERSONA-Val LQ Low-quality validation set Google Drive
PERSONA-Test Real-world test set Google Drive

🔎 Results

The model OSDHuman achieved state-of-the-art performance on both PERSONA-Val and PERSONA-Test. Detailed comparisons are available in the paper.

 Quantitative Comparisons (click to expand)
  • Results in Table 2 on synthetic PERSONA-Val and real-world PERSONA-Test datasets from the main paper.
  •  Visual Comparisons (click to expand)
  • Results in Figure 8 on the real-world PERSONA-Test dataset from the main paper.
  • Results in Figure 9 on the synthetic PERSONA-Val dataset from the main paper.
  •  More Comparisons on real-world PERSONA-Test dataset...
  • Results in Figures 3 and 4 from the supplementary material.
  •  More Comparisons on synthetic PERSONA-Val dataset...
  • Results in Figures 5 and 6 from the supplementary material.
  • 📎 Citation

    If you find the code helpful in your research or work, please cite:

    @inproceedings{gong2025osdhuman,
        title={Human Body Restoration with One-Step Diffusion Model and A New Benchmark},
        author={Gong, Jue and Wang, Jingkai and Chen, Zheng and Liu, Xing and Gu, Hong and Zhang, Yulun and Yang, Xiaokang},
        booktitle={ICML},
        year={2025}
    }

    💡 Acknowledgements

    OSEDiff

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Packages

     
     
     

    Contributors

    Languages