ZhenboSong / RobustSIRR

Official implement for CVPR2023 "Robust Single Image Reflection Removal Against Adversarial Attacks"
MIT License
20 stars 2 forks source link

Reflection removal on custom data #2

Open kiddoray opened 2 months ago

kiddoray commented 2 months ago

I want to use this model to remove some reflections on my own data for further use. How should i preprocess my data and place it? thx

Liar-zzy commented 2 months ago

If you want to test your data, please refer to 👇 https://github.com/ZhenboSong/RobustSIRR/blob/49fcd3aee09184cc4a6f7d838eeea3de36a67d28/data/reflect_dataset.py#L23 You need to modify the folder architecture of the dataset to the same way of Real20. Then you must change the code 👇 https://github.com/ZhenboSong/RobustSIRR/blob/49fcd3aee09184cc4a6f7d838eeea3de36a67d28/data/reflect_dataset.py#L56

and adapt it to your dataset.

Just like :

elif '${yourdataset}' in self.datadir:
    t_img = Image.open(join(self.datadir, 'transmission_layer', fn)).convert('RGB')
    m_img = Image.open(join(self.datadir, 'blended', fn)).convert('RGB')