DIRS Models and Data
This repository hosts the released checkpoints and TJReflection real-world data for DIRS: Principled Reflection Separation via Nonlinear Superposition and Feature Interaction.
DIRS studies reflection separation under a nonlinear sRGB image formation model and provides three released variants:
- DIRS-YTMT: CNN interaction through feature recycling.
- DIRS-MuGI: CNN interaction through mutual gating.
- DIRS-PAIR: Transformer-based dual-stream joint attention.
Repository Contents
checkpoints/
dirs_ytmt_lors.ckpt
dirs_mugi_lors.ckpt
dirs_pair_lors.ckpt
dirs_pair_lors_nature.ckpt
rsr_supplement.ckpt
polarized_dirs_pair_lors.ckpt
pretrained/
swin_large_o365.pth
datasets/
TJReflection/
datasets/TJReflection/ contains 175 real-world reflection images used by the
DIRS release.
Checkpoints
Metrics are reported on the LORS test setting at 256 x 256 resolution. Runtime is measured on a single NVIDIA RTX 3090.
| Model | Type | Params | FLOPs | Time | PSNR | SSIM | File |
|---|---|---|---|---|---|---|---|
| DIRS-YTMT | CNN, activation interaction | 32.42M | 102.91G | 31.35 ms | 24.94 | 0.902 | checkpoints/dirs_ytmt_lors.ckpt |
| DIRS-MuGI | CNN, mutual gating | 84.47M | 153.98G | 49.95 ms | 25.63 | 0.913 | checkpoints/dirs_mugi_lors.ckpt |
| DIRS-PAIR | Transformer, joint attention | 48.80M | 200.22G | 75.36 ms | 26.37 | 0.918 | checkpoints/dirs_pair_lors.ckpt |
| DIRS-PAIR + Nature | Transformer, joint attention | 48.80M | 200.22G | 75.36 ms | 26.95 | 0.926 | checkpoints/dirs_pair_lors_nature.ckpt |
Supplementary checkpoints:
| Task | File | Notes |
|---|---|---|
| Reflection scene reconstruction | checkpoints/rsr_supplement.ckpt |
Supplementary model for reconstructing reflection scenes. |
| Polarized reflection separation | checkpoints/polarized_dirs_pair_lors.ckpt |
DIRS-PAIR adapted to polarized inputs. |
| Swin prior | checkpoints/pretrained/swin_large_o365.pth |
Pretrained prior used by DIRS-PAIR and polarized DIRS. |
Usage
Clone this repository or download it from the Hugging Face UI, then place
checkpoints/ and datasets/ at the root of the
DIRS code repository:
git clone https://github.com/mingcv/DIRS.git
cd DIRS
git clone https://huggingface.co/huqiming513/DIRS-Models DIRS-Models
cp -r DIRS-Models/checkpoints .
cp -r DIRS-Models/datasets .
Example evaluation command:
python -m xreflection.test \
--config options/test_dirs_pair_lors.yml \
--resume checkpoints/dirs_pair_lors.ckpt
Available evaluation configs in the code repository:
| Model | Config | Checkpoint |
|---|---|---|
| DIRS-YTMT | options/test_dirs_ytmt_lors.yml |
checkpoints/dirs_ytmt_lors.ckpt |
| DIRS-MuGI | options/test_dirs_mugi_lors.yml |
checkpoints/dirs_mugi_lors.ckpt |
| DIRS-PAIR | options/test_dirs_pair_lors.yml |
checkpoints/dirs_pair_lors.ckpt |
| DIRS-PAIR + Nature | options/test_dirs_pair_lors.yml |
checkpoints/dirs_pair_lors_nature.ckpt |
Intended Use
These files are intended for academic research and reproducibility in image reflection separation, reflection scene reconstruction, and polarized reflection separation. The models are not designed as a safety-critical restoration system and may fail on images outside the training and evaluation distribution, including unusual glass materials, severe saturation, extreme low light, or strong misalignment.
Citation
If you use these checkpoints, data, or code, please cite:
@article{hu2026dirs,
title={Principled Reflection Separation via Nonlinear Superposition and Feature Interaction},
author={Hu, Qiming and Li, Mingjia and Li, Yuntong and Guo, Xiaojie},
journal={arXiv preprint},
year={2026}
}