Skip to content

Abuuu122/Dereflection-Any-Image

Repository files navigation

Dereflection Any Image with Diffusion Priors and Diversified Data

AAAI 2026

Project Page | Paper | Open In Colab | Hugging Face Space | Hugging Face Model | Hugging Face Dataset

📖Dereflection Any Image with Diffusion Priors and Diversified Data

Jichen Hu1*, Chen Yang1*, Zanwei Zhou1, Jiemin Fang2†, Qi Tian2, Wei Shen1✉†,
1MoE Key Lab of Artificial Intelligence, AI Institute, School of Computer Science, Shanghai Jiao Tong University   2Huawei Inc.  
*Equal contribution.   Project lead.   Corresponding author.

📝 Todo

  • Release inference code
  • Release pretrained model weights
  • Release project page
  • Release paper
  • Release dataset
  • Release training code

🚀Setup

Environment

Dereflection Any Image is tested with CUDA 11.8 and python 3.9. All the required packages are listed in requirements.txt. You can install them with

pip install -r requirements.txt

Weights

Our scripts will automatically download the pretrained weights from Huggingface.

You can also download the weights by Google Drive or Huggingface

💪Usage

Inference

Put images in the "input" dir, and run:

python run.py --input_dir ./input/ --result_dir ./result/ --concat_dir ./concat/ 

or use script run.sh directly.

Gradio Demo

python demo.py

🏋️‍♂️ Training

Data preparation

You can download the training and test data by Huggingface or run the download_merge.sh, the dir structure is like:

dataset_root/
├── train/
│   ├── nature/
│   ├── real/
│   ├── DRR/
│   ├── Syn/
│   ├── DRR_dual/
│   ├── Syn_dual/
│
└── test/
    ├── real20_420/
    ├── Nature/
    ├── SIR2/
    ├── DRR-S/
    ├── DRR-C/

Run create_jsonl.py to create jsonl files for training.

Progressive training

# change to your local path before running

# foundamental training
sh train.sh

# reflection-invariant fine-tuning
sh train_dual.sh

# train the CLD
sh train_decoder.sh

Test

python run_test.py
python metrics.py -m /path/to/output

🌏 Citation

If you find Derefelection Any Image useful for your work please cite:

@misc{hu2025dereflection,
    title={Dereflection Any Image with Diffusion Priors and Diversified Data},
    author={Jichen Hu and Chen Yang and Zanwei Zhou and Jiemin Fang and Xiaokang Yang and Qi Tian and Wei Shen},
    year={2025},
    eprint={2503.17347},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

About

Dereflection Any Image with Diffusion Priors and Diversified Data [AAAI 2026]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published