Home

Awesome

DSRNet: Single Image Reflection Separation via Component Synergy (ICCV 2023)

:book: [ICCV] [Arxiv] [Supp.] <br> Qiming Hu, Xiaojie Guo <br> College of Intelligence and Computing, Tianjin University<br>

Network Architecture

fig_arch

Environment Preparation (Python 3.9)

pip install -r requirements.txt

Data Preparation

Training dataset

Testing dataset

Download all in one by Google Drive or 百度云.

Usage

Training

Setting I (w/o Nature): python train_sirs.py --inet dsrnet_l --model dsrnet_model_sirs --dataset sirs_dataset --loss losses --name dsrnet_l --lambda_vgg 0.01 --lambda_rec 0.2 --if_align --seed 2018 --base_dir "[YOUR DATA DIR]"

Setting II (w/ Nature): python train_sirs_4000.py --inet dsrnet_l_nature --model dsrnet_model_sirs --dataset sirs_dataset --loss losses --name dsrnet_l_4000 --lambda_vgg 0.01 --lambda_rec 0.2 --if_align --seed 2018 --base_dir "[YOUR DATA DIR]"

Evaluation

Setting I (w/o Nature): python eval_sirs.py --inet dsrnet_l --model dsrnet_model_sirs --dataset sirs_dataset --name dsrnet_l_test --if_align --resume --weight_path "./weights/dsrnet_l_epoch18.pt" --base_dir "[YOUR_DATA_DIR]"

Setting II (w/ Nature): python eval_sirs_4000.py --inet dsrnet_l_nature --model dsrnet_model_sirs --dataset sirs_dataset --name dsrnet_l_4000_test --if_align --resume --weight_path "./weights/dsrnet_l_4000_epoch33.pt" --base_dir "[YOUR_DATA_DIR]"

More commands can be found in scripts.sh.

Testing

Setting I (w/o Nature): python test_sirs.py --inet dsrnet_l --model dsrnet_model_sirs --dataset sirs_dataset --name dsrnet_l_test --hyper --if_align --resume --weight_path "./weights/dsrnet_l_epoch18.pt" --base_dir "[YOUR_DATA_DIR]"

Setting II (w/ Nature): python test_sirs.py --inet dsrnet_l_nature --model dsrnet_model_sirs --dataset sirs_dataset --name dsrnet_l_4000_test --hyper --if_align --resume --weight_path "./weights/dsrnet_l_4000_epoch33.pt" --base_dir "[YOUR_DATA_DIR]"

Trained weights

Download the trained weights by Google Drive or 百度云 and drop them into the "weights" dir.

image

Visual comparison on real20 and SIR^2

image

Impressive Restoration Quality of Reflection Layers

image