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
Environment Preparation (Python 3.9)
pip install -r requirements.txt
Data Preparation
Training dataset
- 7,643 images from the Pascal VOC dataset, center-cropped as 224 x 224 slices to synthesize training pairs;
- 90 real-world training pairs provided by Zhang et al.;
- 200 real-world training pairs provided by IBCLN (In our training setting 2, † labeled in our paper).
Testing dataset
- 45 real-world testing images from CEILNet dataset;
- 20 real testing pairs provided by Zhang et al.;
- 20 real testing pairs provided by IBCLN;
- 454 real testing pairs from SIR^2 dataset, containing three subsets (i.e., Objects (200), Postcard (199), Wild (55)).
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.