This is an implementation of "Deep Convolutional Neural Network on iOS Mobile Devices",Chun-Fu (Richard) Chen ,on the topic of VDSR(Very Deep Super Resolution).
The original model and part of my code is copied from "caffe-vdsr" , which is an implementation of "Accurate Image Super-Resolution Using Very Deep Convolutional Networks"
The reference: [1] Jiwon Kim, Jung Kwon Lee and Kyoung Mu Lee, "Accurate Image Super-Resolution Using Very Deep Convolutional Networks", Proc. of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016
##Instruction In order to implement a convolutional computation on mobile device, we need to prune the weights of the model to make the inference process faster,and at the same time,not losing the performance.
This method is trying to eliminate some kernels which are not important, and then fine-tune the model.
###Data The data I used was preprocessd by Matlab,because I found that the "rgb2ycbcr" and "imresize" functions cannot be reproduced by any Python packages.
So you just need to place these data under the "Matlab_mat" directory.
$ python3 VDSR_fine_tune.py
Have preprocessed low-resolution lena.png to im_y.mat (in kill_kernel directory)
-
$ python3 TEST.py
-
There will be an output "python_im_h_y.mat" , put it in your matlab directory
-
open Matlab
-
run Demo_PSNR_finetune.m you will see the PSNR
-
You can run Demo_SR_Conv.m from the author's github to see the PSNR of original VDSR version. I list the answer in my PSNR_ans.txt
###Eliminate 15% kenels (actually eliminate 29.8% parameters)
-
The Official PSNR: 36.635908 dB
-
My fine-tune model PSNR : 36.207958 dB
-
No fine-tune PSNR: 32.353143 dB
-
Just bicubic :32.723209 dB
###Eliminate 18% kenels (actually eliminate 34.9% parameters)
-
The Official PSNR: 36.635908 dB
-
My fine-tune model PSNR :36.093349 dB
-
No fine-tune PSNR: 32.345002 dB
-
Just bicubic :32.723209 dB
###Eliminate 20% kenels (actually eliminate 38.1% parameters)
-
The Official PSNR: 36.635908 dB
-
My fine-tune model PSNR :36.065349 dB
-
No fine-tune PSNR: 32.317988 dB
-
Just bicubic :32.723209 dB
You can see the matlab_vs_python to see the comparison of lots of functions