├── DBPN_main_rgb.m ├── FeatureSIM.m ├── LICENSE ├── README.md ├── Result └── readme.txt ├── Test └── readme.txt ├── caffe ├── DBPN_mat_2x.prototxt ├── DBPN_mat_4x.prototxt ├── DBPN_mat_8x.prototxt ├── DBPN_net_2x.prototxt ├── DBPN_net_4x.prototxt ├── DBPN_net_8x.prototxt ├── DBPN_solver_2x.prototxt ├── DBPN_solver_4x.prototxt └── DBPN_solver_8x.prototxt ├── compute_psnr.m ├── modcrop.m ├── model └── readme.txt ├── run_cnn.m ├── selfEnsemble.m ├── shave.m └── ssim_index.m /DBPN_main_rgb.m: -------------------------------------------------------------------------------- 1 | close all; 2 | clear all; 3 | 4 | %% set parameters 5 | use_gpu=0; 6 | up_scale = 8; 7 | ensemble=0; 8 | dataset = 'Set5/'; 9 | testfolder = ['Test/' dataset]; 10 | resultfolder=['Result/' int2str(up_scale) 'x/' dataset]; 11 | 12 | %% flat or deconv 13 | flat=0; 14 | model = 'model/DBPN_mat_8x.prototxt'; 15 | weights = 'model/DBPN_8x.caffemodel'; 16 | 17 | if ~exist(resultfolder,'file') 18 | mkdir(resultfolder); 19 | end 20 | 21 | filepaths = dir(fullfile(testfolder,'*.png')); 22 | [aa,bb]=size(filepaths); 23 | if aa==0 24 | filepaths = dir(fullfile(testfolder,'*.bmp')); 25 | end 26 | 27 | 28 | tt_bic = zeros(length(filepaths),1); 29 | tt_dbpn = zeros(length(filepaths),1); 30 | 31 | psnr_bic = zeros(length(filepaths),1); 32 | psnr_dbpn = zeros(length(filepaths),1); 33 | 34 | ssim_bic = zeros(length(filepaths),1); 35 | ssim_dbpn = zeros(length(filepaths),1); 36 | 37 | fsim_bic = zeros(length(filepaths),1); 38 | fsim_dbpn = zeros(length(filepaths),1); 39 | 40 | for i = 1 : length(filepaths) 41 | 42 | %% read ground truth image 43 | [add,imname,type] = fileparts(filepaths(i).name); 44 | im = imread([testfolder imname type]); 45 | 46 | if size(im,3) == 1 47 | im=im(:,:,[1 1 1]); 48 | end 49 | 50 | %% work on illuminance only 51 | im_gnd = modcrop(im, up_scale); 52 | im_gnd = single(im_gnd)/255; 53 | im_l = imresize(im_gnd, 1/up_scale, 'bicubic'); 54 | 55 | %% bicubic interpolation 56 | tic 57 | im_b = imresize(im_l, up_scale, 'bicubic'); 58 | t_bic=toc; 59 | 60 | %% DBPN 61 | if flat==1 62 | [im_dbpn,t_dbpn] = run_cnn(im_b, model, weights,use_gpu); 63 | t_dbpn=t_dbpn+t_bic; 64 | else 65 | if ensemble==0 66 | [im_dbpn,t_dbpn] = run_cnn(im_l, model, weights,use_gpu); 67 | else 68 | [im_dbpn,t_dbpn]=selfEnsemble(im_l,model,weights,use_gpu); 69 | end 70 | end 71 | 72 | %% remove border 73 | im_dbpn = shave(uint8(im_dbpn * 255), [up_scale, up_scale]); 74 | im_gnd = shave(uint8(im_gnd * 255), [up_scale, up_scale]); 75 | im_b = shave(uint8(im_b * 255), [up_scale, up_scale]); 76 | 77 | %% compute time 78 | tt_bic(i) = t_bic; 79 | tt_dbpn(i) = t_dbpn+t_bic; 80 | 81 | %% compute PSNR 82 | psnr_bic(i) = compute_psnr(im_gnd,im_b); 83 | psnr_dbpn(i) = compute_psnr(im_gnd,im_dbpn); 84 | 85 | %% compute FSIM 86 | fsim_bic(i) = FeatureSIM(im_gnd,im_b); 87 | fsim_dbpn(i) = FeatureSIM(im_gnd,im_dbpn); 88 | 89 | %% compute SSIM 90 | ssim_bic(i) = ssim_index(im_gnd,im_b); 91 | ssim_dbpn(i) = ssim_index(im_gnd,im_dbpn); 92 | 93 | %% save results 94 | %imwrite(im_b, [resultfolder imname '_bic.bmp']); 95 | %imwrite(im_dbpn, [resultfolder imname '_dbpn.bmp']); 96 | 97 | end 98 | 99 | fprintf('Bicubic: %f , %f , %f , %f \n', mean(psnr_bic), mean(ssim_bic), mean(fsim_bic), mean(tt_bic)); 100 | fprintf('dbpn: %f , %f , %f , %f \n', mean(psnr_dbpn), mean(ssim_dbpn), mean(fsim_dbpn), mean(tt_dbpn)); 101 | -------------------------------------------------------------------------------- /FeatureSIM.m: -------------------------------------------------------------------------------- 1 | function [FSIM, FSIMc] = FeatureSIM(imageRef, imageDis) 2 | % ======================================================================== 3 | % FSIM Index with automatic downsampling, Version 1.0 4 | % Copyright(c) 2010 Lin ZHANG, Lei Zhang, Xuanqin Mou and David Zhang 5 | % All Rights Reserved. 6 | % 7 | % ---------------------------------------------------------------------- 8 | % Permission to use, copy, or modify this software and its documentation 9 | % for educational and research purposes only and without fee is here 10 | % granted, provided that this copyright notice and the original authors' 11 | % names appear on all copies and supporting documentation. This program 12 | % shall not be used, rewritten, or adapted as the basis of a commercial 13 | % software or hardware product without first obtaining permission of the 14 | % authors. The authors make no representations about the suitability of 15 | % this software for any purpose. It is provided "as is" without express 16 | % or implied warranty. 17 | %---------------------------------------------------------------------- 18 | % 19 | % This is an implementation of the algorithm for calculating the 20 | % Feature SIMilarity (FSIM) index between two images. 21 | % 22 | % Please refer to the following paper 23 | % 24 | % Lin Zhang, Lei Zhang, Xuanqin Mou, and David Zhang,"FSIM: a feature similarity 25 | % index for image qualtiy assessment", IEEE Transactions on Image Processing, vol. 20, no. 8, pp. 2378-2386, 2011. 26 | % 27 | %---------------------------------------------------------------------- 28 | % 29 | %Input : (1) imageRef: the first image being compared 30 | % (2) imageDis: the second image being compared 31 | % 32 | %Output: (1) FSIM: is the similarty score calculated using FSIM algorithm. FSIM 33 | % only considers the luminance component of images. For colorful images, 34 | % they will be converted to the grayscale at first. 35 | % (2) FSIMc: is the similarity score calculated using FSIMc algorithm. FSIMc 36 | % considers both the grayscale and the color information. 37 | %Note: For grayscale images, the returned FSIM and FSIMc are the same. 38 | % 39 | %----------------------------------------------------------------------- 40 | % 41 | %Usage: 42 | %Given 2 test images img1 and img2. For gray-scale images, their dynamic range should be 0-255. 43 | %For colorful images, the dynamic range of each color channel should be 0-255. 44 | % 45 | %[FSIM, FSIMc] = FeatureSIM(img1, img2); 46 | %----------------------------------------------------------------------- 47 | 48 | [rows, cols] = size(imageRef(:,:,1)); 49 | I1 = ones(rows, cols); 50 | I2 = ones(rows, cols); 51 | Q1 = ones(rows, cols); 52 | Q2 = ones(rows, cols); 53 | 54 | if ndims(imageRef) == 3 %images are colorful 55 | Y1 = 0.299 * double(imageRef(:,:,1)) + 0.587 * double(imageRef(:,:,2)) + 0.114 * double(imageRef(:,:,3)); 56 | Y2 = 0.299 * double(imageDis(:,:,1)) + 0.587 * double(imageDis(:,:,2)) + 0.114 * double(imageDis(:,:,3)); 57 | I1 = 0.596 * double(imageRef(:,:,1)) - 0.274 * double(imageRef(:,:,2)) - 0.322 * double(imageRef(:,:,3)); 58 | I2 = 0.596 * double(imageDis(:,:,1)) - 0.274 * double(imageDis(:,:,2)) - 0.322 * double(imageDis(:,:,3)); 59 | Q1 = 0.211 * double(imageRef(:,:,1)) - 0.523 * double(imageRef(:,:,2)) + 0.312 * double(imageRef(:,:,3)); 60 | Q2 = 0.211 * double(imageDis(:,:,1)) - 0.523 * double(imageDis(:,:,2)) + 0.312 * double(imageDis(:,:,3)); 61 | else %images are grayscale 62 | Y1 = imageRef; 63 | Y2 = imageDis; 64 | end 65 | 66 | Y1 = double(Y1); 67 | Y2 = double(Y2); 68 | %%%%%%%%%%%%%%%%%%%%%%%%% 69 | % Downsample the image 70 | %%%%%%%%%%%%%%%%%%%%%%%%% 71 | minDimension = min(rows,cols); 72 | F = max(1,round(minDimension / 256)); 73 | aveKernel = fspecial('average',F); 74 | 75 | aveI1 = conv2(I1, aveKernel,'same'); 76 | aveI2 = conv2(I2, aveKernel,'same'); 77 | I1 = aveI1(1:F:rows,1:F:cols); 78 | I2 = aveI2(1:F:rows,1:F:cols); 79 | 80 | aveQ1 = conv2(Q1, aveKernel,'same'); 81 | aveQ2 = conv2(Q2, aveKernel,'same'); 82 | Q1 = aveQ1(1:F:rows,1:F:cols); 83 | Q2 = aveQ2(1:F:rows,1:F:cols); 84 | 85 | aveY1 = conv2(Y1, aveKernel,'same'); 86 | aveY2 = conv2(Y2, aveKernel,'same'); 87 | Y1 = aveY1(1:F:rows,1:F:cols); 88 | Y2 = aveY2(1:F:rows,1:F:cols); 89 | 90 | %%%%%%%%%%%%%%%%%%%%%%%%% 91 | % Calculate the phase congruency maps 92 | %%%%%%%%%%%%%%%%%%%%%%%%% 93 | PC1 = phasecong2(Y1); 94 | PC2 = phasecong2(Y2); 95 | 96 | %%%%%%%%%%%%%%%%%%%%%%%%% 97 | % Calculate the gradient map 98 | %%%%%%%%%%%%%%%%%%%%%%%%% 99 | dx = [3 0 -3; 10 0 -10; 3 0 -3]/16; 100 | dy = [3 10 3; 0 0 0; -3 -10 -3]/16; 101 | IxY1 = conv2(Y1, dx, 'same'); 102 | IyY1 = conv2(Y1, dy, 'same'); 103 | gradientMap1 = sqrt(IxY1.^2 + IyY1.^2); 104 | 105 | IxY2 = conv2(Y2, dx, 'same'); 106 | IyY2 = conv2(Y2, dy, 'same'); 107 | gradientMap2 = sqrt(IxY2.^2 + IyY2.^2); 108 | 109 | %%%%%%%%%%%%%%%%%%%%%%%%% 110 | % Calculate the FSIM 111 | %%%%%%%%%%%%%%%%%%%%%%%%% 112 | T1 = 0.85; %fixed 113 | T2 = 160; %fixed 114 | PCSimMatrix = (2 * PC1 .* PC2 + T1) ./ (PC1.^2 + PC2.^2 + T1); 115 | gradientSimMatrix = (2*gradientMap1.*gradientMap2 + T2) ./(gradientMap1.^2 + gradientMap2.^2 + T2); 116 | PCm = max(PC1, PC2); 117 | SimMatrix = gradientSimMatrix .* PCSimMatrix .* PCm; 118 | FSIM = sum(sum(SimMatrix)) / sum(sum(PCm)); 119 | 120 | %%%%%%%%%%%%%%%%%%%%%%%%% 121 | % Calculate the FSIMc 122 | %%%%%%%%%%%%%%%%%%%%%%%%% 123 | T3 = 200; 124 | T4 = 200; 125 | ISimMatrix = (2 * I1 .* I2 + T3) ./ (I1.^2 + I2.^2 + T3); 126 | QSimMatrix = (2 * Q1 .* Q2 + T4) ./ (Q1.^2 + Q2.^2 + T4); 127 | 128 | lambda = 0.03; 129 | 130 | SimMatrixC = gradientSimMatrix .* PCSimMatrix .* real((ISimMatrix .* QSimMatrix) .^ lambda) .* PCm; 131 | FSIMc = sum(sum(SimMatrixC)) / sum(sum(PCm)); 132 | 133 | return; 134 | 135 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 136 | 137 | function [ResultPC]=phasecong2(im) 138 | % ======================================================================== 139 | % Copyright (c) 1996-2009 Peter Kovesi 140 | % School of Computer Science & Software Engineering 141 | % The University of Western Australia 142 | % http://www.csse.uwa.edu.au/ 143 | % 144 | % Permission is hereby granted, free of charge, to any person obtaining a copy 145 | % of this software and associated documentation files (the "Software"), to deal 146 | % in the Software without restriction, subject to the following conditions: 147 | % 148 | % The above copyright notice and this permission notice shall be included in all 149 | % copies or substantial portions of the Software. 150 | % 151 | % The software is provided "as is", without warranty of any kind. 152 | % References: 153 | % 154 | % Peter Kovesi, "Image Features From Phase Congruency". Videre: A 155 | % Journal of Computer Vision Research. MIT Press. Volume 1, Number 3, 156 | % Summer 1999 http://mitpress.mit.edu/e-journals/Videre/001/v13.html 157 | 158 | nscale = 4; % Number of wavelet scales. 159 | norient = 4; % Number of filter orientations. 160 | minWaveLength = 6; % Wavelength of smallest scale filter. 161 | mult = 2; % Scaling factor between successive filters. 162 | sigmaOnf = 0.55; % Ratio of the standard deviation of the 163 | % Gaussian describing the log Gabor filter's 164 | % transfer function in the frequency domain 165 | % to the filter center frequency. 166 | dThetaOnSigma = 1.2; % Ratio of angular interval between filter orientations 167 | % and the standard deviation of the angular Gaussian 168 | % function used to construct filters in the 169 | % freq. plane. 170 | k = 2.0; % No of standard deviations of the noise 171 | % energy beyond the mean at which we set the 172 | % noise threshold point. 173 | % below which phase congruency values get 174 | % penalized. 175 | epsilon = .0001; % Used to prevent division by zero. 176 | 177 | thetaSigma = pi/norient/dThetaOnSigma; % Calculate the standard deviation of the 178 | % angular Gaussian function used to 179 | % construct filters in the freq. plane. 180 | 181 | [rows,cols] = size(im); 182 | imagefft = fft2(im); % Fourier transform of image 183 | 184 | zero = zeros(rows,cols); 185 | EO = cell(nscale, norient); % Array of convolution results. 186 | 187 | estMeanE2n = []; 188 | ifftFilterArray = cell(1,nscale); % Array of inverse FFTs of filters 189 | 190 | % Pre-compute some stuff to speed up filter construction 191 | 192 | % Set up X and Y matrices with ranges normalised to +/- 0.5 193 | % The following code adjusts things appropriately for odd and even values 194 | % of rows and columns. 195 | if mod(cols,2) 196 | xrange = [-(cols-1)/2:(cols-1)/2]/(cols-1); 197 | else 198 | xrange = [-cols/2:(cols/2-1)]/cols; 199 | end 200 | 201 | if mod(rows,2) 202 | yrange = [-(rows-1)/2:(rows-1)/2]/(rows-1); 203 | else 204 | yrange = [-rows/2:(rows/2-1)]/rows; 205 | end 206 | 207 | [x,y] = meshgrid(xrange, yrange); 208 | 209 | radius = sqrt(x.^2 + y.^2); % Matrix values contain *normalised* radius from centre. 210 | theta = atan2(-y,x); % Matrix values contain polar angle. 211 | % (note -ve y is used to give +ve 212 | % anti-clockwise angles) 213 | 214 | radius = ifftshift(radius); % Quadrant shift radius and theta so that filters 215 | theta = ifftshift(theta); % are constructed with 0 frequency at the corners. 216 | radius(1,1) = 1; % Get rid of the 0 radius value at the 0 217 | % frequency point (now at top-left corner) 218 | % so that taking the log of the radius will 219 | % not cause trouble. 220 | 221 | sintheta = sin(theta); 222 | costheta = cos(theta); 223 | clear x; clear y; clear theta; % save a little memory 224 | 225 | % Filters are constructed in terms of two components. 226 | % 1) The radial component, which controls the frequency band that the filter 227 | % responds to 228 | % 2) The angular component, which controls the orientation that the filter 229 | % responds to. 230 | % The two components are multiplied together to construct the overall filter. 231 | 232 | % Construct the radial filter components... 233 | 234 | % First construct a low-pass filter that is as large as possible, yet falls 235 | % away to zero at the boundaries. All log Gabor filters are multiplied by 236 | % this to ensure no extra frequencies at the 'corners' of the FFT are 237 | % incorporated as this seems to upset the normalisation process when 238 | % calculating phase congrunecy. 239 | lp = lowpassfilter([rows,cols],.45,15); % Radius .45, 'sharpness' 15 240 | 241 | logGabor = cell(1,nscale); 242 | 243 | for s = 1:nscale 244 | wavelength = minWaveLength*mult^(s-1); 245 | fo = 1.0/wavelength; % Centre frequency of filter. 246 | logGabor{s} = exp((-(log(radius/fo)).^2) / (2 * log(sigmaOnf)^2)); 247 | logGabor{s} = logGabor{s}.*lp; % Apply low-pass filter 248 | logGabor{s}(1,1) = 0; % Set the value at the 0 frequency point of the filter 249 | % back to zero (undo the radius fudge). 250 | end 251 | 252 | % Then construct the angular filter components... 253 | 254 | spread = cell(1,norient); 255 | 256 | for o = 1:norient 257 | angl = (o-1)*pi/norient; % Filter angle. 258 | 259 | % For each point in the filter matrix calculate the angular distance from 260 | % the specified filter orientation. To overcome the angular wrap-around 261 | % problem sine difference and cosine difference values are first computed 262 | % and then the atan2 function is used to determine angular distance. 263 | 264 | ds = sintheta * cos(angl) - costheta * sin(angl); % Difference in sine. 265 | dc = costheta * cos(angl) + sintheta * sin(angl); % Difference in cosine. 266 | dtheta = abs(atan2(ds,dc)); % Absolute angular distance. 267 | spread{o} = exp((-dtheta.^2) / (2 * thetaSigma^2)); % Calculate the 268 | % angular filter component. 269 | end 270 | 271 | % The main loop... 272 | EnergyAll(rows,cols) = 0; 273 | AnAll(rows,cols) = 0; 274 | 275 | for o = 1:norient % For each orientation. 276 | sumE_ThisOrient = zero; % Initialize accumulator matrices. 277 | sumO_ThisOrient = zero; 278 | sumAn_ThisOrient = zero; 279 | Energy = zero; 280 | for s = 1:nscale, % For each scale. 281 | filter = logGabor{s} .* spread{o}; % Multiply radial and angular 282 | % components to get the filter. 283 | ifftFilt = real(ifft2(filter))*sqrt(rows*cols); % Note rescaling to match power 284 | ifftFilterArray{s} = ifftFilt; % record ifft2 of filter 285 | % Convolve image with even and odd filters returning the result in EO 286 | EO{s,o} = ifft2(imagefft .* filter); 287 | 288 | An = abs(EO{s,o}); % Amplitude of even & odd filter response. 289 | sumAn_ThisOrient = sumAn_ThisOrient + An; % Sum of amplitude responses. 290 | sumE_ThisOrient = sumE_ThisOrient + real(EO{s,o}); % Sum of even filter convolution results. 291 | sumO_ThisOrient = sumO_ThisOrient + imag(EO{s,o}); % Sum of odd filter convolution results. 292 | if s==1 % Record mean squared filter value at smallest 293 | EM_n = sum(sum(filter.^2)); % scale. This is used for noise estimation. 294 | maxAn = An; % Record the maximum An over all scales. 295 | else 296 | maxAn = max(maxAn, An); 297 | end 298 | end % ... and process the next scale 299 | 300 | % Get weighted mean filter response vector, this gives the weighted mean 301 | % phase angle. 302 | 303 | XEnergy = sqrt(sumE_ThisOrient.^2 + sumO_ThisOrient.^2) + epsilon; 304 | MeanE = sumE_ThisOrient ./ XEnergy; 305 | MeanO = sumO_ThisOrient ./ XEnergy; 306 | 307 | % Now calculate An(cos(phase_deviation) - | sin(phase_deviation)) | by 308 | % using dot and cross products between the weighted mean filter response 309 | % vector and the individual filter response vectors at each scale. This 310 | % quantity is phase congruency multiplied by An, which we call energy. 311 | 312 | for s = 1:nscale, 313 | E = real(EO{s,o}); O = imag(EO{s,o}); % Extract even and odd 314 | % convolution results. 315 | Energy = Energy + E.*MeanE + O.*MeanO - abs(E.*MeanO - O.*MeanE); 316 | end 317 | 318 | % Compensate for noise 319 | % We estimate the noise power from the energy squared response at the 320 | % smallest scale. If the noise is Gaussian the energy squared will have a 321 | % Chi-squared 2DOF pdf. We calculate the median energy squared response 322 | % as this is a robust statistic. From this we estimate the mean. 323 | % The estimate of noise power is obtained by dividing the mean squared 324 | % energy value by the mean squared filter value 325 | 326 | medianE2n = median(reshape(abs(EO{1,o}).^2,1,rows*cols)); 327 | meanE2n = -medianE2n/log(0.5); 328 | estMeanE2n(o) = meanE2n; 329 | 330 | noisePower = meanE2n/EM_n; % Estimate of noise power. 331 | 332 | % Now estimate the total energy^2 due to noise 333 | % Estimate for sum(An^2) + sum(Ai.*Aj.*(cphi.*cphj + sphi.*sphj)) 334 | 335 | EstSumAn2 = zero; 336 | for s = 1:nscale 337 | EstSumAn2 = EstSumAn2 + ifftFilterArray{s}.^2; 338 | end 339 | 340 | EstSumAiAj = zero; 341 | for si = 1:(nscale-1) 342 | for sj = (si+1):nscale 343 | EstSumAiAj = EstSumAiAj + ifftFilterArray{si}.*ifftFilterArray{sj}; 344 | end 345 | end 346 | sumEstSumAn2 = sum(sum(EstSumAn2)); 347 | sumEstSumAiAj = sum(sum(EstSumAiAj)); 348 | 349 | EstNoiseEnergy2 = 2*noisePower*sumEstSumAn2 + 4*noisePower*sumEstSumAiAj; 350 | 351 | tau = sqrt(EstNoiseEnergy2/2); % Rayleigh parameter 352 | EstNoiseEnergy = tau*sqrt(pi/2); % Expected value of noise energy 353 | EstNoiseEnergySigma = sqrt( (2-pi/2)*tau^2 ); 354 | 355 | T = EstNoiseEnergy + k*EstNoiseEnergySigma; % Noise threshold 356 | 357 | % The estimated noise effect calculated above is only valid for the PC_1 measure. 358 | % The PC_2 measure does not lend itself readily to the same analysis. However 359 | % empirically it seems that the noise effect is overestimated roughly by a factor 360 | % of 1.7 for the filter parameters used here. 361 | 362 | T = T/1.7; % Empirical rescaling of the estimated noise effect to 363 | % suit the PC_2 phase congruency measure 364 | Energy = max(Energy - T, zero); % Apply noise threshold 365 | 366 | EnergyAll = EnergyAll + Energy; 367 | AnAll = AnAll + sumAn_ThisOrient; 368 | end % For each orientation 369 | ResultPC = EnergyAll ./ AnAll; 370 | return; 371 | 372 | 373 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 374 | % LOWPASSFILTER - Constructs a low-pass butterworth filter. 375 | % 376 | % usage: f = lowpassfilter(sze, cutoff, n) 377 | % 378 | % where: sze is a two element vector specifying the size of filter 379 | % to construct [rows cols]. 380 | % cutoff is the cutoff frequency of the filter 0 - 0.5 381 | % n is the order of the filter, the higher n is the sharper 382 | % the transition is. (n must be an integer >= 1). 383 | % Note that n is doubled so that it is always an even integer. 384 | % 385 | % 1 386 | % f = -------------------- 387 | % 2n 388 | % 1.0 + (w/cutoff) 389 | % 390 | % The frequency origin of the returned filter is at the corners. 391 | % 392 | % See also: HIGHPASSFILTER, HIGHBOOSTFILTER, BANDPASSFILTER 393 | % 394 | 395 | % Copyright (c) 1999 Peter Kovesi 396 | % School of Computer Science & Software Engineering 397 | % The University of Western Australia 398 | % http://www.csse.uwa.edu.au/ 399 | % 400 | % Permission is hereby granted, free of charge, to any person obtaining a copy 401 | % of this software and associated documentation files (the "Software"), to deal 402 | % in the Software without restriction, subject to the following conditions: 403 | % 404 | % The above copyright notice and this permission notice shall be included in 405 | % all copies or substantial portions of the Software. 406 | % 407 | % The Software is provided "as is", without warranty of any kind. 408 | 409 | % October 1999 410 | % August 2005 - Fixed up frequency ranges for odd and even sized filters 411 | % (previous code was a bit approximate) 412 | 413 | function f = lowpassfilter(sze, cutoff, n) 414 | 415 | if cutoff < 0 || cutoff > 0.5 416 | error('cutoff frequency must be between 0 and 0.5'); 417 | end 418 | 419 | if rem(n,1) ~= 0 || n < 1 420 | error('n must be an integer >= 1'); 421 | end 422 | 423 | if length(sze) == 1 424 | rows = sze; cols = sze; 425 | else 426 | rows = sze(1); cols = sze(2); 427 | end 428 | 429 | % Set up X and Y matrices with ranges normalised to +/- 0.5 430 | % The following code adjusts things appropriately for odd and even values 431 | % of rows and columns. 432 | if mod(cols,2) 433 | xrange = [-(cols-1)/2:(cols-1)/2]/(cols-1); 434 | else 435 | xrange = [-cols/2:(cols/2-1)]/cols; 436 | end 437 | 438 | if mod(rows,2) 439 | yrange = [-(rows-1)/2:(rows-1)/2]/(rows-1); 440 | else 441 | yrange = [-rows/2:(rows/2-1)]/rows; 442 | end 443 | 444 | [x,y] = meshgrid(xrange, yrange); 445 | radius = sqrt(x.^2 + y.^2); % A matrix with every pixel = radius relative to centre. 446 | f = ifftshift( 1 ./ (1.0 + (radius ./ cutoff).^(2*n)) ); % The filter 447 | return; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Muhammad Haris 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DBPN-Caffe 2 | This repository is the original implementation of Deep Back-Projection Networks for Super-Resolution (to appear in CVPR2018) using Caffe. 3 | 4 | Project page: http://www.toyota-ti.ac.jp/Lab/Denshi/iim/members/muhammad.haris/projects/DBPN.html 5 | 6 | Pretrained models can be downloaded from this link! 7 | https://drive.google.com/drive/folders/1ahbeoEHkjxoo4NV1wReOmpoRWbl448z-?usp=sharing 8 | 9 | We also provide [PyTorch implementation](https://github.com/alterzero/DBPN-Pytorch) 10 | 11 | ![DBPN](http://www.toyota-ti.ac.jp/Lab/Denshi/iim/members/muhammad.haris/projects/DBPN.png) 12 | 13 | ## Citations 14 | If you find this work useful, please consider citing it. 15 | ``` 16 | @inproceedings{DBPN2018, 17 |  title={Deep Back-Projection Networks for Super-Resolution}, 18 |  author={Haris, Muhammad and Shakhnarovich, Greg and Ukita, Norimichi}, 19 | booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, 20 | year={2018} 21 | } 22 | ``` 23 | -------------------------------------------------------------------------------- /Result/readme.txt: -------------------------------------------------------------------------------- 1 | Results here! 2 | -------------------------------------------------------------------------------- /Test/readme.txt: -------------------------------------------------------------------------------- 1 | Put test set here! 2 | -------------------------------------------------------------------------------- /caffe/DBPN_mat_2x.prototxt: -------------------------------------------------------------------------------- 1 | name: "DRBPSR" 2 | input: "data" 3 | input_dim: 1 4 | input_dim: 3 5 | input_dim: 114 6 | input_dim: 172 7 | layer { 8 | name: "conv0_1" 9 | type: "Convolution" 10 | bottom: "data" 11 | top: "conv0_1" 12 | param { 13 | lr_mult: 1 14 | } 15 | param { 16 | lr_mult: 1 17 | } 18 | convolution_param { 19 | num_output: 256 20 | kernel_size: 3 21 | stride: 1 22 | pad: 1 23 | weight_filler { 24 | type: "gaussian" 25 | std: 0.02946 26 | } 27 | bias_filler { 28 | type: "constant" 29 | value: 0 30 | } 31 | } 32 | } 33 | 34 | layer { 35 | name: "relu0_1" 36 | type: "PReLU" 37 | bottom: "conv0_1" 38 | top: "conv0_1" 39 | prelu_param { 40 | channel_shared: 1 41 | } 42 | } 43 | 44 | layer { 45 | name: "conv1" 46 | type: "Convolution" 47 | bottom: "conv0_1" 48 | top: "conv1" 49 | param { 50 | lr_mult: 1 51 | } 52 | param { 53 | lr_mult: 1 54 | } 55 | convolution_param { 56 | num_output: 64 57 | kernel_size: 1 58 | stride: 1 59 | pad: 0 60 | weight_filler { 61 | type: "gaussian" 62 | std: 0.1767 63 | } 64 | bias_filler { 65 | type: "constant" 66 | value: 0 67 | } 68 | } 69 | } 70 | 71 | layer { 72 | name: "relu1" 73 | type: "PReLU" 74 | bottom: "conv1" 75 | top: "conv1" 76 | prelu_param { 77 | channel_shared: 1 78 | } 79 | } 80 | 81 | ######################### BP1 ######################### 82 | layer { 83 | name: "conv1_bp1" 84 | type: "Deconvolution" 85 | bottom: "conv1" 86 | top: "conv1_bp1" 87 | param { 88 | lr_mult: 1 89 | } 90 | param { 91 | lr_mult: 1 92 | } 93 | convolution_param { 94 | num_output: 64 95 | kernel_size: 6 96 | stride: 2 97 | pad: 2 98 | weight_filler { 99 | type: "gaussian" 100 | std: 0.0294 101 | } 102 | bias_filler { 103 | type: "constant" 104 | value: 0 105 | } 106 | } 107 | } 108 | 109 | layer { 110 | name: "relu1_bp1" 111 | type: "PReLU" 112 | bottom: "conv1_bp1" 113 | top: "conv1_bp1" 114 | prelu_param { 115 | channel_shared: 1 116 | } 117 | } 118 | 119 | 120 | layer { 121 | name: "conv2_bp1" 122 | type: "Convolution" 123 | bottom: "conv1_bp1" 124 | top: "conv2_bp1" 125 | param { 126 | lr_mult: 1 127 | } 128 | param { 129 | lr_mult: 1 130 | } 131 | convolution_param { 132 | num_output: 64 133 | kernel_size: 6 134 | stride: 2 135 | pad: 2 136 | weight_filler { 137 | type: "gaussian" 138 | std: 0.0294 139 | } 140 | bias_filler { 141 | type: "constant" 142 | value: 0 143 | } 144 | } 145 | } 146 | 147 | layer { 148 | name: "relu2_bp1" 149 | type: "PReLU" 150 | bottom: "conv2_bp1" 151 | top: "conv2_bp1" 152 | prelu_param { 153 | channel_shared: 1 154 | } 155 | } 156 | 157 | layer { 158 | name: "eltwise1_bp1" 159 | type: "Eltwise" 160 | bottom: "conv1" 161 | bottom: "conv2_bp1" 162 | top: "eltwise1_bp1" 163 | eltwise_param { 164 | operation: SUM 165 | coeff: 1 166 | coeff: -1 167 | } 168 | } 169 | 170 | layer { 171 | name: "conv3_bp1" 172 | type: "Deconvolution" 173 | bottom: "eltwise1_bp1" 174 | top: "conv3_bp1" 175 | param { 176 | lr_mult: 1 177 | } 178 | param { 179 | lr_mult: 1 180 | } 181 | convolution_param { 182 | num_output: 64 183 | kernel_size: 6 184 | stride: 2 185 | pad: 2 186 | weight_filler { 187 | type: "gaussian" 188 | std: 0.0294 189 | } 190 | bias_filler { 191 | type: "constant" 192 | value: 0 193 | } 194 | } 195 | } 196 | 197 | layer { 198 | name: "relu3_bp1" 199 | type: "PReLU" 200 | bottom: "conv3_bp1" 201 | top: "conv3_bp1" 202 | prelu_param { 203 | channel_shared: 1 204 | } 205 | } 206 | 207 | layer { 208 | name: "eltwise2_bp1" 209 | type: "Eltwise" 210 | bottom: "conv3_bp1" 211 | bottom: "conv1_bp1" 212 | top: "output_bp1" 213 | eltwise_param { 214 | operation: 1 215 | } 216 | } 217 | 218 | ######################### BP2 ######################### 219 | layer { 220 | name: "conv1_bp2" 221 | type: "Convolution" 222 | bottom: "output_bp1" 223 | top: "conv1_bp2" 224 | param { 225 | lr_mult: 1 226 | } 227 | param { 228 | lr_mult: 1 229 | } 230 | convolution_param { 231 | num_output: 64 232 | kernel_size: 6 233 | stride: 2 234 | pad: 2 235 | weight_filler { 236 | type: "gaussian" 237 | std: 0.0294 238 | } 239 | bias_filler { 240 | type: "constant" 241 | value: 0 242 | } 243 | } 244 | } 245 | 246 | layer { 247 | name: "relu1_bp2" 248 | type: "PReLU" 249 | bottom: "conv1_bp2" 250 | top: "conv1_bp2" 251 | prelu_param { 252 | channel_shared: 1 253 | } 254 | } 255 | 256 | 257 | layer { 258 | name: "conv2_bp2" 259 | type: "Deconvolution" 260 | bottom: "conv1_bp2" 261 | top: "conv2_bp2" 262 | param { 263 | lr_mult: 1 264 | } 265 | param { 266 | lr_mult: 1 267 | } 268 | convolution_param { 269 | num_output: 64 270 | kernel_size: 6 271 | stride: 2 272 | pad: 2 273 | weight_filler { 274 | type: "gaussian" 275 | std: 0.0294 276 | } 277 | bias_filler { 278 | type: "constant" 279 | value: 0 280 | } 281 | } 282 | } 283 | 284 | layer { 285 | name: "relu2_bp2" 286 | type: "PReLU" 287 | bottom: "conv2_bp2" 288 | top: "conv2_bp2" 289 | prelu_param { 290 | channel_shared: 1 291 | } 292 | } 293 | 294 | layer { 295 | name: "eltwise1_bp2" 296 | type: "Eltwise" 297 | bottom: "output_bp1" 298 | bottom: "conv2_bp2" 299 | top: "eltwise1_bp2" 300 | eltwise_param { 301 | operation: SUM 302 | coeff: 1 303 | coeff: -1 304 | } 305 | } 306 | 307 | layer { 308 | name: "conv3_bp2" 309 | type: "Convolution" 310 | bottom: "eltwise1_bp2" 311 | top: "conv3_bp2" 312 | param { 313 | lr_mult: 1 314 | } 315 | param { 316 | lr_mult: 1 317 | } 318 | convolution_param { 319 | num_output: 64 320 | kernel_size: 6 321 | stride: 2 322 | pad: 2 323 | weight_filler { 324 | type: "gaussian" 325 | std: 0.0294 326 | } 327 | bias_filler { 328 | type: "constant" 329 | value: 0 330 | } 331 | } 332 | } 333 | 334 | layer { 335 | name: "relu3_bp2" 336 | type: "PReLU" 337 | bottom: "conv3_bp2" 338 | top: "conv3_bp2" 339 | prelu_param { 340 | channel_shared: 1 341 | } 342 | } 343 | 344 | layer { 345 | name: "eltwise2_bp2" 346 | type: "Eltwise" 347 | bottom: "conv3_bp2" 348 | bottom: "conv1_bp2" 349 | top: "output_bp2" 350 | eltwise_param { 351 | operation: 1 352 | } 353 | } 354 | 355 | #######Start dense######### 356 | ######################### BP3 ######################### 357 | layer { 358 | name: "conv1_bp3" 359 | type: "Deconvolution" 360 | bottom: "output_bp2" 361 | top: "conv1_bp3" 362 | param { 363 | lr_mult: 1 364 | } 365 | param { 366 | lr_mult: 1 367 | } 368 | convolution_param { 369 | num_output: 64 370 | kernel_size: 6 371 | stride: 2 372 | pad: 2 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.0294 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | 384 | layer { 385 | name: "relu1_bp3" 386 | type: "PReLU" 387 | bottom: "conv1_bp3" 388 | top: "conv1_bp3" 389 | prelu_param { 390 | channel_shared: 1 391 | } 392 | } 393 | 394 | 395 | layer { 396 | name: "conv2_bp3" 397 | type: "Convolution" 398 | bottom: "conv1_bp3" 399 | top: "conv2_bp3" 400 | param { 401 | lr_mult: 1 402 | } 403 | param { 404 | lr_mult: 1 405 | } 406 | convolution_param { 407 | num_output: 64 408 | kernel_size: 6 409 | stride: 2 410 | pad: 2 411 | weight_filler { 412 | type: "gaussian" 413 | std: 0.0294 414 | } 415 | bias_filler { 416 | type: "constant" 417 | value: 0 418 | } 419 | } 420 | } 421 | 422 | layer { 423 | name: "relu2_bp3" 424 | type: "PReLU" 425 | bottom: "conv2_bp3" 426 | top: "conv2_bp3" 427 | prelu_param { 428 | channel_shared: 1 429 | } 430 | } 431 | 432 | layer { 433 | name: "eltwise1_bp3" 434 | type: "Eltwise" 435 | bottom: "output_bp2" 436 | bottom: "conv2_bp3" 437 | top: "eltwise1_bp3" 438 | eltwise_param { 439 | operation: SUM 440 | coeff: 1 441 | coeff: -1 442 | } 443 | } 444 | 445 | layer { 446 | name: "conv3_bp3" 447 | type: "Deconvolution" 448 | bottom: "eltwise1_bp3" 449 | top: "conv3_bp3" 450 | param { 451 | lr_mult: 1 452 | } 453 | param { 454 | lr_mult: 1 455 | } 456 | convolution_param { 457 | num_output: 64 458 | kernel_size: 6 459 | stride: 2 460 | pad: 2 461 | weight_filler { 462 | type: "gaussian" 463 | std: 0.0294 464 | } 465 | bias_filler { 466 | type: "constant" 467 | value: 0 468 | } 469 | } 470 | } 471 | 472 | layer { 473 | name: "relu3_bp3" 474 | type: "PReLU" 475 | bottom: "conv3_bp3" 476 | top: "conv3_bp3" 477 | prelu_param { 478 | channel_shared: 1 479 | } 480 | } 481 | 482 | layer { 483 | name: "eltwise2_bp3" 484 | type: "Eltwise" 485 | bottom: "conv3_bp3" 486 | bottom: "conv1_bp3" 487 | top: "output_bp3" 488 | eltwise_param { 489 | operation: 1 490 | } 491 | } 492 | 493 | layer { 494 | name: "concat_bp3" 495 | type: "Concat" 496 | bottom: "output_bp3" 497 | bottom: "output_bp1" 498 | top: "concat_bp3" 499 | } 500 | 501 | layer { 502 | name: "out_concat_bp3" 503 | type: "Convolution" 504 | bottom: "concat_bp3" 505 | top: "out_concat_bp3" 506 | param { 507 | lr_mult: 1 508 | } 509 | param { 510 | lr_mult: 1 511 | } 512 | convolution_param { 513 | num_output: 64 514 | kernel_size: 1 515 | stride: 1 516 | pad: 0 517 | weight_filler { 518 | type: "gaussian" 519 | std: 0.1767 520 | } 521 | bias_filler { 522 | type: "constant" 523 | value: 0 524 | } 525 | } 526 | } 527 | 528 | layer { 529 | name: "relu1_concat_bp3" 530 | type: "PReLU" 531 | bottom: "out_concat_bp3" 532 | top: "out_concat_bp3" 533 | prelu_param { 534 | channel_shared: 1 535 | } 536 | } 537 | 538 | ######################### BP4 ######################### 539 | layer { 540 | name: "conv1_bp4" 541 | type: "Convolution" 542 | bottom: "out_concat_bp3" 543 | top: "conv1_bp4" 544 | param { 545 | lr_mult: 1 546 | } 547 | param { 548 | lr_mult: 1 549 | } 550 | convolution_param { 551 | num_output: 64 552 | kernel_size: 6 553 | stride: 2 554 | pad: 2 555 | weight_filler { 556 | type: "gaussian" 557 | std: 0.0294 558 | } 559 | bias_filler { 560 | type: "constant" 561 | value: 0 562 | } 563 | } 564 | } 565 | 566 | layer { 567 | name: "relu1_bp4" 568 | type: "PReLU" 569 | bottom: "conv1_bp4" 570 | top: "conv1_bp4" 571 | prelu_param { 572 | channel_shared: 1 573 | } 574 | } 575 | 576 | 577 | layer { 578 | name: "conv2_bp4" 579 | type: "Deconvolution" 580 | bottom: "conv1_bp4" 581 | top: "conv2_bp4" 582 | param { 583 | lr_mult: 1 584 | } 585 | param { 586 | lr_mult: 1 587 | } 588 | convolution_param { 589 | num_output: 64 590 | kernel_size: 6 591 | stride: 2 592 | pad: 2 593 | weight_filler { 594 | type: "gaussian" 595 | std: 0.0294 596 | } 597 | bias_filler { 598 | type: "constant" 599 | value: 0 600 | } 601 | } 602 | } 603 | 604 | layer { 605 | name: "relu2_bp4" 606 | type: "PReLU" 607 | bottom: "conv2_bp4" 608 | top: "conv2_bp4" 609 | prelu_param { 610 | channel_shared: 1 611 | } 612 | } 613 | 614 | layer { 615 | name: "eltwise1_bp4" 616 | type: "Eltwise" 617 | bottom: "out_concat_bp3" 618 | bottom: "conv2_bp4" 619 | top: "eltwise1_bp4" 620 | eltwise_param { 621 | operation: SUM 622 | coeff: 1 623 | coeff: -1 624 | } 625 | } 626 | 627 | layer { 628 | name: "conv3_bp4" 629 | type: "Convolution" 630 | bottom: "eltwise1_bp4" 631 | top: "conv3_bp4" 632 | param { 633 | lr_mult: 1 634 | } 635 | param { 636 | lr_mult: 1 637 | } 638 | convolution_param { 639 | num_output: 64 640 | kernel_size: 6 641 | stride: 2 642 | pad: 2 643 | weight_filler { 644 | type: "gaussian" 645 | std: 0.0294 646 | } 647 | bias_filler { 648 | type: "constant" 649 | value: 0 650 | } 651 | } 652 | } 653 | 654 | layer { 655 | name: "relu3_bp4" 656 | type: "PReLU" 657 | bottom: "conv3_bp4" 658 | top: "conv3_bp4" 659 | prelu_param { 660 | channel_shared: 1 661 | } 662 | } 663 | 664 | layer { 665 | name: "eltwise2_bp4" 666 | type: "Eltwise" 667 | bottom: "conv3_bp4" 668 | bottom: "conv1_bp4" 669 | top: "output_bp4" 670 | eltwise_param { 671 | operation: 1 672 | } 673 | } 674 | 675 | layer { 676 | name: "concat_bp4" 677 | type: "Concat" 678 | bottom: "output_bp4" 679 | bottom: "output_bp2" 680 | top: "concat_bp4" 681 | } 682 | 683 | layer { 684 | name: "out_concat_bp4" 685 | type: "Convolution" 686 | bottom: "concat_bp4" 687 | top: "out_concat_bp4" 688 | param { 689 | lr_mult: 1 690 | } 691 | param { 692 | lr_mult: 1 693 | } 694 | convolution_param { 695 | num_output: 64 696 | kernel_size: 1 697 | stride: 1 698 | pad: 0 699 | weight_filler { 700 | type: "gaussian" 701 | std: 0.1767 702 | } 703 | bias_filler { 704 | type: "constant" 705 | value: 0 706 | } 707 | } 708 | } 709 | 710 | layer { 711 | name: "relu1_concat_bp4" 712 | type: "PReLU" 713 | bottom: "out_concat_bp4" 714 | top: "out_concat_bp4" 715 | prelu_param { 716 | channel_shared: 1 717 | } 718 | } 719 | 720 | ######################### BP5 ######################### 721 | layer { 722 | name: "conv1_bp5" 723 | type: "Deconvolution" 724 | bottom: "out_concat_bp4" 725 | top: "conv1_bp5" 726 | param { 727 | lr_mult: 1 728 | } 729 | param { 730 | lr_mult: 1 731 | } 732 | convolution_param { 733 | num_output: 64 734 | kernel_size: 6 735 | stride: 2 736 | pad: 2 737 | weight_filler { 738 | type: "gaussian" 739 | std: 0.0294 740 | } 741 | bias_filler { 742 | type: "constant" 743 | value: 0 744 | } 745 | } 746 | } 747 | 748 | layer { 749 | name: "relu1_bp5" 750 | type: "PReLU" 751 | bottom: "conv1_bp5" 752 | top: "conv1_bp5" 753 | prelu_param { 754 | channel_shared: 1 755 | } 756 | } 757 | 758 | 759 | layer { 760 | name: "conv2_bp5" 761 | type: "Convolution" 762 | bottom: "conv1_bp5" 763 | top: "conv2_bp5" 764 | param { 765 | lr_mult: 1 766 | } 767 | param { 768 | lr_mult: 1 769 | } 770 | convolution_param { 771 | num_output: 64 772 | kernel_size: 6 773 | stride: 2 774 | pad: 2 775 | weight_filler { 776 | type: "gaussian" 777 | std: 0.0294 778 | } 779 | bias_filler { 780 | type: "constant" 781 | value: 0 782 | } 783 | } 784 | } 785 | 786 | layer { 787 | name: "relu2_bp5" 788 | type: "PReLU" 789 | bottom: "conv2_bp5" 790 | top: "conv2_bp5" 791 | prelu_param { 792 | channel_shared: 1 793 | } 794 | } 795 | 796 | layer { 797 | name: "eltwise1_bp5" 798 | type: "Eltwise" 799 | bottom: "out_concat_bp4" 800 | bottom: "conv2_bp5" 801 | top: "eltwise1_bp5" 802 | eltwise_param { 803 | operation: SUM 804 | coeff: 1 805 | coeff: -1 806 | } 807 | } 808 | 809 | layer { 810 | name: "conv3_bp5" 811 | type: "Deconvolution" 812 | bottom: "eltwise1_bp5" 813 | top: "conv3_bp5" 814 | param { 815 | lr_mult: 1 816 | } 817 | param { 818 | lr_mult: 1 819 | } 820 | convolution_param { 821 | num_output: 64 822 | kernel_size: 6 823 | stride: 2 824 | pad: 2 825 | weight_filler { 826 | type: "gaussian" 827 | std: 0.0294 828 | } 829 | bias_filler { 830 | type: "constant" 831 | value: 0 832 | } 833 | } 834 | } 835 | 836 | layer { 837 | name: "relu3_bp5" 838 | type: "PReLU" 839 | bottom: "conv3_bp5" 840 | top: "conv3_bp5" 841 | prelu_param { 842 | channel_shared: 1 843 | } 844 | } 845 | 846 | layer { 847 | name: "eltwise2_bp5" 848 | type: "Eltwise" 849 | bottom: "conv3_bp5" 850 | bottom: "conv1_bp5" 851 | top: "output_bp5" 852 | eltwise_param { 853 | operation: 1 854 | } 855 | } 856 | 857 | layer { 858 | name: "concat_bp5" 859 | type: "Concat" 860 | bottom: "output_bp5" 861 | bottom: "concat_bp3" 862 | top: "concat_bp5" 863 | } 864 | 865 | layer { 866 | name: "out_concat_bp5" 867 | type: "Convolution" 868 | bottom: "concat_bp5" 869 | top: "out_concat_bp5" 870 | param { 871 | lr_mult: 1 872 | } 873 | param { 874 | lr_mult: 1 875 | } 876 | convolution_param { 877 | num_output: 64 878 | kernel_size: 1 879 | stride: 1 880 | pad: 0 881 | weight_filler { 882 | type: "gaussian" 883 | std: 0.1767 884 | } 885 | bias_filler { 886 | type: "constant" 887 | value: 0 888 | } 889 | } 890 | } 891 | 892 | layer { 893 | name: "relu1_concat_bp5" 894 | type: "PReLU" 895 | bottom: "out_concat_bp5" 896 | top: "out_concat_bp5" 897 | prelu_param { 898 | channel_shared: 1 899 | } 900 | } 901 | ######################### BP6 ######################### 902 | layer { 903 | name: "conv1_bp6" 904 | type: "Convolution" 905 | bottom: "out_concat_bp5" 906 | top: "conv1_bp6" 907 | param { 908 | lr_mult: 1 909 | } 910 | param { 911 | lr_mult: 1 912 | } 913 | convolution_param { 914 | num_output: 64 915 | kernel_size: 6 916 | stride: 2 917 | pad: 2 918 | weight_filler { 919 | type: "gaussian" 920 | std: 0.0294 921 | } 922 | bias_filler { 923 | type: "constant" 924 | value: 0 925 | } 926 | } 927 | } 928 | 929 | layer { 930 | name: "relu1_bp6" 931 | type: "PReLU" 932 | bottom: "conv1_bp6" 933 | top: "conv1_bp6" 934 | prelu_param { 935 | channel_shared: 1 936 | } 937 | } 938 | 939 | 940 | layer { 941 | name: "conv2_bp6" 942 | type: "Deconvolution" 943 | bottom: "conv1_bp6" 944 | top: "conv2_bp6" 945 | param { 946 | lr_mult: 1 947 | } 948 | param { 949 | lr_mult: 1 950 | } 951 | convolution_param { 952 | num_output: 64 953 | kernel_size: 6 954 | stride: 2 955 | pad: 2 956 | weight_filler { 957 | type: "gaussian" 958 | std: 0.0294 959 | } 960 | bias_filler { 961 | type: "constant" 962 | value: 0 963 | } 964 | } 965 | } 966 | 967 | layer { 968 | name: "relu2_bp6" 969 | type: "PReLU" 970 | bottom: "conv2_bp6" 971 | top: "conv2_bp6" 972 | prelu_param { 973 | channel_shared: 1 974 | } 975 | } 976 | 977 | layer { 978 | name: "eltwise1_bp6" 979 | type: "Eltwise" 980 | bottom: "out_concat_bp5" 981 | bottom: "conv2_bp6" 982 | top: "eltwise1_bp6" 983 | eltwise_param { 984 | operation: SUM 985 | coeff: 1 986 | coeff: -1 987 | } 988 | } 989 | 990 | layer { 991 | name: "conv3_bp6" 992 | type: "Convolution" 993 | bottom: "eltwise1_bp6" 994 | top: "conv3_bp6" 995 | param { 996 | lr_mult: 1 997 | } 998 | param { 999 | lr_mult: 1 1000 | } 1001 | convolution_param { 1002 | num_output: 64 1003 | kernel_size: 6 1004 | stride: 2 1005 | pad: 2 1006 | weight_filler { 1007 | type: "gaussian" 1008 | std: 0.0294 1009 | } 1010 | bias_filler { 1011 | type: "constant" 1012 | value: 0 1013 | } 1014 | } 1015 | } 1016 | 1017 | layer { 1018 | name: "relu3_bp6" 1019 | type: "PReLU" 1020 | bottom: "conv3_bp6" 1021 | top: "conv3_bp6" 1022 | prelu_param { 1023 | channel_shared: 1 1024 | } 1025 | } 1026 | 1027 | layer { 1028 | name: "eltwise2_bp6" 1029 | type: "Eltwise" 1030 | bottom: "conv3_bp6" 1031 | bottom: "conv1_bp6" 1032 | top: "output_bp6" 1033 | eltwise_param { 1034 | operation: 1 1035 | } 1036 | } 1037 | 1038 | layer { 1039 | name: "concat_bp6" 1040 | type: "Concat" 1041 | bottom: "output_bp6" 1042 | bottom: "concat_bp4" 1043 | top: "concat_bp6" 1044 | } 1045 | 1046 | layer { 1047 | name: "out_concat_bp6" 1048 | type: "Convolution" 1049 | bottom: "concat_bp6" 1050 | top: "out_concat_bp6" 1051 | param { 1052 | lr_mult: 1 1053 | } 1054 | param { 1055 | lr_mult: 1 1056 | } 1057 | convolution_param { 1058 | num_output: 64 1059 | kernel_size: 1 1060 | stride: 1 1061 | pad: 0 1062 | weight_filler { 1063 | type: "gaussian" 1064 | std: 0.1767 1065 | } 1066 | bias_filler { 1067 | type: "constant" 1068 | value: 0 1069 | } 1070 | } 1071 | } 1072 | 1073 | layer { 1074 | name: "relu1_concat_bp6" 1075 | type: "PReLU" 1076 | bottom: "out_concat_bp6" 1077 | top: "out_concat_bp6" 1078 | prelu_param { 1079 | channel_shared: 1 1080 | } 1081 | } 1082 | 1083 | ######################### BP7 ######################### 1084 | layer { 1085 | name: "conv1_bp7" 1086 | type: "Deconvolution" 1087 | bottom: "out_concat_bp6" 1088 | top: "conv1_bp7" 1089 | param { 1090 | lr_mult: 1 1091 | } 1092 | param { 1093 | lr_mult: 1 1094 | } 1095 | convolution_param { 1096 | num_output: 64 1097 | kernel_size: 6 1098 | stride: 2 1099 | pad: 2 1100 | weight_filler { 1101 | type: "gaussian" 1102 | std: 0.0294 1103 | } 1104 | bias_filler { 1105 | type: "constant" 1106 | value: 0 1107 | } 1108 | } 1109 | } 1110 | 1111 | layer { 1112 | name: "relu1_bp7" 1113 | type: "PReLU" 1114 | bottom: "conv1_bp7" 1115 | top: "conv1_bp7" 1116 | prelu_param { 1117 | channel_shared: 1 1118 | } 1119 | } 1120 | 1121 | 1122 | layer { 1123 | name: "conv2_bp7" 1124 | type: "Convolution" 1125 | bottom: "conv1_bp7" 1126 | top: "conv2_bp7" 1127 | param { 1128 | lr_mult: 1 1129 | } 1130 | param { 1131 | lr_mult: 1 1132 | } 1133 | convolution_param { 1134 | num_output: 64 1135 | kernel_size: 6 1136 | stride: 2 1137 | pad: 2 1138 | weight_filler { 1139 | type: "gaussian" 1140 | std: 0.0294 1141 | } 1142 | bias_filler { 1143 | type: "constant" 1144 | value: 0 1145 | } 1146 | } 1147 | } 1148 | 1149 | layer { 1150 | name: "relu2_bp7" 1151 | type: "PReLU" 1152 | bottom: "conv2_bp7" 1153 | top: "conv2_bp7" 1154 | prelu_param { 1155 | channel_shared: 1 1156 | } 1157 | } 1158 | 1159 | layer { 1160 | name: "eltwise1_bp7" 1161 | type: "Eltwise" 1162 | bottom: "out_concat_bp6" 1163 | bottom: "conv2_bp7" 1164 | top: "eltwise1_bp7" 1165 | eltwise_param { 1166 | operation: SUM 1167 | coeff: 1 1168 | coeff: -1 1169 | } 1170 | } 1171 | 1172 | layer { 1173 | name: "conv3_bp7" 1174 | type: "Deconvolution" 1175 | bottom: "eltwise1_bp7" 1176 | top: "conv3_bp7" 1177 | param { 1178 | lr_mult: 1 1179 | } 1180 | param { 1181 | lr_mult: 1 1182 | } 1183 | convolution_param { 1184 | num_output: 64 1185 | kernel_size: 6 1186 | stride: 2 1187 | pad: 2 1188 | weight_filler { 1189 | type: "gaussian" 1190 | std: 0.0294 1191 | } 1192 | bias_filler { 1193 | type: "constant" 1194 | value: 0 1195 | } 1196 | } 1197 | } 1198 | 1199 | layer { 1200 | name: "relu3_bp7" 1201 | type: "PReLU" 1202 | bottom: "conv3_bp7" 1203 | top: "conv3_bp7" 1204 | prelu_param { 1205 | channel_shared: 1 1206 | } 1207 | } 1208 | 1209 | layer { 1210 | name: "eltwise2_bp7" 1211 | type: "Eltwise" 1212 | bottom: "conv3_bp7" 1213 | bottom: "conv1_bp7" 1214 | top: "output_bp7" 1215 | eltwise_param { 1216 | operation: 1 1217 | } 1218 | } 1219 | 1220 | layer { 1221 | name: "concat_bp7" 1222 | type: "Concat" 1223 | bottom: "output_bp7" 1224 | bottom: "concat_bp5" 1225 | top: "concat_bp7" 1226 | } 1227 | 1228 | layer { 1229 | name: "out_concat_bp7" 1230 | type: "Convolution" 1231 | bottom: "concat_bp7" 1232 | top: "out_concat_bp7" 1233 | param { 1234 | lr_mult: 1 1235 | } 1236 | param { 1237 | lr_mult: 1 1238 | } 1239 | convolution_param { 1240 | num_output: 64 1241 | kernel_size: 1 1242 | stride: 1 1243 | pad: 0 1244 | weight_filler { 1245 | type: "gaussian" 1246 | std: 0.1767 1247 | } 1248 | bias_filler { 1249 | type: "constant" 1250 | value: 0 1251 | } 1252 | } 1253 | } 1254 | 1255 | layer { 1256 | name: "relu1_concat_bp7" 1257 | type: "PReLU" 1258 | bottom: "out_concat_bp7" 1259 | top: "out_concat_bp7" 1260 | prelu_param { 1261 | channel_shared: 1 1262 | } 1263 | } 1264 | 1265 | ######################### BP8 ######################### 1266 | layer { 1267 | name: "conv1_bp8" 1268 | type: "Convolution" 1269 | bottom: "out_concat_bp7" 1270 | top: "conv1_bp8" 1271 | param { 1272 | lr_mult: 1 1273 | } 1274 | param { 1275 | lr_mult: 1 1276 | } 1277 | convolution_param { 1278 | num_output: 64 1279 | kernel_size: 6 1280 | stride: 2 1281 | pad: 2 1282 | weight_filler { 1283 | type: "gaussian" 1284 | std: 0.0294 1285 | } 1286 | bias_filler { 1287 | type: "constant" 1288 | value: 0 1289 | } 1290 | } 1291 | } 1292 | 1293 | layer { 1294 | name: "relu1_bp8" 1295 | type: "PReLU" 1296 | bottom: "conv1_bp8" 1297 | top: "conv1_bp8" 1298 | prelu_param { 1299 | channel_shared: 1 1300 | } 1301 | } 1302 | 1303 | 1304 | layer { 1305 | name: "conv2_bp8" 1306 | type: "Deconvolution" 1307 | bottom: "conv1_bp8" 1308 | top: "conv2_bp8" 1309 | param { 1310 | lr_mult: 1 1311 | } 1312 | param { 1313 | lr_mult: 1 1314 | } 1315 | convolution_param { 1316 | num_output: 64 1317 | kernel_size: 6 1318 | stride: 2 1319 | pad: 2 1320 | weight_filler { 1321 | type: "gaussian" 1322 | std: 0.0294 1323 | } 1324 | bias_filler { 1325 | type: "constant" 1326 | value: 0 1327 | } 1328 | } 1329 | } 1330 | 1331 | layer { 1332 | name: "relu2_bp8" 1333 | type: "PReLU" 1334 | bottom: "conv2_bp8" 1335 | top: "conv2_bp8" 1336 | prelu_param { 1337 | channel_shared: 1 1338 | } 1339 | } 1340 | 1341 | layer { 1342 | name: "eltwise1_bp8" 1343 | type: "Eltwise" 1344 | bottom: "out_concat_bp7" 1345 | bottom: "conv2_bp8" 1346 | top: "eltwise1_bp8" 1347 | eltwise_param { 1348 | operation: SUM 1349 | coeff: 1 1350 | coeff: -1 1351 | } 1352 | } 1353 | 1354 | layer { 1355 | name: "conv3_bp8" 1356 | type: "Convolution" 1357 | bottom: "eltwise1_bp8" 1358 | top: "conv3_bp8" 1359 | param { 1360 | lr_mult: 1 1361 | } 1362 | param { 1363 | lr_mult: 1 1364 | } 1365 | convolution_param { 1366 | num_output: 64 1367 | kernel_size: 6 1368 | stride: 2 1369 | pad: 2 1370 | weight_filler { 1371 | type: "gaussian" 1372 | std: 0.0294 1373 | } 1374 | bias_filler { 1375 | type: "constant" 1376 | value: 0 1377 | } 1378 | } 1379 | } 1380 | 1381 | layer { 1382 | name: "relu3_bp8" 1383 | type: "PReLU" 1384 | bottom: "conv3_bp8" 1385 | top: "conv3_bp8" 1386 | prelu_param { 1387 | channel_shared: 1 1388 | } 1389 | } 1390 | 1391 | layer { 1392 | name: "eltwise2_bp8" 1393 | type: "Eltwise" 1394 | bottom: "conv3_bp8" 1395 | bottom: "conv1_bp8" 1396 | top: "output_bp8" 1397 | eltwise_param { 1398 | operation: 1 1399 | } 1400 | } 1401 | 1402 | layer { 1403 | name: "concat_bp8" 1404 | type: "Concat" 1405 | bottom: "output_bp8" 1406 | bottom: "concat_bp6" 1407 | top: "concat_bp8" 1408 | } 1409 | 1410 | layer { 1411 | name: "out_concat_bp8" 1412 | type: "Convolution" 1413 | bottom: "concat_bp8" 1414 | top: "out_concat_bp8" 1415 | param { 1416 | lr_mult: 1 1417 | } 1418 | param { 1419 | lr_mult: 1 1420 | } 1421 | convolution_param { 1422 | num_output: 64 1423 | kernel_size: 1 1424 | stride: 1 1425 | pad: 0 1426 | weight_filler { 1427 | type: "gaussian" 1428 | std: 0.1767 1429 | } 1430 | bias_filler { 1431 | type: "constant" 1432 | value: 0 1433 | } 1434 | } 1435 | } 1436 | 1437 | layer { 1438 | name: "relu1_concat_bp8" 1439 | type: "PReLU" 1440 | bottom: "out_concat_bp8" 1441 | top: "out_concat_bp8" 1442 | prelu_param { 1443 | channel_shared: 1 1444 | } 1445 | } 1446 | ######################### BP9 ######################### 1447 | layer { 1448 | name: "conv1_bp9" 1449 | type: "Deconvolution" 1450 | bottom: "out_concat_bp8" 1451 | top: "conv1_bp9" 1452 | param { 1453 | lr_mult: 1 1454 | } 1455 | param { 1456 | lr_mult: 1 1457 | } 1458 | convolution_param { 1459 | num_output: 64 1460 | kernel_size: 6 1461 | stride: 2 1462 | pad: 2 1463 | weight_filler { 1464 | type: "gaussian" 1465 | std: 0.0294 1466 | } 1467 | bias_filler { 1468 | type: "constant" 1469 | value: 0 1470 | } 1471 | } 1472 | } 1473 | 1474 | layer { 1475 | name: "relu1_bp9" 1476 | type: "PReLU" 1477 | bottom: "conv1_bp9" 1478 | top: "conv1_bp9" 1479 | prelu_param { 1480 | channel_shared: 1 1481 | } 1482 | } 1483 | 1484 | 1485 | layer { 1486 | name: "conv2_bp9" 1487 | type: "Convolution" 1488 | bottom: "conv1_bp9" 1489 | top: "conv2_bp9" 1490 | param { 1491 | lr_mult: 1 1492 | } 1493 | param { 1494 | lr_mult: 1 1495 | } 1496 | convolution_param { 1497 | num_output: 64 1498 | kernel_size: 6 1499 | stride: 2 1500 | pad: 2 1501 | weight_filler { 1502 | type: "gaussian" 1503 | std: 0.0294 1504 | } 1505 | bias_filler { 1506 | type: "constant" 1507 | value: 0 1508 | } 1509 | } 1510 | } 1511 | 1512 | layer { 1513 | name: "relu2_bp9" 1514 | type: "PReLU" 1515 | bottom: "conv2_bp9" 1516 | top: "conv2_bp9" 1517 | prelu_param { 1518 | channel_shared: 1 1519 | } 1520 | } 1521 | 1522 | layer { 1523 | name: "eltwise1_bp9" 1524 | type: "Eltwise" 1525 | bottom: "out_concat_bp8" 1526 | bottom: "conv2_bp9" 1527 | top: "eltwise1_bp9" 1528 | eltwise_param { 1529 | operation: SUM 1530 | coeff: 1 1531 | coeff: -1 1532 | } 1533 | } 1534 | 1535 | layer { 1536 | name: "conv3_bp9" 1537 | type: "Deconvolution" 1538 | bottom: "eltwise1_bp9" 1539 | top: "conv3_bp9" 1540 | param { 1541 | lr_mult: 1 1542 | } 1543 | param { 1544 | lr_mult: 1 1545 | } 1546 | convolution_param { 1547 | num_output: 64 1548 | kernel_size: 6 1549 | stride: 2 1550 | pad: 2 1551 | weight_filler { 1552 | type: "gaussian" 1553 | std: 0.0294 1554 | } 1555 | bias_filler { 1556 | type: "constant" 1557 | value: 0 1558 | } 1559 | } 1560 | } 1561 | 1562 | layer { 1563 | name: "relu3_bp9" 1564 | type: "PReLU" 1565 | bottom: "conv3_bp9" 1566 | top: "conv3_bp9" 1567 | prelu_param { 1568 | channel_shared: 1 1569 | } 1570 | } 1571 | 1572 | layer { 1573 | name: "eltwise2_bp9" 1574 | type: "Eltwise" 1575 | bottom: "conv3_bp9" 1576 | bottom: "conv1_bp9" 1577 | top: "output_bp9" 1578 | eltwise_param { 1579 | operation: 1 1580 | } 1581 | } 1582 | 1583 | layer { 1584 | name: "concat_bp9" 1585 | type: "Concat" 1586 | bottom: "output_bp9" 1587 | bottom: "concat_bp7" 1588 | top: "concat_bp9" 1589 | } 1590 | 1591 | layer { 1592 | name: "out_concat_bp9" 1593 | type: "Convolution" 1594 | bottom: "concat_bp9" 1595 | top: "out_concat_bp9" 1596 | param { 1597 | lr_mult: 1 1598 | } 1599 | param { 1600 | lr_mult: 1 1601 | } 1602 | convolution_param { 1603 | num_output: 64 1604 | kernel_size: 1 1605 | stride: 1 1606 | pad: 0 1607 | weight_filler { 1608 | type: "gaussian" 1609 | std: 0.1767 1610 | } 1611 | bias_filler { 1612 | type: "constant" 1613 | value: 0 1614 | } 1615 | } 1616 | } 1617 | 1618 | layer { 1619 | name: "relu1_concat_bp9" 1620 | type: "PReLU" 1621 | bottom: "out_concat_bp9" 1622 | top: "out_concat_bp9" 1623 | prelu_param { 1624 | channel_shared: 1 1625 | } 1626 | } 1627 | ######################### BP10 ######################### 1628 | layer { 1629 | name: "conv1_bp10" 1630 | type: "Convolution" 1631 | bottom: "out_concat_bp9" 1632 | top: "conv1_bp10" 1633 | param { 1634 | lr_mult: 1 1635 | } 1636 | param { 1637 | lr_mult: 1 1638 | } 1639 | convolution_param { 1640 | num_output: 64 1641 | kernel_size: 6 1642 | stride: 2 1643 | pad: 2 1644 | weight_filler { 1645 | type: "gaussian" 1646 | std: 0.0294 1647 | } 1648 | bias_filler { 1649 | type: "constant" 1650 | value: 0 1651 | } 1652 | } 1653 | } 1654 | 1655 | layer { 1656 | name: "relu1_bp10" 1657 | type: "PReLU" 1658 | bottom: "conv1_bp10" 1659 | top: "conv1_bp10" 1660 | prelu_param { 1661 | channel_shared: 1 1662 | } 1663 | } 1664 | 1665 | 1666 | layer { 1667 | name: "conv2_bp10" 1668 | type: "Deconvolution" 1669 | bottom: "conv1_bp10" 1670 | top: "conv2_bp10" 1671 | param { 1672 | lr_mult: 1 1673 | } 1674 | param { 1675 | lr_mult: 1 1676 | } 1677 | convolution_param { 1678 | num_output: 64 1679 | kernel_size: 6 1680 | stride: 2 1681 | pad: 2 1682 | weight_filler { 1683 | type: "gaussian" 1684 | std: 0.0294 1685 | } 1686 | bias_filler { 1687 | type: "constant" 1688 | value: 0 1689 | } 1690 | } 1691 | } 1692 | 1693 | layer { 1694 | name: "relu2_bp10" 1695 | type: "PReLU" 1696 | bottom: "conv2_bp10" 1697 | top: "conv2_bp10" 1698 | prelu_param { 1699 | channel_shared: 1 1700 | } 1701 | } 1702 | 1703 | layer { 1704 | name: "eltwise1_bp10" 1705 | type: "Eltwise" 1706 | bottom: "out_concat_bp9" 1707 | bottom: "conv2_bp10" 1708 | top: "eltwise1_bp10" 1709 | eltwise_param { 1710 | operation: SUM 1711 | coeff: 1 1712 | coeff: -1 1713 | } 1714 | } 1715 | 1716 | layer { 1717 | name: "conv3_bp10" 1718 | type: "Convolution" 1719 | bottom: "eltwise1_bp10" 1720 | top: "conv3_bp10" 1721 | param { 1722 | lr_mult: 1 1723 | } 1724 | param { 1725 | lr_mult: 1 1726 | } 1727 | convolution_param { 1728 | num_output: 64 1729 | kernel_size: 6 1730 | stride: 2 1731 | pad: 2 1732 | weight_filler { 1733 | type: "gaussian" 1734 | std: 0.0294 1735 | } 1736 | bias_filler { 1737 | type: "constant" 1738 | value: 0 1739 | } 1740 | } 1741 | } 1742 | 1743 | layer { 1744 | name: "relu3_bp10" 1745 | type: "PReLU" 1746 | bottom: "conv3_bp10" 1747 | top: "conv3_bp10" 1748 | prelu_param { 1749 | channel_shared: 1 1750 | } 1751 | } 1752 | 1753 | layer { 1754 | name: "eltwise2_bp10" 1755 | type: "Eltwise" 1756 | bottom: "conv3_bp10" 1757 | bottom: "conv1_bp10" 1758 | top: "output_bp10" 1759 | eltwise_param { 1760 | operation: 1 1761 | } 1762 | } 1763 | 1764 | layer { 1765 | name: "concat_bp10" 1766 | type: "Concat" 1767 | bottom: "output_bp10" 1768 | bottom: "concat_bp8" 1769 | top: "concat_bp10" 1770 | } 1771 | 1772 | layer { 1773 | name: "out_concat_bp10" 1774 | type: "Convolution" 1775 | bottom: "concat_bp10" 1776 | top: "out_concat_bp10" 1777 | param { 1778 | lr_mult: 1 1779 | } 1780 | param { 1781 | lr_mult: 1 1782 | } 1783 | convolution_param { 1784 | num_output: 64 1785 | kernel_size: 1 1786 | stride: 1 1787 | pad: 0 1788 | weight_filler { 1789 | type: "gaussian" 1790 | std: 0.1767 1791 | } 1792 | bias_filler { 1793 | type: "constant" 1794 | value: 0 1795 | } 1796 | } 1797 | } 1798 | 1799 | layer { 1800 | name: "relu1_concat_bp10" 1801 | type: "PReLU" 1802 | bottom: "out_concat_bp10" 1803 | top: "out_concat_bp10" 1804 | prelu_param { 1805 | channel_shared: 1 1806 | } 1807 | } 1808 | ######################### BP11 ######################### 1809 | layer { 1810 | name: "conv1_bp11" 1811 | type: "Deconvolution" 1812 | bottom: "out_concat_bp10" 1813 | top: "conv1_bp11" 1814 | param { 1815 | lr_mult: 1 1816 | } 1817 | param { 1818 | lr_mult: 1 1819 | } 1820 | convolution_param { 1821 | num_output: 64 1822 | kernel_size: 6 1823 | stride: 2 1824 | pad: 2 1825 | weight_filler { 1826 | type: "gaussian" 1827 | std: 0.0294 1828 | } 1829 | bias_filler { 1830 | type: "constant" 1831 | value: 0 1832 | } 1833 | } 1834 | } 1835 | 1836 | layer { 1837 | name: "relu1_bp11" 1838 | type: "PReLU" 1839 | bottom: "conv1_bp11" 1840 | top: "conv1_bp11" 1841 | prelu_param { 1842 | channel_shared: 1 1843 | } 1844 | } 1845 | 1846 | 1847 | layer { 1848 | name: "conv2_bp11" 1849 | type: "Convolution" 1850 | bottom: "conv1_bp11" 1851 | top: "conv2_bp11" 1852 | param { 1853 | lr_mult: 1 1854 | } 1855 | param { 1856 | lr_mult: 1 1857 | } 1858 | convolution_param { 1859 | num_output: 64 1860 | kernel_size: 6 1861 | stride: 2 1862 | pad: 2 1863 | weight_filler { 1864 | type: "gaussian" 1865 | std: 0.0294 1866 | } 1867 | bias_filler { 1868 | type: "constant" 1869 | value: 0 1870 | } 1871 | } 1872 | } 1873 | 1874 | layer { 1875 | name: "relu2_bp11" 1876 | type: "PReLU" 1877 | bottom: "conv2_bp11" 1878 | top: "conv2_bp11" 1879 | prelu_param { 1880 | channel_shared: 1 1881 | } 1882 | } 1883 | 1884 | layer { 1885 | name: "eltwise1_bp11" 1886 | type: "Eltwise" 1887 | bottom: "out_concat_bp10" 1888 | bottom: "conv2_bp11" 1889 | top: "eltwise1_bp11" 1890 | eltwise_param { 1891 | operation: SUM 1892 | coeff: 1 1893 | coeff: -1 1894 | } 1895 | } 1896 | 1897 | layer { 1898 | name: "conv3_bp11" 1899 | type: "Deconvolution" 1900 | bottom: "eltwise1_bp11" 1901 | top: "conv3_bp11" 1902 | param { 1903 | lr_mult: 1 1904 | } 1905 | param { 1906 | lr_mult: 1 1907 | } 1908 | convolution_param { 1909 | num_output: 64 1910 | kernel_size: 6 1911 | stride: 2 1912 | pad: 2 1913 | weight_filler { 1914 | type: "gaussian" 1915 | std: 0.0294 1916 | } 1917 | bias_filler { 1918 | type: "constant" 1919 | value: 0 1920 | } 1921 | } 1922 | } 1923 | 1924 | layer { 1925 | name: "relu3_bp11" 1926 | type: "PReLU" 1927 | bottom: "conv3_bp11" 1928 | top: "conv3_bp11" 1929 | prelu_param { 1930 | channel_shared: 1 1931 | } 1932 | } 1933 | 1934 | layer { 1935 | name: "eltwise2_bp11" 1936 | type: "Eltwise" 1937 | bottom: "conv3_bp11" 1938 | bottom: "conv1_bp11" 1939 | top: "output_bp11" 1940 | eltwise_param { 1941 | operation: 1 1942 | } 1943 | } 1944 | 1945 | layer { 1946 | name: "concat_bp11" 1947 | type: "Concat" 1948 | bottom: "output_bp11" 1949 | bottom: "concat_bp9" 1950 | top: "concat_bp11" 1951 | } 1952 | 1953 | layer { 1954 | name: "out_concat_bp11" 1955 | type: "Convolution" 1956 | bottom: "concat_bp11" 1957 | top: "out_concat_bp11" 1958 | param { 1959 | lr_mult: 1 1960 | } 1961 | param { 1962 | lr_mult: 1 1963 | } 1964 | convolution_param { 1965 | num_output: 64 1966 | kernel_size: 1 1967 | stride: 1 1968 | pad: 0 1969 | weight_filler { 1970 | type: "gaussian" 1971 | std: 0.1767 1972 | } 1973 | bias_filler { 1974 | type: "constant" 1975 | value: 0 1976 | } 1977 | } 1978 | } 1979 | 1980 | layer { 1981 | name: "relu1_concat_bp11" 1982 | type: "PReLU" 1983 | bottom: "out_concat_bp11" 1984 | top: "out_concat_bp11" 1985 | prelu_param { 1986 | channel_shared: 1 1987 | } 1988 | } 1989 | 1990 | ######################### BP12 ######################### 1991 | layer { 1992 | name: "conv1_bp12" 1993 | type: "Convolution" 1994 | bottom: "out_concat_bp11" 1995 | top: "conv1_bp12" 1996 | param { 1997 | lr_mult: 1 1998 | } 1999 | param { 2000 | lr_mult: 1 2001 | } 2002 | convolution_param { 2003 | num_output: 64 2004 | kernel_size: 6 2005 | stride: 2 2006 | pad: 2 2007 | weight_filler { 2008 | type: "gaussian" 2009 | std: 0.0294 2010 | } 2011 | bias_filler { 2012 | type: "constant" 2013 | value: 0 2014 | } 2015 | } 2016 | } 2017 | 2018 | layer { 2019 | name: "relu1_bp12" 2020 | type: "PReLU" 2021 | bottom: "conv1_bp12" 2022 | top: "conv1_bp12" 2023 | prelu_param { 2024 | channel_shared: 1 2025 | } 2026 | } 2027 | 2028 | 2029 | layer { 2030 | name: "conv2_bp12" 2031 | type: "Deconvolution" 2032 | bottom: "conv1_bp12" 2033 | top: "conv2_bp12" 2034 | param { 2035 | lr_mult: 1 2036 | } 2037 | param { 2038 | lr_mult: 1 2039 | } 2040 | convolution_param { 2041 | num_output: 64 2042 | kernel_size: 6 2043 | stride: 2 2044 | pad: 2 2045 | weight_filler { 2046 | type: "gaussian" 2047 | std: 0.0294 2048 | } 2049 | bias_filler { 2050 | type: "constant" 2051 | value: 0 2052 | } 2053 | } 2054 | } 2055 | 2056 | layer { 2057 | name: "relu2_bp12" 2058 | type: "PReLU" 2059 | bottom: "conv2_bp12" 2060 | top: "conv2_bp12" 2061 | prelu_param { 2062 | channel_shared: 1 2063 | } 2064 | } 2065 | 2066 | layer { 2067 | name: "eltwise1_bp12" 2068 | type: "Eltwise" 2069 | bottom: "out_concat_bp11" 2070 | bottom: "conv2_bp12" 2071 | top: "eltwise1_bp12" 2072 | eltwise_param { 2073 | operation: SUM 2074 | coeff: 1 2075 | coeff: -1 2076 | } 2077 | } 2078 | 2079 | layer { 2080 | name: "conv3_bp12" 2081 | type: "Convolution" 2082 | bottom: "eltwise1_bp12" 2083 | top: "conv3_bp12" 2084 | param { 2085 | lr_mult: 1 2086 | } 2087 | param { 2088 | lr_mult: 1 2089 | } 2090 | convolution_param { 2091 | num_output: 64 2092 | kernel_size: 6 2093 | stride: 2 2094 | pad: 2 2095 | weight_filler { 2096 | type: "gaussian" 2097 | std: 0.0294 2098 | } 2099 | bias_filler { 2100 | type: "constant" 2101 | value: 0 2102 | } 2103 | } 2104 | } 2105 | 2106 | layer { 2107 | name: "relu3_bp12" 2108 | type: "PReLU" 2109 | bottom: "conv3_bp12" 2110 | top: "conv3_bp12" 2111 | prelu_param { 2112 | channel_shared: 1 2113 | } 2114 | } 2115 | 2116 | layer { 2117 | name: "eltwise2_bp12" 2118 | type: "Eltwise" 2119 | bottom: "conv3_bp12" 2120 | bottom: "conv1_bp12" 2121 | top: "output_bp12" 2122 | eltwise_param { 2123 | operation: 1 2124 | } 2125 | } 2126 | 2127 | layer { 2128 | name: "concat_bp12" 2129 | type: "Concat" 2130 | bottom: "output_bp12" 2131 | bottom: "concat_bp10" 2132 | top: "concat_bp12" 2133 | } 2134 | 2135 | layer { 2136 | name: "out_concat_bp12" 2137 | type: "Convolution" 2138 | bottom: "concat_bp12" 2139 | top: "out_concat_bp12" 2140 | param { 2141 | lr_mult: 1 2142 | } 2143 | param { 2144 | lr_mult: 1 2145 | } 2146 | convolution_param { 2147 | num_output: 64 2148 | kernel_size: 1 2149 | stride: 1 2150 | pad: 0 2151 | weight_filler { 2152 | type: "gaussian" 2153 | std: 0.1767 2154 | } 2155 | bias_filler { 2156 | type: "constant" 2157 | value: 0 2158 | } 2159 | } 2160 | } 2161 | 2162 | layer { 2163 | name: "relu1_concat_bp12" 2164 | type: "PReLU" 2165 | bottom: "out_concat_bp12" 2166 | top: "out_concat_bp12" 2167 | prelu_param { 2168 | channel_shared: 1 2169 | } 2170 | } 2171 | ######################### BP13 ######################### 2172 | layer { 2173 | name: "conv1_bp13" 2174 | type: "Deconvolution" 2175 | bottom: "out_concat_bp12" 2176 | top: "conv1_bp13" 2177 | param { 2178 | lr_mult: 1 2179 | } 2180 | param { 2181 | lr_mult: 1 2182 | } 2183 | convolution_param { 2184 | num_output: 64 2185 | kernel_size: 6 2186 | stride: 2 2187 | pad: 2 2188 | weight_filler { 2189 | type: "gaussian" 2190 | std: 0.0294 2191 | } 2192 | bias_filler { 2193 | type: "constant" 2194 | value: 0 2195 | } 2196 | } 2197 | } 2198 | 2199 | layer { 2200 | name: "relu1_bp13" 2201 | type: "PReLU" 2202 | bottom: "conv1_bp13" 2203 | top: "conv1_bp13" 2204 | prelu_param { 2205 | channel_shared: 1 2206 | } 2207 | } 2208 | 2209 | 2210 | layer { 2211 | name: "conv2_bp13" 2212 | type: "Convolution" 2213 | bottom: "conv1_bp13" 2214 | top: "conv2_bp13" 2215 | param { 2216 | lr_mult: 1 2217 | } 2218 | param { 2219 | lr_mult: 1 2220 | } 2221 | convolution_param { 2222 | num_output: 64 2223 | kernel_size: 6 2224 | stride: 2 2225 | pad: 2 2226 | weight_filler { 2227 | type: "gaussian" 2228 | std: 0.0294 2229 | } 2230 | bias_filler { 2231 | type: "constant" 2232 | value: 0 2233 | } 2234 | } 2235 | } 2236 | 2237 | layer { 2238 | name: "relu2_bp13" 2239 | type: "PReLU" 2240 | bottom: "conv2_bp13" 2241 | top: "conv2_bp13" 2242 | prelu_param { 2243 | channel_shared: 1 2244 | } 2245 | } 2246 | 2247 | layer { 2248 | name: "eltwise1_bp13" 2249 | type: "Eltwise" 2250 | bottom: "out_concat_bp12" 2251 | bottom: "conv2_bp13" 2252 | top: "eltwise1_bp13" 2253 | eltwise_param { 2254 | operation: SUM 2255 | coeff: 1 2256 | coeff: -1 2257 | } 2258 | } 2259 | 2260 | layer { 2261 | name: "conv3_bp13" 2262 | type: "Deconvolution" 2263 | bottom: "eltwise1_bp13" 2264 | top: "conv3_bp13" 2265 | param { 2266 | lr_mult: 1 2267 | } 2268 | param { 2269 | lr_mult: 1 2270 | } 2271 | convolution_param { 2272 | num_output: 64 2273 | kernel_size: 6 2274 | stride: 2 2275 | pad: 2 2276 | weight_filler { 2277 | type: "gaussian" 2278 | std: 0.0294 2279 | } 2280 | bias_filler { 2281 | type: "constant" 2282 | value: 0 2283 | } 2284 | } 2285 | } 2286 | 2287 | layer { 2288 | name: "relu3_bp13" 2289 | type: "PReLU" 2290 | bottom: "conv3_bp13" 2291 | top: "conv3_bp13" 2292 | prelu_param { 2293 | channel_shared: 1 2294 | } 2295 | } 2296 | 2297 | layer { 2298 | name: "eltwise2_bp13" 2299 | type: "Eltwise" 2300 | bottom: "conv3_bp13" 2301 | bottom: "conv1_bp13" 2302 | top: "output_bp13" 2303 | eltwise_param { 2304 | operation: 1 2305 | } 2306 | } 2307 | 2308 | layer { 2309 | name: "concat_bp13" 2310 | type: "Concat" 2311 | bottom: "output_bp13" 2312 | bottom: "concat_bp11" 2313 | top: "concat_bp13" 2314 | } 2315 | 2316 | ######################### END BP ######################### 2317 | 2318 | layer { 2319 | name: "conv_final" 2320 | type: "Convolution" 2321 | bottom: "concat_bp13" 2322 | top: "conv_final" 2323 | param { 2324 | lr_mult: 1 2325 | } 2326 | param { 2327 | lr_mult: 1 2328 | } 2329 | convolution_param { 2330 | num_output: 3 2331 | kernel_size: 3 2332 | stride: 1 2333 | pad: 1 2334 | weight_filler { 2335 | type: "gaussian" 2336 | std: 0.1 2337 | } 2338 | bias_filler { 2339 | type: "constant" 2340 | value: 0 2341 | } 2342 | } 2343 | } 2344 | -------------------------------------------------------------------------------- /caffe/DBPN_mat_4x.prototxt: -------------------------------------------------------------------------------- 1 | name: "DRBPSR" 2 | input: "data" 3 | input_dim: 1 4 | input_dim: 3 5 | input_dim: 57 6 | input_dim: 86 7 | layer { 8 | name: "conv0_1" 9 | type: "Convolution" 10 | bottom: "data" 11 | top: "conv0_1" 12 | param { 13 | lr_mult: 1 14 | } 15 | param { 16 | lr_mult: 1 17 | } 18 | convolution_param { 19 | num_output: 256 20 | kernel_size: 3 21 | stride: 1 22 | pad: 1 23 | weight_filler { 24 | type: "gaussian" 25 | std: 0.02946 26 | } 27 | bias_filler { 28 | type: "constant" 29 | value: 0 30 | } 31 | } 32 | } 33 | 34 | layer { 35 | name: "relu0_1" 36 | type: "PReLU" 37 | bottom: "conv0_1" 38 | top: "conv0_1" 39 | prelu_param { 40 | channel_shared: 1 41 | } 42 | } 43 | 44 | layer { 45 | name: "conv1" 46 | type: "Convolution" 47 | bottom: "conv0_1" 48 | top: "conv1" 49 | param { 50 | lr_mult: 1 51 | } 52 | param { 53 | lr_mult: 1 54 | } 55 | convolution_param { 56 | num_output: 64 57 | kernel_size: 1 58 | stride: 1 59 | pad: 0 60 | weight_filler { 61 | type: "gaussian" 62 | std: 0.1767 63 | } 64 | bias_filler { 65 | type: "constant" 66 | value: 0 67 | } 68 | } 69 | } 70 | 71 | layer { 72 | name: "relu1" 73 | type: "PReLU" 74 | bottom: "conv1" 75 | top: "conv1" 76 | prelu_param { 77 | channel_shared: 1 78 | } 79 | } 80 | 81 | ######################### BP1 ######################### 82 | layer { 83 | name: "conv1_bp1" 84 | type: "Deconvolution" 85 | bottom: "conv1" 86 | top: "conv1_bp1" 87 | param { 88 | lr_mult: 1 89 | } 90 | param { 91 | lr_mult: 1 92 | } 93 | convolution_param { 94 | num_output: 64 95 | kernel_size: 8 96 | stride: 4 97 | pad: 2 98 | weight_filler { 99 | type: "gaussian" 100 | std: 0.022 101 | } 102 | bias_filler { 103 | type: "constant" 104 | value: 0 105 | } 106 | } 107 | } 108 | 109 | layer { 110 | name: "relu1_bp1" 111 | type: "PReLU" 112 | bottom: "conv1_bp1" 113 | top: "conv1_bp1" 114 | prelu_param { 115 | channel_shared: 1 116 | } 117 | } 118 | 119 | 120 | layer { 121 | name: "conv2_bp1" 122 | type: "Convolution" 123 | bottom: "conv1_bp1" 124 | top: "conv2_bp1" 125 | param { 126 | lr_mult: 1 127 | } 128 | param { 129 | lr_mult: 1 130 | } 131 | convolution_param { 132 | num_output: 64 133 | kernel_size: 8 134 | stride: 4 135 | pad: 2 136 | weight_filler { 137 | type: "gaussian" 138 | std: 0.022 139 | } 140 | bias_filler { 141 | type: "constant" 142 | value: 0 143 | } 144 | } 145 | } 146 | 147 | layer { 148 | name: "relu2_bp1" 149 | type: "PReLU" 150 | bottom: "conv2_bp1" 151 | top: "conv2_bp1" 152 | prelu_param { 153 | channel_shared: 1 154 | } 155 | } 156 | 157 | layer { 158 | name: "eltwise1_bp1" 159 | type: "Eltwise" 160 | bottom: "conv1" 161 | bottom: "conv2_bp1" 162 | top: "eltwise1_bp1" 163 | eltwise_param { 164 | operation: SUM 165 | coeff: 1 166 | coeff: -1 167 | } 168 | } 169 | 170 | layer { 171 | name: "conv3_bp1" 172 | type: "Deconvolution" 173 | bottom: "eltwise1_bp1" 174 | top: "conv3_bp1" 175 | param { 176 | lr_mult: 1 177 | } 178 | param { 179 | lr_mult: 1 180 | } 181 | convolution_param { 182 | num_output: 64 183 | kernel_size: 8 184 | stride: 4 185 | pad: 2 186 | weight_filler { 187 | type: "gaussian" 188 | std: 0.022 189 | } 190 | bias_filler { 191 | type: "constant" 192 | value: 0 193 | } 194 | } 195 | } 196 | 197 | layer { 198 | name: "relu3_bp1" 199 | type: "PReLU" 200 | bottom: "conv3_bp1" 201 | top: "conv3_bp1" 202 | prelu_param { 203 | channel_shared: 1 204 | } 205 | } 206 | 207 | layer { 208 | name: "eltwise2_bp1" 209 | type: "Eltwise" 210 | bottom: "conv3_bp1" 211 | bottom: "conv1_bp1" 212 | top: "output_bp1" 213 | eltwise_param { 214 | operation: 1 215 | } 216 | } 217 | 218 | ######################### BP2 ######################### 219 | layer { 220 | name: "conv1_bp2" 221 | type: "Convolution" 222 | bottom: "output_bp1" 223 | top: "conv1_bp2" 224 | param { 225 | lr_mult: 1 226 | } 227 | param { 228 | lr_mult: 1 229 | } 230 | convolution_param { 231 | num_output: 64 232 | kernel_size: 8 233 | stride: 4 234 | pad: 2 235 | weight_filler { 236 | type: "gaussian" 237 | std: 0.022 238 | } 239 | bias_filler { 240 | type: "constant" 241 | value: 0 242 | } 243 | } 244 | } 245 | 246 | layer { 247 | name: "relu1_bp2" 248 | type: "PReLU" 249 | bottom: "conv1_bp2" 250 | top: "conv1_bp2" 251 | prelu_param { 252 | channel_shared: 1 253 | } 254 | } 255 | 256 | 257 | layer { 258 | name: "conv2_bp2" 259 | type: "Deconvolution" 260 | bottom: "conv1_bp2" 261 | top: "conv2_bp2" 262 | param { 263 | lr_mult: 1 264 | } 265 | param { 266 | lr_mult: 1 267 | } 268 | convolution_param { 269 | num_output: 64 270 | kernel_size: 8 271 | stride: 4 272 | pad: 2 273 | weight_filler { 274 | type: "gaussian" 275 | std: 0.022 276 | } 277 | bias_filler { 278 | type: "constant" 279 | value: 0 280 | } 281 | } 282 | } 283 | 284 | layer { 285 | name: "relu2_bp2" 286 | type: "PReLU" 287 | bottom: "conv2_bp2" 288 | top: "conv2_bp2" 289 | prelu_param { 290 | channel_shared: 1 291 | } 292 | } 293 | 294 | layer { 295 | name: "eltwise1_bp2" 296 | type: "Eltwise" 297 | bottom: "output_bp1" 298 | bottom: "conv2_bp2" 299 | top: "eltwise1_bp2" 300 | eltwise_param { 301 | operation: SUM 302 | coeff: 1 303 | coeff: -1 304 | } 305 | } 306 | 307 | layer { 308 | name: "conv3_bp2" 309 | type: "Convolution" 310 | bottom: "eltwise1_bp2" 311 | top: "conv3_bp2" 312 | param { 313 | lr_mult: 1 314 | } 315 | param { 316 | lr_mult: 1 317 | } 318 | convolution_param { 319 | num_output: 64 320 | kernel_size: 8 321 | stride: 4 322 | pad: 2 323 | weight_filler { 324 | type: "gaussian" 325 | std: 0.022 326 | } 327 | bias_filler { 328 | type: "constant" 329 | value: 0 330 | } 331 | } 332 | } 333 | 334 | layer { 335 | name: "relu3_bp2" 336 | type: "PReLU" 337 | bottom: "conv3_bp2" 338 | top: "conv3_bp2" 339 | prelu_param { 340 | channel_shared: 1 341 | } 342 | } 343 | 344 | layer { 345 | name: "eltwise2_bp2" 346 | type: "Eltwise" 347 | bottom: "conv3_bp2" 348 | bottom: "conv1_bp2" 349 | top: "output_bp2" 350 | eltwise_param { 351 | operation: 1 352 | } 353 | } 354 | 355 | #######Start dense######### 356 | ######################### BP3 ######################### 357 | layer { 358 | name: "conv1_bp3" 359 | type: "Deconvolution" 360 | bottom: "output_bp2" 361 | top: "conv1_bp3" 362 | param { 363 | lr_mult: 1 364 | } 365 | param { 366 | lr_mult: 1 367 | } 368 | convolution_param { 369 | num_output: 64 370 | kernel_size: 8 371 | stride: 4 372 | pad: 2 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.022 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | 384 | layer { 385 | name: "relu1_bp3" 386 | type: "PReLU" 387 | bottom: "conv1_bp3" 388 | top: "conv1_bp3" 389 | prelu_param { 390 | channel_shared: 1 391 | } 392 | } 393 | 394 | 395 | layer { 396 | name: "conv2_bp3" 397 | type: "Convolution" 398 | bottom: "conv1_bp3" 399 | top: "conv2_bp3" 400 | param { 401 | lr_mult: 1 402 | } 403 | param { 404 | lr_mult: 1 405 | } 406 | convolution_param { 407 | num_output: 64 408 | kernel_size: 8 409 | stride: 4 410 | pad: 2 411 | weight_filler { 412 | type: "gaussian" 413 | std: 0.022 414 | } 415 | bias_filler { 416 | type: "constant" 417 | value: 0 418 | } 419 | } 420 | } 421 | 422 | layer { 423 | name: "relu2_bp3" 424 | type: "PReLU" 425 | bottom: "conv2_bp3" 426 | top: "conv2_bp3" 427 | prelu_param { 428 | channel_shared: 1 429 | } 430 | } 431 | 432 | layer { 433 | name: "eltwise1_bp3" 434 | type: "Eltwise" 435 | bottom: "output_bp2" 436 | bottom: "conv2_bp3" 437 | top: "eltwise1_bp3" 438 | eltwise_param { 439 | operation: SUM 440 | coeff: 1 441 | coeff: -1 442 | } 443 | } 444 | 445 | layer { 446 | name: "conv3_bp3" 447 | type: "Deconvolution" 448 | bottom: "eltwise1_bp3" 449 | top: "conv3_bp3" 450 | param { 451 | lr_mult: 1 452 | } 453 | param { 454 | lr_mult: 1 455 | } 456 | convolution_param { 457 | num_output: 64 458 | kernel_size: 8 459 | stride: 4 460 | pad: 2 461 | weight_filler { 462 | type: "gaussian" 463 | std: 0.022 464 | } 465 | bias_filler { 466 | type: "constant" 467 | value: 0 468 | } 469 | } 470 | } 471 | 472 | layer { 473 | name: "relu3_bp3" 474 | type: "PReLU" 475 | bottom: "conv3_bp3" 476 | top: "conv3_bp3" 477 | prelu_param { 478 | channel_shared: 1 479 | } 480 | } 481 | 482 | layer { 483 | name: "eltwise2_bp3" 484 | type: "Eltwise" 485 | bottom: "conv3_bp3" 486 | bottom: "conv1_bp3" 487 | top: "output_bp3" 488 | eltwise_param { 489 | operation: 1 490 | } 491 | } 492 | 493 | layer { 494 | name: "concat_bp3" 495 | type: "Concat" 496 | bottom: "output_bp3" 497 | bottom: "output_bp1" 498 | top: "concat_bp3" 499 | } 500 | 501 | layer { 502 | name: "out_concat_bp3" 503 | type: "Convolution" 504 | bottom: "concat_bp3" 505 | top: "out_concat_bp3" 506 | param { 507 | lr_mult: 1 508 | } 509 | param { 510 | lr_mult: 1 511 | } 512 | convolution_param { 513 | num_output: 64 514 | kernel_size: 1 515 | stride: 1 516 | pad: 0 517 | weight_filler { 518 | type: "gaussian" 519 | std: 0.1767 520 | } 521 | bias_filler { 522 | type: "constant" 523 | value: 0 524 | } 525 | } 526 | } 527 | 528 | layer { 529 | name: "relu1_concat_bp3" 530 | type: "PReLU" 531 | bottom: "out_concat_bp3" 532 | top: "out_concat_bp3" 533 | prelu_param { 534 | channel_shared: 1 535 | } 536 | } 537 | 538 | ######################### BP4 ######################### 539 | layer { 540 | name: "conv1_bp4" 541 | type: "Convolution" 542 | bottom: "out_concat_bp3" 543 | top: "conv1_bp4" 544 | param { 545 | lr_mult: 1 546 | } 547 | param { 548 | lr_mult: 1 549 | } 550 | convolution_param { 551 | num_output: 64 552 | kernel_size: 8 553 | stride: 4 554 | pad: 2 555 | weight_filler { 556 | type: "gaussian" 557 | std: 0.022 558 | } 559 | bias_filler { 560 | type: "constant" 561 | value: 0 562 | } 563 | } 564 | } 565 | 566 | layer { 567 | name: "relu1_bp4" 568 | type: "PReLU" 569 | bottom: "conv1_bp4" 570 | top: "conv1_bp4" 571 | prelu_param { 572 | channel_shared: 1 573 | } 574 | } 575 | 576 | 577 | layer { 578 | name: "conv2_bp4" 579 | type: "Deconvolution" 580 | bottom: "conv1_bp4" 581 | top: "conv2_bp4" 582 | param { 583 | lr_mult: 1 584 | } 585 | param { 586 | lr_mult: 1 587 | } 588 | convolution_param { 589 | num_output: 64 590 | kernel_size: 8 591 | stride: 4 592 | pad: 2 593 | weight_filler { 594 | type: "gaussian" 595 | std: 0.022 596 | } 597 | bias_filler { 598 | type: "constant" 599 | value: 0 600 | } 601 | } 602 | } 603 | 604 | layer { 605 | name: "relu2_bp4" 606 | type: "PReLU" 607 | bottom: "conv2_bp4" 608 | top: "conv2_bp4" 609 | prelu_param { 610 | channel_shared: 1 611 | } 612 | } 613 | 614 | layer { 615 | name: "eltwise1_bp4" 616 | type: "Eltwise" 617 | bottom: "out_concat_bp3" 618 | bottom: "conv2_bp4" 619 | top: "eltwise1_bp4" 620 | eltwise_param { 621 | operation: SUM 622 | coeff: 1 623 | coeff: -1 624 | } 625 | } 626 | 627 | layer { 628 | name: "conv3_bp4" 629 | type: "Convolution" 630 | bottom: "eltwise1_bp4" 631 | top: "conv3_bp4" 632 | param { 633 | lr_mult: 1 634 | } 635 | param { 636 | lr_mult: 1 637 | } 638 | convolution_param { 639 | num_output: 64 640 | kernel_size: 8 641 | stride: 4 642 | pad: 2 643 | weight_filler { 644 | type: "gaussian" 645 | std: 0.022 646 | } 647 | bias_filler { 648 | type: "constant" 649 | value: 0 650 | } 651 | } 652 | } 653 | 654 | layer { 655 | name: "relu3_bp4" 656 | type: "PReLU" 657 | bottom: "conv3_bp4" 658 | top: "conv3_bp4" 659 | prelu_param { 660 | channel_shared: 1 661 | } 662 | } 663 | 664 | layer { 665 | name: "eltwise2_bp4" 666 | type: "Eltwise" 667 | bottom: "conv3_bp4" 668 | bottom: "conv1_bp4" 669 | top: "output_bp4" 670 | eltwise_param { 671 | operation: 1 672 | } 673 | } 674 | 675 | layer { 676 | name: "concat_bp4" 677 | type: "Concat" 678 | bottom: "output_bp4" 679 | bottom: "output_bp2" 680 | top: "concat_bp4" 681 | } 682 | 683 | layer { 684 | name: "out_concat_bp4" 685 | type: "Convolution" 686 | bottom: "concat_bp4" 687 | top: "out_concat_bp4" 688 | param { 689 | lr_mult: 1 690 | } 691 | param { 692 | lr_mult: 1 693 | } 694 | convolution_param { 695 | num_output: 64 696 | kernel_size: 1 697 | stride: 1 698 | pad: 0 699 | weight_filler { 700 | type: "gaussian" 701 | std: 0.1767 702 | } 703 | bias_filler { 704 | type: "constant" 705 | value: 0 706 | } 707 | } 708 | } 709 | 710 | layer { 711 | name: "relu1_concat_bp4" 712 | type: "PReLU" 713 | bottom: "out_concat_bp4" 714 | top: "out_concat_bp4" 715 | prelu_param { 716 | channel_shared: 1 717 | } 718 | } 719 | 720 | ######################### BP5 ######################### 721 | layer { 722 | name: "conv1_bp5" 723 | type: "Deconvolution" 724 | bottom: "out_concat_bp4" 725 | top: "conv1_bp5" 726 | param { 727 | lr_mult: 1 728 | } 729 | param { 730 | lr_mult: 1 731 | } 732 | convolution_param { 733 | num_output: 64 734 | kernel_size: 8 735 | stride: 4 736 | pad: 2 737 | weight_filler { 738 | type: "gaussian" 739 | std: 0.022 740 | } 741 | bias_filler { 742 | type: "constant" 743 | value: 0 744 | } 745 | } 746 | } 747 | 748 | layer { 749 | name: "relu1_bp5" 750 | type: "PReLU" 751 | bottom: "conv1_bp5" 752 | top: "conv1_bp5" 753 | prelu_param { 754 | channel_shared: 1 755 | } 756 | } 757 | 758 | 759 | layer { 760 | name: "conv2_bp5" 761 | type: "Convolution" 762 | bottom: "conv1_bp5" 763 | top: "conv2_bp5" 764 | param { 765 | lr_mult: 1 766 | } 767 | param { 768 | lr_mult: 1 769 | } 770 | convolution_param { 771 | num_output: 64 772 | kernel_size: 8 773 | stride: 4 774 | pad: 2 775 | weight_filler { 776 | type: "gaussian" 777 | std: 0.022 778 | } 779 | bias_filler { 780 | type: "constant" 781 | value: 0 782 | } 783 | } 784 | } 785 | 786 | layer { 787 | name: "relu2_bp5" 788 | type: "PReLU" 789 | bottom: "conv2_bp5" 790 | top: "conv2_bp5" 791 | prelu_param { 792 | channel_shared: 1 793 | } 794 | } 795 | 796 | layer { 797 | name: "eltwise1_bp5" 798 | type: "Eltwise" 799 | bottom: "out_concat_bp4" 800 | bottom: "conv2_bp5" 801 | top: "eltwise1_bp5" 802 | eltwise_param { 803 | operation: SUM 804 | coeff: 1 805 | coeff: -1 806 | } 807 | } 808 | 809 | layer { 810 | name: "conv3_bp5" 811 | type: "Deconvolution" 812 | bottom: "eltwise1_bp5" 813 | top: "conv3_bp5" 814 | param { 815 | lr_mult: 1 816 | } 817 | param { 818 | lr_mult: 1 819 | } 820 | convolution_param { 821 | num_output: 64 822 | kernel_size: 8 823 | stride: 4 824 | pad: 2 825 | weight_filler { 826 | type: "gaussian" 827 | std: 0.022 828 | } 829 | bias_filler { 830 | type: "constant" 831 | value: 0 832 | } 833 | } 834 | } 835 | 836 | layer { 837 | name: "relu3_bp5" 838 | type: "PReLU" 839 | bottom: "conv3_bp5" 840 | top: "conv3_bp5" 841 | prelu_param { 842 | channel_shared: 1 843 | } 844 | } 845 | 846 | layer { 847 | name: "eltwise2_bp5" 848 | type: "Eltwise" 849 | bottom: "conv3_bp5" 850 | bottom: "conv1_bp5" 851 | top: "output_bp5" 852 | eltwise_param { 853 | operation: 1 854 | } 855 | } 856 | 857 | layer { 858 | name: "concat_bp5" 859 | type: "Concat" 860 | bottom: "output_bp5" 861 | bottom: "concat_bp3" 862 | top: "concat_bp5" 863 | } 864 | 865 | layer { 866 | name: "out_concat_bp5" 867 | type: "Convolution" 868 | bottom: "concat_bp5" 869 | top: "out_concat_bp5" 870 | param { 871 | lr_mult: 1 872 | } 873 | param { 874 | lr_mult: 1 875 | } 876 | convolution_param { 877 | num_output: 64 878 | kernel_size: 1 879 | stride: 1 880 | pad: 0 881 | weight_filler { 882 | type: "gaussian" 883 | std: 0.1767 884 | } 885 | bias_filler { 886 | type: "constant" 887 | value: 0 888 | } 889 | } 890 | } 891 | 892 | layer { 893 | name: "relu1_concat_bp5" 894 | type: "PReLU" 895 | bottom: "out_concat_bp5" 896 | top: "out_concat_bp5" 897 | prelu_param { 898 | channel_shared: 1 899 | } 900 | } 901 | ######################### BP6 ######################### 902 | layer { 903 | name: "conv1_bp6" 904 | type: "Convolution" 905 | bottom: "out_concat_bp5" 906 | top: "conv1_bp6" 907 | param { 908 | lr_mult: 1 909 | } 910 | param { 911 | lr_mult: 1 912 | } 913 | convolution_param { 914 | num_output: 64 915 | kernel_size: 8 916 | stride: 4 917 | pad: 2 918 | weight_filler { 919 | type: "gaussian" 920 | std: 0.022 921 | } 922 | bias_filler { 923 | type: "constant" 924 | value: 0 925 | } 926 | } 927 | } 928 | 929 | layer { 930 | name: "relu1_bp6" 931 | type: "PReLU" 932 | bottom: "conv1_bp6" 933 | top: "conv1_bp6" 934 | prelu_param { 935 | channel_shared: 1 936 | } 937 | } 938 | 939 | 940 | layer { 941 | name: "conv2_bp6" 942 | type: "Deconvolution" 943 | bottom: "conv1_bp6" 944 | top: "conv2_bp6" 945 | param { 946 | lr_mult: 1 947 | } 948 | param { 949 | lr_mult: 1 950 | } 951 | convolution_param { 952 | num_output: 64 953 | kernel_size: 8 954 | stride: 4 955 | pad: 2 956 | weight_filler { 957 | type: "gaussian" 958 | std: 0.022 959 | } 960 | bias_filler { 961 | type: "constant" 962 | value: 0 963 | } 964 | } 965 | } 966 | 967 | layer { 968 | name: "relu2_bp6" 969 | type: "PReLU" 970 | bottom: "conv2_bp6" 971 | top: "conv2_bp6" 972 | prelu_param { 973 | channel_shared: 1 974 | } 975 | } 976 | 977 | layer { 978 | name: "eltwise1_bp6" 979 | type: "Eltwise" 980 | bottom: "out_concat_bp5" 981 | bottom: "conv2_bp6" 982 | top: "eltwise1_bp6" 983 | eltwise_param { 984 | operation: SUM 985 | coeff: 1 986 | coeff: -1 987 | } 988 | } 989 | 990 | layer { 991 | name: "conv3_bp6" 992 | type: "Convolution" 993 | bottom: "eltwise1_bp6" 994 | top: "conv3_bp6" 995 | param { 996 | lr_mult: 1 997 | } 998 | param { 999 | lr_mult: 1 1000 | } 1001 | convolution_param { 1002 | num_output: 64 1003 | kernel_size: 8 1004 | stride: 4 1005 | pad: 2 1006 | weight_filler { 1007 | type: "gaussian" 1008 | std: 0.022 1009 | } 1010 | bias_filler { 1011 | type: "constant" 1012 | value: 0 1013 | } 1014 | } 1015 | } 1016 | 1017 | layer { 1018 | name: "relu3_bp6" 1019 | type: "PReLU" 1020 | bottom: "conv3_bp6" 1021 | top: "conv3_bp6" 1022 | prelu_param { 1023 | channel_shared: 1 1024 | } 1025 | } 1026 | 1027 | layer { 1028 | name: "eltwise2_bp6" 1029 | type: "Eltwise" 1030 | bottom: "conv3_bp6" 1031 | bottom: "conv1_bp6" 1032 | top: "output_bp6" 1033 | eltwise_param { 1034 | operation: 1 1035 | } 1036 | } 1037 | 1038 | layer { 1039 | name: "concat_bp6" 1040 | type: "Concat" 1041 | bottom: "output_bp6" 1042 | bottom: "concat_bp4" 1043 | top: "concat_bp6" 1044 | } 1045 | 1046 | layer { 1047 | name: "out_concat_bp6" 1048 | type: "Convolution" 1049 | bottom: "concat_bp6" 1050 | top: "out_concat_bp6" 1051 | param { 1052 | lr_mult: 1 1053 | } 1054 | param { 1055 | lr_mult: 1 1056 | } 1057 | convolution_param { 1058 | num_output: 64 1059 | kernel_size: 1 1060 | stride: 1 1061 | pad: 0 1062 | weight_filler { 1063 | type: "gaussian" 1064 | std: 0.1767 1065 | } 1066 | bias_filler { 1067 | type: "constant" 1068 | value: 0 1069 | } 1070 | } 1071 | } 1072 | 1073 | layer { 1074 | name: "relu1_concat_bp6" 1075 | type: "PReLU" 1076 | bottom: "out_concat_bp6" 1077 | top: "out_concat_bp6" 1078 | prelu_param { 1079 | channel_shared: 1 1080 | } 1081 | } 1082 | 1083 | ######################### BP7 ######################### 1084 | layer { 1085 | name: "conv1_bp7" 1086 | type: "Deconvolution" 1087 | bottom: "out_concat_bp6" 1088 | top: "conv1_bp7" 1089 | param { 1090 | lr_mult: 1 1091 | } 1092 | param { 1093 | lr_mult: 1 1094 | } 1095 | convolution_param { 1096 | num_output: 64 1097 | kernel_size: 8 1098 | stride: 4 1099 | pad: 2 1100 | weight_filler { 1101 | type: "gaussian" 1102 | std: 0.022 1103 | } 1104 | bias_filler { 1105 | type: "constant" 1106 | value: 0 1107 | } 1108 | } 1109 | } 1110 | 1111 | layer { 1112 | name: "relu1_bp7" 1113 | type: "PReLU" 1114 | bottom: "conv1_bp7" 1115 | top: "conv1_bp7" 1116 | prelu_param { 1117 | channel_shared: 1 1118 | } 1119 | } 1120 | 1121 | 1122 | layer { 1123 | name: "conv2_bp7" 1124 | type: "Convolution" 1125 | bottom: "conv1_bp7" 1126 | top: "conv2_bp7" 1127 | param { 1128 | lr_mult: 1 1129 | } 1130 | param { 1131 | lr_mult: 1 1132 | } 1133 | convolution_param { 1134 | num_output: 64 1135 | kernel_size: 8 1136 | stride: 4 1137 | pad: 2 1138 | weight_filler { 1139 | type: "gaussian" 1140 | std: 0.022 1141 | } 1142 | bias_filler { 1143 | type: "constant" 1144 | value: 0 1145 | } 1146 | } 1147 | } 1148 | 1149 | layer { 1150 | name: "relu2_bp7" 1151 | type: "PReLU" 1152 | bottom: "conv2_bp7" 1153 | top: "conv2_bp7" 1154 | prelu_param { 1155 | channel_shared: 1 1156 | } 1157 | } 1158 | 1159 | layer { 1160 | name: "eltwise1_bp7" 1161 | type: "Eltwise" 1162 | bottom: "out_concat_bp6" 1163 | bottom: "conv2_bp7" 1164 | top: "eltwise1_bp7" 1165 | eltwise_param { 1166 | operation: SUM 1167 | coeff: 1 1168 | coeff: -1 1169 | } 1170 | } 1171 | 1172 | layer { 1173 | name: "conv3_bp7" 1174 | type: "Deconvolution" 1175 | bottom: "eltwise1_bp7" 1176 | top: "conv3_bp7" 1177 | param { 1178 | lr_mult: 1 1179 | } 1180 | param { 1181 | lr_mult: 1 1182 | } 1183 | convolution_param { 1184 | num_output: 64 1185 | kernel_size: 8 1186 | stride: 4 1187 | pad: 2 1188 | weight_filler { 1189 | type: "gaussian" 1190 | std: 0.022 1191 | } 1192 | bias_filler { 1193 | type: "constant" 1194 | value: 0 1195 | } 1196 | } 1197 | } 1198 | 1199 | layer { 1200 | name: "relu3_bp7" 1201 | type: "PReLU" 1202 | bottom: "conv3_bp7" 1203 | top: "conv3_bp7" 1204 | prelu_param { 1205 | channel_shared: 1 1206 | } 1207 | } 1208 | 1209 | layer { 1210 | name: "eltwise2_bp7" 1211 | type: "Eltwise" 1212 | bottom: "conv3_bp7" 1213 | bottom: "conv1_bp7" 1214 | top: "output_bp7" 1215 | eltwise_param { 1216 | operation: 1 1217 | } 1218 | } 1219 | 1220 | layer { 1221 | name: "concat_bp7" 1222 | type: "Concat" 1223 | bottom: "output_bp7" 1224 | bottom: "concat_bp5" 1225 | top: "concat_bp7" 1226 | } 1227 | 1228 | layer { 1229 | name: "out_concat_bp7" 1230 | type: "Convolution" 1231 | bottom: "concat_bp7" 1232 | top: "out_concat_bp7" 1233 | param { 1234 | lr_mult: 1 1235 | } 1236 | param { 1237 | lr_mult: 1 1238 | } 1239 | convolution_param { 1240 | num_output: 64 1241 | kernel_size: 1 1242 | stride: 1 1243 | pad: 0 1244 | weight_filler { 1245 | type: "gaussian" 1246 | std: 0.1767 1247 | } 1248 | bias_filler { 1249 | type: "constant" 1250 | value: 0 1251 | } 1252 | } 1253 | } 1254 | 1255 | layer { 1256 | name: "relu1_concat_bp7" 1257 | type: "PReLU" 1258 | bottom: "out_concat_bp7" 1259 | top: "out_concat_bp7" 1260 | prelu_param { 1261 | channel_shared: 1 1262 | } 1263 | } 1264 | 1265 | ######################### BP8 ######################### 1266 | layer { 1267 | name: "conv1_bp8" 1268 | type: "Convolution" 1269 | bottom: "out_concat_bp7" 1270 | top: "conv1_bp8" 1271 | param { 1272 | lr_mult: 1 1273 | } 1274 | param { 1275 | lr_mult: 1 1276 | } 1277 | convolution_param { 1278 | num_output: 64 1279 | kernel_size: 8 1280 | stride: 4 1281 | pad: 2 1282 | weight_filler { 1283 | type: "gaussian" 1284 | std: 0.022 1285 | } 1286 | bias_filler { 1287 | type: "constant" 1288 | value: 0 1289 | } 1290 | } 1291 | } 1292 | 1293 | layer { 1294 | name: "relu1_bp8" 1295 | type: "PReLU" 1296 | bottom: "conv1_bp8" 1297 | top: "conv1_bp8" 1298 | prelu_param { 1299 | channel_shared: 1 1300 | } 1301 | } 1302 | 1303 | 1304 | layer { 1305 | name: "conv2_bp8" 1306 | type: "Deconvolution" 1307 | bottom: "conv1_bp8" 1308 | top: "conv2_bp8" 1309 | param { 1310 | lr_mult: 1 1311 | } 1312 | param { 1313 | lr_mult: 1 1314 | } 1315 | convolution_param { 1316 | num_output: 64 1317 | kernel_size: 8 1318 | stride: 4 1319 | pad: 2 1320 | weight_filler { 1321 | type: "gaussian" 1322 | std: 0.022 1323 | } 1324 | bias_filler { 1325 | type: "constant" 1326 | value: 0 1327 | } 1328 | } 1329 | } 1330 | 1331 | layer { 1332 | name: "relu2_bp8" 1333 | type: "PReLU" 1334 | bottom: "conv2_bp8" 1335 | top: "conv2_bp8" 1336 | prelu_param { 1337 | channel_shared: 1 1338 | } 1339 | } 1340 | 1341 | layer { 1342 | name: "eltwise1_bp8" 1343 | type: "Eltwise" 1344 | bottom: "out_concat_bp7" 1345 | bottom: "conv2_bp8" 1346 | top: "eltwise1_bp8" 1347 | eltwise_param { 1348 | operation: SUM 1349 | coeff: 1 1350 | coeff: -1 1351 | } 1352 | } 1353 | 1354 | layer { 1355 | name: "conv3_bp8" 1356 | type: "Convolution" 1357 | bottom: "eltwise1_bp8" 1358 | top: "conv3_bp8" 1359 | param { 1360 | lr_mult: 1 1361 | } 1362 | param { 1363 | lr_mult: 1 1364 | } 1365 | convolution_param { 1366 | num_output: 64 1367 | kernel_size: 8 1368 | stride: 4 1369 | pad: 2 1370 | weight_filler { 1371 | type: "gaussian" 1372 | std: 0.022 1373 | } 1374 | bias_filler { 1375 | type: "constant" 1376 | value: 0 1377 | } 1378 | } 1379 | } 1380 | 1381 | layer { 1382 | name: "relu3_bp8" 1383 | type: "PReLU" 1384 | bottom: "conv3_bp8" 1385 | top: "conv3_bp8" 1386 | prelu_param { 1387 | channel_shared: 1 1388 | } 1389 | } 1390 | 1391 | layer { 1392 | name: "eltwise2_bp8" 1393 | type: "Eltwise" 1394 | bottom: "conv3_bp8" 1395 | bottom: "conv1_bp8" 1396 | top: "output_bp8" 1397 | eltwise_param { 1398 | operation: 1 1399 | } 1400 | } 1401 | 1402 | layer { 1403 | name: "concat_bp8" 1404 | type: "Concat" 1405 | bottom: "output_bp8" 1406 | bottom: "concat_bp6" 1407 | top: "concat_bp8" 1408 | } 1409 | 1410 | layer { 1411 | name: "out_concat_bp8" 1412 | type: "Convolution" 1413 | bottom: "concat_bp8" 1414 | top: "out_concat_bp8" 1415 | param { 1416 | lr_mult: 1 1417 | } 1418 | param { 1419 | lr_mult: 1 1420 | } 1421 | convolution_param { 1422 | num_output: 64 1423 | kernel_size: 1 1424 | stride: 1 1425 | pad: 0 1426 | weight_filler { 1427 | type: "gaussian" 1428 | std: 0.1767 1429 | } 1430 | bias_filler { 1431 | type: "constant" 1432 | value: 0 1433 | } 1434 | } 1435 | } 1436 | 1437 | layer { 1438 | name: "relu1_concat_bp8" 1439 | type: "PReLU" 1440 | bottom: "out_concat_bp8" 1441 | top: "out_concat_bp8" 1442 | prelu_param { 1443 | channel_shared: 1 1444 | } 1445 | } 1446 | ######################### BP9 ######################### 1447 | layer { 1448 | name: "conv1_bp9" 1449 | type: "Deconvolution" 1450 | bottom: "out_concat_bp8" 1451 | top: "conv1_bp9" 1452 | param { 1453 | lr_mult: 1 1454 | } 1455 | param { 1456 | lr_mult: 1 1457 | } 1458 | convolution_param { 1459 | num_output: 64 1460 | kernel_size: 8 1461 | stride: 4 1462 | pad: 2 1463 | weight_filler { 1464 | type: "gaussian" 1465 | std: 0.022 1466 | } 1467 | bias_filler { 1468 | type: "constant" 1469 | value: 0 1470 | } 1471 | } 1472 | } 1473 | 1474 | layer { 1475 | name: "relu1_bp9" 1476 | type: "PReLU" 1477 | bottom: "conv1_bp9" 1478 | top: "conv1_bp9" 1479 | prelu_param { 1480 | channel_shared: 1 1481 | } 1482 | } 1483 | 1484 | 1485 | layer { 1486 | name: "conv2_bp9" 1487 | type: "Convolution" 1488 | bottom: "conv1_bp9" 1489 | top: "conv2_bp9" 1490 | param { 1491 | lr_mult: 1 1492 | } 1493 | param { 1494 | lr_mult: 1 1495 | } 1496 | convolution_param { 1497 | num_output: 64 1498 | kernel_size: 8 1499 | stride: 4 1500 | pad: 2 1501 | weight_filler { 1502 | type: "gaussian" 1503 | std: 0.022 1504 | } 1505 | bias_filler { 1506 | type: "constant" 1507 | value: 0 1508 | } 1509 | } 1510 | } 1511 | 1512 | layer { 1513 | name: "relu2_bp9" 1514 | type: "PReLU" 1515 | bottom: "conv2_bp9" 1516 | top: "conv2_bp9" 1517 | prelu_param { 1518 | channel_shared: 1 1519 | } 1520 | } 1521 | 1522 | layer { 1523 | name: "eltwise1_bp9" 1524 | type: "Eltwise" 1525 | bottom: "out_concat_bp8" 1526 | bottom: "conv2_bp9" 1527 | top: "eltwise1_bp9" 1528 | eltwise_param { 1529 | operation: SUM 1530 | coeff: 1 1531 | coeff: -1 1532 | } 1533 | } 1534 | 1535 | layer { 1536 | name: "conv3_bp9" 1537 | type: "Deconvolution" 1538 | bottom: "eltwise1_bp9" 1539 | top: "conv3_bp9" 1540 | param { 1541 | lr_mult: 1 1542 | } 1543 | param { 1544 | lr_mult: 1 1545 | } 1546 | convolution_param { 1547 | num_output: 64 1548 | kernel_size: 8 1549 | stride: 4 1550 | pad: 2 1551 | weight_filler { 1552 | type: "gaussian" 1553 | std: 0.022 1554 | } 1555 | bias_filler { 1556 | type: "constant" 1557 | value: 0 1558 | } 1559 | } 1560 | } 1561 | 1562 | layer { 1563 | name: "relu3_bp9" 1564 | type: "PReLU" 1565 | bottom: "conv3_bp9" 1566 | top: "conv3_bp9" 1567 | prelu_param { 1568 | channel_shared: 1 1569 | } 1570 | } 1571 | 1572 | layer { 1573 | name: "eltwise2_bp9" 1574 | type: "Eltwise" 1575 | bottom: "conv3_bp9" 1576 | bottom: "conv1_bp9" 1577 | top: "output_bp9" 1578 | eltwise_param { 1579 | operation: 1 1580 | } 1581 | } 1582 | 1583 | layer { 1584 | name: "concat_bp9" 1585 | type: "Concat" 1586 | bottom: "output_bp9" 1587 | bottom: "concat_bp7" 1588 | top: "concat_bp9" 1589 | } 1590 | 1591 | layer { 1592 | name: "out_concat_bp9" 1593 | type: "Convolution" 1594 | bottom: "concat_bp9" 1595 | top: "out_concat_bp9" 1596 | param { 1597 | lr_mult: 1 1598 | } 1599 | param { 1600 | lr_mult: 1 1601 | } 1602 | convolution_param { 1603 | num_output: 64 1604 | kernel_size: 1 1605 | stride: 1 1606 | pad: 0 1607 | weight_filler { 1608 | type: "gaussian" 1609 | std: 0.1767 1610 | } 1611 | bias_filler { 1612 | type: "constant" 1613 | value: 0 1614 | } 1615 | } 1616 | } 1617 | 1618 | layer { 1619 | name: "relu1_concat_bp9" 1620 | type: "PReLU" 1621 | bottom: "out_concat_bp9" 1622 | top: "out_concat_bp9" 1623 | prelu_param { 1624 | channel_shared: 1 1625 | } 1626 | } 1627 | ######################### BP10 ######################### 1628 | layer { 1629 | name: "conv1_bp10" 1630 | type: "Convolution" 1631 | bottom: "out_concat_bp9" 1632 | top: "conv1_bp10" 1633 | param { 1634 | lr_mult: 1 1635 | } 1636 | param { 1637 | lr_mult: 1 1638 | } 1639 | convolution_param { 1640 | num_output: 64 1641 | kernel_size: 8 1642 | stride: 4 1643 | pad: 2 1644 | weight_filler { 1645 | type: "gaussian" 1646 | std: 0.022 1647 | } 1648 | bias_filler { 1649 | type: "constant" 1650 | value: 0 1651 | } 1652 | } 1653 | } 1654 | 1655 | layer { 1656 | name: "relu1_bp10" 1657 | type: "PReLU" 1658 | bottom: "conv1_bp10" 1659 | top: "conv1_bp10" 1660 | prelu_param { 1661 | channel_shared: 1 1662 | } 1663 | } 1664 | 1665 | 1666 | layer { 1667 | name: "conv2_bp10" 1668 | type: "Deconvolution" 1669 | bottom: "conv1_bp10" 1670 | top: "conv2_bp10" 1671 | param { 1672 | lr_mult: 1 1673 | } 1674 | param { 1675 | lr_mult: 1 1676 | } 1677 | convolution_param { 1678 | num_output: 64 1679 | kernel_size: 8 1680 | stride: 4 1681 | pad: 2 1682 | weight_filler { 1683 | type: "gaussian" 1684 | std: 0.022 1685 | } 1686 | bias_filler { 1687 | type: "constant" 1688 | value: 0 1689 | } 1690 | } 1691 | } 1692 | 1693 | layer { 1694 | name: "relu2_bp10" 1695 | type: "PReLU" 1696 | bottom: "conv2_bp10" 1697 | top: "conv2_bp10" 1698 | prelu_param { 1699 | channel_shared: 1 1700 | } 1701 | } 1702 | 1703 | layer { 1704 | name: "eltwise1_bp10" 1705 | type: "Eltwise" 1706 | bottom: "out_concat_bp9" 1707 | bottom: "conv2_bp10" 1708 | top: "eltwise1_bp10" 1709 | eltwise_param { 1710 | operation: SUM 1711 | coeff: 1 1712 | coeff: -1 1713 | } 1714 | } 1715 | 1716 | layer { 1717 | name: "conv3_bp10" 1718 | type: "Convolution" 1719 | bottom: "eltwise1_bp10" 1720 | top: "conv3_bp10" 1721 | param { 1722 | lr_mult: 1 1723 | } 1724 | param { 1725 | lr_mult: 1 1726 | } 1727 | convolution_param { 1728 | num_output: 64 1729 | kernel_size: 8 1730 | stride: 4 1731 | pad: 2 1732 | weight_filler { 1733 | type: "gaussian" 1734 | std: 0.022 1735 | } 1736 | bias_filler { 1737 | type: "constant" 1738 | value: 0 1739 | } 1740 | } 1741 | } 1742 | 1743 | layer { 1744 | name: "relu3_bp10" 1745 | type: "PReLU" 1746 | bottom: "conv3_bp10" 1747 | top: "conv3_bp10" 1748 | prelu_param { 1749 | channel_shared: 1 1750 | } 1751 | } 1752 | 1753 | layer { 1754 | name: "eltwise2_bp10" 1755 | type: "Eltwise" 1756 | bottom: "conv3_bp10" 1757 | bottom: "conv1_bp10" 1758 | top: "output_bp10" 1759 | eltwise_param { 1760 | operation: 1 1761 | } 1762 | } 1763 | 1764 | layer { 1765 | name: "concat_bp10" 1766 | type: "Concat" 1767 | bottom: "output_bp10" 1768 | bottom: "concat_bp8" 1769 | top: "concat_bp10" 1770 | } 1771 | 1772 | layer { 1773 | name: "out_concat_bp10" 1774 | type: "Convolution" 1775 | bottom: "concat_bp10" 1776 | top: "out_concat_bp10" 1777 | param { 1778 | lr_mult: 1 1779 | } 1780 | param { 1781 | lr_mult: 1 1782 | } 1783 | convolution_param { 1784 | num_output: 64 1785 | kernel_size: 1 1786 | stride: 1 1787 | pad: 0 1788 | weight_filler { 1789 | type: "gaussian" 1790 | std: 0.1767 1791 | } 1792 | bias_filler { 1793 | type: "constant" 1794 | value: 0 1795 | } 1796 | } 1797 | } 1798 | 1799 | layer { 1800 | name: "relu1_concat_bp10" 1801 | type: "PReLU" 1802 | bottom: "out_concat_bp10" 1803 | top: "out_concat_bp10" 1804 | prelu_param { 1805 | channel_shared: 1 1806 | } 1807 | } 1808 | ######################### BP11 ######################### 1809 | layer { 1810 | name: "conv1_bp11" 1811 | type: "Deconvolution" 1812 | bottom: "out_concat_bp10" 1813 | top: "conv1_bp11" 1814 | param { 1815 | lr_mult: 1 1816 | } 1817 | param { 1818 | lr_mult: 1 1819 | } 1820 | convolution_param { 1821 | num_output: 64 1822 | kernel_size: 8 1823 | stride: 4 1824 | pad: 2 1825 | weight_filler { 1826 | type: "gaussian" 1827 | std: 0.022 1828 | } 1829 | bias_filler { 1830 | type: "constant" 1831 | value: 0 1832 | } 1833 | } 1834 | } 1835 | 1836 | layer { 1837 | name: "relu1_bp11" 1838 | type: "PReLU" 1839 | bottom: "conv1_bp11" 1840 | top: "conv1_bp11" 1841 | prelu_param { 1842 | channel_shared: 1 1843 | } 1844 | } 1845 | 1846 | 1847 | layer { 1848 | name: "conv2_bp11" 1849 | type: "Convolution" 1850 | bottom: "conv1_bp11" 1851 | top: "conv2_bp11" 1852 | param { 1853 | lr_mult: 1 1854 | } 1855 | param { 1856 | lr_mult: 1 1857 | } 1858 | convolution_param { 1859 | num_output: 64 1860 | kernel_size: 8 1861 | stride: 4 1862 | pad: 2 1863 | weight_filler { 1864 | type: "gaussian" 1865 | std: 0.022 1866 | } 1867 | bias_filler { 1868 | type: "constant" 1869 | value: 0 1870 | } 1871 | } 1872 | } 1873 | 1874 | layer { 1875 | name: "relu2_bp11" 1876 | type: "PReLU" 1877 | bottom: "conv2_bp11" 1878 | top: "conv2_bp11" 1879 | prelu_param { 1880 | channel_shared: 1 1881 | } 1882 | } 1883 | 1884 | layer { 1885 | name: "eltwise1_bp11" 1886 | type: "Eltwise" 1887 | bottom: "out_concat_bp10" 1888 | bottom: "conv2_bp11" 1889 | top: "eltwise1_bp11" 1890 | eltwise_param { 1891 | operation: SUM 1892 | coeff: 1 1893 | coeff: -1 1894 | } 1895 | } 1896 | 1897 | layer { 1898 | name: "conv3_bp11" 1899 | type: "Deconvolution" 1900 | bottom: "eltwise1_bp11" 1901 | top: "conv3_bp11" 1902 | param { 1903 | lr_mult: 1 1904 | } 1905 | param { 1906 | lr_mult: 1 1907 | } 1908 | convolution_param { 1909 | num_output: 64 1910 | kernel_size: 8 1911 | stride: 4 1912 | pad: 2 1913 | weight_filler { 1914 | type: "gaussian" 1915 | std: 0.022 1916 | } 1917 | bias_filler { 1918 | type: "constant" 1919 | value: 0 1920 | } 1921 | } 1922 | } 1923 | 1924 | layer { 1925 | name: "relu3_bp11" 1926 | type: "PReLU" 1927 | bottom: "conv3_bp11" 1928 | top: "conv3_bp11" 1929 | prelu_param { 1930 | channel_shared: 1 1931 | } 1932 | } 1933 | 1934 | layer { 1935 | name: "eltwise2_bp11" 1936 | type: "Eltwise" 1937 | bottom: "conv3_bp11" 1938 | bottom: "conv1_bp11" 1939 | top: "output_bp11" 1940 | eltwise_param { 1941 | operation: 1 1942 | } 1943 | } 1944 | 1945 | layer { 1946 | name: "concat_bp11" 1947 | type: "Concat" 1948 | bottom: "output_bp11" 1949 | bottom: "concat_bp9" 1950 | top: "concat_bp11" 1951 | } 1952 | 1953 | layer { 1954 | name: "out_concat_bp11" 1955 | type: "Convolution" 1956 | bottom: "concat_bp11" 1957 | top: "out_concat_bp11" 1958 | param { 1959 | lr_mult: 1 1960 | } 1961 | param { 1962 | lr_mult: 1 1963 | } 1964 | convolution_param { 1965 | num_output: 64 1966 | kernel_size: 1 1967 | stride: 1 1968 | pad: 0 1969 | weight_filler { 1970 | type: "gaussian" 1971 | std: 0.1767 1972 | } 1973 | bias_filler { 1974 | type: "constant" 1975 | value: 0 1976 | } 1977 | } 1978 | } 1979 | 1980 | layer { 1981 | name: "relu1_concat_bp11" 1982 | type: "PReLU" 1983 | bottom: "out_concat_bp11" 1984 | top: "out_concat_bp11" 1985 | prelu_param { 1986 | channel_shared: 1 1987 | } 1988 | } 1989 | 1990 | ######################### BP12 ######################### 1991 | layer { 1992 | name: "conv1_bp12" 1993 | type: "Convolution" 1994 | bottom: "out_concat_bp11" 1995 | top: "conv1_bp12" 1996 | param { 1997 | lr_mult: 1 1998 | } 1999 | param { 2000 | lr_mult: 1 2001 | } 2002 | convolution_param { 2003 | num_output: 64 2004 | kernel_size: 8 2005 | stride: 4 2006 | pad: 2 2007 | weight_filler { 2008 | type: "gaussian" 2009 | std: 0.022 2010 | } 2011 | bias_filler { 2012 | type: "constant" 2013 | value: 0 2014 | } 2015 | } 2016 | } 2017 | 2018 | layer { 2019 | name: "relu1_bp12" 2020 | type: "PReLU" 2021 | bottom: "conv1_bp12" 2022 | top: "conv1_bp12" 2023 | prelu_param { 2024 | channel_shared: 1 2025 | } 2026 | } 2027 | 2028 | 2029 | layer { 2030 | name: "conv2_bp12" 2031 | type: "Deconvolution" 2032 | bottom: "conv1_bp12" 2033 | top: "conv2_bp12" 2034 | param { 2035 | lr_mult: 1 2036 | } 2037 | param { 2038 | lr_mult: 1 2039 | } 2040 | convolution_param { 2041 | num_output: 64 2042 | kernel_size: 8 2043 | stride: 4 2044 | pad: 2 2045 | weight_filler { 2046 | type: "gaussian" 2047 | std: 0.022 2048 | } 2049 | bias_filler { 2050 | type: "constant" 2051 | value: 0 2052 | } 2053 | } 2054 | } 2055 | 2056 | layer { 2057 | name: "relu2_bp12" 2058 | type: "PReLU" 2059 | bottom: "conv2_bp12" 2060 | top: "conv2_bp12" 2061 | prelu_param { 2062 | channel_shared: 1 2063 | } 2064 | } 2065 | 2066 | layer { 2067 | name: "eltwise1_bp12" 2068 | type: "Eltwise" 2069 | bottom: "out_concat_bp11" 2070 | bottom: "conv2_bp12" 2071 | top: "eltwise1_bp12" 2072 | eltwise_param { 2073 | operation: SUM 2074 | coeff: 1 2075 | coeff: -1 2076 | } 2077 | } 2078 | 2079 | layer { 2080 | name: "conv3_bp12" 2081 | type: "Convolution" 2082 | bottom: "eltwise1_bp12" 2083 | top: "conv3_bp12" 2084 | param { 2085 | lr_mult: 1 2086 | } 2087 | param { 2088 | lr_mult: 1 2089 | } 2090 | convolution_param { 2091 | num_output: 64 2092 | kernel_size: 8 2093 | stride: 4 2094 | pad: 2 2095 | weight_filler { 2096 | type: "gaussian" 2097 | std: 0.022 2098 | } 2099 | bias_filler { 2100 | type: "constant" 2101 | value: 0 2102 | } 2103 | } 2104 | } 2105 | 2106 | layer { 2107 | name: "relu3_bp12" 2108 | type: "PReLU" 2109 | bottom: "conv3_bp12" 2110 | top: "conv3_bp12" 2111 | prelu_param { 2112 | channel_shared: 1 2113 | } 2114 | } 2115 | 2116 | layer { 2117 | name: "eltwise2_bp12" 2118 | type: "Eltwise" 2119 | bottom: "conv3_bp12" 2120 | bottom: "conv1_bp12" 2121 | top: "output_bp12" 2122 | eltwise_param { 2123 | operation: 1 2124 | } 2125 | } 2126 | 2127 | layer { 2128 | name: "concat_bp12" 2129 | type: "Concat" 2130 | bottom: "output_bp12" 2131 | bottom: "concat_bp10" 2132 | top: "concat_bp12" 2133 | } 2134 | 2135 | layer { 2136 | name: "out_concat_bp12" 2137 | type: "Convolution" 2138 | bottom: "concat_bp12" 2139 | top: "out_concat_bp12" 2140 | param { 2141 | lr_mult: 1 2142 | } 2143 | param { 2144 | lr_mult: 1 2145 | } 2146 | convolution_param { 2147 | num_output: 64 2148 | kernel_size: 1 2149 | stride: 1 2150 | pad: 0 2151 | weight_filler { 2152 | type: "gaussian" 2153 | std: 0.1767 2154 | } 2155 | bias_filler { 2156 | type: "constant" 2157 | value: 0 2158 | } 2159 | } 2160 | } 2161 | 2162 | layer { 2163 | name: "relu1_concat_bp12" 2164 | type: "PReLU" 2165 | bottom: "out_concat_bp12" 2166 | top: "out_concat_bp12" 2167 | prelu_param { 2168 | channel_shared: 1 2169 | } 2170 | } 2171 | ######################### BP13 ######################### 2172 | layer { 2173 | name: "conv1_bp13" 2174 | type: "Deconvolution" 2175 | bottom: "out_concat_bp12" 2176 | top: "conv1_bp13" 2177 | param { 2178 | lr_mult: 1 2179 | } 2180 | param { 2181 | lr_mult: 1 2182 | } 2183 | convolution_param { 2184 | num_output: 64 2185 | kernel_size: 8 2186 | stride: 4 2187 | pad: 2 2188 | weight_filler { 2189 | type: "gaussian" 2190 | std: 0.022 2191 | } 2192 | bias_filler { 2193 | type: "constant" 2194 | value: 0 2195 | } 2196 | } 2197 | } 2198 | 2199 | layer { 2200 | name: "relu1_bp13" 2201 | type: "PReLU" 2202 | bottom: "conv1_bp13" 2203 | top: "conv1_bp13" 2204 | prelu_param { 2205 | channel_shared: 1 2206 | } 2207 | } 2208 | 2209 | 2210 | layer { 2211 | name: "conv2_bp13" 2212 | type: "Convolution" 2213 | bottom: "conv1_bp13" 2214 | top: "conv2_bp13" 2215 | param { 2216 | lr_mult: 1 2217 | } 2218 | param { 2219 | lr_mult: 1 2220 | } 2221 | convolution_param { 2222 | num_output: 64 2223 | kernel_size: 8 2224 | stride: 4 2225 | pad: 2 2226 | weight_filler { 2227 | type: "gaussian" 2228 | std: 0.022 2229 | } 2230 | bias_filler { 2231 | type: "constant" 2232 | value: 0 2233 | } 2234 | } 2235 | } 2236 | 2237 | layer { 2238 | name: "relu2_bp13" 2239 | type: "PReLU" 2240 | bottom: "conv2_bp13" 2241 | top: "conv2_bp13" 2242 | prelu_param { 2243 | channel_shared: 1 2244 | } 2245 | } 2246 | 2247 | layer { 2248 | name: "eltwise1_bp13" 2249 | type: "Eltwise" 2250 | bottom: "out_concat_bp12" 2251 | bottom: "conv2_bp13" 2252 | top: "eltwise1_bp13" 2253 | eltwise_param { 2254 | operation: SUM 2255 | coeff: 1 2256 | coeff: -1 2257 | } 2258 | } 2259 | 2260 | layer { 2261 | name: "conv3_bp13" 2262 | type: "Deconvolution" 2263 | bottom: "eltwise1_bp13" 2264 | top: "conv3_bp13" 2265 | param { 2266 | lr_mult: 1 2267 | } 2268 | param { 2269 | lr_mult: 1 2270 | } 2271 | convolution_param { 2272 | num_output: 64 2273 | kernel_size: 8 2274 | stride: 4 2275 | pad: 2 2276 | weight_filler { 2277 | type: "gaussian" 2278 | std: 0.022 2279 | } 2280 | bias_filler { 2281 | type: "constant" 2282 | value: 0 2283 | } 2284 | } 2285 | } 2286 | 2287 | layer { 2288 | name: "relu3_bp13" 2289 | type: "PReLU" 2290 | bottom: "conv3_bp13" 2291 | top: "conv3_bp13" 2292 | prelu_param { 2293 | channel_shared: 1 2294 | } 2295 | } 2296 | 2297 | layer { 2298 | name: "eltwise2_bp13" 2299 | type: "Eltwise" 2300 | bottom: "conv3_bp13" 2301 | bottom: "conv1_bp13" 2302 | top: "output_bp13" 2303 | eltwise_param { 2304 | operation: 1 2305 | } 2306 | } 2307 | 2308 | layer { 2309 | name: "concat_bp13" 2310 | type: "Concat" 2311 | bottom: "output_bp13" 2312 | bottom: "concat_bp11" 2313 | top: "concat_bp13" 2314 | } 2315 | 2316 | ######################### END BP ######################### 2317 | 2318 | layer { 2319 | name: "conv_final" 2320 | type: "Convolution" 2321 | bottom: "concat_bp13" 2322 | top: "conv_final" 2323 | param { 2324 | lr_mult: 1 2325 | } 2326 | param { 2327 | lr_mult: 1 2328 | } 2329 | convolution_param { 2330 | num_output: 3 2331 | kernel_size: 3 2332 | stride: 1 2333 | pad: 1 2334 | weight_filler { 2335 | type: "gaussian" 2336 | std: 0.1 2337 | } 2338 | bias_filler { 2339 | type: "constant" 2340 | value: 0 2341 | } 2342 | } 2343 | } 2344 | -------------------------------------------------------------------------------- /caffe/DBPN_mat_8x.prototxt: -------------------------------------------------------------------------------- 1 | name: "DRBPSR" 2 | input: "data" 3 | input_dim: 1 4 | input_dim: 3 5 | input_dim: 73 6 | input_dim: 48 7 | layer { 8 | name: "conv0_1" 9 | type: "Convolution" 10 | bottom: "data" 11 | top: "conv0_1" 12 | param { 13 | lr_mult: 1 14 | } 15 | param { 16 | lr_mult: 1 17 | } 18 | convolution_param { 19 | num_output: 256 20 | kernel_size: 3 21 | stride: 1 22 | pad: 1 23 | weight_filler { 24 | type: "gaussian" 25 | std: 0.02946 26 | } 27 | bias_filler { 28 | type: "constant" 29 | value: 0 30 | } 31 | } 32 | } 33 | 34 | layer { 35 | name: "relu0_1" 36 | type: "PReLU" 37 | bottom: "conv0_1" 38 | top: "conv0_1" 39 | prelu_param { 40 | channel_shared: 1 41 | } 42 | } 43 | 44 | layer { 45 | name: "conv1" 46 | type: "Convolution" 47 | bottom: "conv0_1" 48 | top: "conv1" 49 | param { 50 | lr_mult: 1 51 | } 52 | param { 53 | lr_mult: 1 54 | } 55 | convolution_param { 56 | num_output: 64 57 | kernel_size: 1 58 | stride: 1 59 | pad: 0 60 | weight_filler { 61 | type: "gaussian" 62 | std: 0.1767 63 | } 64 | bias_filler { 65 | type: "constant" 66 | value: 0 67 | } 68 | } 69 | } 70 | 71 | layer { 72 | name: "relu1" 73 | type: "PReLU" 74 | bottom: "conv1" 75 | top: "conv1" 76 | prelu_param { 77 | channel_shared: 1 78 | } 79 | } 80 | 81 | ######################### BP1 ######################### 82 | layer { 83 | name: "conv1_bp1" 84 | type: "Deconvolution" 85 | bottom: "conv1" 86 | top: "conv1_bp1" 87 | param { 88 | lr_mult: 1 89 | } 90 | param { 91 | lr_mult: 1 92 | } 93 | convolution_param { 94 | num_output: 64 95 | kernel_size: 12 96 | stride: 8 97 | pad: 2 98 | weight_filler { 99 | type: "gaussian" 100 | std: 0.0147 101 | } 102 | bias_filler { 103 | type: "constant" 104 | value: 0 105 | } 106 | } 107 | } 108 | 109 | layer { 110 | name: "relu1_bp1" 111 | type: "PReLU" 112 | bottom: "conv1_bp1" 113 | top: "conv1_bp1" 114 | prelu_param { 115 | channel_shared: 1 116 | } 117 | } 118 | 119 | 120 | layer { 121 | name: "conv2_bp1" 122 | type: "Convolution" 123 | bottom: "conv1_bp1" 124 | top: "conv2_bp1" 125 | param { 126 | lr_mult: 1 127 | } 128 | param { 129 | lr_mult: 1 130 | } 131 | convolution_param { 132 | num_output: 64 133 | kernel_size: 12 134 | stride: 8 135 | pad: 2 136 | weight_filler { 137 | type: "gaussian" 138 | std: 0.0147 139 | } 140 | bias_filler { 141 | type: "constant" 142 | value: 0 143 | } 144 | } 145 | } 146 | 147 | layer { 148 | name: "relu2_bp1" 149 | type: "PReLU" 150 | bottom: "conv2_bp1" 151 | top: "conv2_bp1" 152 | prelu_param { 153 | channel_shared: 1 154 | } 155 | } 156 | 157 | layer { 158 | name: "eltwise1_bp1" 159 | type: "Eltwise" 160 | bottom: "conv1" 161 | bottom: "conv2_bp1" 162 | top: "eltwise1_bp1" 163 | eltwise_param { 164 | operation: SUM 165 | coeff: 1 166 | coeff: -1 167 | } 168 | } 169 | 170 | layer { 171 | name: "conv3_bp1" 172 | type: "Deconvolution" 173 | bottom: "eltwise1_bp1" 174 | top: "conv3_bp1" 175 | param { 176 | lr_mult: 1 177 | } 178 | param { 179 | lr_mult: 1 180 | } 181 | convolution_param { 182 | num_output: 64 183 | kernel_size: 12 184 | stride: 8 185 | pad: 2 186 | weight_filler { 187 | type: "gaussian" 188 | std: 0.0147 189 | } 190 | bias_filler { 191 | type: "constant" 192 | value: 0 193 | } 194 | } 195 | } 196 | 197 | layer { 198 | name: "relu3_bp1" 199 | type: "PReLU" 200 | bottom: "conv3_bp1" 201 | top: "conv3_bp1" 202 | prelu_param { 203 | channel_shared: 1 204 | } 205 | } 206 | 207 | layer { 208 | name: "eltwise2_bp1" 209 | type: "Eltwise" 210 | bottom: "conv3_bp1" 211 | bottom: "conv1_bp1" 212 | top: "output_bp1" 213 | eltwise_param { 214 | operation: 1 215 | } 216 | } 217 | 218 | ######################### BP2 ######################### 219 | layer { 220 | name: "conv1_bp2" 221 | type: "Convolution" 222 | bottom: "output_bp1" 223 | top: "conv1_bp2" 224 | param { 225 | lr_mult: 1 226 | } 227 | param { 228 | lr_mult: 1 229 | } 230 | convolution_param { 231 | num_output: 64 232 | kernel_size: 12 233 | stride: 8 234 | pad: 2 235 | weight_filler { 236 | type: "gaussian" 237 | std: 0.0147 238 | } 239 | bias_filler { 240 | type: "constant" 241 | value: 0 242 | } 243 | } 244 | } 245 | 246 | layer { 247 | name: "relu1_bp2" 248 | type: "PReLU" 249 | bottom: "conv1_bp2" 250 | top: "conv1_bp2" 251 | prelu_param { 252 | channel_shared: 1 253 | } 254 | } 255 | 256 | 257 | layer { 258 | name: "conv2_bp2" 259 | type: "Deconvolution" 260 | bottom: "conv1_bp2" 261 | top: "conv2_bp2" 262 | param { 263 | lr_mult: 1 264 | } 265 | param { 266 | lr_mult: 1 267 | } 268 | convolution_param { 269 | num_output: 64 270 | kernel_size: 12 271 | stride: 8 272 | pad: 2 273 | weight_filler { 274 | type: "gaussian" 275 | std: 0.0147 276 | } 277 | bias_filler { 278 | type: "constant" 279 | value: 0 280 | } 281 | } 282 | } 283 | 284 | layer { 285 | name: "relu2_bp2" 286 | type: "PReLU" 287 | bottom: "conv2_bp2" 288 | top: "conv2_bp2" 289 | prelu_param { 290 | channel_shared: 1 291 | } 292 | } 293 | 294 | layer { 295 | name: "eltwise1_bp2" 296 | type: "Eltwise" 297 | bottom: "output_bp1" 298 | bottom: "conv2_bp2" 299 | top: "eltwise1_bp2" 300 | eltwise_param { 301 | operation: SUM 302 | coeff: 1 303 | coeff: -1 304 | } 305 | } 306 | 307 | layer { 308 | name: "conv3_bp2" 309 | type: "Convolution" 310 | bottom: "eltwise1_bp2" 311 | top: "conv3_bp2" 312 | param { 313 | lr_mult: 1 314 | } 315 | param { 316 | lr_mult: 1 317 | } 318 | convolution_param { 319 | num_output: 64 320 | kernel_size: 12 321 | stride: 8 322 | pad: 2 323 | weight_filler { 324 | type: "gaussian" 325 | std: 0.0147 326 | } 327 | bias_filler { 328 | type: "constant" 329 | value: 0 330 | } 331 | } 332 | } 333 | 334 | layer { 335 | name: "relu3_bp2" 336 | type: "PReLU" 337 | bottom: "conv3_bp2" 338 | top: "conv3_bp2" 339 | prelu_param { 340 | channel_shared: 1 341 | } 342 | } 343 | 344 | layer { 345 | name: "eltwise2_bp2" 346 | type: "Eltwise" 347 | bottom: "conv3_bp2" 348 | bottom: "conv1_bp2" 349 | top: "output_bp2" 350 | eltwise_param { 351 | operation: 1 352 | } 353 | } 354 | 355 | #######Start dense######### 356 | ######################### BP3 ######################### 357 | layer { 358 | name: "conv1_bp3" 359 | type: "Deconvolution" 360 | bottom: "output_bp2" 361 | top: "conv1_bp3" 362 | param { 363 | lr_mult: 1 364 | } 365 | param { 366 | lr_mult: 1 367 | } 368 | convolution_param { 369 | num_output: 64 370 | kernel_size: 12 371 | stride: 8 372 | pad: 2 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.0147 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | 384 | layer { 385 | name: "relu1_bp3" 386 | type: "PReLU" 387 | bottom: "conv1_bp3" 388 | top: "conv1_bp3" 389 | prelu_param { 390 | channel_shared: 1 391 | } 392 | } 393 | 394 | 395 | layer { 396 | name: "conv2_bp3" 397 | type: "Convolution" 398 | bottom: "conv1_bp3" 399 | top: "conv2_bp3" 400 | param { 401 | lr_mult: 1 402 | } 403 | param { 404 | lr_mult: 1 405 | } 406 | convolution_param { 407 | num_output: 64 408 | kernel_size: 12 409 | stride: 8 410 | pad: 2 411 | weight_filler { 412 | type: "gaussian" 413 | std: 0.0147 414 | } 415 | bias_filler { 416 | type: "constant" 417 | value: 0 418 | } 419 | } 420 | } 421 | 422 | layer { 423 | name: "relu2_bp3" 424 | type: "PReLU" 425 | bottom: "conv2_bp3" 426 | top: "conv2_bp3" 427 | prelu_param { 428 | channel_shared: 1 429 | } 430 | } 431 | 432 | layer { 433 | name: "eltwise1_bp3" 434 | type: "Eltwise" 435 | bottom: "output_bp2" 436 | bottom: "conv2_bp3" 437 | top: "eltwise1_bp3" 438 | eltwise_param { 439 | operation: SUM 440 | coeff: 1 441 | coeff: -1 442 | } 443 | } 444 | 445 | layer { 446 | name: "conv3_bp3" 447 | type: "Deconvolution" 448 | bottom: "eltwise1_bp3" 449 | top: "conv3_bp3" 450 | param { 451 | lr_mult: 1 452 | } 453 | param { 454 | lr_mult: 1 455 | } 456 | convolution_param { 457 | num_output: 64 458 | kernel_size: 12 459 | stride: 8 460 | pad: 2 461 | weight_filler { 462 | type: "gaussian" 463 | std: 0.0147 464 | } 465 | bias_filler { 466 | type: "constant" 467 | value: 0 468 | } 469 | } 470 | } 471 | 472 | layer { 473 | name: "relu3_bp3" 474 | type: "PReLU" 475 | bottom: "conv3_bp3" 476 | top: "conv3_bp3" 477 | prelu_param { 478 | channel_shared: 1 479 | } 480 | } 481 | 482 | layer { 483 | name: "eltwise2_bp3" 484 | type: "Eltwise" 485 | bottom: "conv3_bp3" 486 | bottom: "conv1_bp3" 487 | top: "output_bp3" 488 | eltwise_param { 489 | operation: 1 490 | } 491 | } 492 | 493 | layer { 494 | name: "concat_bp3" 495 | type: "Concat" 496 | bottom: "output_bp3" 497 | bottom: "output_bp1" 498 | top: "concat_bp3" 499 | } 500 | 501 | layer { 502 | name: "out_concat_bp3" 503 | type: "Convolution" 504 | bottom: "concat_bp3" 505 | top: "out_concat_bp3" 506 | param { 507 | lr_mult: 1 508 | } 509 | param { 510 | lr_mult: 1 511 | } 512 | convolution_param { 513 | num_output: 64 514 | kernel_size: 1 515 | stride: 1 516 | pad: 0 517 | weight_filler { 518 | type: "gaussian" 519 | std: 0.1767 520 | } 521 | bias_filler { 522 | type: "constant" 523 | value: 0 524 | } 525 | } 526 | } 527 | 528 | layer { 529 | name: "relu1_concat_bp3" 530 | type: "PReLU" 531 | bottom: "out_concat_bp3" 532 | top: "out_concat_bp3" 533 | prelu_param { 534 | channel_shared: 1 535 | } 536 | } 537 | 538 | ######################### BP4 ######################### 539 | layer { 540 | name: "conv1_bp4" 541 | type: "Convolution" 542 | bottom: "out_concat_bp3" 543 | top: "conv1_bp4" 544 | param { 545 | lr_mult: 1 546 | } 547 | param { 548 | lr_mult: 1 549 | } 550 | convolution_param { 551 | num_output: 64 552 | kernel_size: 12 553 | stride: 8 554 | pad: 2 555 | weight_filler { 556 | type: "gaussian" 557 | std: 0.0147 558 | } 559 | bias_filler { 560 | type: "constant" 561 | value: 0 562 | } 563 | } 564 | } 565 | 566 | layer { 567 | name: "relu1_bp4" 568 | type: "PReLU" 569 | bottom: "conv1_bp4" 570 | top: "conv1_bp4" 571 | prelu_param { 572 | channel_shared: 1 573 | } 574 | } 575 | 576 | 577 | layer { 578 | name: "conv2_bp4" 579 | type: "Deconvolution" 580 | bottom: "conv1_bp4" 581 | top: "conv2_bp4" 582 | param { 583 | lr_mult: 1 584 | } 585 | param { 586 | lr_mult: 1 587 | } 588 | convolution_param { 589 | num_output: 64 590 | kernel_size: 12 591 | stride: 8 592 | pad: 2 593 | weight_filler { 594 | type: "gaussian" 595 | std: 0.0147 596 | } 597 | bias_filler { 598 | type: "constant" 599 | value: 0 600 | } 601 | } 602 | } 603 | 604 | layer { 605 | name: "relu2_bp4" 606 | type: "PReLU" 607 | bottom: "conv2_bp4" 608 | top: "conv2_bp4" 609 | prelu_param { 610 | channel_shared: 1 611 | } 612 | } 613 | 614 | layer { 615 | name: "eltwise1_bp4" 616 | type: "Eltwise" 617 | bottom: "out_concat_bp3" 618 | bottom: "conv2_bp4" 619 | top: "eltwise1_bp4" 620 | eltwise_param { 621 | operation: SUM 622 | coeff: 1 623 | coeff: -1 624 | } 625 | } 626 | 627 | layer { 628 | name: "conv3_bp4" 629 | type: "Convolution" 630 | bottom: "eltwise1_bp4" 631 | top: "conv3_bp4" 632 | param { 633 | lr_mult: 1 634 | } 635 | param { 636 | lr_mult: 1 637 | } 638 | convolution_param { 639 | num_output: 64 640 | kernel_size: 12 641 | stride: 8 642 | pad: 2 643 | weight_filler { 644 | type: "gaussian" 645 | std: 0.0147 646 | } 647 | bias_filler { 648 | type: "constant" 649 | value: 0 650 | } 651 | } 652 | } 653 | 654 | layer { 655 | name: "relu3_bp4" 656 | type: "PReLU" 657 | bottom: "conv3_bp4" 658 | top: "conv3_bp4" 659 | prelu_param { 660 | channel_shared: 1 661 | } 662 | } 663 | 664 | layer { 665 | name: "eltwise2_bp4" 666 | type: "Eltwise" 667 | bottom: "conv3_bp4" 668 | bottom: "conv1_bp4" 669 | top: "output_bp4" 670 | eltwise_param { 671 | operation: 1 672 | } 673 | } 674 | 675 | layer { 676 | name: "concat_bp4" 677 | type: "Concat" 678 | bottom: "output_bp4" 679 | bottom: "output_bp2" 680 | top: "concat_bp4" 681 | } 682 | 683 | layer { 684 | name: "out_concat_bp4" 685 | type: "Convolution" 686 | bottom: "concat_bp4" 687 | top: "out_concat_bp4" 688 | param { 689 | lr_mult: 1 690 | } 691 | param { 692 | lr_mult: 1 693 | } 694 | convolution_param { 695 | num_output: 64 696 | kernel_size: 1 697 | stride: 1 698 | pad: 0 699 | weight_filler { 700 | type: "gaussian" 701 | std: 0.1767 702 | } 703 | bias_filler { 704 | type: "constant" 705 | value: 0 706 | } 707 | } 708 | } 709 | 710 | layer { 711 | name: "relu1_concat_bp4" 712 | type: "PReLU" 713 | bottom: "out_concat_bp4" 714 | top: "out_concat_bp4" 715 | prelu_param { 716 | channel_shared: 1 717 | } 718 | } 719 | 720 | ######################### BP5 ######################### 721 | layer { 722 | name: "conv1_bp5" 723 | type: "Deconvolution" 724 | bottom: "out_concat_bp4" 725 | top: "conv1_bp5" 726 | param { 727 | lr_mult: 1 728 | } 729 | param { 730 | lr_mult: 1 731 | } 732 | convolution_param { 733 | num_output: 64 734 | kernel_size: 12 735 | stride: 8 736 | pad: 2 737 | weight_filler { 738 | type: "gaussian" 739 | std: 0.0147 740 | } 741 | bias_filler { 742 | type: "constant" 743 | value: 0 744 | } 745 | } 746 | } 747 | 748 | layer { 749 | name: "relu1_bp5" 750 | type: "PReLU" 751 | bottom: "conv1_bp5" 752 | top: "conv1_bp5" 753 | prelu_param { 754 | channel_shared: 1 755 | } 756 | } 757 | 758 | 759 | layer { 760 | name: "conv2_bp5" 761 | type: "Convolution" 762 | bottom: "conv1_bp5" 763 | top: "conv2_bp5" 764 | param { 765 | lr_mult: 1 766 | } 767 | param { 768 | lr_mult: 1 769 | } 770 | convolution_param { 771 | num_output: 64 772 | kernel_size: 12 773 | stride: 8 774 | pad: 2 775 | weight_filler { 776 | type: "gaussian" 777 | std: 0.0147 778 | } 779 | bias_filler { 780 | type: "constant" 781 | value: 0 782 | } 783 | } 784 | } 785 | 786 | layer { 787 | name: "relu2_bp5" 788 | type: "PReLU" 789 | bottom: "conv2_bp5" 790 | top: "conv2_bp5" 791 | prelu_param { 792 | channel_shared: 1 793 | } 794 | } 795 | 796 | layer { 797 | name: "eltwise1_bp5" 798 | type: "Eltwise" 799 | bottom: "out_concat_bp4" 800 | bottom: "conv2_bp5" 801 | top: "eltwise1_bp5" 802 | eltwise_param { 803 | operation: SUM 804 | coeff: 1 805 | coeff: -1 806 | } 807 | } 808 | 809 | layer { 810 | name: "conv3_bp5" 811 | type: "Deconvolution" 812 | bottom: "eltwise1_bp5" 813 | top: "conv3_bp5" 814 | param { 815 | lr_mult: 1 816 | } 817 | param { 818 | lr_mult: 1 819 | } 820 | convolution_param { 821 | num_output: 64 822 | kernel_size: 12 823 | stride: 8 824 | pad: 2 825 | weight_filler { 826 | type: "gaussian" 827 | std: 0.0147 828 | } 829 | bias_filler { 830 | type: "constant" 831 | value: 0 832 | } 833 | } 834 | } 835 | 836 | layer { 837 | name: "relu3_bp5" 838 | type: "PReLU" 839 | bottom: "conv3_bp5" 840 | top: "conv3_bp5" 841 | prelu_param { 842 | channel_shared: 1 843 | } 844 | } 845 | 846 | layer { 847 | name: "eltwise2_bp5" 848 | type: "Eltwise" 849 | bottom: "conv3_bp5" 850 | bottom: "conv1_bp5" 851 | top: "output_bp5" 852 | eltwise_param { 853 | operation: 1 854 | } 855 | } 856 | 857 | layer { 858 | name: "concat_bp5" 859 | type: "Concat" 860 | bottom: "output_bp5" 861 | bottom: "concat_bp3" 862 | top: "concat_bp5" 863 | } 864 | 865 | layer { 866 | name: "out_concat_bp5" 867 | type: "Convolution" 868 | bottom: "concat_bp5" 869 | top: "out_concat_bp5" 870 | param { 871 | lr_mult: 1 872 | } 873 | param { 874 | lr_mult: 1 875 | } 876 | convolution_param { 877 | num_output: 64 878 | kernel_size: 1 879 | stride: 1 880 | pad: 0 881 | weight_filler { 882 | type: "gaussian" 883 | std: 0.1767 884 | } 885 | bias_filler { 886 | type: "constant" 887 | value: 0 888 | } 889 | } 890 | } 891 | 892 | layer { 893 | name: "relu1_concat_bp5" 894 | type: "PReLU" 895 | bottom: "out_concat_bp5" 896 | top: "out_concat_bp5" 897 | prelu_param { 898 | channel_shared: 1 899 | } 900 | } 901 | ######################### BP6 ######################### 902 | layer { 903 | name: "conv1_bp6" 904 | type: "Convolution" 905 | bottom: "out_concat_bp5" 906 | top: "conv1_bp6" 907 | param { 908 | lr_mult: 1 909 | } 910 | param { 911 | lr_mult: 1 912 | } 913 | convolution_param { 914 | num_output: 64 915 | kernel_size: 12 916 | stride: 8 917 | pad: 2 918 | weight_filler { 919 | type: "gaussian" 920 | std: 0.0147 921 | } 922 | bias_filler { 923 | type: "constant" 924 | value: 0 925 | } 926 | } 927 | } 928 | 929 | layer { 930 | name: "relu1_bp6" 931 | type: "PReLU" 932 | bottom: "conv1_bp6" 933 | top: "conv1_bp6" 934 | prelu_param { 935 | channel_shared: 1 936 | } 937 | } 938 | 939 | 940 | layer { 941 | name: "conv2_bp6" 942 | type: "Deconvolution" 943 | bottom: "conv1_bp6" 944 | top: "conv2_bp6" 945 | param { 946 | lr_mult: 1 947 | } 948 | param { 949 | lr_mult: 1 950 | } 951 | convolution_param { 952 | num_output: 64 953 | kernel_size: 12 954 | stride: 8 955 | pad: 2 956 | weight_filler { 957 | type: "gaussian" 958 | std: 0.0147 959 | } 960 | bias_filler { 961 | type: "constant" 962 | value: 0 963 | } 964 | } 965 | } 966 | 967 | layer { 968 | name: "relu2_bp6" 969 | type: "PReLU" 970 | bottom: "conv2_bp6" 971 | top: "conv2_bp6" 972 | prelu_param { 973 | channel_shared: 1 974 | } 975 | } 976 | 977 | layer { 978 | name: "eltwise1_bp6" 979 | type: "Eltwise" 980 | bottom: "out_concat_bp5" 981 | bottom: "conv2_bp6" 982 | top: "eltwise1_bp6" 983 | eltwise_param { 984 | operation: SUM 985 | coeff: 1 986 | coeff: -1 987 | } 988 | } 989 | 990 | layer { 991 | name: "conv3_bp6" 992 | type: "Convolution" 993 | bottom: "eltwise1_bp6" 994 | top: "conv3_bp6" 995 | param { 996 | lr_mult: 1 997 | } 998 | param { 999 | lr_mult: 1 1000 | } 1001 | convolution_param { 1002 | num_output: 64 1003 | kernel_size: 12 1004 | stride: 8 1005 | pad: 2 1006 | weight_filler { 1007 | type: "gaussian" 1008 | std: 0.0147 1009 | } 1010 | bias_filler { 1011 | type: "constant" 1012 | value: 0 1013 | } 1014 | } 1015 | } 1016 | 1017 | layer { 1018 | name: "relu3_bp6" 1019 | type: "PReLU" 1020 | bottom: "conv3_bp6" 1021 | top: "conv3_bp6" 1022 | prelu_param { 1023 | channel_shared: 1 1024 | } 1025 | } 1026 | 1027 | layer { 1028 | name: "eltwise2_bp6" 1029 | type: "Eltwise" 1030 | bottom: "conv3_bp6" 1031 | bottom: "conv1_bp6" 1032 | top: "output_bp6" 1033 | eltwise_param { 1034 | operation: 1 1035 | } 1036 | } 1037 | 1038 | layer { 1039 | name: "concat_bp6" 1040 | type: "Concat" 1041 | bottom: "output_bp6" 1042 | bottom: "concat_bp4" 1043 | top: "concat_bp6" 1044 | } 1045 | 1046 | layer { 1047 | name: "out_concat_bp6" 1048 | type: "Convolution" 1049 | bottom: "concat_bp6" 1050 | top: "out_concat_bp6" 1051 | param { 1052 | lr_mult: 1 1053 | } 1054 | param { 1055 | lr_mult: 1 1056 | } 1057 | convolution_param { 1058 | num_output: 64 1059 | kernel_size: 1 1060 | stride: 1 1061 | pad: 0 1062 | weight_filler { 1063 | type: "gaussian" 1064 | std: 0.1767 1065 | } 1066 | bias_filler { 1067 | type: "constant" 1068 | value: 0 1069 | } 1070 | } 1071 | } 1072 | 1073 | layer { 1074 | name: "relu1_concat_bp6" 1075 | type: "PReLU" 1076 | bottom: "out_concat_bp6" 1077 | top: "out_concat_bp6" 1078 | prelu_param { 1079 | channel_shared: 1 1080 | } 1081 | } 1082 | 1083 | ######################### BP7 ######################### 1084 | layer { 1085 | name: "conv1_bp7" 1086 | type: "Deconvolution" 1087 | bottom: "out_concat_bp6" 1088 | top: "conv1_bp7" 1089 | param { 1090 | lr_mult: 1 1091 | } 1092 | param { 1093 | lr_mult: 1 1094 | } 1095 | convolution_param { 1096 | num_output: 64 1097 | kernel_size: 12 1098 | stride: 8 1099 | pad: 2 1100 | weight_filler { 1101 | type: "gaussian" 1102 | std: 0.0147 1103 | } 1104 | bias_filler { 1105 | type: "constant" 1106 | value: 0 1107 | } 1108 | } 1109 | } 1110 | 1111 | layer { 1112 | name: "relu1_bp7" 1113 | type: "PReLU" 1114 | bottom: "conv1_bp7" 1115 | top: "conv1_bp7" 1116 | prelu_param { 1117 | channel_shared: 1 1118 | } 1119 | } 1120 | 1121 | 1122 | layer { 1123 | name: "conv2_bp7" 1124 | type: "Convolution" 1125 | bottom: "conv1_bp7" 1126 | top: "conv2_bp7" 1127 | param { 1128 | lr_mult: 1 1129 | } 1130 | param { 1131 | lr_mult: 1 1132 | } 1133 | convolution_param { 1134 | num_output: 64 1135 | kernel_size: 12 1136 | stride: 8 1137 | pad: 2 1138 | weight_filler { 1139 | type: "gaussian" 1140 | std: 0.0147 1141 | } 1142 | bias_filler { 1143 | type: "constant" 1144 | value: 0 1145 | } 1146 | } 1147 | } 1148 | 1149 | layer { 1150 | name: "relu2_bp7" 1151 | type: "PReLU" 1152 | bottom: "conv2_bp7" 1153 | top: "conv2_bp7" 1154 | prelu_param { 1155 | channel_shared: 1 1156 | } 1157 | } 1158 | 1159 | layer { 1160 | name: "eltwise1_bp7" 1161 | type: "Eltwise" 1162 | bottom: "out_concat_bp6" 1163 | bottom: "conv2_bp7" 1164 | top: "eltwise1_bp7" 1165 | eltwise_param { 1166 | operation: SUM 1167 | coeff: 1 1168 | coeff: -1 1169 | } 1170 | } 1171 | 1172 | layer { 1173 | name: "conv3_bp7" 1174 | type: "Deconvolution" 1175 | bottom: "eltwise1_bp7" 1176 | top: "conv3_bp7" 1177 | param { 1178 | lr_mult: 1 1179 | } 1180 | param { 1181 | lr_mult: 1 1182 | } 1183 | convolution_param { 1184 | num_output: 64 1185 | kernel_size: 12 1186 | stride: 8 1187 | pad: 2 1188 | weight_filler { 1189 | type: "gaussian" 1190 | std: 0.0147 1191 | } 1192 | bias_filler { 1193 | type: "constant" 1194 | value: 0 1195 | } 1196 | } 1197 | } 1198 | 1199 | layer { 1200 | name: "relu3_bp7" 1201 | type: "PReLU" 1202 | bottom: "conv3_bp7" 1203 | top: "conv3_bp7" 1204 | prelu_param { 1205 | channel_shared: 1 1206 | } 1207 | } 1208 | 1209 | layer { 1210 | name: "eltwise2_bp7" 1211 | type: "Eltwise" 1212 | bottom: "conv3_bp7" 1213 | bottom: "conv1_bp7" 1214 | top: "output_bp7" 1215 | eltwise_param { 1216 | operation: 1 1217 | } 1218 | } 1219 | 1220 | layer { 1221 | name: "concat_bp7" 1222 | type: "Concat" 1223 | bottom: "output_bp7" 1224 | bottom: "concat_bp5" 1225 | top: "concat_bp7" 1226 | } 1227 | 1228 | layer { 1229 | name: "out_concat_bp7" 1230 | type: "Convolution" 1231 | bottom: "concat_bp7" 1232 | top: "out_concat_bp7" 1233 | param { 1234 | lr_mult: 1 1235 | } 1236 | param { 1237 | lr_mult: 1 1238 | } 1239 | convolution_param { 1240 | num_output: 64 1241 | kernel_size: 1 1242 | stride: 1 1243 | pad: 0 1244 | weight_filler { 1245 | type: "gaussian" 1246 | std: 0.1767 1247 | } 1248 | bias_filler { 1249 | type: "constant" 1250 | value: 0 1251 | } 1252 | } 1253 | } 1254 | 1255 | layer { 1256 | name: "relu1_concat_bp7" 1257 | type: "PReLU" 1258 | bottom: "out_concat_bp7" 1259 | top: "out_concat_bp7" 1260 | prelu_param { 1261 | channel_shared: 1 1262 | } 1263 | } 1264 | 1265 | ######################### BP8 ######################### 1266 | layer { 1267 | name: "conv1_bp8" 1268 | type: "Convolution" 1269 | bottom: "out_concat_bp7" 1270 | top: "conv1_bp8" 1271 | param { 1272 | lr_mult: 1 1273 | } 1274 | param { 1275 | lr_mult: 1 1276 | } 1277 | convolution_param { 1278 | num_output: 64 1279 | kernel_size: 12 1280 | stride: 8 1281 | pad: 2 1282 | weight_filler { 1283 | type: "gaussian" 1284 | std: 0.0147 1285 | } 1286 | bias_filler { 1287 | type: "constant" 1288 | value: 0 1289 | } 1290 | } 1291 | } 1292 | 1293 | layer { 1294 | name: "relu1_bp8" 1295 | type: "PReLU" 1296 | bottom: "conv1_bp8" 1297 | top: "conv1_bp8" 1298 | prelu_param { 1299 | channel_shared: 1 1300 | } 1301 | } 1302 | 1303 | 1304 | layer { 1305 | name: "conv2_bp8" 1306 | type: "Deconvolution" 1307 | bottom: "conv1_bp8" 1308 | top: "conv2_bp8" 1309 | param { 1310 | lr_mult: 1 1311 | } 1312 | param { 1313 | lr_mult: 1 1314 | } 1315 | convolution_param { 1316 | num_output: 64 1317 | kernel_size: 12 1318 | stride: 8 1319 | pad: 2 1320 | weight_filler { 1321 | type: "gaussian" 1322 | std: 0.0147 1323 | } 1324 | bias_filler { 1325 | type: "constant" 1326 | value: 0 1327 | } 1328 | } 1329 | } 1330 | 1331 | layer { 1332 | name: "relu2_bp8" 1333 | type: "PReLU" 1334 | bottom: "conv2_bp8" 1335 | top: "conv2_bp8" 1336 | prelu_param { 1337 | channel_shared: 1 1338 | } 1339 | } 1340 | 1341 | layer { 1342 | name: "eltwise1_bp8" 1343 | type: "Eltwise" 1344 | bottom: "out_concat_bp7" 1345 | bottom: "conv2_bp8" 1346 | top: "eltwise1_bp8" 1347 | eltwise_param { 1348 | operation: SUM 1349 | coeff: 1 1350 | coeff: -1 1351 | } 1352 | } 1353 | 1354 | layer { 1355 | name: "conv3_bp8" 1356 | type: "Convolution" 1357 | bottom: "eltwise1_bp8" 1358 | top: "conv3_bp8" 1359 | param { 1360 | lr_mult: 1 1361 | } 1362 | param { 1363 | lr_mult: 1 1364 | } 1365 | convolution_param { 1366 | num_output: 64 1367 | kernel_size: 12 1368 | stride: 8 1369 | pad: 2 1370 | weight_filler { 1371 | type: "gaussian" 1372 | std: 0.0147 1373 | } 1374 | bias_filler { 1375 | type: "constant" 1376 | value: 0 1377 | } 1378 | } 1379 | } 1380 | 1381 | layer { 1382 | name: "relu3_bp8" 1383 | type: "PReLU" 1384 | bottom: "conv3_bp8" 1385 | top: "conv3_bp8" 1386 | prelu_param { 1387 | channel_shared: 1 1388 | } 1389 | } 1390 | 1391 | layer { 1392 | name: "eltwise2_bp8" 1393 | type: "Eltwise" 1394 | bottom: "conv3_bp8" 1395 | bottom: "conv1_bp8" 1396 | top: "output_bp8" 1397 | eltwise_param { 1398 | operation: 1 1399 | } 1400 | } 1401 | 1402 | layer { 1403 | name: "concat_bp8" 1404 | type: "Concat" 1405 | bottom: "output_bp8" 1406 | bottom: "concat_bp6" 1407 | top: "concat_bp8" 1408 | } 1409 | 1410 | layer { 1411 | name: "out_concat_bp8" 1412 | type: "Convolution" 1413 | bottom: "concat_bp8" 1414 | top: "out_concat_bp8" 1415 | param { 1416 | lr_mult: 1 1417 | } 1418 | param { 1419 | lr_mult: 1 1420 | } 1421 | convolution_param { 1422 | num_output: 64 1423 | kernel_size: 1 1424 | stride: 1 1425 | pad: 0 1426 | weight_filler { 1427 | type: "gaussian" 1428 | std: 0.1767 1429 | } 1430 | bias_filler { 1431 | type: "constant" 1432 | value: 0 1433 | } 1434 | } 1435 | } 1436 | 1437 | layer { 1438 | name: "relu1_concat_bp8" 1439 | type: "PReLU" 1440 | bottom: "out_concat_bp8" 1441 | top: "out_concat_bp8" 1442 | prelu_param { 1443 | channel_shared: 1 1444 | } 1445 | } 1446 | ######################### BP9 ######################### 1447 | layer { 1448 | name: "conv1_bp9" 1449 | type: "Deconvolution" 1450 | bottom: "out_concat_bp8" 1451 | top: "conv1_bp9" 1452 | param { 1453 | lr_mult: 1 1454 | } 1455 | param { 1456 | lr_mult: 1 1457 | } 1458 | convolution_param { 1459 | num_output: 64 1460 | kernel_size: 12 1461 | stride: 8 1462 | pad: 2 1463 | weight_filler { 1464 | type: "gaussian" 1465 | std: 0.0147 1466 | } 1467 | bias_filler { 1468 | type: "constant" 1469 | value: 0 1470 | } 1471 | } 1472 | } 1473 | 1474 | layer { 1475 | name: "relu1_bp9" 1476 | type: "PReLU" 1477 | bottom: "conv1_bp9" 1478 | top: "conv1_bp9" 1479 | prelu_param { 1480 | channel_shared: 1 1481 | } 1482 | } 1483 | 1484 | 1485 | layer { 1486 | name: "conv2_bp9" 1487 | type: "Convolution" 1488 | bottom: "conv1_bp9" 1489 | top: "conv2_bp9" 1490 | param { 1491 | lr_mult: 1 1492 | } 1493 | param { 1494 | lr_mult: 1 1495 | } 1496 | convolution_param { 1497 | num_output: 64 1498 | kernel_size: 12 1499 | stride: 8 1500 | pad: 2 1501 | weight_filler { 1502 | type: "gaussian" 1503 | std: 0.0147 1504 | } 1505 | bias_filler { 1506 | type: "constant" 1507 | value: 0 1508 | } 1509 | } 1510 | } 1511 | 1512 | layer { 1513 | name: "relu2_bp9" 1514 | type: "PReLU" 1515 | bottom: "conv2_bp9" 1516 | top: "conv2_bp9" 1517 | prelu_param { 1518 | channel_shared: 1 1519 | } 1520 | } 1521 | 1522 | layer { 1523 | name: "eltwise1_bp9" 1524 | type: "Eltwise" 1525 | bottom: "out_concat_bp8" 1526 | bottom: "conv2_bp9" 1527 | top: "eltwise1_bp9" 1528 | eltwise_param { 1529 | operation: SUM 1530 | coeff: 1 1531 | coeff: -1 1532 | } 1533 | } 1534 | 1535 | layer { 1536 | name: "conv3_bp9" 1537 | type: "Deconvolution" 1538 | bottom: "eltwise1_bp9" 1539 | top: "conv3_bp9" 1540 | param { 1541 | lr_mult: 1 1542 | } 1543 | param { 1544 | lr_mult: 1 1545 | } 1546 | convolution_param { 1547 | num_output: 64 1548 | kernel_size: 12 1549 | stride: 8 1550 | pad: 2 1551 | weight_filler { 1552 | type: "gaussian" 1553 | std: 0.0147 1554 | } 1555 | bias_filler { 1556 | type: "constant" 1557 | value: 0 1558 | } 1559 | } 1560 | } 1561 | 1562 | layer { 1563 | name: "relu3_bp9" 1564 | type: "PReLU" 1565 | bottom: "conv3_bp9" 1566 | top: "conv3_bp9" 1567 | prelu_param { 1568 | channel_shared: 1 1569 | } 1570 | } 1571 | 1572 | layer { 1573 | name: "eltwise2_bp9" 1574 | type: "Eltwise" 1575 | bottom: "conv3_bp9" 1576 | bottom: "conv1_bp9" 1577 | top: "output_bp9" 1578 | eltwise_param { 1579 | operation: 1 1580 | } 1581 | } 1582 | 1583 | layer { 1584 | name: "concat_bp9" 1585 | type: "Concat" 1586 | bottom: "output_bp9" 1587 | bottom: "concat_bp7" 1588 | top: "concat_bp9" 1589 | } 1590 | 1591 | layer { 1592 | name: "out_concat_bp9" 1593 | type: "Convolution" 1594 | bottom: "concat_bp9" 1595 | top: "out_concat_bp9" 1596 | param { 1597 | lr_mult: 1 1598 | } 1599 | param { 1600 | lr_mult: 1 1601 | } 1602 | convolution_param { 1603 | num_output: 64 1604 | kernel_size: 1 1605 | stride: 1 1606 | pad: 0 1607 | weight_filler { 1608 | type: "gaussian" 1609 | std: 0.1767 1610 | } 1611 | bias_filler { 1612 | type: "constant" 1613 | value: 0 1614 | } 1615 | } 1616 | } 1617 | 1618 | layer { 1619 | name: "relu1_concat_bp9" 1620 | type: "PReLU" 1621 | bottom: "out_concat_bp9" 1622 | top: "out_concat_bp9" 1623 | prelu_param { 1624 | channel_shared: 1 1625 | } 1626 | } 1627 | ######################### BP10 ######################### 1628 | layer { 1629 | name: "conv1_bp10" 1630 | type: "Convolution" 1631 | bottom: "out_concat_bp9" 1632 | top: "conv1_bp10" 1633 | param { 1634 | lr_mult: 1 1635 | } 1636 | param { 1637 | lr_mult: 1 1638 | } 1639 | convolution_param { 1640 | num_output: 64 1641 | kernel_size: 12 1642 | stride: 8 1643 | pad: 2 1644 | weight_filler { 1645 | type: "gaussian" 1646 | std: 0.0147 1647 | } 1648 | bias_filler { 1649 | type: "constant" 1650 | value: 0 1651 | } 1652 | } 1653 | } 1654 | 1655 | layer { 1656 | name: "relu1_bp10" 1657 | type: "PReLU" 1658 | bottom: "conv1_bp10" 1659 | top: "conv1_bp10" 1660 | prelu_param { 1661 | channel_shared: 1 1662 | } 1663 | } 1664 | 1665 | 1666 | layer { 1667 | name: "conv2_bp10" 1668 | type: "Deconvolution" 1669 | bottom: "conv1_bp10" 1670 | top: "conv2_bp10" 1671 | param { 1672 | lr_mult: 1 1673 | } 1674 | param { 1675 | lr_mult: 1 1676 | } 1677 | convolution_param { 1678 | num_output: 64 1679 | kernel_size: 12 1680 | stride: 8 1681 | pad: 2 1682 | weight_filler { 1683 | type: "gaussian" 1684 | std: 0.0147 1685 | } 1686 | bias_filler { 1687 | type: "constant" 1688 | value: 0 1689 | } 1690 | } 1691 | } 1692 | 1693 | layer { 1694 | name: "relu2_bp10" 1695 | type: "PReLU" 1696 | bottom: "conv2_bp10" 1697 | top: "conv2_bp10" 1698 | prelu_param { 1699 | channel_shared: 1 1700 | } 1701 | } 1702 | 1703 | layer { 1704 | name: "eltwise1_bp10" 1705 | type: "Eltwise" 1706 | bottom: "out_concat_bp9" 1707 | bottom: "conv2_bp10" 1708 | top: "eltwise1_bp10" 1709 | eltwise_param { 1710 | operation: SUM 1711 | coeff: 1 1712 | coeff: -1 1713 | } 1714 | } 1715 | 1716 | layer { 1717 | name: "conv3_bp10" 1718 | type: "Convolution" 1719 | bottom: "eltwise1_bp10" 1720 | top: "conv3_bp10" 1721 | param { 1722 | lr_mult: 1 1723 | } 1724 | param { 1725 | lr_mult: 1 1726 | } 1727 | convolution_param { 1728 | num_output: 64 1729 | kernel_size: 12 1730 | stride: 8 1731 | pad: 2 1732 | weight_filler { 1733 | type: "gaussian" 1734 | std: 0.0147 1735 | } 1736 | bias_filler { 1737 | type: "constant" 1738 | value: 0 1739 | } 1740 | } 1741 | } 1742 | 1743 | layer { 1744 | name: "relu3_bp10" 1745 | type: "PReLU" 1746 | bottom: "conv3_bp10" 1747 | top: "conv3_bp10" 1748 | prelu_param { 1749 | channel_shared: 1 1750 | } 1751 | } 1752 | 1753 | layer { 1754 | name: "eltwise2_bp10" 1755 | type: "Eltwise" 1756 | bottom: "conv3_bp10" 1757 | bottom: "conv1_bp10" 1758 | top: "output_bp10" 1759 | eltwise_param { 1760 | operation: 1 1761 | } 1762 | } 1763 | 1764 | layer { 1765 | name: "concat_bp10" 1766 | type: "Concat" 1767 | bottom: "output_bp10" 1768 | bottom: "concat_bp8" 1769 | top: "concat_bp10" 1770 | } 1771 | 1772 | layer { 1773 | name: "out_concat_bp10" 1774 | type: "Convolution" 1775 | bottom: "concat_bp10" 1776 | top: "out_concat_bp10" 1777 | param { 1778 | lr_mult: 1 1779 | } 1780 | param { 1781 | lr_mult: 1 1782 | } 1783 | convolution_param { 1784 | num_output: 64 1785 | kernel_size: 1 1786 | stride: 1 1787 | pad: 0 1788 | weight_filler { 1789 | type: "gaussian" 1790 | std: 0.1767 1791 | } 1792 | bias_filler { 1793 | type: "constant" 1794 | value: 0 1795 | } 1796 | } 1797 | } 1798 | 1799 | layer { 1800 | name: "relu1_concat_bp10" 1801 | type: "PReLU" 1802 | bottom: "out_concat_bp10" 1803 | top: "out_concat_bp10" 1804 | prelu_param { 1805 | channel_shared: 1 1806 | } 1807 | } 1808 | ######################### BP11 ######################### 1809 | layer { 1810 | name: "conv1_bp11" 1811 | type: "Deconvolution" 1812 | bottom: "out_concat_bp10" 1813 | top: "conv1_bp11" 1814 | param { 1815 | lr_mult: 1 1816 | } 1817 | param { 1818 | lr_mult: 1 1819 | } 1820 | convolution_param { 1821 | num_output: 64 1822 | kernel_size: 12 1823 | stride: 8 1824 | pad: 2 1825 | weight_filler { 1826 | type: "gaussian" 1827 | std: 0.0147 1828 | } 1829 | bias_filler { 1830 | type: "constant" 1831 | value: 0 1832 | } 1833 | } 1834 | } 1835 | 1836 | layer { 1837 | name: "relu1_bp11" 1838 | type: "PReLU" 1839 | bottom: "conv1_bp11" 1840 | top: "conv1_bp11" 1841 | prelu_param { 1842 | channel_shared: 1 1843 | } 1844 | } 1845 | 1846 | 1847 | layer { 1848 | name: "conv2_bp11" 1849 | type: "Convolution" 1850 | bottom: "conv1_bp11" 1851 | top: "conv2_bp11" 1852 | param { 1853 | lr_mult: 1 1854 | } 1855 | param { 1856 | lr_mult: 1 1857 | } 1858 | convolution_param { 1859 | num_output: 64 1860 | kernel_size: 12 1861 | stride: 8 1862 | pad: 2 1863 | weight_filler { 1864 | type: "gaussian" 1865 | std: 0.0147 1866 | } 1867 | bias_filler { 1868 | type: "constant" 1869 | value: 0 1870 | } 1871 | } 1872 | } 1873 | 1874 | layer { 1875 | name: "relu2_bp11" 1876 | type: "PReLU" 1877 | bottom: "conv2_bp11" 1878 | top: "conv2_bp11" 1879 | prelu_param { 1880 | channel_shared: 1 1881 | } 1882 | } 1883 | 1884 | layer { 1885 | name: "eltwise1_bp11" 1886 | type: "Eltwise" 1887 | bottom: "out_concat_bp10" 1888 | bottom: "conv2_bp11" 1889 | top: "eltwise1_bp11" 1890 | eltwise_param { 1891 | operation: SUM 1892 | coeff: 1 1893 | coeff: -1 1894 | } 1895 | } 1896 | 1897 | layer { 1898 | name: "conv3_bp11" 1899 | type: "Deconvolution" 1900 | bottom: "eltwise1_bp11" 1901 | top: "conv3_bp11" 1902 | param { 1903 | lr_mult: 1 1904 | } 1905 | param { 1906 | lr_mult: 1 1907 | } 1908 | convolution_param { 1909 | num_output: 64 1910 | kernel_size: 12 1911 | stride: 8 1912 | pad: 2 1913 | weight_filler { 1914 | type: "gaussian" 1915 | std: 0.0147 1916 | } 1917 | bias_filler { 1918 | type: "constant" 1919 | value: 0 1920 | } 1921 | } 1922 | } 1923 | 1924 | layer { 1925 | name: "relu3_bp11" 1926 | type: "PReLU" 1927 | bottom: "conv3_bp11" 1928 | top: "conv3_bp11" 1929 | prelu_param { 1930 | channel_shared: 1 1931 | } 1932 | } 1933 | 1934 | layer { 1935 | name: "eltwise2_bp11" 1936 | type: "Eltwise" 1937 | bottom: "conv3_bp11" 1938 | bottom: "conv1_bp11" 1939 | top: "output_bp11" 1940 | eltwise_param { 1941 | operation: 1 1942 | } 1943 | } 1944 | 1945 | layer { 1946 | name: "concat_bp11" 1947 | type: "Concat" 1948 | bottom: "output_bp11" 1949 | bottom: "concat_bp9" 1950 | top: "concat_bp11" 1951 | } 1952 | 1953 | layer { 1954 | name: "out_concat_bp11" 1955 | type: "Convolution" 1956 | bottom: "concat_bp11" 1957 | top: "out_concat_bp11" 1958 | param { 1959 | lr_mult: 1 1960 | } 1961 | param { 1962 | lr_mult: 1 1963 | } 1964 | convolution_param { 1965 | num_output: 64 1966 | kernel_size: 1 1967 | stride: 1 1968 | pad: 0 1969 | weight_filler { 1970 | type: "gaussian" 1971 | std: 0.1767 1972 | } 1973 | bias_filler { 1974 | type: "constant" 1975 | value: 0 1976 | } 1977 | } 1978 | } 1979 | 1980 | layer { 1981 | name: "relu1_concat_bp11" 1982 | type: "PReLU" 1983 | bottom: "out_concat_bp11" 1984 | top: "out_concat_bp11" 1985 | prelu_param { 1986 | channel_shared: 1 1987 | } 1988 | } 1989 | 1990 | ######################### BP12 ######################### 1991 | layer { 1992 | name: "conv1_bp12" 1993 | type: "Convolution" 1994 | bottom: "out_concat_bp11" 1995 | top: "conv1_bp12" 1996 | param { 1997 | lr_mult: 1 1998 | } 1999 | param { 2000 | lr_mult: 1 2001 | } 2002 | convolution_param { 2003 | num_output: 64 2004 | kernel_size: 12 2005 | stride: 8 2006 | pad: 2 2007 | weight_filler { 2008 | type: "gaussian" 2009 | std: 0.0147 2010 | } 2011 | bias_filler { 2012 | type: "constant" 2013 | value: 0 2014 | } 2015 | } 2016 | } 2017 | 2018 | layer { 2019 | name: "relu1_bp12" 2020 | type: "PReLU" 2021 | bottom: "conv1_bp12" 2022 | top: "conv1_bp12" 2023 | prelu_param { 2024 | channel_shared: 1 2025 | } 2026 | } 2027 | 2028 | 2029 | layer { 2030 | name: "conv2_bp12" 2031 | type: "Deconvolution" 2032 | bottom: "conv1_bp12" 2033 | top: "conv2_bp12" 2034 | param { 2035 | lr_mult: 1 2036 | } 2037 | param { 2038 | lr_mult: 1 2039 | } 2040 | convolution_param { 2041 | num_output: 64 2042 | kernel_size: 12 2043 | stride: 8 2044 | pad: 2 2045 | weight_filler { 2046 | type: "gaussian" 2047 | std: 0.0147 2048 | } 2049 | bias_filler { 2050 | type: "constant" 2051 | value: 0 2052 | } 2053 | } 2054 | } 2055 | 2056 | layer { 2057 | name: "relu2_bp12" 2058 | type: "PReLU" 2059 | bottom: "conv2_bp12" 2060 | top: "conv2_bp12" 2061 | prelu_param { 2062 | channel_shared: 1 2063 | } 2064 | } 2065 | 2066 | layer { 2067 | name: "eltwise1_bp12" 2068 | type: "Eltwise" 2069 | bottom: "out_concat_bp11" 2070 | bottom: "conv2_bp12" 2071 | top: "eltwise1_bp12" 2072 | eltwise_param { 2073 | operation: SUM 2074 | coeff: 1 2075 | coeff: -1 2076 | } 2077 | } 2078 | 2079 | layer { 2080 | name: "conv3_bp12" 2081 | type: "Convolution" 2082 | bottom: "eltwise1_bp12" 2083 | top: "conv3_bp12" 2084 | param { 2085 | lr_mult: 1 2086 | } 2087 | param { 2088 | lr_mult: 1 2089 | } 2090 | convolution_param { 2091 | num_output: 64 2092 | kernel_size: 12 2093 | stride: 8 2094 | pad: 2 2095 | weight_filler { 2096 | type: "gaussian" 2097 | std: 0.0147 2098 | } 2099 | bias_filler { 2100 | type: "constant" 2101 | value: 0 2102 | } 2103 | } 2104 | } 2105 | 2106 | layer { 2107 | name: "relu3_bp12" 2108 | type: "PReLU" 2109 | bottom: "conv3_bp12" 2110 | top: "conv3_bp12" 2111 | prelu_param { 2112 | channel_shared: 1 2113 | } 2114 | } 2115 | 2116 | layer { 2117 | name: "eltwise2_bp12" 2118 | type: "Eltwise" 2119 | bottom: "conv3_bp12" 2120 | bottom: "conv1_bp12" 2121 | top: "output_bp12" 2122 | eltwise_param { 2123 | operation: 1 2124 | } 2125 | } 2126 | 2127 | layer { 2128 | name: "concat_bp12" 2129 | type: "Concat" 2130 | bottom: "output_bp12" 2131 | bottom: "concat_bp10" 2132 | top: "concat_bp12" 2133 | } 2134 | 2135 | layer { 2136 | name: "out_concat_bp12" 2137 | type: "Convolution" 2138 | bottom: "concat_bp12" 2139 | top: "out_concat_bp12" 2140 | param { 2141 | lr_mult: 1 2142 | } 2143 | param { 2144 | lr_mult: 1 2145 | } 2146 | convolution_param { 2147 | num_output: 64 2148 | kernel_size: 1 2149 | stride: 1 2150 | pad: 0 2151 | weight_filler { 2152 | type: "gaussian" 2153 | std: 0.1767 2154 | } 2155 | bias_filler { 2156 | type: "constant" 2157 | value: 0 2158 | } 2159 | } 2160 | } 2161 | 2162 | layer { 2163 | name: "relu1_concat_bp12" 2164 | type: "PReLU" 2165 | bottom: "out_concat_bp12" 2166 | top: "out_concat_bp12" 2167 | prelu_param { 2168 | channel_shared: 1 2169 | } 2170 | } 2171 | ######################### BP13 ######################### 2172 | layer { 2173 | name: "conv1_bp13" 2174 | type: "Deconvolution" 2175 | bottom: "out_concat_bp12" 2176 | top: "conv1_bp13" 2177 | param { 2178 | lr_mult: 1 2179 | } 2180 | param { 2181 | lr_mult: 1 2182 | } 2183 | convolution_param { 2184 | num_output: 64 2185 | kernel_size: 12 2186 | stride: 8 2187 | pad: 2 2188 | weight_filler { 2189 | type: "gaussian" 2190 | std: 0.0147 2191 | } 2192 | bias_filler { 2193 | type: "constant" 2194 | value: 0 2195 | } 2196 | } 2197 | } 2198 | 2199 | layer { 2200 | name: "relu1_bp13" 2201 | type: "PReLU" 2202 | bottom: "conv1_bp13" 2203 | top: "conv1_bp13" 2204 | prelu_param { 2205 | channel_shared: 1 2206 | } 2207 | } 2208 | 2209 | 2210 | layer { 2211 | name: "conv2_bp13" 2212 | type: "Convolution" 2213 | bottom: "conv1_bp13" 2214 | top: "conv2_bp13" 2215 | param { 2216 | lr_mult: 1 2217 | } 2218 | param { 2219 | lr_mult: 1 2220 | } 2221 | convolution_param { 2222 | num_output: 64 2223 | kernel_size: 12 2224 | stride: 8 2225 | pad: 2 2226 | weight_filler { 2227 | type: "gaussian" 2228 | std: 0.0147 2229 | } 2230 | bias_filler { 2231 | type: "constant" 2232 | value: 0 2233 | } 2234 | } 2235 | } 2236 | 2237 | layer { 2238 | name: "relu2_bp13" 2239 | type: "PReLU" 2240 | bottom: "conv2_bp13" 2241 | top: "conv2_bp13" 2242 | prelu_param { 2243 | channel_shared: 1 2244 | } 2245 | } 2246 | 2247 | layer { 2248 | name: "eltwise1_bp13" 2249 | type: "Eltwise" 2250 | bottom: "out_concat_bp12" 2251 | bottom: "conv2_bp13" 2252 | top: "eltwise1_bp13" 2253 | eltwise_param { 2254 | operation: SUM 2255 | coeff: 1 2256 | coeff: -1 2257 | } 2258 | } 2259 | 2260 | layer { 2261 | name: "conv3_bp13" 2262 | type: "Deconvolution" 2263 | bottom: "eltwise1_bp13" 2264 | top: "conv3_bp13" 2265 | param { 2266 | lr_mult: 1 2267 | } 2268 | param { 2269 | lr_mult: 1 2270 | } 2271 | convolution_param { 2272 | num_output: 64 2273 | kernel_size: 12 2274 | stride: 8 2275 | pad: 2 2276 | weight_filler { 2277 | type: "gaussian" 2278 | std: 0.0147 2279 | } 2280 | bias_filler { 2281 | type: "constant" 2282 | value: 0 2283 | } 2284 | } 2285 | } 2286 | 2287 | layer { 2288 | name: "relu3_bp13" 2289 | type: "PReLU" 2290 | bottom: "conv3_bp13" 2291 | top: "conv3_bp13" 2292 | prelu_param { 2293 | channel_shared: 1 2294 | } 2295 | } 2296 | 2297 | layer { 2298 | name: "eltwise2_bp13" 2299 | type: "Eltwise" 2300 | bottom: "conv3_bp13" 2301 | bottom: "conv1_bp13" 2302 | top: "output_bp13" 2303 | eltwise_param { 2304 | operation: 1 2305 | } 2306 | } 2307 | 2308 | layer { 2309 | name: "concat_bp13" 2310 | type: "Concat" 2311 | bottom: "output_bp13" 2312 | bottom: "concat_bp11" 2313 | top: "concat_bp13" 2314 | } 2315 | 2316 | ######################### END BP ######################### 2317 | 2318 | layer { 2319 | name: "conv_final" 2320 | type: "Convolution" 2321 | bottom: "concat_bp13" 2322 | top: "conv_final" 2323 | param { 2324 | lr_mult: 1 2325 | } 2326 | param { 2327 | lr_mult: 1 2328 | } 2329 | convolution_param { 2330 | num_output: 3 2331 | kernel_size: 3 2332 | stride: 1 2333 | pad: 1 2334 | weight_filler { 2335 | type: "gaussian" 2336 | std: 0.1 2337 | } 2338 | bias_filler { 2339 | type: "constant" 2340 | value: 0 2341 | } 2342 | } 2343 | } 2344 | -------------------------------------------------------------------------------- /caffe/DBPN_net_4x.prototxt: -------------------------------------------------------------------------------- 1 | name: "DRBPSR" 2 | layer { 3 | name: "data" 4 | type: "HDF5Data" 5 | top: "data" 6 | top: "label" 7 | hdf5_data_param { 8 | source: "train_4x_div_128_rgb.txt" 9 | batch_size: 12 10 | } 11 | include: { phase: TRAIN } 12 | } 13 | layer { 14 | name: "data" 15 | type: "HDF5Data" 16 | top: "data" 17 | top: "label" 18 | hdf5_data_param { 19 | source: "test_deconv_128_rgb.txt" 20 | batch_size: 2 21 | } 22 | include: { phase: TEST } 23 | } 24 | 25 | layer { 26 | name: "conv0_1" 27 | type: "Convolution" 28 | bottom: "data" 29 | top: "conv0_1" 30 | param { 31 | lr_mult: 1 32 | } 33 | param { 34 | lr_mult: 1 35 | } 36 | convolution_param { 37 | num_output: 256 38 | kernel_size: 3 39 | stride: 1 40 | pad: 1 41 | weight_filler { 42 | type: "gaussian" 43 | std: 0.02946 44 | } 45 | bias_filler { 46 | type: "constant" 47 | value: 0 48 | } 49 | } 50 | } 51 | 52 | layer { 53 | name: "relu0_1" 54 | type: "PReLU" 55 | bottom: "conv0_1" 56 | top: "conv0_1" 57 | prelu_param { 58 | channel_shared: 1 59 | } 60 | } 61 | 62 | layer { 63 | name: "conv1" 64 | type: "Convolution" 65 | bottom: "conv0_1" 66 | top: "conv1" 67 | param { 68 | lr_mult: 1 69 | } 70 | param { 71 | lr_mult: 1 72 | } 73 | convolution_param { 74 | num_output: 64 75 | kernel_size: 1 76 | stride: 1 77 | pad: 0 78 | weight_filler { 79 | type: "gaussian" 80 | std: 0.1767 81 | } 82 | bias_filler { 83 | type: "constant" 84 | value: 0 85 | } 86 | } 87 | } 88 | 89 | layer { 90 | name: "relu1" 91 | type: "PReLU" 92 | bottom: "conv1" 93 | top: "conv1" 94 | prelu_param { 95 | channel_shared: 1 96 | } 97 | } 98 | 99 | ######################### BP1 ######################### 100 | layer { 101 | name: "conv1_bp1" 102 | type: "Deconvolution" 103 | bottom: "conv1" 104 | top: "conv1_bp1" 105 | param { 106 | lr_mult: 1 107 | } 108 | param { 109 | lr_mult: 1 110 | } 111 | convolution_param { 112 | num_output: 64 113 | kernel_size: 8 114 | stride: 4 115 | pad: 2 116 | weight_filler { 117 | type: "gaussian" 118 | std: 0.022 119 | } 120 | bias_filler { 121 | type: "constant" 122 | value: 0 123 | } 124 | } 125 | } 126 | 127 | layer { 128 | name: "relu1_bp1" 129 | type: "PReLU" 130 | bottom: "conv1_bp1" 131 | top: "conv1_bp1" 132 | prelu_param { 133 | channel_shared: 1 134 | } 135 | } 136 | 137 | 138 | layer { 139 | name: "conv2_bp1" 140 | type: "Convolution" 141 | bottom: "conv1_bp1" 142 | top: "conv2_bp1" 143 | param { 144 | lr_mult: 1 145 | } 146 | param { 147 | lr_mult: 1 148 | } 149 | convolution_param { 150 | num_output: 64 151 | kernel_size: 8 152 | stride: 4 153 | pad: 2 154 | weight_filler { 155 | type: "gaussian" 156 | std: 0.022 157 | } 158 | bias_filler { 159 | type: "constant" 160 | value: 0 161 | } 162 | } 163 | } 164 | 165 | layer { 166 | name: "relu2_bp1" 167 | type: "PReLU" 168 | bottom: "conv2_bp1" 169 | top: "conv2_bp1" 170 | prelu_param { 171 | channel_shared: 1 172 | } 173 | } 174 | 175 | layer { 176 | name: "eltwise1_bp1" 177 | type: "Eltwise" 178 | bottom: "conv1" 179 | bottom: "conv2_bp1" 180 | top: "eltwise1_bp1" 181 | eltwise_param { 182 | operation: SUM 183 | coeff: 1 184 | coeff: -1 185 | } 186 | } 187 | 188 | layer { 189 | name: "conv3_bp1" 190 | type: "Deconvolution" 191 | bottom: "eltwise1_bp1" 192 | top: "conv3_bp1" 193 | param { 194 | lr_mult: 1 195 | } 196 | param { 197 | lr_mult: 1 198 | } 199 | convolution_param { 200 | num_output: 64 201 | kernel_size: 8 202 | stride: 4 203 | pad: 2 204 | weight_filler { 205 | type: "gaussian" 206 | std: 0.022 207 | } 208 | bias_filler { 209 | type: "constant" 210 | value: 0 211 | } 212 | } 213 | } 214 | 215 | layer { 216 | name: "relu3_bp1" 217 | type: "PReLU" 218 | bottom: "conv3_bp1" 219 | top: "conv3_bp1" 220 | prelu_param { 221 | channel_shared: 1 222 | } 223 | } 224 | 225 | layer { 226 | name: "eltwise2_bp1" 227 | type: "Eltwise" 228 | bottom: "conv3_bp1" 229 | bottom: "conv1_bp1" 230 | top: "output_bp1" 231 | eltwise_param { 232 | operation: 1 233 | } 234 | } 235 | 236 | ######################### BP2 ######################### 237 | layer { 238 | name: "conv1_bp2" 239 | type: "Convolution" 240 | bottom: "output_bp1" 241 | top: "conv1_bp2" 242 | param { 243 | lr_mult: 1 244 | } 245 | param { 246 | lr_mult: 1 247 | } 248 | convolution_param { 249 | num_output: 64 250 | kernel_size: 8 251 | stride: 4 252 | pad: 2 253 | weight_filler { 254 | type: "gaussian" 255 | std: 0.022 256 | } 257 | bias_filler { 258 | type: "constant" 259 | value: 0 260 | } 261 | } 262 | } 263 | 264 | layer { 265 | name: "relu1_bp2" 266 | type: "PReLU" 267 | bottom: "conv1_bp2" 268 | top: "conv1_bp2" 269 | prelu_param { 270 | channel_shared: 1 271 | } 272 | } 273 | 274 | 275 | layer { 276 | name: "conv2_bp2" 277 | type: "Deconvolution" 278 | bottom: "conv1_bp2" 279 | top: "conv2_bp2" 280 | param { 281 | lr_mult: 1 282 | } 283 | param { 284 | lr_mult: 1 285 | } 286 | convolution_param { 287 | num_output: 64 288 | kernel_size: 8 289 | stride: 4 290 | pad: 2 291 | weight_filler { 292 | type: "gaussian" 293 | std: 0.022 294 | } 295 | bias_filler { 296 | type: "constant" 297 | value: 0 298 | } 299 | } 300 | } 301 | 302 | layer { 303 | name: "relu2_bp2" 304 | type: "PReLU" 305 | bottom: "conv2_bp2" 306 | top: "conv2_bp2" 307 | prelu_param { 308 | channel_shared: 1 309 | } 310 | } 311 | 312 | layer { 313 | name: "eltwise1_bp2" 314 | type: "Eltwise" 315 | bottom: "output_bp1" 316 | bottom: "conv2_bp2" 317 | top: "eltwise1_bp2" 318 | eltwise_param { 319 | operation: SUM 320 | coeff: 1 321 | coeff: -1 322 | } 323 | } 324 | 325 | layer { 326 | name: "conv3_bp2" 327 | type: "Convolution" 328 | bottom: "eltwise1_bp2" 329 | top: "conv3_bp2" 330 | param { 331 | lr_mult: 1 332 | } 333 | param { 334 | lr_mult: 1 335 | } 336 | convolution_param { 337 | num_output: 64 338 | kernel_size: 8 339 | stride: 4 340 | pad: 2 341 | weight_filler { 342 | type: "gaussian" 343 | std: 0.022 344 | } 345 | bias_filler { 346 | type: "constant" 347 | value: 0 348 | } 349 | } 350 | } 351 | 352 | layer { 353 | name: "relu3_bp2" 354 | type: "PReLU" 355 | bottom: "conv3_bp2" 356 | top: "conv3_bp2" 357 | prelu_param { 358 | channel_shared: 1 359 | } 360 | } 361 | 362 | layer { 363 | name: "eltwise2_bp2" 364 | type: "Eltwise" 365 | bottom: "conv3_bp2" 366 | bottom: "conv1_bp2" 367 | top: "output_bp2" 368 | eltwise_param { 369 | operation: 1 370 | } 371 | } 372 | 373 | #######Start dense######### 374 | ######################### BP3 ######################### 375 | layer { 376 | name: "conv1_bp3" 377 | type: "Deconvolution" 378 | bottom: "output_bp2" 379 | top: "conv1_bp3" 380 | param { 381 | lr_mult: 1 382 | } 383 | param { 384 | lr_mult: 1 385 | } 386 | convolution_param { 387 | num_output: 64 388 | kernel_size: 8 389 | stride: 4 390 | pad: 2 391 | weight_filler { 392 | type: "gaussian" 393 | std: 0.022 394 | } 395 | bias_filler { 396 | type: "constant" 397 | value: 0 398 | } 399 | } 400 | } 401 | 402 | layer { 403 | name: "relu1_bp3" 404 | type: "PReLU" 405 | bottom: "conv1_bp3" 406 | top: "conv1_bp3" 407 | prelu_param { 408 | channel_shared: 1 409 | } 410 | } 411 | 412 | 413 | layer { 414 | name: "conv2_bp3" 415 | type: "Convolution" 416 | bottom: "conv1_bp3" 417 | top: "conv2_bp3" 418 | param { 419 | lr_mult: 1 420 | } 421 | param { 422 | lr_mult: 1 423 | } 424 | convolution_param { 425 | num_output: 64 426 | kernel_size: 8 427 | stride: 4 428 | pad: 2 429 | weight_filler { 430 | type: "gaussian" 431 | std: 0.022 432 | } 433 | bias_filler { 434 | type: "constant" 435 | value: 0 436 | } 437 | } 438 | } 439 | 440 | layer { 441 | name: "relu2_bp3" 442 | type: "PReLU" 443 | bottom: "conv2_bp3" 444 | top: "conv2_bp3" 445 | prelu_param { 446 | channel_shared: 1 447 | } 448 | } 449 | 450 | layer { 451 | name: "eltwise1_bp3" 452 | type: "Eltwise" 453 | bottom: "output_bp2" 454 | bottom: "conv2_bp3" 455 | top: "eltwise1_bp3" 456 | eltwise_param { 457 | operation: SUM 458 | coeff: 1 459 | coeff: -1 460 | } 461 | } 462 | 463 | layer { 464 | name: "conv3_bp3" 465 | type: "Deconvolution" 466 | bottom: "eltwise1_bp3" 467 | top: "conv3_bp3" 468 | param { 469 | lr_mult: 1 470 | } 471 | param { 472 | lr_mult: 1 473 | } 474 | convolution_param { 475 | num_output: 64 476 | kernel_size: 8 477 | stride: 4 478 | pad: 2 479 | weight_filler { 480 | type: "gaussian" 481 | std: 0.022 482 | } 483 | bias_filler { 484 | type: "constant" 485 | value: 0 486 | } 487 | } 488 | } 489 | 490 | layer { 491 | name: "relu3_bp3" 492 | type: "PReLU" 493 | bottom: "conv3_bp3" 494 | top: "conv3_bp3" 495 | prelu_param { 496 | channel_shared: 1 497 | } 498 | } 499 | 500 | layer { 501 | name: "eltwise2_bp3" 502 | type: "Eltwise" 503 | bottom: "conv3_bp3" 504 | bottom: "conv1_bp3" 505 | top: "output_bp3" 506 | eltwise_param { 507 | operation: 1 508 | } 509 | } 510 | 511 | layer { 512 | name: "concat_bp3" 513 | type: "Concat" 514 | bottom: "output_bp3" 515 | bottom: "output_bp1" 516 | top: "concat_bp3" 517 | } 518 | 519 | layer { 520 | name: "out_concat_bp3" 521 | type: "Convolution" 522 | bottom: "concat_bp3" 523 | top: "out_concat_bp3" 524 | param { 525 | lr_mult: 1 526 | } 527 | param { 528 | lr_mult: 1 529 | } 530 | convolution_param { 531 | num_output: 64 532 | kernel_size: 1 533 | stride: 1 534 | pad: 0 535 | weight_filler { 536 | type: "gaussian" 537 | std: 0.1767 538 | } 539 | bias_filler { 540 | type: "constant" 541 | value: 0 542 | } 543 | } 544 | } 545 | 546 | layer { 547 | name: "relu1_concat_bp3" 548 | type: "PReLU" 549 | bottom: "out_concat_bp3" 550 | top: "out_concat_bp3" 551 | prelu_param { 552 | channel_shared: 1 553 | } 554 | } 555 | 556 | ######################### BP4 ######################### 557 | layer { 558 | name: "conv1_bp4" 559 | type: "Convolution" 560 | bottom: "out_concat_bp3" 561 | top: "conv1_bp4" 562 | param { 563 | lr_mult: 1 564 | } 565 | param { 566 | lr_mult: 1 567 | } 568 | convolution_param { 569 | num_output: 64 570 | kernel_size: 8 571 | stride: 4 572 | pad: 2 573 | weight_filler { 574 | type: "gaussian" 575 | std: 0.022 576 | } 577 | bias_filler { 578 | type: "constant" 579 | value: 0 580 | } 581 | } 582 | } 583 | 584 | layer { 585 | name: "relu1_bp4" 586 | type: "PReLU" 587 | bottom: "conv1_bp4" 588 | top: "conv1_bp4" 589 | prelu_param { 590 | channel_shared: 1 591 | } 592 | } 593 | 594 | 595 | layer { 596 | name: "conv2_bp4" 597 | type: "Deconvolution" 598 | bottom: "conv1_bp4" 599 | top: "conv2_bp4" 600 | param { 601 | lr_mult: 1 602 | } 603 | param { 604 | lr_mult: 1 605 | } 606 | convolution_param { 607 | num_output: 64 608 | kernel_size: 8 609 | stride: 4 610 | pad: 2 611 | weight_filler { 612 | type: "gaussian" 613 | std: 0.022 614 | } 615 | bias_filler { 616 | type: "constant" 617 | value: 0 618 | } 619 | } 620 | } 621 | 622 | layer { 623 | name: "relu2_bp4" 624 | type: "PReLU" 625 | bottom: "conv2_bp4" 626 | top: "conv2_bp4" 627 | prelu_param { 628 | channel_shared: 1 629 | } 630 | } 631 | 632 | layer { 633 | name: "eltwise1_bp4" 634 | type: "Eltwise" 635 | bottom: "out_concat_bp3" 636 | bottom: "conv2_bp4" 637 | top: "eltwise1_bp4" 638 | eltwise_param { 639 | operation: SUM 640 | coeff: 1 641 | coeff: -1 642 | } 643 | } 644 | 645 | layer { 646 | name: "conv3_bp4" 647 | type: "Convolution" 648 | bottom: "eltwise1_bp4" 649 | top: "conv3_bp4" 650 | param { 651 | lr_mult: 1 652 | } 653 | param { 654 | lr_mult: 1 655 | } 656 | convolution_param { 657 | num_output: 64 658 | kernel_size: 8 659 | stride: 4 660 | pad: 2 661 | weight_filler { 662 | type: "gaussian" 663 | std: 0.022 664 | } 665 | bias_filler { 666 | type: "constant" 667 | value: 0 668 | } 669 | } 670 | } 671 | 672 | layer { 673 | name: "relu3_bp4" 674 | type: "PReLU" 675 | bottom: "conv3_bp4" 676 | top: "conv3_bp4" 677 | prelu_param { 678 | channel_shared: 1 679 | } 680 | } 681 | 682 | layer { 683 | name: "eltwise2_bp4" 684 | type: "Eltwise" 685 | bottom: "conv3_bp4" 686 | bottom: "conv1_bp4" 687 | top: "output_bp4" 688 | eltwise_param { 689 | operation: 1 690 | } 691 | } 692 | 693 | layer { 694 | name: "concat_bp4" 695 | type: "Concat" 696 | bottom: "output_bp4" 697 | bottom: "output_bp2" 698 | top: "concat_bp4" 699 | } 700 | 701 | layer { 702 | name: "out_concat_bp4" 703 | type: "Convolution" 704 | bottom: "concat_bp4" 705 | top: "out_concat_bp4" 706 | param { 707 | lr_mult: 1 708 | } 709 | param { 710 | lr_mult: 1 711 | } 712 | convolution_param { 713 | num_output: 64 714 | kernel_size: 1 715 | stride: 1 716 | pad: 0 717 | weight_filler { 718 | type: "gaussian" 719 | std: 0.1767 720 | } 721 | bias_filler { 722 | type: "constant" 723 | value: 0 724 | } 725 | } 726 | } 727 | 728 | layer { 729 | name: "relu1_concat_bp4" 730 | type: "PReLU" 731 | bottom: "out_concat_bp4" 732 | top: "out_concat_bp4" 733 | prelu_param { 734 | channel_shared: 1 735 | } 736 | } 737 | 738 | ######################### BP5 ######################### 739 | layer { 740 | name: "conv1_bp5" 741 | type: "Deconvolution" 742 | bottom: "out_concat_bp4" 743 | top: "conv1_bp5" 744 | param { 745 | lr_mult: 1 746 | } 747 | param { 748 | lr_mult: 1 749 | } 750 | convolution_param { 751 | num_output: 64 752 | kernel_size: 8 753 | stride: 4 754 | pad: 2 755 | weight_filler { 756 | type: "gaussian" 757 | std: 0.022 758 | } 759 | bias_filler { 760 | type: "constant" 761 | value: 0 762 | } 763 | } 764 | } 765 | 766 | layer { 767 | name: "relu1_bp5" 768 | type: "PReLU" 769 | bottom: "conv1_bp5" 770 | top: "conv1_bp5" 771 | prelu_param { 772 | channel_shared: 1 773 | } 774 | } 775 | 776 | 777 | layer { 778 | name: "conv2_bp5" 779 | type: "Convolution" 780 | bottom: "conv1_bp5" 781 | top: "conv2_bp5" 782 | param { 783 | lr_mult: 1 784 | } 785 | param { 786 | lr_mult: 1 787 | } 788 | convolution_param { 789 | num_output: 64 790 | kernel_size: 8 791 | stride: 4 792 | pad: 2 793 | weight_filler { 794 | type: "gaussian" 795 | std: 0.022 796 | } 797 | bias_filler { 798 | type: "constant" 799 | value: 0 800 | } 801 | } 802 | } 803 | 804 | layer { 805 | name: "relu2_bp5" 806 | type: "PReLU" 807 | bottom: "conv2_bp5" 808 | top: "conv2_bp5" 809 | prelu_param { 810 | channel_shared: 1 811 | } 812 | } 813 | 814 | layer { 815 | name: "eltwise1_bp5" 816 | type: "Eltwise" 817 | bottom: "out_concat_bp4" 818 | bottom: "conv2_bp5" 819 | top: "eltwise1_bp5" 820 | eltwise_param { 821 | operation: SUM 822 | coeff: 1 823 | coeff: -1 824 | } 825 | } 826 | 827 | layer { 828 | name: "conv3_bp5" 829 | type: "Deconvolution" 830 | bottom: "eltwise1_bp5" 831 | top: "conv3_bp5" 832 | param { 833 | lr_mult: 1 834 | } 835 | param { 836 | lr_mult: 1 837 | } 838 | convolution_param { 839 | num_output: 64 840 | kernel_size: 8 841 | stride: 4 842 | pad: 2 843 | weight_filler { 844 | type: "gaussian" 845 | std: 0.022 846 | } 847 | bias_filler { 848 | type: "constant" 849 | value: 0 850 | } 851 | } 852 | } 853 | 854 | layer { 855 | name: "relu3_bp5" 856 | type: "PReLU" 857 | bottom: "conv3_bp5" 858 | top: "conv3_bp5" 859 | prelu_param { 860 | channel_shared: 1 861 | } 862 | } 863 | 864 | layer { 865 | name: "eltwise2_bp5" 866 | type: "Eltwise" 867 | bottom: "conv3_bp5" 868 | bottom: "conv1_bp5" 869 | top: "output_bp5" 870 | eltwise_param { 871 | operation: 1 872 | } 873 | } 874 | 875 | layer { 876 | name: "concat_bp5" 877 | type: "Concat" 878 | bottom: "output_bp5" 879 | bottom: "concat_bp3" 880 | top: "concat_bp5" 881 | } 882 | 883 | layer { 884 | name: "out_concat_bp5" 885 | type: "Convolution" 886 | bottom: "concat_bp5" 887 | top: "out_concat_bp5" 888 | param { 889 | lr_mult: 1 890 | } 891 | param { 892 | lr_mult: 1 893 | } 894 | convolution_param { 895 | num_output: 64 896 | kernel_size: 1 897 | stride: 1 898 | pad: 0 899 | weight_filler { 900 | type: "gaussian" 901 | std: 0.1767 902 | } 903 | bias_filler { 904 | type: "constant" 905 | value: 0 906 | } 907 | } 908 | } 909 | 910 | layer { 911 | name: "relu1_concat_bp5" 912 | type: "PReLU" 913 | bottom: "out_concat_bp5" 914 | top: "out_concat_bp5" 915 | prelu_param { 916 | channel_shared: 1 917 | } 918 | } 919 | ######################### BP6 ######################### 920 | layer { 921 | name: "conv1_bp6" 922 | type: "Convolution" 923 | bottom: "out_concat_bp5" 924 | top: "conv1_bp6" 925 | param { 926 | lr_mult: 1 927 | } 928 | param { 929 | lr_mult: 1 930 | } 931 | convolution_param { 932 | num_output: 64 933 | kernel_size: 8 934 | stride: 4 935 | pad: 2 936 | weight_filler { 937 | type: "gaussian" 938 | std: 0.022 939 | } 940 | bias_filler { 941 | type: "constant" 942 | value: 0 943 | } 944 | } 945 | } 946 | 947 | layer { 948 | name: "relu1_bp6" 949 | type: "PReLU" 950 | bottom: "conv1_bp6" 951 | top: "conv1_bp6" 952 | prelu_param { 953 | channel_shared: 1 954 | } 955 | } 956 | 957 | 958 | layer { 959 | name: "conv2_bp6" 960 | type: "Deconvolution" 961 | bottom: "conv1_bp6" 962 | top: "conv2_bp6" 963 | param { 964 | lr_mult: 1 965 | } 966 | param { 967 | lr_mult: 1 968 | } 969 | convolution_param { 970 | num_output: 64 971 | kernel_size: 8 972 | stride: 4 973 | pad: 2 974 | weight_filler { 975 | type: "gaussian" 976 | std: 0.022 977 | } 978 | bias_filler { 979 | type: "constant" 980 | value: 0 981 | } 982 | } 983 | } 984 | 985 | layer { 986 | name: "relu2_bp6" 987 | type: "PReLU" 988 | bottom: "conv2_bp6" 989 | top: "conv2_bp6" 990 | prelu_param { 991 | channel_shared: 1 992 | } 993 | } 994 | 995 | layer { 996 | name: "eltwise1_bp6" 997 | type: "Eltwise" 998 | bottom: "out_concat_bp5" 999 | bottom: "conv2_bp6" 1000 | top: "eltwise1_bp6" 1001 | eltwise_param { 1002 | operation: SUM 1003 | coeff: 1 1004 | coeff: -1 1005 | } 1006 | } 1007 | 1008 | layer { 1009 | name: "conv3_bp6" 1010 | type: "Convolution" 1011 | bottom: "eltwise1_bp6" 1012 | top: "conv3_bp6" 1013 | param { 1014 | lr_mult: 1 1015 | } 1016 | param { 1017 | lr_mult: 1 1018 | } 1019 | convolution_param { 1020 | num_output: 64 1021 | kernel_size: 8 1022 | stride: 4 1023 | pad: 2 1024 | weight_filler { 1025 | type: "gaussian" 1026 | std: 0.022 1027 | } 1028 | bias_filler { 1029 | type: "constant" 1030 | value: 0 1031 | } 1032 | } 1033 | } 1034 | 1035 | layer { 1036 | name: "relu3_bp6" 1037 | type: "PReLU" 1038 | bottom: "conv3_bp6" 1039 | top: "conv3_bp6" 1040 | prelu_param { 1041 | channel_shared: 1 1042 | } 1043 | } 1044 | 1045 | layer { 1046 | name: "eltwise2_bp6" 1047 | type: "Eltwise" 1048 | bottom: "conv3_bp6" 1049 | bottom: "conv1_bp6" 1050 | top: "output_bp6" 1051 | eltwise_param { 1052 | operation: 1 1053 | } 1054 | } 1055 | 1056 | layer { 1057 | name: "concat_bp6" 1058 | type: "Concat" 1059 | bottom: "output_bp6" 1060 | bottom: "concat_bp4" 1061 | top: "concat_bp6" 1062 | } 1063 | 1064 | layer { 1065 | name: "out_concat_bp6" 1066 | type: "Convolution" 1067 | bottom: "concat_bp6" 1068 | top: "out_concat_bp6" 1069 | param { 1070 | lr_mult: 1 1071 | } 1072 | param { 1073 | lr_mult: 1 1074 | } 1075 | convolution_param { 1076 | num_output: 64 1077 | kernel_size: 1 1078 | stride: 1 1079 | pad: 0 1080 | weight_filler { 1081 | type: "gaussian" 1082 | std: 0.1767 1083 | } 1084 | bias_filler { 1085 | type: "constant" 1086 | value: 0 1087 | } 1088 | } 1089 | } 1090 | 1091 | layer { 1092 | name: "relu1_concat_bp6" 1093 | type: "PReLU" 1094 | bottom: "out_concat_bp6" 1095 | top: "out_concat_bp6" 1096 | prelu_param { 1097 | channel_shared: 1 1098 | } 1099 | } 1100 | 1101 | ######################### BP7 ######################### 1102 | layer { 1103 | name: "conv1_bp7" 1104 | type: "Deconvolution" 1105 | bottom: "out_concat_bp6" 1106 | top: "conv1_bp7" 1107 | param { 1108 | lr_mult: 1 1109 | } 1110 | param { 1111 | lr_mult: 1 1112 | } 1113 | convolution_param { 1114 | num_output: 64 1115 | kernel_size: 8 1116 | stride: 4 1117 | pad: 2 1118 | weight_filler { 1119 | type: "gaussian" 1120 | std: 0.022 1121 | } 1122 | bias_filler { 1123 | type: "constant" 1124 | value: 0 1125 | } 1126 | } 1127 | } 1128 | 1129 | layer { 1130 | name: "relu1_bp7" 1131 | type: "PReLU" 1132 | bottom: "conv1_bp7" 1133 | top: "conv1_bp7" 1134 | prelu_param { 1135 | channel_shared: 1 1136 | } 1137 | } 1138 | 1139 | 1140 | layer { 1141 | name: "conv2_bp7" 1142 | type: "Convolution" 1143 | bottom: "conv1_bp7" 1144 | top: "conv2_bp7" 1145 | param { 1146 | lr_mult: 1 1147 | } 1148 | param { 1149 | lr_mult: 1 1150 | } 1151 | convolution_param { 1152 | num_output: 64 1153 | kernel_size: 8 1154 | stride: 4 1155 | pad: 2 1156 | weight_filler { 1157 | type: "gaussian" 1158 | std: 0.022 1159 | } 1160 | bias_filler { 1161 | type: "constant" 1162 | value: 0 1163 | } 1164 | } 1165 | } 1166 | 1167 | layer { 1168 | name: "relu2_bp7" 1169 | type: "PReLU" 1170 | bottom: "conv2_bp7" 1171 | top: "conv2_bp7" 1172 | prelu_param { 1173 | channel_shared: 1 1174 | } 1175 | } 1176 | 1177 | layer { 1178 | name: "eltwise1_bp7" 1179 | type: "Eltwise" 1180 | bottom: "out_concat_bp6" 1181 | bottom: "conv2_bp7" 1182 | top: "eltwise1_bp7" 1183 | eltwise_param { 1184 | operation: SUM 1185 | coeff: 1 1186 | coeff: -1 1187 | } 1188 | } 1189 | 1190 | layer { 1191 | name: "conv3_bp7" 1192 | type: "Deconvolution" 1193 | bottom: "eltwise1_bp7" 1194 | top: "conv3_bp7" 1195 | param { 1196 | lr_mult: 1 1197 | } 1198 | param { 1199 | lr_mult: 1 1200 | } 1201 | convolution_param { 1202 | num_output: 64 1203 | kernel_size: 8 1204 | stride: 4 1205 | pad: 2 1206 | weight_filler { 1207 | type: "gaussian" 1208 | std: 0.022 1209 | } 1210 | bias_filler { 1211 | type: "constant" 1212 | value: 0 1213 | } 1214 | } 1215 | } 1216 | 1217 | layer { 1218 | name: "relu3_bp7" 1219 | type: "PReLU" 1220 | bottom: "conv3_bp7" 1221 | top: "conv3_bp7" 1222 | prelu_param { 1223 | channel_shared: 1 1224 | } 1225 | } 1226 | 1227 | layer { 1228 | name: "eltwise2_bp7" 1229 | type: "Eltwise" 1230 | bottom: "conv3_bp7" 1231 | bottom: "conv1_bp7" 1232 | top: "output_bp7" 1233 | eltwise_param { 1234 | operation: 1 1235 | } 1236 | } 1237 | 1238 | layer { 1239 | name: "concat_bp7" 1240 | type: "Concat" 1241 | bottom: "output_bp7" 1242 | bottom: "concat_bp5" 1243 | top: "concat_bp7" 1244 | } 1245 | 1246 | layer { 1247 | name: "out_concat_bp7" 1248 | type: "Convolution" 1249 | bottom: "concat_bp7" 1250 | top: "out_concat_bp7" 1251 | param { 1252 | lr_mult: 1 1253 | } 1254 | param { 1255 | lr_mult: 1 1256 | } 1257 | convolution_param { 1258 | num_output: 64 1259 | kernel_size: 1 1260 | stride: 1 1261 | pad: 0 1262 | weight_filler { 1263 | type: "gaussian" 1264 | std: 0.1767 1265 | } 1266 | bias_filler { 1267 | type: "constant" 1268 | value: 0 1269 | } 1270 | } 1271 | } 1272 | 1273 | layer { 1274 | name: "relu1_concat_bp7" 1275 | type: "PReLU" 1276 | bottom: "out_concat_bp7" 1277 | top: "out_concat_bp7" 1278 | prelu_param { 1279 | channel_shared: 1 1280 | } 1281 | } 1282 | 1283 | ######################### BP8 ######################### 1284 | layer { 1285 | name: "conv1_bp8" 1286 | type: "Convolution" 1287 | bottom: "out_concat_bp7" 1288 | top: "conv1_bp8" 1289 | param { 1290 | lr_mult: 1 1291 | } 1292 | param { 1293 | lr_mult: 1 1294 | } 1295 | convolution_param { 1296 | num_output: 64 1297 | kernel_size: 8 1298 | stride: 4 1299 | pad: 2 1300 | weight_filler { 1301 | type: "gaussian" 1302 | std: 0.022 1303 | } 1304 | bias_filler { 1305 | type: "constant" 1306 | value: 0 1307 | } 1308 | } 1309 | } 1310 | 1311 | layer { 1312 | name: "relu1_bp8" 1313 | type: "PReLU" 1314 | bottom: "conv1_bp8" 1315 | top: "conv1_bp8" 1316 | prelu_param { 1317 | channel_shared: 1 1318 | } 1319 | } 1320 | 1321 | 1322 | layer { 1323 | name: "conv2_bp8" 1324 | type: "Deconvolution" 1325 | bottom: "conv1_bp8" 1326 | top: "conv2_bp8" 1327 | param { 1328 | lr_mult: 1 1329 | } 1330 | param { 1331 | lr_mult: 1 1332 | } 1333 | convolution_param { 1334 | num_output: 64 1335 | kernel_size: 8 1336 | stride: 4 1337 | pad: 2 1338 | weight_filler { 1339 | type: "gaussian" 1340 | std: 0.022 1341 | } 1342 | bias_filler { 1343 | type: "constant" 1344 | value: 0 1345 | } 1346 | } 1347 | } 1348 | 1349 | layer { 1350 | name: "relu2_bp8" 1351 | type: "PReLU" 1352 | bottom: "conv2_bp8" 1353 | top: "conv2_bp8" 1354 | prelu_param { 1355 | channel_shared: 1 1356 | } 1357 | } 1358 | 1359 | layer { 1360 | name: "eltwise1_bp8" 1361 | type: "Eltwise" 1362 | bottom: "out_concat_bp7" 1363 | bottom: "conv2_bp8" 1364 | top: "eltwise1_bp8" 1365 | eltwise_param { 1366 | operation: SUM 1367 | coeff: 1 1368 | coeff: -1 1369 | } 1370 | } 1371 | 1372 | layer { 1373 | name: "conv3_bp8" 1374 | type: "Convolution" 1375 | bottom: "eltwise1_bp8" 1376 | top: "conv3_bp8" 1377 | param { 1378 | lr_mult: 1 1379 | } 1380 | param { 1381 | lr_mult: 1 1382 | } 1383 | convolution_param { 1384 | num_output: 64 1385 | kernel_size: 8 1386 | stride: 4 1387 | pad: 2 1388 | weight_filler { 1389 | type: "gaussian" 1390 | std: 0.022 1391 | } 1392 | bias_filler { 1393 | type: "constant" 1394 | value: 0 1395 | } 1396 | } 1397 | } 1398 | 1399 | layer { 1400 | name: "relu3_bp8" 1401 | type: "PReLU" 1402 | bottom: "conv3_bp8" 1403 | top: "conv3_bp8" 1404 | prelu_param { 1405 | channel_shared: 1 1406 | } 1407 | } 1408 | 1409 | layer { 1410 | name: "eltwise2_bp8" 1411 | type: "Eltwise" 1412 | bottom: "conv3_bp8" 1413 | bottom: "conv1_bp8" 1414 | top: "output_bp8" 1415 | eltwise_param { 1416 | operation: 1 1417 | } 1418 | } 1419 | 1420 | layer { 1421 | name: "concat_bp8" 1422 | type: "Concat" 1423 | bottom: "output_bp8" 1424 | bottom: "concat_bp6" 1425 | top: "concat_bp8" 1426 | } 1427 | 1428 | layer { 1429 | name: "out_concat_bp8" 1430 | type: "Convolution" 1431 | bottom: "concat_bp8" 1432 | top: "out_concat_bp8" 1433 | param { 1434 | lr_mult: 1 1435 | } 1436 | param { 1437 | lr_mult: 1 1438 | } 1439 | convolution_param { 1440 | num_output: 64 1441 | kernel_size: 1 1442 | stride: 1 1443 | pad: 0 1444 | weight_filler { 1445 | type: "gaussian" 1446 | std: 0.1767 1447 | } 1448 | bias_filler { 1449 | type: "constant" 1450 | value: 0 1451 | } 1452 | } 1453 | } 1454 | 1455 | layer { 1456 | name: "relu1_concat_bp8" 1457 | type: "PReLU" 1458 | bottom: "out_concat_bp8" 1459 | top: "out_concat_bp8" 1460 | prelu_param { 1461 | channel_shared: 1 1462 | } 1463 | } 1464 | ######################### BP9 ######################### 1465 | layer { 1466 | name: "conv1_bp9" 1467 | type: "Deconvolution" 1468 | bottom: "out_concat_bp8" 1469 | top: "conv1_bp9" 1470 | param { 1471 | lr_mult: 1 1472 | } 1473 | param { 1474 | lr_mult: 1 1475 | } 1476 | convolution_param { 1477 | num_output: 64 1478 | kernel_size: 8 1479 | stride: 4 1480 | pad: 2 1481 | weight_filler { 1482 | type: "gaussian" 1483 | std: 0.022 1484 | } 1485 | bias_filler { 1486 | type: "constant" 1487 | value: 0 1488 | } 1489 | } 1490 | } 1491 | 1492 | layer { 1493 | name: "relu1_bp9" 1494 | type: "PReLU" 1495 | bottom: "conv1_bp9" 1496 | top: "conv1_bp9" 1497 | prelu_param { 1498 | channel_shared: 1 1499 | } 1500 | } 1501 | 1502 | 1503 | layer { 1504 | name: "conv2_bp9" 1505 | type: "Convolution" 1506 | bottom: "conv1_bp9" 1507 | top: "conv2_bp9" 1508 | param { 1509 | lr_mult: 1 1510 | } 1511 | param { 1512 | lr_mult: 1 1513 | } 1514 | convolution_param { 1515 | num_output: 64 1516 | kernel_size: 8 1517 | stride: 4 1518 | pad: 2 1519 | weight_filler { 1520 | type: "gaussian" 1521 | std: 0.022 1522 | } 1523 | bias_filler { 1524 | type: "constant" 1525 | value: 0 1526 | } 1527 | } 1528 | } 1529 | 1530 | layer { 1531 | name: "relu2_bp9" 1532 | type: "PReLU" 1533 | bottom: "conv2_bp9" 1534 | top: "conv2_bp9" 1535 | prelu_param { 1536 | channel_shared: 1 1537 | } 1538 | } 1539 | 1540 | layer { 1541 | name: "eltwise1_bp9" 1542 | type: "Eltwise" 1543 | bottom: "out_concat_bp8" 1544 | bottom: "conv2_bp9" 1545 | top: "eltwise1_bp9" 1546 | eltwise_param { 1547 | operation: SUM 1548 | coeff: 1 1549 | coeff: -1 1550 | } 1551 | } 1552 | 1553 | layer { 1554 | name: "conv3_bp9" 1555 | type: "Deconvolution" 1556 | bottom: "eltwise1_bp9" 1557 | top: "conv3_bp9" 1558 | param { 1559 | lr_mult: 1 1560 | } 1561 | param { 1562 | lr_mult: 1 1563 | } 1564 | convolution_param { 1565 | num_output: 64 1566 | kernel_size: 8 1567 | stride: 4 1568 | pad: 2 1569 | weight_filler { 1570 | type: "gaussian" 1571 | std: 0.022 1572 | } 1573 | bias_filler { 1574 | type: "constant" 1575 | value: 0 1576 | } 1577 | } 1578 | } 1579 | 1580 | layer { 1581 | name: "relu3_bp9" 1582 | type: "PReLU" 1583 | bottom: "conv3_bp9" 1584 | top: "conv3_bp9" 1585 | prelu_param { 1586 | channel_shared: 1 1587 | } 1588 | } 1589 | 1590 | layer { 1591 | name: "eltwise2_bp9" 1592 | type: "Eltwise" 1593 | bottom: "conv3_bp9" 1594 | bottom: "conv1_bp9" 1595 | top: "output_bp9" 1596 | eltwise_param { 1597 | operation: 1 1598 | } 1599 | } 1600 | 1601 | layer { 1602 | name: "concat_bp9" 1603 | type: "Concat" 1604 | bottom: "output_bp9" 1605 | bottom: "concat_bp7" 1606 | top: "concat_bp9" 1607 | } 1608 | 1609 | layer { 1610 | name: "out_concat_bp9" 1611 | type: "Convolution" 1612 | bottom: "concat_bp9" 1613 | top: "out_concat_bp9" 1614 | param { 1615 | lr_mult: 1 1616 | } 1617 | param { 1618 | lr_mult: 1 1619 | } 1620 | convolution_param { 1621 | num_output: 64 1622 | kernel_size: 1 1623 | stride: 1 1624 | pad: 0 1625 | weight_filler { 1626 | type: "gaussian" 1627 | std: 0.1767 1628 | } 1629 | bias_filler { 1630 | type: "constant" 1631 | value: 0 1632 | } 1633 | } 1634 | } 1635 | 1636 | layer { 1637 | name: "relu1_concat_bp9" 1638 | type: "PReLU" 1639 | bottom: "out_concat_bp9" 1640 | top: "out_concat_bp9" 1641 | prelu_param { 1642 | channel_shared: 1 1643 | } 1644 | } 1645 | ######################### BP10 ######################### 1646 | layer { 1647 | name: "conv1_bp10" 1648 | type: "Convolution" 1649 | bottom: "out_concat_bp9" 1650 | top: "conv1_bp10" 1651 | param { 1652 | lr_mult: 1 1653 | } 1654 | param { 1655 | lr_mult: 1 1656 | } 1657 | convolution_param { 1658 | num_output: 64 1659 | kernel_size: 8 1660 | stride: 4 1661 | pad: 2 1662 | weight_filler { 1663 | type: "gaussian" 1664 | std: 0.022 1665 | } 1666 | bias_filler { 1667 | type: "constant" 1668 | value: 0 1669 | } 1670 | } 1671 | } 1672 | 1673 | layer { 1674 | name: "relu1_bp10" 1675 | type: "PReLU" 1676 | bottom: "conv1_bp10" 1677 | top: "conv1_bp10" 1678 | prelu_param { 1679 | channel_shared: 1 1680 | } 1681 | } 1682 | 1683 | 1684 | layer { 1685 | name: "conv2_bp10" 1686 | type: "Deconvolution" 1687 | bottom: "conv1_bp10" 1688 | top: "conv2_bp10" 1689 | param { 1690 | lr_mult: 1 1691 | } 1692 | param { 1693 | lr_mult: 1 1694 | } 1695 | convolution_param { 1696 | num_output: 64 1697 | kernel_size: 8 1698 | stride: 4 1699 | pad: 2 1700 | weight_filler { 1701 | type: "gaussian" 1702 | std: 0.022 1703 | } 1704 | bias_filler { 1705 | type: "constant" 1706 | value: 0 1707 | } 1708 | } 1709 | } 1710 | 1711 | layer { 1712 | name: "relu2_bp10" 1713 | type: "PReLU" 1714 | bottom: "conv2_bp10" 1715 | top: "conv2_bp10" 1716 | prelu_param { 1717 | channel_shared: 1 1718 | } 1719 | } 1720 | 1721 | layer { 1722 | name: "eltwise1_bp10" 1723 | type: "Eltwise" 1724 | bottom: "out_concat_bp9" 1725 | bottom: "conv2_bp10" 1726 | top: "eltwise1_bp10" 1727 | eltwise_param { 1728 | operation: SUM 1729 | coeff: 1 1730 | coeff: -1 1731 | } 1732 | } 1733 | 1734 | layer { 1735 | name: "conv3_bp10" 1736 | type: "Convolution" 1737 | bottom: "eltwise1_bp10" 1738 | top: "conv3_bp10" 1739 | param { 1740 | lr_mult: 1 1741 | } 1742 | param { 1743 | lr_mult: 1 1744 | } 1745 | convolution_param { 1746 | num_output: 64 1747 | kernel_size: 8 1748 | stride: 4 1749 | pad: 2 1750 | weight_filler { 1751 | type: "gaussian" 1752 | std: 0.022 1753 | } 1754 | bias_filler { 1755 | type: "constant" 1756 | value: 0 1757 | } 1758 | } 1759 | } 1760 | 1761 | layer { 1762 | name: "relu3_bp10" 1763 | type: "PReLU" 1764 | bottom: "conv3_bp10" 1765 | top: "conv3_bp10" 1766 | prelu_param { 1767 | channel_shared: 1 1768 | } 1769 | } 1770 | 1771 | layer { 1772 | name: "eltwise2_bp10" 1773 | type: "Eltwise" 1774 | bottom: "conv3_bp10" 1775 | bottom: "conv1_bp10" 1776 | top: "output_bp10" 1777 | eltwise_param { 1778 | operation: 1 1779 | } 1780 | } 1781 | 1782 | layer { 1783 | name: "concat_bp10" 1784 | type: "Concat" 1785 | bottom: "output_bp10" 1786 | bottom: "concat_bp8" 1787 | top: "concat_bp10" 1788 | } 1789 | 1790 | layer { 1791 | name: "out_concat_bp10" 1792 | type: "Convolution" 1793 | bottom: "concat_bp10" 1794 | top: "out_concat_bp10" 1795 | param { 1796 | lr_mult: 1 1797 | } 1798 | param { 1799 | lr_mult: 1 1800 | } 1801 | convolution_param { 1802 | num_output: 64 1803 | kernel_size: 1 1804 | stride: 1 1805 | pad: 0 1806 | weight_filler { 1807 | type: "gaussian" 1808 | std: 0.1767 1809 | } 1810 | bias_filler { 1811 | type: "constant" 1812 | value: 0 1813 | } 1814 | } 1815 | } 1816 | 1817 | layer { 1818 | name: "relu1_concat_bp10" 1819 | type: "PReLU" 1820 | bottom: "out_concat_bp10" 1821 | top: "out_concat_bp10" 1822 | prelu_param { 1823 | channel_shared: 1 1824 | } 1825 | } 1826 | ######################### BP11 ######################### 1827 | layer { 1828 | name: "conv1_bp11" 1829 | type: "Deconvolution" 1830 | bottom: "out_concat_bp10" 1831 | top: "conv1_bp11" 1832 | param { 1833 | lr_mult: 1 1834 | } 1835 | param { 1836 | lr_mult: 1 1837 | } 1838 | convolution_param { 1839 | num_output: 64 1840 | kernel_size: 8 1841 | stride: 4 1842 | pad: 2 1843 | weight_filler { 1844 | type: "gaussian" 1845 | std: 0.022 1846 | } 1847 | bias_filler { 1848 | type: "constant" 1849 | value: 0 1850 | } 1851 | } 1852 | } 1853 | 1854 | layer { 1855 | name: "relu1_bp11" 1856 | type: "PReLU" 1857 | bottom: "conv1_bp11" 1858 | top: "conv1_bp11" 1859 | prelu_param { 1860 | channel_shared: 1 1861 | } 1862 | } 1863 | 1864 | 1865 | layer { 1866 | name: "conv2_bp11" 1867 | type: "Convolution" 1868 | bottom: "conv1_bp11" 1869 | top: "conv2_bp11" 1870 | param { 1871 | lr_mult: 1 1872 | } 1873 | param { 1874 | lr_mult: 1 1875 | } 1876 | convolution_param { 1877 | num_output: 64 1878 | kernel_size: 8 1879 | stride: 4 1880 | pad: 2 1881 | weight_filler { 1882 | type: "gaussian" 1883 | std: 0.022 1884 | } 1885 | bias_filler { 1886 | type: "constant" 1887 | value: 0 1888 | } 1889 | } 1890 | } 1891 | 1892 | layer { 1893 | name: "relu2_bp11" 1894 | type: "PReLU" 1895 | bottom: "conv2_bp11" 1896 | top: "conv2_bp11" 1897 | prelu_param { 1898 | channel_shared: 1 1899 | } 1900 | } 1901 | 1902 | layer { 1903 | name: "eltwise1_bp11" 1904 | type: "Eltwise" 1905 | bottom: "out_concat_bp10" 1906 | bottom: "conv2_bp11" 1907 | top: "eltwise1_bp11" 1908 | eltwise_param { 1909 | operation: SUM 1910 | coeff: 1 1911 | coeff: -1 1912 | } 1913 | } 1914 | 1915 | layer { 1916 | name: "conv3_bp11" 1917 | type: "Deconvolution" 1918 | bottom: "eltwise1_bp11" 1919 | top: "conv3_bp11" 1920 | param { 1921 | lr_mult: 1 1922 | } 1923 | param { 1924 | lr_mult: 1 1925 | } 1926 | convolution_param { 1927 | num_output: 64 1928 | kernel_size: 8 1929 | stride: 4 1930 | pad: 2 1931 | weight_filler { 1932 | type: "gaussian" 1933 | std: 0.022 1934 | } 1935 | bias_filler { 1936 | type: "constant" 1937 | value: 0 1938 | } 1939 | } 1940 | } 1941 | 1942 | layer { 1943 | name: "relu3_bp11" 1944 | type: "PReLU" 1945 | bottom: "conv3_bp11" 1946 | top: "conv3_bp11" 1947 | prelu_param { 1948 | channel_shared: 1 1949 | } 1950 | } 1951 | 1952 | layer { 1953 | name: "eltwise2_bp11" 1954 | type: "Eltwise" 1955 | bottom: "conv3_bp11" 1956 | bottom: "conv1_bp11" 1957 | top: "output_bp11" 1958 | eltwise_param { 1959 | operation: 1 1960 | } 1961 | } 1962 | 1963 | layer { 1964 | name: "concat_bp11" 1965 | type: "Concat" 1966 | bottom: "output_bp11" 1967 | bottom: "concat_bp9" 1968 | top: "concat_bp11" 1969 | } 1970 | 1971 | layer { 1972 | name: "out_concat_bp11" 1973 | type: "Convolution" 1974 | bottom: "concat_bp11" 1975 | top: "out_concat_bp11" 1976 | param { 1977 | lr_mult: 1 1978 | } 1979 | param { 1980 | lr_mult: 1 1981 | } 1982 | convolution_param { 1983 | num_output: 64 1984 | kernel_size: 1 1985 | stride: 1 1986 | pad: 0 1987 | weight_filler { 1988 | type: "gaussian" 1989 | std: 0.1767 1990 | } 1991 | bias_filler { 1992 | type: "constant" 1993 | value: 0 1994 | } 1995 | } 1996 | } 1997 | 1998 | layer { 1999 | name: "relu1_concat_bp11" 2000 | type: "PReLU" 2001 | bottom: "out_concat_bp11" 2002 | top: "out_concat_bp11" 2003 | prelu_param { 2004 | channel_shared: 1 2005 | } 2006 | } 2007 | 2008 | ######################### BP12 ######################### 2009 | layer { 2010 | name: "conv1_bp12" 2011 | type: "Convolution" 2012 | bottom: "out_concat_bp11" 2013 | top: "conv1_bp12" 2014 | param { 2015 | lr_mult: 1 2016 | } 2017 | param { 2018 | lr_mult: 1 2019 | } 2020 | convolution_param { 2021 | num_output: 64 2022 | kernel_size: 8 2023 | stride: 4 2024 | pad: 2 2025 | weight_filler { 2026 | type: "gaussian" 2027 | std: 0.022 2028 | } 2029 | bias_filler { 2030 | type: "constant" 2031 | value: 0 2032 | } 2033 | } 2034 | } 2035 | 2036 | layer { 2037 | name: "relu1_bp12" 2038 | type: "PReLU" 2039 | bottom: "conv1_bp12" 2040 | top: "conv1_bp12" 2041 | prelu_param { 2042 | channel_shared: 1 2043 | } 2044 | } 2045 | 2046 | 2047 | layer { 2048 | name: "conv2_bp12" 2049 | type: "Deconvolution" 2050 | bottom: "conv1_bp12" 2051 | top: "conv2_bp12" 2052 | param { 2053 | lr_mult: 1 2054 | } 2055 | param { 2056 | lr_mult: 1 2057 | } 2058 | convolution_param { 2059 | num_output: 64 2060 | kernel_size: 8 2061 | stride: 4 2062 | pad: 2 2063 | weight_filler { 2064 | type: "gaussian" 2065 | std: 0.022 2066 | } 2067 | bias_filler { 2068 | type: "constant" 2069 | value: 0 2070 | } 2071 | } 2072 | } 2073 | 2074 | layer { 2075 | name: "relu2_bp12" 2076 | type: "PReLU" 2077 | bottom: "conv2_bp12" 2078 | top: "conv2_bp12" 2079 | prelu_param { 2080 | channel_shared: 1 2081 | } 2082 | } 2083 | 2084 | layer { 2085 | name: "eltwise1_bp12" 2086 | type: "Eltwise" 2087 | bottom: "out_concat_bp11" 2088 | bottom: "conv2_bp12" 2089 | top: "eltwise1_bp12" 2090 | eltwise_param { 2091 | operation: SUM 2092 | coeff: 1 2093 | coeff: -1 2094 | } 2095 | } 2096 | 2097 | layer { 2098 | name: "conv3_bp12" 2099 | type: "Convolution" 2100 | bottom: "eltwise1_bp12" 2101 | top: "conv3_bp12" 2102 | param { 2103 | lr_mult: 1 2104 | } 2105 | param { 2106 | lr_mult: 1 2107 | } 2108 | convolution_param { 2109 | num_output: 64 2110 | kernel_size: 8 2111 | stride: 4 2112 | pad: 2 2113 | weight_filler { 2114 | type: "gaussian" 2115 | std: 0.022 2116 | } 2117 | bias_filler { 2118 | type: "constant" 2119 | value: 0 2120 | } 2121 | } 2122 | } 2123 | 2124 | layer { 2125 | name: "relu3_bp12" 2126 | type: "PReLU" 2127 | bottom: "conv3_bp12" 2128 | top: "conv3_bp12" 2129 | prelu_param { 2130 | channel_shared: 1 2131 | } 2132 | } 2133 | 2134 | layer { 2135 | name: "eltwise2_bp12" 2136 | type: "Eltwise" 2137 | bottom: "conv3_bp12" 2138 | bottom: "conv1_bp12" 2139 | top: "output_bp12" 2140 | eltwise_param { 2141 | operation: 1 2142 | } 2143 | } 2144 | 2145 | layer { 2146 | name: "concat_bp12" 2147 | type: "Concat" 2148 | bottom: "output_bp12" 2149 | bottom: "concat_bp10" 2150 | top: "concat_bp12" 2151 | } 2152 | 2153 | layer { 2154 | name: "out_concat_bp12" 2155 | type: "Convolution" 2156 | bottom: "concat_bp12" 2157 | top: "out_concat_bp12" 2158 | param { 2159 | lr_mult: 1 2160 | } 2161 | param { 2162 | lr_mult: 1 2163 | } 2164 | convolution_param { 2165 | num_output: 64 2166 | kernel_size: 1 2167 | stride: 1 2168 | pad: 0 2169 | weight_filler { 2170 | type: "gaussian" 2171 | std: 0.1767 2172 | } 2173 | bias_filler { 2174 | type: "constant" 2175 | value: 0 2176 | } 2177 | } 2178 | } 2179 | 2180 | layer { 2181 | name: "relu1_concat_bp12" 2182 | type: "PReLU" 2183 | bottom: "out_concat_bp12" 2184 | top: "out_concat_bp12" 2185 | prelu_param { 2186 | channel_shared: 1 2187 | } 2188 | } 2189 | ######################### BP13 ######################### 2190 | layer { 2191 | name: "conv1_bp13" 2192 | type: "Deconvolution" 2193 | bottom: "out_concat_bp12" 2194 | top: "conv1_bp13" 2195 | param { 2196 | lr_mult: 1 2197 | } 2198 | param { 2199 | lr_mult: 1 2200 | } 2201 | convolution_param { 2202 | num_output: 64 2203 | kernel_size: 8 2204 | stride: 4 2205 | pad: 2 2206 | weight_filler { 2207 | type: "gaussian" 2208 | std: 0.022 2209 | } 2210 | bias_filler { 2211 | type: "constant" 2212 | value: 0 2213 | } 2214 | } 2215 | } 2216 | 2217 | layer { 2218 | name: "relu1_bp13" 2219 | type: "PReLU" 2220 | bottom: "conv1_bp13" 2221 | top: "conv1_bp13" 2222 | prelu_param { 2223 | channel_shared: 1 2224 | } 2225 | } 2226 | 2227 | 2228 | layer { 2229 | name: "conv2_bp13" 2230 | type: "Convolution" 2231 | bottom: "conv1_bp13" 2232 | top: "conv2_bp13" 2233 | param { 2234 | lr_mult: 1 2235 | } 2236 | param { 2237 | lr_mult: 1 2238 | } 2239 | convolution_param { 2240 | num_output: 64 2241 | kernel_size: 8 2242 | stride: 4 2243 | pad: 2 2244 | weight_filler { 2245 | type: "gaussian" 2246 | std: 0.022 2247 | } 2248 | bias_filler { 2249 | type: "constant" 2250 | value: 0 2251 | } 2252 | } 2253 | } 2254 | 2255 | layer { 2256 | name: "relu2_bp13" 2257 | type: "PReLU" 2258 | bottom: "conv2_bp13" 2259 | top: "conv2_bp13" 2260 | prelu_param { 2261 | channel_shared: 1 2262 | } 2263 | } 2264 | 2265 | layer { 2266 | name: "eltwise1_bp13" 2267 | type: "Eltwise" 2268 | bottom: "out_concat_bp12" 2269 | bottom: "conv2_bp13" 2270 | top: "eltwise1_bp13" 2271 | eltwise_param { 2272 | operation: SUM 2273 | coeff: 1 2274 | coeff: -1 2275 | } 2276 | } 2277 | 2278 | layer { 2279 | name: "conv3_bp13" 2280 | type: "Deconvolution" 2281 | bottom: "eltwise1_bp13" 2282 | top: "conv3_bp13" 2283 | param { 2284 | lr_mult: 1 2285 | } 2286 | param { 2287 | lr_mult: 1 2288 | } 2289 | convolution_param { 2290 | num_output: 64 2291 | kernel_size: 8 2292 | stride: 4 2293 | pad: 2 2294 | weight_filler { 2295 | type: "gaussian" 2296 | std: 0.022 2297 | } 2298 | bias_filler { 2299 | type: "constant" 2300 | value: 0 2301 | } 2302 | } 2303 | } 2304 | 2305 | layer { 2306 | name: "relu3_bp13" 2307 | type: "PReLU" 2308 | bottom: "conv3_bp13" 2309 | top: "conv3_bp13" 2310 | prelu_param { 2311 | channel_shared: 1 2312 | } 2313 | } 2314 | 2315 | layer { 2316 | name: "eltwise2_bp13" 2317 | type: "Eltwise" 2318 | bottom: "conv3_bp13" 2319 | bottom: "conv1_bp13" 2320 | top: "output_bp13" 2321 | eltwise_param { 2322 | operation: 1 2323 | } 2324 | } 2325 | 2326 | layer { 2327 | name: "concat_bp13" 2328 | type: "Concat" 2329 | bottom: "output_bp13" 2330 | bottom: "concat_bp11" 2331 | top: "concat_bp13" 2332 | } 2333 | 2334 | ######################### END BP ######################### 2335 | 2336 | layer { 2337 | name: "conv_final" 2338 | type: "Convolution" 2339 | bottom: "concat_bp13" 2340 | top: "conv_final" 2341 | param { 2342 | lr_mult: 1 2343 | } 2344 | param { 2345 | lr_mult: 1 2346 | } 2347 | convolution_param { 2348 | num_output: 3 2349 | kernel_size: 3 2350 | stride: 1 2351 | pad: 1 2352 | weight_filler { 2353 | type: "gaussian" 2354 | std: 0.1 2355 | } 2356 | bias_filler { 2357 | type: "constant" 2358 | value: 0 2359 | } 2360 | } 2361 | } 2362 | 2363 | layer { 2364 | name: "eltwise_loss1" 2365 | type: "Eltwise" 2366 | bottom: "label" 2367 | bottom: "conv_final" 2368 | top: "diff1" 2369 | eltwise_param { 2370 | operation: SUM 2371 | coeff: 1 2372 | coeff: -1 2373 | } 2374 | } 2375 | 2376 | layer { 2377 | name: "layer1" 2378 | bottom: "diff1" 2379 | top: "abs1" 2380 | type: "AbsVal" 2381 | } 2382 | 2383 | layer { 2384 | name: "fc1" 2385 | type: "InnerProduct" 2386 | param { lr_mult: 0 decay_mult: 0 } 2387 | param { lr_mult: 0 decay_mult: 0 } 2388 | inner_product_param { 2389 | num_output: 1 2390 | weight_filler { 2391 | type: "constant" 2392 | value: 1 2393 | } 2394 | bias_filler { 2395 | type: "constant" 2396 | value: 0 2397 | } 2398 | } 2399 | bottom: "abs1" 2400 | top: "loss1" 2401 | loss_weight: 1 2402 | } 2403 | -------------------------------------------------------------------------------- /caffe/DBPN_solver_2x.prototxt: -------------------------------------------------------------------------------- 1 | # The train/test net protocol buffer definition 2 | net: "DBPN_net_2x.prototxt" 3 | test_iter: 500 4 | test_interval: 2000 5 | iter_size: 1 6 | 7 | # The base learning rate, momentum and the weight decay of the network. 8 | type: "Adam" 9 | base_lr: 0.0001 10 | momentum: 0.9 11 | weight_decay: 0.0001 12 | # The learning rate policy 13 | lr_policy: "step" 14 | gamma: 0.1 15 | stepsize: 500000 16 | # Display every 100 iterations 17 | display: 100 18 | # The maximum number of iterations 19 | max_iter: 1000000 20 | # snapshot intermediate results 21 | snapshot: 50000 22 | snapshot_prefix: "model/DBPN_2x" 23 | # solver mode: CPU or GPU 24 | solver_mode: GPU 25 | -------------------------------------------------------------------------------- /caffe/DBPN_solver_4x.prototxt: -------------------------------------------------------------------------------- 1 | # The train/test net protocol buffer definition 2 | net: "DBPN_net_4x.prototxt" 3 | test_iter: 600 4 | test_interval: 2000 5 | iter_size: 1 6 | 7 | # The base learning rate, momentum and the weight decay of the network. 8 | type: "Adam" 9 | base_lr: 0.0001 10 | momentum: 0.9 11 | weight_decay: 0.0001 12 | # The learning rate policy 13 | lr_policy: "step" 14 | gamma: 0.1 15 | stepsize: 500000 16 | # Display every 100 iterations 17 | display: 100 18 | # The maximum number of iterations 19 | max_iter: 1000000 20 | # snapshot intermediate results 21 | snapshot: 50000 22 | snapshot_prefix: "model/DBPN_4x" 23 | # solver mode: CPU or GPU 24 | solver_mode: GPU 25 | -------------------------------------------------------------------------------- /caffe/DBPN_solver_8x.prototxt: -------------------------------------------------------------------------------- 1 | # The train/test net protocol buffer definition 2 | net: "DBPN_net_8x.prototxt" 3 | test_iter: 600 4 | test_interval: 2000 5 | iter_size: 1 6 | 7 | # The base learning rate, momentum and the weight decay of the network. 8 | type: "Adam" 9 | base_lr: 0.0001 10 | momentum: 0.9 11 | weight_decay: 0.0001 12 | # The learning rate policy 13 | lr_policy: "step" 14 | gamma: 0.1 15 | stepsize: 500000 16 | # Display every 100 iterations 17 | display: 100 18 | # The maximum number of iterations 19 | max_iter: 1000000 20 | # snapshot intermediate results 21 | snapshot: 50000 22 | snapshot_prefix: "model/DBPN_8x" 23 | # solver mode: CPU or GPU 24 | solver_mode: GPU 25 | -------------------------------------------------------------------------------- /compute_psnr.m: -------------------------------------------------------------------------------- 1 | function psnr=compute_psnr(im1,im2) 2 | if size(im1, 3) == 3, 3 | im1 = rgb2ycbcr(im1); 4 | im1 = im1(:, :, 1); 5 | end 6 | 7 | if size(im2, 3) == 3, 8 | im2 = rgb2ycbcr(im2); 9 | im2 = im2(:, :, 1); 10 | end 11 | 12 | imdff = double(im1) - double(im2); 13 | imdff = imdff(:); 14 | 15 | rmse = sqrt(mean(imdff.^2)); 16 | psnr = 20*log10(255/rmse); -------------------------------------------------------------------------------- /modcrop.m: -------------------------------------------------------------------------------- 1 | function imgs = modcrop(imgs, modulo) 2 | if size(imgs,3)==1 3 | sz = size(imgs); 4 | sz = sz - mod(sz, modulo); 5 | imgs = imgs(1:sz(1), 1:sz(2)); 6 | else 7 | tmpsz = size(imgs); 8 | sz = tmpsz(1:2); 9 | sz = sz - mod(sz, modulo); 10 | imgs = imgs(1:sz(1), 1:sz(2),:); 11 | end 12 | 13 | -------------------------------------------------------------------------------- /model/readme.txt: -------------------------------------------------------------------------------- 1 | put the pretrained model here! 2 | -------------------------------------------------------------------------------- /run_cnn.m: -------------------------------------------------------------------------------- 1 | function [result,t_run] = run_cnn(im,model,weights,use_gpu) 2 | % Set caffe mode 3 | if exist('use_gpu', 'var') && use_gpu 4 | caffe.set_mode_gpu(); 5 | gpu_id = 0; % we will use the first gpu in this demo 6 | caffe.set_device(gpu_id); 7 | else 8 | caffe.set_mode_cpu(); 9 | end 10 | 11 | % Weights (parameter) file 12 | net_model = model; 13 | net_weights = weights; 14 | phase = 'test'; % run with phase test (so that dropout isn't applied) 15 | if ~exist(net_weights, 'file') 16 | error('Please download Model before you run this demo'); 17 | end 18 | 19 | %%%%% change PROTOTXT DEPLOY %%%%% 20 | [wid,hei,channels_num] = size(im); 21 | fidin1=fopen(net_model,'r+'); 22 | i=0; 23 | while ~feof(fidin1) 24 | tline=fgetl(fidin1); 25 | i=i+1; 26 | newtline{i}=tline; 27 | if i == 4 28 | newtline{i}=[tline(1:11) num2str(channels_num)]; 29 | end 30 | if i == 5 31 | newtline{i}=[tline(1:11) num2str(hei)]; 32 | end 33 | if i == 6 34 | newtline{i}=[tline(1:11) num2str(wid)]; 35 | end 36 | end 37 | fclose(fidin1); 38 | fidin1=fopen(net_model,'w+'); 39 | for j=1:i 40 | fprintf(fidin1,'%s\n',newtline{j}); 41 | end 42 | fclose(fidin1); 43 | %%%%%%%%%%%%%%%%%%%%%%%% 44 | 45 | % Initialize a network 46 | net = caffe.Net(net_model, net_weights, phase); 47 | 48 | %run network 49 | tic; 50 | out = net.forward({im}); 51 | t_run=toc; 52 | result=out{1}; 53 | %end 54 | 55 | %result=blockproc( reshape(1:dd,a/aa,b/bb)', [1,1], @(x) im_out(:,:,x.data) ); 56 | % call caffe.reset_all() to reset caffe 57 | caffe.reset_all(); 58 | 59 | -------------------------------------------------------------------------------- /selfEnsemble.m: -------------------------------------------------------------------------------- 1 | function [im_drl,t_drbpsr]=selfEnsemble(im_l,model,weights,use_gpu) 2 | t_drbpsr=0; 3 | im_l_90=imrotate(im_l,90); 4 | im_l_180=imrotate(im_l,180); 5 | im_l_270=imrotate(im_l,270); 6 | [im_drl_0,t_drbpsr_0] = run_cnn(im_l, model, weights,use_gpu); 7 | [im_drl_90,t_drbpsr_90] = run_cnn(im_l_90, model, weights,use_gpu); 8 | [im_drl_180,t_drbpsr_180] = run_cnn(im_l_180, model, weights,use_gpu); 9 | [im_drl_270,t_drbpsr_270] = run_cnn(im_l_270, model, weights,use_gpu); 10 | [cc,vv,channel]=size(im_drl_0); 11 | im_drl=zeros(cc,vv,channel,8); 12 | 13 | t_drbpsr=t_drbpsr+t_drbpsr_0+t_drbpsr_90+t_drbpsr_180+t_drbpsr_270; 14 | im_drl(:,:,:,1)=im_drl_0; 15 | im_drl(:,:,:,2)=imrotate(im_drl_90,-90); 16 | im_drl(:,:,:,3)=imrotate(im_drl_180,-180); 17 | im_drl(:,:,:,4)=imrotate(im_drl_270,-270); 18 | 19 | im_l=flip(im_l,2); 20 | im_l_90=imrotate(im_l,90); 21 | im_l_180=imrotate(im_l,180); 22 | im_l_270=imrotate(im_l,270); 23 | [im_drl_0,t_drbpsr_0] = run_cnn(im_l, model, weights,use_gpu); 24 | [im_drl_90,t_drbpsr_90] = run_cnn(im_l_90, model, weights,use_gpu); 25 | [im_drl_180,t_drbpsr_180] = run_cnn(im_l_180, model, weights,use_gpu); 26 | [im_drl_270,t_drbpsr_270] = run_cnn(im_l_270, model, weights,use_gpu); 27 | 28 | t_drbpsr=t_drbpsr+t_drbpsr_0+t_drbpsr_90+t_drbpsr_180+t_drbpsr_270; 29 | im_drl(:,:,:,5)=flip(im_drl_0,2); 30 | im_drl(:,:,:,6)=flip(imrotate(im_drl_90,-90),2); 31 | im_drl(:,:,:,7)=flip(imrotate(im_drl_180,-180),2); 32 | im_drl(:,:,:,8)=flip(imrotate(im_drl_270,-270),2); 33 | 34 | im_drl=mean(im_drl,4); -------------------------------------------------------------------------------- /shave.m: -------------------------------------------------------------------------------- 1 | function I = shave(I, border) 2 | I = I(1+border(1):end-border(1), ... 3 | 1+border(2):end-border(2), :, :); 4 | 5 | -------------------------------------------------------------------------------- /ssim_index.m: -------------------------------------------------------------------------------- 1 | function [mssim, ssim_map] = ssim_index(img1, img2, K, window, L) 2 | 3 | %======================================================================== 4 | %SSIM Index, Version 1.0 5 | %Copyright(c) 2003 Zhou Wang 6 | %All Rights Reserved. 7 | % 8 | %The author is with Howard Hughes Medical Institute, and Laboratory 9 | %for Computational Vision at Center for Neural Science and Courant 10 | %Institute of Mathematical Sciences, New York University. 11 | % 12 | %---------------------------------------------------------------------- 13 | %Permission to use, copy, or modify this software and its documentation 14 | %for educational and research purposes only and without fee is hereby 15 | %granted, provided that this copyright notice and the original authors' 16 | %names appear on all copies and supporting documentation. This program 17 | %shall not be used, rewritten, or adapted as the basis of a commercial 18 | %software or hardware product without first obtaining permission of the 19 | %authors. The authors make no representations about the suitability of 20 | %this software for any purpose. It is provided "as is" without express 21 | %or implied warranty. 22 | %---------------------------------------------------------------------- 23 | % 24 | %This is an implementation of the algorithm for calculating the 25 | %Structural SIMilarity (SSIM) index between two images. Please refer 26 | %to the following paper: 27 | % 28 | %Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image 29 | %quality assessment: From error measurement to structural similarity" 30 | %IEEE Transactios on Image Processing, vol. 13, no. 1, Jan. 2004. 31 | % 32 | %Kindly report any suggestions or corrections to zhouwang@ieee.org 33 | % 34 | %---------------------------------------------------------------------- 35 | % 36 | %Input : (1) img1: the first image being compared 37 | % (2) img2: the second image being compared 38 | % (3) K: constants in the SSIM index formula (see the above 39 | % reference). defualt value: K = [0.01 0.03] 40 | % (4) window: local window for statistics (see the above 41 | % reference). default widnow is Gaussian given by 42 | % window = fspecial('gaussian', 11, 1.5); 43 | % (5) L: dynamic range of the images. default: L = 255 44 | % 45 | %Output: (1) mssim: the mean SSIM index value between 2 images. 46 | % If one of the images being compared is regarded as 47 | % perfect quality, then mssim can be considered as the 48 | % quality measure of the other image. 49 | % If img1 = img2, then mssim = 1. 50 | % (2) ssim_map: the SSIM index map of the test image. The map 51 | % has a smaller size than the input images. The actual size: 52 | % size(img1) - size(window) + 1. 53 | % 54 | %Default Usage: 55 | % Given 2 test images img1 and img2, whose dynamic range is 0-255 56 | % 57 | % [mssim ssim_map] = ssim_index(img1, img2); 58 | % 59 | %Advanced Usage: 60 | % User defined parameters. For example 61 | % 62 | % K = [0.05 0.05]; 63 | % window = ones(8); 64 | % L = 100; 65 | % [mssim ssim_map] = ssim_index(img1, img2, K, window, L); 66 | % 67 | %See the results: 68 | % 69 | % mssim %Gives the mssim value 70 | % imshow(max(0, ssim_map).^4) %Shows the SSIM index map 71 | % 72 | %======================================================================== 73 | 74 | if size(img1, 3) == 3, 75 | img1 = rgb2ycbcr(img1); 76 | img1 = img1(:, :, 1); 77 | end 78 | 79 | if size(img2, 3) == 3, 80 | img2 = rgb2ycbcr(img2); 81 | img2 = img2(:, :, 1); 82 | end 83 | 84 | if (nargin < 2 || nargin > 5) 85 | ssim_index = -Inf; 86 | ssim_map = -Inf; 87 | return; 88 | end 89 | 90 | if (size(img1) ~= size(img2)) 91 | ssim_index = -Inf; 92 | ssim_map = -Inf; 93 | return; 94 | end 95 | 96 | [M N] = size(img1); 97 | 98 | if (nargin == 2) 99 | if ((M < 11) || (N < 11)) 100 | ssim_index = -Inf; 101 | ssim_map = -Inf; 102 | return 103 | end 104 | window = fspecial('gaussian', 11, 1.5); % 105 | K(1) = 0.01; % default settings 106 | K(2) = 0.03; % 107 | L = 255; % 108 | end 109 | 110 | if (nargin == 3) 111 | if ((M < 11) || (N < 11)) 112 | ssim_index = -Inf; 113 | ssim_map = -Inf; 114 | return 115 | end 116 | window = fspecial('gaussian', 11, 1.5); 117 | L = 255; 118 | if (length(K) == 2) 119 | if (K(1) < 0 || K(2) < 0) 120 | ssim_index = -Inf; 121 | ssim_map = -Inf; 122 | return; 123 | end 124 | else 125 | ssim_index = -Inf; 126 | ssim_map = -Inf; 127 | return; 128 | end 129 | end 130 | 131 | if (nargin == 4) 132 | [H W] = size(window); 133 | if ((H*W) < 4 || (H > M) || (W > N)) 134 | ssim_index = -Inf; 135 | ssim_map = -Inf; 136 | return 137 | end 138 | L = 255; 139 | if (length(K) == 2) 140 | if (K(1) < 0 || K(2) < 0) 141 | ssim_index = -Inf; 142 | ssim_map = -Inf; 143 | return; 144 | end 145 | else 146 | ssim_index = -Inf; 147 | ssim_map = -Inf; 148 | return; 149 | end 150 | end 151 | 152 | if (nargin == 5) 153 | [H W] = size(window); 154 | if ((H*W) < 4 || (H > M) || (W > N)) 155 | ssim_index = -Inf; 156 | ssim_map = -Inf; 157 | return 158 | end 159 | if (length(K) == 2) 160 | if (K(1) < 0 || K(2) < 0) 161 | ssim_index = -Inf; 162 | ssim_map = -Inf; 163 | return; 164 | end 165 | else 166 | ssim_index = -Inf; 167 | ssim_map = -Inf; 168 | return; 169 | end 170 | end 171 | 172 | C1 = (K(1)*L)^2; 173 | C2 = (K(2)*L)^2; 174 | window = window/sum(sum(window)); 175 | img1 = double(img1); 176 | img2 = double(img2); 177 | 178 | mu1 = filter2(window, img1, 'valid'); 179 | mu2 = filter2(window, img2, 'valid'); 180 | mu1_sq = mu1.*mu1; 181 | mu2_sq = mu2.*mu2; 182 | mu1_mu2 = mu1.*mu2; 183 | sigma1_sq = filter2(window, img1.*img1, 'valid') - mu1_sq; 184 | sigma2_sq = filter2(window, img2.*img2, 'valid') - mu2_sq; 185 | sigma12 = filter2(window, img1.*img2, 'valid') - mu1_mu2; 186 | 187 | if (C1 > 0 & C2 > 0) 188 | ssim_map = ((2*mu1_mu2 + C1).*(2*sigma12 + C2))./((mu1_sq + mu2_sq + C1).*(sigma1_sq + sigma2_sq + C2)); 189 | else 190 | numerator1 = 2*mu1_mu2 + C1; 191 | numerator2 = 2*sigma12 + C2; 192 | denominator1 = mu1_sq + mu2_sq + C1; 193 | denominator2 = sigma1_sq + sigma2_sq + C2; 194 | ssim_map = ones(size(mu1)); 195 | index = (denominator1.*denominator2 > 0); 196 | ssim_map(index) = (numerator1(index).*numerator2(index))./(denominator1(index).*denominator2(index)); 197 | index = (denominator1 ~= 0) & (denominator2 == 0); 198 | ssim_map(index) = numerator1(index)./denominator1(index); 199 | end 200 | 201 | mssim = mean2(ssim_map); 202 | 203 | return --------------------------------------------------------------------------------