├── README.md ├── data ├── generate_real.m ├── generate_train.m ├── generate_validation.m ├── rainy_image_dataset │ ├── input │ │ └── README.md │ ├── input_val │ │ ├── input1.png │ │ ├── input10.png │ │ ├── input11.png │ │ ├── input12.png │ │ ├── input13.png │ │ ├── input14.png │ │ ├── input15.png │ │ ├── input16.png │ │ ├── input17.png │ │ ├── input18.png │ │ ├── input19.png │ │ ├── input2.png │ │ ├── input20.png │ │ ├── input3.png │ │ ├── input4.png │ │ ├── input5.png │ │ ├── input6.png │ │ ├── input7.png │ │ ├── input8.png │ │ └── input9.png │ ├── label │ │ └── README.md │ ├── label_val │ │ ├── norain1.png │ │ ├── norain10.png │ │ ├── norain11.png │ │ ├── norain12.png │ │ ├── norain13.png │ │ ├── norain14.png │ │ ├── norain15.png │ │ ├── norain16.png │ │ ├── norain17.png │ │ ├── norain18.png │ │ ├── norain19.png │ │ ├── norain2.png │ │ ├── norain20.png │ │ ├── norain3.png │ │ ├── norain4.png │ │ ├── norain5.png │ │ ├── norain6.png │ │ ├── norain7.png │ │ ├── norain8.png │ │ └── norain9.png │ └── real_input │ │ ├── 1.jpg │ │ ├── 10.jpg │ │ ├── 100.jpg │ │ ├── 101.jpg │ │ ├── 102.jpg │ │ ├── 103.jpg │ │ ├── 104.jpg │ │ ├── 105.jpg │ │ ├── 106.jpg │ │ ├── 107.jpg │ │ ├── 108.jpg │ │ ├── 109.jpg │ │ ├── 11.jpg │ │ ├── 110.jpg │ │ ├── 111.jpg │ │ ├── 112.jpg │ │ ├── 113.jpg │ │ ├── 114.jpg │ │ ├── 115.jpg │ │ ├── 116.jpg │ │ ├── 117.jpg │ │ ├── 118.jpg │ │ ├── 119.jpg │ │ ├── 12.jpg │ │ ├── 120.jpg │ │ ├── 121.jpg │ │ ├── 122.jpg │ │ ├── 123.jpg │ │ ├── 124.jpg │ │ ├── 125.jpg │ │ ├── 126.jpg │ │ ├── 127.jpg │ │ ├── 128.jpg │ │ ├── 129.jpg │ │ ├── 13.jpg │ │ ├── 130.jpg │ │ ├── 131.jpg │ │ ├── 132.jpg │ │ ├── 133.jpg │ │ ├── 134.jpg │ │ ├── 135.jpg │ │ ├── 136.jpg │ │ ├── 137.jpg │ │ ├── 138.jpg │ │ ├── 139.jpg │ │ ├── 14.jpg │ │ ├── 140.jpg │ │ ├── 141.jpg │ │ ├── 142.jpg │ │ ├── 143.jpg │ │ ├── 144.jpg │ │ ├── 145.jpg │ │ ├── 146.jpg │ │ ├── 147.jpg │ │ ├── 15.jpg │ │ ├── 16.jpg │ │ ├── 17.jpg │ │ ├── 18.jpg │ │ ├── 19.jpg │ │ ├── 2.jpg │ │ ├── 20.jpg │ │ ├── 21.jpg │ │ ├── 22.jpg │ │ ├── 23.jpg │ │ ├── 24.jpg │ │ ├── 25.jpg │ │ ├── 26.jpg │ │ ├── 27.jpg │ │ ├── 28.jpg │ │ ├── 29.jpg │ │ ├── 3.jpg │ │ ├── 30.jpg │ │ ├── 31.jpg │ │ ├── 32.jpg │ │ ├── 33.jpg │ │ ├── 34.jpg │ │ ├── 35.jpg │ │ ├── 36.jpg │ │ ├── 37.jpg │ │ ├── 38.jpg │ │ ├── 39.jpg │ │ ├── 4.jpg │ │ ├── 40.jpg │ │ ├── 41.jpg │ │ ├── 42.jpg │ │ ├── 43.jpg │ │ ├── 44.jpg │ │ ├── 45.jpg │ │ ├── 46.jpg │ │ ├── 47.jpg │ │ ├── 48.jpg │ │ ├── 49.jpg │ │ ├── 5.jpg │ │ ├── 50.jpg │ │ ├── 51.jpg │ │ ├── 52.jpg │ │ ├── 53.jpg │ │ ├── 54.jpg │ │ ├── 55.jpg │ │ ├── 56.jpg │ │ ├── 57.jpg │ │ ├── 58.jpg │ │ ├── 59.jpg │ │ ├── 6.jpg │ │ ├── 60.jpg │ │ ├── 61.jpg │ │ ├── 62.jpg │ │ ├── 63.jpg │ │ ├── 64.jpg │ │ ├── 65.jpg │ │ ├── 66.jpg │ │ ├── 67.jpg │ │ ├── 68.jpg │ │ ├── 69.jpg │ │ ├── 7.jpg │ │ ├── 70.jpg │ │ ├── 71.jpg │ │ ├── 72.jpg │ │ ├── 73.jpg │ │ ├── 74.jpg │ │ ├── 75.jpg │ │ ├── 76.jpg │ │ ├── 77.jpg │ │ ├── 78.jpg │ │ ├── 79.jpg │ │ ├── 8.jpg │ │ ├── 80.jpg │ │ ├── 81.jpg │ │ ├── 82.jpg │ │ ├── 83.jpg │ │ ├── 84.jpg │ │ ├── 85.jpg │ │ ├── 86.jpg │ │ ├── 87.jpg │ │ ├── 88.jpg │ │ ├── 89.jpg │ │ ├── 9.jpg │ │ ├── 90.jpg │ │ ├── 91.jpg │ │ ├── 92.jpg │ │ ├── 93.jpg │ │ ├── 94.jpg │ │ ├── 95.jpg │ │ ├── 96.jpg │ │ ├── 97.jpg │ │ ├── 98.jpg │ │ └── 99.jpg └── store2hdf5.m ├── model ├── checkpoint ├── model.data-00000-of-00001 ├── model.index └── model.meta ├── test-image ├── input.png └── norain.png ├── testing.py ├── training.py └── utils.py /README.md: -------------------------------------------------------------------------------- 1 | # Semi-supervised Transfer Learning for Image Rain Removal 2 | 3 | This package contains the Python implementation of "[Semi-supervised Transfer Learning for Image Rain Removal](https://arxiv.org/pdf/1807.11078.pdf)", in CVPR 2019. 4 | 5 | 6 | 7 | 8 | 9 | ## Usage 10 | 11 | #### Prepare Training Data 12 | Download synthesized data from [here](https://github.com/jinnovation/rainy-image-dataset), as supervised training data. Put input images in './data/rainy_image_dataset/input' and ground truth images in './data/rainy_image_dataset/label'. 13 | Run /data/generate.m to generate HDF files as training data. 14 | 15 | #### Train 16 | python training.py 17 | 18 | #### Test 19 | python testing.py 20 | 21 | ## Cite 22 | Please cite this paper if you use the code: 23 | 24 | @InProceedings{Wei_2019_CVPR, 25 | author = {Wei, Wei and Meng, Deyu and Zhao, Qian and Xu, Zongben and Wu, Ying}, 26 | title = {Semi-Supervised Transfer Learning for Image Rain Removal}, 27 | booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition}, 28 | year = {2019} 29 | } 30 | 31 | The prior work using MoG for video deraining can be found here: 32 | 33 | @InProceedings{wei2017should, 34 | title={Should we encode rain streaks in video as deterministic or stochastic?}, 35 | author={Wei, Wei and Yi, Lixuan and Xie, Qi and Zhao, Qian and Meng, Deyu and Xu, Zongben}, 36 | booktitle={Proceedings of the IEEE International Conference on Computer Vision}, 37 | year={2017} 38 | } 39 | 40 | ## Acknowledge 41 | We use [Deep Detail Network](https://xueyangfu.github.io/projects/cvpr2017.html) as our baseline. Thanks for sharing the code! 42 | 43 | ## Note 44 | 1. You are welcomed to add more real data. 45 | 2. You are welcomed to try more recent derain network as baseline. 46 | -------------------------------------------------------------------------------- /data/generate_real.m: -------------------------------------------------------------------------------- 1 | clear;close all; 2 | %% settings 3 | size_input = 64; 4 | size_label = 64; 5 | image_dim = 3; 6 | 7 | %%% generate 50000 h5 files, each file contains 20 image patches, total 1,000,000 patches 8 | num_h5_files = 50000; 9 | num_patches = 20; 10 | %%% 11 | 12 | %% initialization 13 | data = zeros(size_input, size_input, image_dim, 1); 14 | 15 | %% generate data 16 | listing = dir('./rainy_image_dataset/real_input/*.jpg'); 17 | for j = 1:num_h5_files 18 | count = 0; 19 | disp(['generating ',num2str(j),' h5 file, total ',num2str(num_h5_files),' files']); 20 | savepath = ['h5data_real/real',num2str(j),'.h5']; 21 | 22 | for i = 1 : num_patches 23 | r_idx = random('unid', size(listing, 1)); 24 | im_input = imread(strcat('./rainy_image_dataset/real_input/', listing(r_idx).name)); % input: rainy image 25 | im_input = double(im_input)./255.0; 26 | 27 | orig_img_size = size(im_input); 28 | x = random('unid', orig_img_size(1) - size_input + 1); 29 | y = random('unid', orig_img_size(2) - size_input + 1); 30 | subim_input = im_input(x : x+size_input-1, y : y+size_input-1,:); 31 | 32 | count=count+1; 33 | data(:, :, 1:image_dim, count) = flip(imrotate(subim_input,270),2); 34 | end 35 | 36 | order = randperm(count); 37 | data = data(:, :, 1:image_dim, order); 38 | 39 | 40 | %% writing to HDF5 41 | chunksz = 20; 42 | created_flag = false; 43 | totalct = 0; 44 | 45 | for batchno = 1:floor(count/chunksz) 46 | last_read=(batchno-1)*chunksz; 47 | batchdata = data(:,:,1:image_dim,last_read+1:last_read+chunksz); 48 | batchlabs = zeros(size(batchdata)); 49 | 50 | startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]); 51 | curr_dat_sz = store2hdf5(savepath, batchdata, batchlabs, ~created_flag, startloc, chunksz); 52 | created_flag = true; 53 | totalct = curr_dat_sz(end); 54 | end 55 | h5disp(savepath); 56 | end 57 | -------------------------------------------------------------------------------- /data/generate_train.m: -------------------------------------------------------------------------------- 1 | clear;close all; 2 | %% settings 3 | size_input = 64; 4 | size_label = 64; 5 | image_dim = 3; 6 | 7 | %%% generate 50000 h5 files, each file contains 20 image patches, total 1,000,000 patches 8 | num_h5_files = 50000; 9 | num_patches = 20; 10 | %%% 11 | 12 | %% initialization 13 | data = zeros(size_input, size_input, image_dim, 1); 14 | label = zeros(size_label, size_label, image_dim, 1); 15 | 16 | 17 | %% generate data 18 | listing = dir('./rainy_image_dataset/input/*.jpg'); 19 | for j = 1:num_h5_files 20 | count = 0; 21 | disp(['generating ',num2str(j),' h5 file, total ',num2str(num_h5_files),' files']); 22 | savepath = ['h5data/train',num2str(j),'.h5']; 23 | 24 | for i = 1 : num_patches 25 | 26 | r_idx = random('unid', size(listing, 1)); 27 | 28 | 29 | im_input = imread(strcat('./rainy_image_dataset/input/', listing(r_idx).name)); % input: rainy image 30 | im_input = double(im_input)./255.0; 31 | 32 | temp = listing(r_idx).name; 33 | indfir = max(strfind(temp,'_')); 34 | indlas = strfind(temp,'.'); 35 | temp = temp([1:indfir-1,indlas:end]); 36 | im_label = imread(strcat('./rainy_image_dataset/label/', temp)); % label: clean image 37 | im_label = double(im_label)./255.0; 38 | 39 | 40 | 41 | orig_img_size = size(im_label); 42 | x = random('unid', orig_img_size(1) - size_input + 1); 43 | y = random('unid', orig_img_size(2) - size_input + 1); 44 | subim_input = im_input(x : x+size_input-1, y : y+size_input-1,:); 45 | subim_label = im_label(x : x+size_input-1, y : y+size_input-1,:); 46 | 47 | count=count+1; 48 | data(:, :, 1:image_dim, count) = flip(imrotate(subim_input,270),2); 49 | label(:, :, 1:image_dim, count) = flip(imrotate(subim_label,270),2); 50 | 51 | 52 | end 53 | 54 | order = randperm(count); 55 | data = data(:, :, 1:image_dim, order); 56 | label = label(:, :, 1:image_dim, order); 57 | 58 | 59 | %% writing to HDF5 60 | chunksz = 20; 61 | created_flag = false; 62 | totalct = 0; 63 | 64 | for batchno = 1:floor(count/chunksz) 65 | last_read=(batchno-1)*chunksz; 66 | batchdata = data(:,:,1:image_dim,last_read+1:last_read+chunksz); 67 | batchlabs = label(:,:,1:image_dim,last_read+1:last_read+chunksz); 68 | 69 | startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]); 70 | curr_dat_sz = store2hdf5(savepath, batchdata, batchlabs, ~created_flag, startloc, chunksz); 71 | created_flag = true; 72 | totalct = curr_dat_sz(end); 73 | end 74 | h5disp(savepath); 75 | end 76 | -------------------------------------------------------------------------------- /data/generate_validation.m: -------------------------------------------------------------------------------- 1 | clear;close all; 2 | %% settings 3 | size_input = 64; 4 | size_label = 64; 5 | image_dim = 3; 6 | 7 | %%% generate 1 h5 file that contains 500 image patches for validation 8 | num_h5_files = 1; 9 | num_patches = 20; 10 | %%% 11 | 12 | 13 | %% initialization 14 | data = zeros(size_input, size_input, image_dim, 1); 15 | label = zeros(size_label, size_label, image_dim, 1); 16 | 17 | 18 | %% generate data 19 | listing = dir('./rainy_image_dataset/input_val/*.png'); 20 | for j = 1:num_h5_files 21 | count = 0; 22 | savepath = './h5data/validation.h5'; 23 | 24 | for i = 1 : num_patches 25 | 26 | r_idx = random('unid', size(listing, 1)); 27 | 28 | im_input = imread(strcat('./rainy_image_dataset/input_val/', listing(r_idx).name)); % input: rainy image 29 | im_input = double(im_input)./255.0; 30 | 31 | im_label = imread(strcat('./rainy_image_dataset/label_val/norain', listing(r_idx).name(6:end))); % label: clean image 32 | im_label = double(im_label)./255.0; 33 | 34 | 35 | orig_img_size = size(im_label); 36 | x = random('unid', orig_img_size(1) - size_input + 1); 37 | y = random('unid', orig_img_size(2) - size_input + 1); 38 | 39 | subim_input = im_input(x : x+size_input-1, y : y+size_input-1,:); 40 | subim_label = im_label(x : x+size_input-1, y : y+size_input-1,:); 41 | 42 | count = count + 1; 43 | data(:, :, 1:image_dim, count) = flip(imrotate(subim_input,270),2); 44 | label(:, :, 1:image_dim, count) = flip(imrotate(subim_label,270),2); 45 | 46 | 47 | end 48 | 49 | order = randperm(count); 50 | data = data(:, :, 1:image_dim, order); 51 | label = label(:, :, 1:image_dim, order); 52 | 53 | %% writing to HDF5 54 | chunksz = 20; 55 | created_flag = false; 56 | totalct = 0; 57 | 58 | for batchno = 1:floor(count/chunksz) 59 | last_read = (batchno-1)*chunksz; 60 | batchdata = data(:,:,1:image_dim,last_read+1:last_read+chunksz); 61 | batchlabs = label(:,:,1:image_dim,last_read+1:last_read+chunksz); 62 | 63 | startloc = struct('dat',[1,1,1,totalct+1], 'lab', [1,1,1,totalct+1]); 64 | curr_dat_sz = store2hdf5(savepath, batchdata, batchlabs, ~created_flag, startloc, chunksz); 65 | created_flag = true; 66 | totalct = curr_dat_sz(end); 67 | end 68 | h5disp(savepath); 69 | end 70 | -------------------------------------------------------------------------------- /data/rainy_image_dataset/input/README.md: -------------------------------------------------------------------------------- 1 | Please put synthesized supervised images here. 2 | -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input1.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input10.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input11.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input12.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input13.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input14.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input15.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input16.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input17.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input18.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input19.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input2.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input20.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input3.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input4.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input5.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input6.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input7.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input8.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/input_val/input9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/input_val/input9.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label/README.md: -------------------------------------------------------------------------------- 1 | Please put supervised ground truth image here. 2 | -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain1.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain10.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain11.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain12.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain13.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain14.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain15.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain16.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain17.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain18.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain19.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain2.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain20.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain3.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain4.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain5.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain6.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain7.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain8.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/label_val/norain9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/label_val/norain9.png -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/1.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/10.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/100.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/101.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/101.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/102.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/102.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/103.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/103.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/104.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/104.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/105.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/105.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/106.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/106.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/107.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/107.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/108.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/108.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/109.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/109.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/11.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/110.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/110.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/111.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/111.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/112.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/112.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/113.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/113.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/114.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/114.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/115.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/115.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/116.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/116.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/117.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/117.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/118.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/118.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/119.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/119.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/12.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/120.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/120.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/121.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/121.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/122.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/122.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/123.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/123.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/124.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/124.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/125.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/125.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/126.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/126.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/127.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/127.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/128.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/129.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/129.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/13.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/130.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/130.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/131.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/131.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/132.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/132.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/133.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/133.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/134.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/134.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/135.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/135.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/136.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/136.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/137.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/137.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/138.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/138.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/139.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/139.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/14.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/140.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/140.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/141.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/141.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/142.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/142.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/143.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/143.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/144.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/144.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/145.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/146.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/146.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/147.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/147.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/15.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/16.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/17.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/18.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/19.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/2.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/20.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/21.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/22.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/23.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/24.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/25.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/26.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/27.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/28.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/29.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/3.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/30.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/31.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/32.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/33.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/34.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/35.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/36.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/37.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/38.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/39.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/4.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/40.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/41.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/42.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/43.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/44.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/45.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/46.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/47.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/48.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/48.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/49.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/5.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/50.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/51.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/52.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/52.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/53.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/54.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/54.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/55.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/56.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/56.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/57.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/57.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/58.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/59.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/6.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/60.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/61.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/61.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/62.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/62.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/63.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/63.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/64.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/64.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/65.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/65.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/66.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/66.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/67.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/67.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/68.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/68.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/69.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/69.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/7.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/70.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/70.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/71.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/71.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/72.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/72.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/73.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/73.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/74.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/75.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/75.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/76.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/76.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/77.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/77.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/78.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/78.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/79.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/79.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/8.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/80.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/80.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/81.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/81.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/82.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/82.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/83.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/83.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/84.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/84.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/85.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/85.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/86.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/86.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/87.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/87.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/88.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/88.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/89.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/89.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/9.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/90.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/90.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/91.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/91.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/92.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/92.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/93.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/93.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/94.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/94.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/95.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/95.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/96.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/96.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/97.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/97.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/98.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/98.jpg -------------------------------------------------------------------------------- /data/rainy_image_dataset/real_input/99.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/data/rainy_image_dataset/real_input/99.jpg -------------------------------------------------------------------------------- /data/store2hdf5.m: -------------------------------------------------------------------------------- 1 | function [curr_dat_sz, curr_lab_sz] = store2hdf5(filename, data, labels, create, startloc, chunksz) 2 | % *data* is W*H*C*N matrix of images should be normalized (e.g. to lie between 0 and 1) beforehand 3 | % *label* is D*N matrix of labels (D labels per sample) 4 | % *create* [0/1] specifies whether to create file newly or to append to previously created file, useful to store information in batches when a dataset is too big to be held in memory (default: 1) 5 | % *startloc* (point at which to start writing data). By default, 6 | % if create=1 (create mode), startloc.data=[1 1 1 1], and startloc.lab=[1 1]; 7 | % if create=0 (append mode), startloc.data=[1 1 1 K+1], and startloc.lab = [1 K+1]; where K is the current number of samples stored in the HDF 8 | % chunksz (used only in create mode), specifies number of samples to be stored per chunk (see HDF5 documentation on chunking) for creating HDF5 files with unbounded maximum size - TLDR; higher chunk sizes allow faster read-write operations 9 | 10 | % verify that format is right 11 | dat_dims=size(data); 12 | lab_dims=size(labels); 13 | num_samples=dat_dims(end); 14 | 15 | assert(lab_dims(end)==num_samples, 'Number of samples should be matched between data and labels'); 16 | 17 | if ~exist('create','var') 18 | create=true; 19 | end 20 | 21 | 22 | if create 23 | %fprintf('Creating dataset with %d samples\n', num_samples); 24 | if ~exist('chunksz', 'var') 25 | chunksz=1000; 26 | end 27 | if exist(filename, 'file') 28 | fprintf('Warning: replacing existing file %s \n', filename); 29 | delete(filename); 30 | end 31 | h5create(filename, '/data', [dat_dims(1:end-1) Inf], 'Datatype', 'single', 'ChunkSize', [dat_dims(1:end-1) chunksz]); % width, height, channels, number 32 | h5create(filename, '/label', [lab_dims(1:end-1) Inf], 'Datatype', 'single', 'ChunkSize', [lab_dims(1:end-1) chunksz]); % width, height, channels, number 33 | if ~exist('startloc','var') 34 | startloc.dat=[ones(1,length(dat_dims)-1), 1]; 35 | startloc.lab=[ones(1,length(lab_dims)-1), 1]; 36 | end 37 | else % append mode 38 | if ~exist('startloc','var') 39 | info=h5info(filename); 40 | prev_dat_sz=info.Datasets(1).Dataspace.Size; 41 | prev_lab_sz=info.Datasets(2).Dataspace.Size; 42 | assert(prev_dat_sz(1:end-1)==dat_dims(1:end-1), 'Data dimensions must match existing dimensions in dataset'); 43 | assert(prev_lab_sz(1:end-1)==lab_dims(1:end-1), 'Label dimensions must match existing dimensions in dataset'); 44 | startloc.dat=[ones(1,length(dat_dims)-1), prev_dat_sz(end)+1]; 45 | startloc.lab=[ones(1,length(lab_dims)-1), prev_lab_sz(end)+1]; 46 | end 47 | end 48 | 49 | if ~isempty(data) 50 | h5write(filename, '/data', single(data), startloc.dat, size(data)); 51 | h5write(filename, '/label', single(labels), startloc.lab, size(labels)); 52 | end 53 | 54 | if nargout 55 | info=h5info(filename); 56 | curr_dat_sz=info.Datasets(1).Dataspace.Size; 57 | curr_lab_sz=info.Datasets(2).Dataspace.Size; 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /model/checkpoint: -------------------------------------------------------------------------------- 1 | model_checkpoint_path: "model" 2 | -------------------------------------------------------------------------------- /model/model.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/model/model.data-00000-of-00001 -------------------------------------------------------------------------------- /model/model.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/model/model.index -------------------------------------------------------------------------------- /model/model.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/model/model.meta -------------------------------------------------------------------------------- /test-image/input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/test-image/input.png -------------------------------------------------------------------------------- /test-image/norain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwzjer/Semi-supervised-IRR/dca2a894142de69e2697ab11d7645581b22d54f8/test-image/norain.png -------------------------------------------------------------------------------- /testing.py: -------------------------------------------------------------------------------- 1 | import os 2 | import training as Network 3 | import tensorflow as tf 4 | import matplotlib.pyplot as plt 5 | import matplotlib.image as img 6 | import numpy as np 7 | import cv2 8 | import skimage.measure 9 | 10 | ##################### Select GPU device #################################### 11 | os.environ['CUDA_VISIBLE_DEVICES'] = "0" 12 | ############################################################################ 13 | #os.environ['CUDA_VISIBLE_DEVICES'] = str(monitoring_gpu.GPU_INDEX) 14 | ############################################################################ 15 | 16 | 17 | 18 | def guided_filter(data, height,width): 19 | r = 15 20 | eps = 1.0 21 | batch_size = 1 22 | channel = 3 23 | batch_q = np.zeros((batch_size, height, width, channel)) 24 | for i in range(batch_size): 25 | for j in range(channel): 26 | I = data[i, :, :,j] 27 | p = data[i, :, :,j] 28 | ones_array = np.ones([height, width]) 29 | N = cv2.boxFilter(ones_array, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) 30 | mean_I = cv2.boxFilter(I, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 31 | mean_p = cv2.boxFilter(p, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 32 | mean_Ip = cv2.boxFilter(I * p, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 33 | cov_Ip = mean_Ip - mean_I * mean_p 34 | mean_II = cv2.boxFilter(I * I, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 35 | var_I = mean_II - mean_I * mean_I 36 | a = cov_Ip / (var_I + eps) 37 | b = mean_p - a * mean_I 38 | mean_a = cv2.boxFilter(a , -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 39 | mean_b = cv2.boxFilter(b , -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 40 | q = mean_a * I + mean_b 41 | batch_q[i, :, :,j] = q 42 | return batch_q 43 | 44 | 45 | file = "./test-image/input.png" 46 | ori = img.imread(file) 47 | ori = np.double(ori) 48 | 49 | input = np.expand_dims(ori[:,:,:], axis = 0) 50 | detail_layer = input - guided_filter(input, input.shape[1], input.shape[2]) 51 | 52 | 53 | num_channels = 3 54 | image = tf.placeholder(tf.float32, shape=(1, input.shape[1], input.shape[2], num_channels)) 55 | detail = tf.placeholder(tf.float32, shape=(1, input.shape[1], input.shape[2], num_channels)) 56 | 57 | output = Network.inference(image,detail,factor=1.) 58 | saver = tf.train.Saver() 59 | config = tf.ConfigProto() 60 | config.gpu_options.per_process_gpu_memory_fraction = 0.5 61 | config.gpu_options.allow_growth = True 62 | 63 | with tf.Session(config=config) as sess: 64 | 65 | ckpt = tf.train.latest_checkpoint('./model/') 66 | saver.restore(sess, ckpt) 67 | print ("Loading model") 68 | 69 | final_output = sess.run(output, feed_dict={image:input, detail: detail_layer}) 70 | 71 | final_output[np.where(final_output < 0. )] = 0. 72 | final_output[np.where(final_output > 1. )] = 1. 73 | derained = final_output[0,:,:,:] 74 | 75 | plt.subplot(1,2,1) 76 | plt.imshow(ori) 77 | plt.title('input') 78 | 79 | plt.subplot(1,2,2) 80 | plt.imshow(derained) 81 | plt.title('output') 82 | plt.imsave('./test-image/output.png',derained) 83 | psnr = skimage.measure.compare_psnr(np.uint8(255*img.imread('./test-image/norain.png')),np.uint8(255*derained)) 84 | print(psnr) 85 | 86 | plt.title('output') 87 | 88 | plt.show() 89 | -------------------------------------------------------------------------------- /training.py: -------------------------------------------------------------------------------- 1 | import os 2 | import h5py 3 | import numpy as np 4 | import tensorflow as tf 5 | import cv2 6 | import random 7 | from utils import total_variation 8 | import skimage.measure 9 | 10 | ##################### select GPU device #################################### 11 | os.environ['CUDA_VISIBLE_DEVICES'] = "0" 12 | ############################################################################ 13 | #os.environ['CUDA_VISIBLE_DEVICES'] = str(monitoring_gpu.GPU_INDEX) 14 | ############################################################################ 15 | 16 | 17 | ####Delete all flags before declare##### 18 | 19 | def del_all_flags(FLAGS): 20 | flags_dict = FLAGS._flags() 21 | keys_list = [keys for keys in flags_dict] 22 | for keys in keys_list: 23 | FLAGS.__delattr__(keys) 24 | 25 | del_all_flags(tf.flags.FLAGS) 26 | tf.reset_default_graph() 27 | 28 | FLAGS = tf.app.flags.FLAGS 29 | tf.app.flags.DEFINE_integer('num_h5_file', 50000,"""number of training h5 files.""") 30 | tf.app.flags.DEFINE_integer('num_patches', 20,"""number of patches in each h5 file.""") 31 | tf.app.flags.DEFINE_float('learning_rate', 0.001,"""learning rate.""") 32 | tf.app.flags.DEFINE_integer('epoch', 15,"""epoch.""") 33 | tf.app.flags.DEFINE_integer('batch_size', 20,"""Batch size.""") 34 | tf.app.flags.DEFINE_integer('num_channels', 3,"""Number of channels of the input.""") 35 | tf.app.flags.DEFINE_integer('image_size', 64,"""Size of the images.""") 36 | tf.app.flags.DEFINE_integer('label_size', 64,"""Size of the labels.""") 37 | tf.app.flags.DEFINE_string("data_path", "./data/h5data/", "The path of synthesized data") 38 | tf.app.flags.DEFINE_string("data_path_real","./data/h5data_real/","The path of real data") 39 | tf.app.flags.DEFINE_string("save_model_path", "./model/", "The path of saving model") 40 | tf.app.flags.DEFINE_float('lambda1',1.,"lambda1 value") 41 | tf.app.flags.DEFINE_float('lambda2',.5,"lambda2 value") 42 | tf.app.flags.DEFINE_float('lambda3',1e-5,"lambda3 value") 43 | tf.app.flags.DEFINE_float('lambda4',1e-9,"lambda4 value") 44 | tf.app.flags.DEFINE_integer('num_components', 3, """"number of gaussian mixture components""") 45 | 46 | 47 | 48 | # read h5 files 49 | def read_data(file): 50 | with h5py.File(file, 'r') as hf: 51 | data = hf.get('data') 52 | label = hf.get('label') 53 | return np.array(data), np.array(label) 54 | 55 | 56 | 57 | # guided filter 58 | def guided_filter(data, num_patches = FLAGS.num_patches, width = FLAGS.image_size, height = FLAGS.image_size, channel = FLAGS.num_channels): 59 | r = 15 60 | eps = 1.0 61 | batch_q = np.zeros((num_patches, height, width, channel)) 62 | for i in range(num_patches): 63 | for j in range(channel): 64 | I = data[i, :, :,j] 65 | p = data[i, :, :,j] 66 | ones_array = np.ones([height, width]) 67 | N = cv2.boxFilter(ones_array, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) 68 | mean_I = cv2.boxFilter(I, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 69 | mean_p = cv2.boxFilter(p, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 70 | mean_Ip = cv2.boxFilter(I * p, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 71 | cov_Ip = mean_Ip - mean_I * mean_p 72 | mean_II = cv2.boxFilter(I * I, -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 73 | var_I = mean_II - mean_I * mean_I 74 | a = cov_Ip / (var_I + eps) 75 | b = mean_p - a * mean_I 76 | mean_a = cv2.boxFilter(a , -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 77 | mean_b = cv2.boxFilter(b , -1, (2 * r + 1, 2 * r + 1), normalize = False, borderType = 0) / N 78 | q = mean_a * I + mean_b 79 | batch_q[i, :, :,j] = q 80 | return batch_q 81 | 82 | 83 | 84 | # initialize weights 85 | def create_kernel(name, shape, initializer=tf.contrib.layers.xavier_initializer()): 86 | regularizer = tf.contrib.layers.l2_regularizer(scale = 1e-10) 87 | 88 | new_variables = tf.get_variable(name=name, shape=shape, initializer=initializer, 89 | regularizer=regularizer, trainable=True) 90 | return new_variables 91 | 92 | 93 | # network structure 94 | def inference(images,detail,factor=1): 95 | 96 | # layer 1 97 | with tf.variable_scope('conv_1'): 98 | kernel = create_kernel(name='weights_1', shape=[3, 3, FLAGS.num_channels, 16]) 99 | biases = tf.Variable(tf.constant(0.0, shape=[16], dtype=tf.float32), trainable=True, name='biases_1') 100 | scale = tf.Variable(tf.ones([16]), trainable=True, name='scale_1') 101 | beta = tf.Variable(tf.zeros([16]), trainable=True, name='beta_1') 102 | 103 | conv = tf.nn.conv2d(detail, kernel, [1, 1, 1, 1], padding='SAME') 104 | #stride [1,x_movement,y_movement,1] 105 | #padding 'VALID' small; 'SAME' equal 106 | feature = tf.nn.bias_add(conv, biases) 107 | 108 | mean, var = tf.nn.moments(feature,[0, 1, 2]) 109 | feature_normal = tf.nn.batch_normalization(feature, mean, var, beta, scale, 1e-5) 110 | 111 | conv_shortcut = tf.nn.relu(feature_normal) 112 | 113 | # layers 2 to 25 114 | for i in range(12): 115 | with tf.variable_scope('conv_%s'%(i*2+2)): 116 | kernel = create_kernel(name=('weights_%s'%(i*2+2)), shape=[3, 3, 16, 16]) 117 | biases = tf.Variable(tf.constant(0.0, shape=[16], dtype=tf.float32), trainable=True, name=('biases_%s'%(i*2+2))) 118 | scale = tf.Variable(tf.ones([16]), trainable=True, name=('scale_%s'%(i*2+2))) 119 | beta = tf.Variable(tf.zeros([16]), trainable=True, name=('beta_%s'%(i*2+2))) 120 | 121 | conv = tf.nn.conv2d(conv_shortcut, kernel, [1, 1, 1, 1], padding='SAME') 122 | feature = tf.nn.bias_add(conv, biases) 123 | 124 | mean, var = tf.nn.moments(feature,[0, 1, 2]) 125 | feature_normal = tf.nn.batch_normalization(feature, mean, var, beta, scale, 1e-5) 126 | 127 | feature_relu = tf.nn.relu(feature_normal) 128 | 129 | 130 | with tf.variable_scope('conv_%s'%(i*2+3)): 131 | kernel = create_kernel(name=('weights_%s'%(i*2+3)), shape=[3, 3, 16, 16]) 132 | biases = tf.Variable(tf.constant(0.0, shape=[16], dtype=tf.float32), trainable=True, name=('biases_%s'%(i*2+3))) 133 | scale = tf.Variable(tf.ones([16]), trainable=True, name=('scale_%s'%(i*2+3))) 134 | beta = tf.Variable(tf.zeros([16]), trainable=True, name=('beta_%s'%(i*2+3))) 135 | 136 | conv = tf.nn.conv2d(feature_relu, kernel, [1, 1, 1, 1], padding='SAME') 137 | feature = tf.nn.bias_add(conv, biases) 138 | 139 | mean, var = tf.nn.moments(feature,[0, 1, 2]) 140 | feature_normal = tf.nn.batch_normalization(feature, mean, var, beta, scale, 1e-5) 141 | 142 | feature_relu = tf.nn.relu(feature_normal) 143 | 144 | conv_shortcut = tf.add(conv_shortcut, feature_relu) # shortcut 145 | 146 | 147 | # layer 26 148 | with tf.variable_scope('conv_26'): 149 | kernel = create_kernel(name='weights_26', shape=[3, 3, 16, FLAGS.num_channels]) 150 | biases = tf.Variable(tf.constant(0.0, shape=[FLAGS.num_channels], dtype=tf.float32), trainable=True, name='biases_26') 151 | scale = tf.Variable(tf.ones([3]), trainable=True, name=('scale_26')) 152 | beta = tf.Variable(tf.zeros([3]), trainable=True, name=('beta_26')) 153 | 154 | conv = tf.nn.conv2d(conv_shortcut, kernel, [1, 1, 1, 1], padding='SAME') 155 | feature = tf.nn.bias_add(conv, biases) 156 | 157 | mean, var = tf.nn.moments(feature,[0, 1, 2]) 158 | neg_residual = tf.nn.batch_normalization(feature, mean, var, beta, scale, 1e-5) 159 | 160 | final_out = tf.add(images, neg_residual/factor) 161 | 162 | return final_out 163 | 164 | # GMM initialization 165 | def initialize(X,k): 166 | n = X.shape[1] 167 | idx = random.sample(range(n),k) 168 | m = X[:,idx] 169 | a = m.T*X-np.square(m).T/2 170 | #R = np.argmax(a,0) 171 | R = list(map(lambda x: x==np.max(x,0),a.T)) * np.ones(shape=a.T.shape) 172 | return R 173 | 174 | # E step 175 | def expectation(X,model): 176 | mu = model['mu'] 177 | Sigma = model['Sigma'] 178 | w = model['weight'] 179 | 180 | n = X.shape[1] 181 | k = mu.shape[1] 182 | logRho = np.zeros([n,k]) 183 | 184 | for i in range(k): 185 | logRho[:,i] = loggausspdf(X,mu[0,i],Sigma[0,i]) 186 | 187 | logRho = logRho+np.log(w) 188 | T = logsumexp(logRho) 189 | llh = np.sum(T)/n 190 | logR = logRho.T-T 191 | R = np.exp(logR).T 192 | return (R,llh) 193 | 194 | def loggausspdf(X,mu,Sigma): 195 | d = X.shape[0] 196 | X = X-mu 197 | U = np.sqrt(Sigma) 198 | Q = X/U 199 | q = np.square(Q) 200 | c = d*np.log(2*np.pi)+2*np.sum(np.log(U)) 201 | y = -(c+q)/2 202 | return y 203 | 204 | def logsumexp(x): 205 | y = np.max(x,1) 206 | x = x.T-y 207 | s = y+np.log(np.sum(np.exp(x),0)) 208 | return s 209 | 210 | # M step 211 | def maximizationModel(X,R): 212 | k = R.shape[1] 213 | nk = np.sum(R,0) 214 | mu = np.zeros([1,k]) 215 | 216 | w = nk/R.shape[0] 217 | Sigma = np.zeros([1,k]) 218 | sqrtR = np.sqrt(R) 219 | for i in range(k): 220 | Xo = X-mu[0,i] 221 | Xo = Xo*sqrtR[:,i] 222 | Sigma[:,i] = np.dot(Xo,Xo.T)/nk[i] 223 | Sigma[:,i] = Sigma[:,i]+1e-6 224 | 225 | model = {'mu':mu, 'Sigma':Sigma, 'weight':w} 226 | return model 227 | 228 | 229 | 230 | if __name__ == '__main__': 231 | 232 | images = tf.placeholder(tf.float32, shape=(None, FLAGS.image_size, FLAGS.image_size, FLAGS.num_channels)) # supervised data (None,64,64,3) 233 | details = tf.placeholder(tf.float32, shape=(None, FLAGS.image_size, FLAGS.image_size, FLAGS.num_channels)) # supervised detail layer (None,64,64,3) 234 | labels = tf.placeholder(tf.float32, shape=(None, FLAGS.label_size, FLAGS.label_size, FLAGS.num_channels)) # supervised label (None,64,64,3) 235 | outputs = inference(images,details) # supervised outputs (None,64,64,3) 236 | loss1 = tf.reduce_mean(tf.square(labels - outputs)) # supervised MSE loss 237 | 238 | with tf.variable_scope(tf.get_variable_scope()) as scope: 239 | tf.get_variable_scope().reuse_variables() 240 | un_images = tf.placeholder(tf.float32, shape=(None, FLAGS.image_size, FLAGS.image_size, FLAGS.num_channels)) # unsupervised data (None,64,64,3) 241 | un_details = tf.placeholder(tf.float32, shape=(None, FLAGS.image_size, FLAGS.image_size, FLAGS.num_channels)) # unsupervised detail layer (None,64,64,3) 242 | un_outputs = inference(un_images,un_details) # unsupervised outputs (None,64,64,3) 243 | 244 | R = tf.placeholder(tf.float32,shape=(None,FLAGS.num_components)) 245 | 246 | #mu = tf.placeholder(tf.float32,shape=(1,3)) 247 | Sigma = tf.placeholder(tf.float32,shape=(1,FLAGS.num_components),name='Sigma') 248 | weight = tf.placeholder(tf.float32,shape=(FLAGS.num_components),name='weight') 249 | 250 | loss2 = 0. 251 | for k in range(FLAGS.num_components): 252 | loss2 += R[:,k]*tf.reshape(tf.square(un_images-un_outputs),[1,-1])*.5/Sigma[0,k] 253 | loss2 = tf.reduce_mean(loss2) 254 | 255 | loss3 = tf.reduce_mean(total_variation(un_outputs)) 256 | 257 | tfd = tf.contrib.distributions 258 | mean, var = tf.nn.moments(tf.reshape(images - labels,(-1,1)),[0]) 259 | f1 = tfd.Normal(loc=mean, scale=tf.sqrt(var)) 260 | 261 | loss4 = [] 262 | for k in range(FLAGS.num_components): 263 | loss4.append(tfd.kl_divergence(f1, tfd.Normal(loc=0., scale=Sigma[0,k]))) 264 | 265 | loss4 = tf.reduce_min(loss4) 266 | loss = FLAGS.lambda1*loss1 + FLAGS.lambda2*loss2 + FLAGS.lambda3*loss3 + FLAGS.lambda4*loss4 267 | 268 | 269 | lr_ = FLAGS.learning_rate 270 | lr = tf.placeholder(tf.float32 ,shape = []) 271 | g_optim = tf.train.AdamOptimizer(lr).minimize(loss) 272 | 273 | saver = tf.train.Saver(max_to_keep = 5) 274 | 275 | config = tf.ConfigProto() 276 | config.gpu_options.per_process_gpu_memory_fraction = 0.5 # GPU setting 277 | config.gpu_options.allow_growth = True 278 | 279 | 280 | epoch = int(FLAGS.epoch) 281 | 282 | with tf.Session(config=config) as sess: 283 | 284 | sess.run(tf.global_variables_initializer()) 285 | 286 | validation_data_name = "validation.h5" 287 | validation_h5_data, validation_h5_label = read_data(FLAGS.data_path + validation_data_name) 288 | 289 | validation_data = validation_h5_data 290 | validation_data = np.transpose(validation_data, (0,2,3,1)) # image data 291 | 292 | validation_detail = validation_data - guided_filter(validation_data) # detail layer 293 | 294 | validation_label = np.transpose(validation_h5_label, (0,2,3,1)) # label 295 | 296 | print("Start training") 297 | start_point = 0 298 | 299 | 300 | for j in range(start_point,epoch): 301 | 302 | if j+1 >(epoch/3): # reduce learning rate 303 | lr_ = FLAGS.learning_rate*0.1 304 | if j+1 >(2*epoch/3): 305 | lr_ = FLAGS.learning_rate*0.01 306 | 307 | for num in range(FLAGS.num_h5_file): # h5 files 308 | train_data_name = "train" + str(num+1) + ".h5" 309 | train_h5_data, train_h5_label = read_data(FLAGS.data_path + train_data_name) 310 | 311 | train_data = np.transpose(train_h5_data, (0,2,3,1)) # image data 312 | detail_data = train_data - guided_filter(train_data) # detail layer 313 | train_label = np.transpose(train_h5_label, (0,2,3,1)) # label 314 | 315 | train_real_data_name = "real" + str(num+1) + ".h5" 316 | train_real_h5_data, _ = read_data(FLAGS.data_path_real + train_real_data_name) 317 | 318 | train_real_data = np.transpose(train_real_h5_data,(0,2,3,1)) 319 | detail_real_data = train_real_data - guided_filter(train_real_data) 320 | 321 | if j==0: 322 | R_real = initialize(train_real_data.reshape(1,-1),FLAGS.num_components) 323 | model = {'mu':np.zeros([1,FLAGS.num_components],dtype=np.float32), 324 | 'Sigma':np.random.rand(1,FLAGS.num_components).astype(np.float32), 325 | 'weight':np.sum(R_real,0)/float(np.size(R_real,0))} 326 | Error = train_real_data.reshape(1, -1) 327 | else: 328 | unsupervised_outputs = sess.run(un_outputs, feed_dict={un_images:train_real_data, un_details: detail_real_data}) 329 | Error = train_real_data.reshape(1,-1) - unsupervised_outputs.reshape(1,-1) 330 | 331 | R_real,_ = expectation(Error,model) 332 | model = maximizationModel(Error,R_real) 333 | R_real, _ = expectation(Error,model) 334 | 335 | 336 | _,lossvalue = sess.run([g_optim,loss], 337 | feed_dict={images:train_data, 338 | details:detail_data, 339 | labels:train_label, 340 | un_images:train_real_data, 341 | un_details:detail_real_data, 342 | lr:lr_,R:R_real, 343 | Sigma:model['Sigma'], 344 | weight:model['weight']}) 345 | pred_im = sess.run(outputs, feed_dict={images:train_data, details: detail_data}) 346 | psnr = skimage.measure.compare_psnr(train_label,pred_im) 347 | 348 | 349 | 350 | model_name = 'model-epoch' # save model 351 | save_path_full = os.path.join(FLAGS.save_model_path, model_name) 352 | saver.save(sess, save_path_full, global_step = j+1) 353 | 354 | 355 | 356 | Validation_Loss = sess.run(loss, 357 | feed_dict={images: validation_data, 358 | details: validation_detail, 359 | labels:validation_label, 360 | un_images:train_real_data, 361 | un_details:detail_real_data, 362 | lr:lr_,R:R_real, 363 | Sigma:model['Sigma'], 364 | weight:model['weight']}) 365 | pred_val = sess.run(outputs, feed_dict={images:validation_data, details: validation_detail}) 366 | psnr_val = skimage.measure.compare_psnr(validation_label,pred_val) 367 | 368 | print ('Epoch %d :Train loss %.4f, Validation loss %.4f, Train PSNR %.4f, Validation PSNR %.4f' % 369 | (j+1, lossvalue, Validation_Loss, psnr, psnr_val)) 370 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | from tensorflow.python.framework import ops 2 | import tensorflow as tf 3 | 4 | def total_variation(images, name=None): 5 | """Calculate and return the Total Variation for one or more images. 6 | 7 | The total variation is the sum of the absolute differences for neighboring 8 | pixel-values in the input images. This measures how much noise is in the images. 9 | 10 | This can be used as a loss-function during optimization so as to suppress noise 11 | in images. If you have a batch of images, then you should calculate the scalar 12 | loss-value as the sum: `loss = tf.reduce_sum(tf.image.total_variation(images))` 13 | 14 | This implements the anisotropic 2-D version of the formula described here: 15 | 16 | https://en.wikipedia.org/wiki/Total_variation_denoising 17 | 18 | Args: 19 | images: 4-D Tensor of shape `[batch, height, width, channels]` or 20 | 3-D Tensor of shape `[height, width, channels]`. 21 | 22 | name: A name for the operation (optional). 23 | 24 | Raises: 25 | ValueError: if images.shape is not a 3-D or 4-D vector. 26 | 27 | Returns: 28 | The total variation of `images`. 29 | 30 | If `images` was 4-D, a 1-D float Tensor of shape `[batch]` with the 31 | total variation for each image in the batch. 32 | If `images` was 3-D, a scalar float with the total variation for that image. 33 | """ 34 | 35 | with ops.name_scope(name, 'total_variation'): 36 | ndims = images.get_shape().ndims 37 | 38 | if ndims == 3: 39 | # The input is a single image with shape [height, width, channels]. 40 | 41 | # Calculate the difference of neighboring pixel-values. 42 | # The images are shifted one pixel along the height and width by slicing. 43 | pixel_dif1 = images[1:,:,:] - images[:-1,:,:] 44 | pixel_dif2 = images[:,1:,:] - images[:,:-1,:] 45 | 46 | # Sum for all axis. (None is an alias for all axis.) 47 | sum_axis = None 48 | elif ndims == 4: 49 | # The input is a batch of images with shape [batch, height, width, channels]. 50 | 51 | # Calculate the difference of neighboring pixel-values. 52 | # The images are shifted one pixel along the height and width by slicing. 53 | pixel_dif1 = images[:,1:,:,:] - images[:,:-1,:,:] 54 | pixel_dif2 = images[:,:,1:,:] - images[:,:,:-1,:] 55 | 56 | # Only sum for the last 3 axis. 57 | # This results in a 1-D tensor with the total variation for each image. 58 | sum_axis = [1, 2, 3] 59 | else: 60 | raise ValueError('\'images\' must be either 3 or 4-dimensional.') 61 | 62 | # Calculate the total variation by taking the absolute value of the 63 | # pixel-differences and summing over the appropriate axis. 64 | tot_var = tf.reduce_sum(tf.abs(pixel_dif1), axis=sum_axis) + \ 65 | tf.reduce_sum(tf.abs(pixel_dif2), axis=sum_axis) 66 | 67 | return tot_var 68 | --------------------------------------------------------------------------------