Open GitarthVaishnav opened 2 years ago
For derain:
python main.py --dir_data $DATA_PATH --pretrain $MODEL_PATH --scale 1 --derain
So if you want to get the deraining results, you may set the arg: --derain instead of --derain_test 1
I tried this, but it is finding TrainL dataset to work.
I want to use my own single image and get deraining result on that single image.
How can I do that?
Request you to let me know.
You can modify :
self.derain_dataroot = os.path.join(args.dir_data, "RainTrainL")
self.derain_img_list = search(self.derain_dataroot, "rainstreak")
self.derain_test = os.path.join(args.dir_data, "Rain100L")
self.derain_lr_test = search(self.derain_test, "rain")
self.derain_hr_test = [path.replace("rainy/","no") for path in self.derain_lr_test]
in Lines to:
self.derain_lr_test = search(self.derain_test, "")
self.derain_hr_test = search(self.derain_test, "")
Moreover, you may set the arg --save_results to save the output images.
Thank you for sharing the good work!
I was trying to get deraining and denoising output (inference) on single image of my choice, but was not able to do the same.
The steps I performed are: Added a folder /Pretrained-IPT-main/test_data/Images Added this 'Images' in the init.py of /Pretrained-IPT-main/data/ Added the pretrained deraining model to the /Pretrained-IPT-main/pretrained_model/ folder
Used the following code:
python main.py --dir_data /Pretrained-IPT-main/test_data/ --data_test 'Images' --pretrain /Pretrained-IPT-main/pretrained_model/IPT_derain.pt --scale 1 --derain_test 1 --test_only
This is giving the following output:
There is no derained image being stored in any folder, instead a couple of folders are being created:
/Pretrained-IPT-main/test_data/benchmark/Images/bin
(empty)/Pretrained-IPT-main/test_data/DIV2K
/Pretrained-IPT-main/test_data/DIV2K/DIV2K_train_HR
(empty)/Pretrained-IPT-main/test_data/DIV2K/bin
/Pretrained-IPT-main/test_data/DIV2K/bin/DIV2K_train_HR
(empty)Request you to let me know what am I doing wrong, and how can I get inference (output) on a single image for deraining and denoising.