Skip to content

wxywhu/demo-resLF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo-resLF

Reimplementation of resLF(CVPR2019): Residual Networks for Light Field Image Super-Resolution (http://openaccess.thecvf.com/content_CVPR_2019/papers/Zhang_Residual_Networks_for_Light_Field_Image_Super-Resolution_CVPR_2019_paper.pdf)

Motivation

The official code released by authors is at (https://github.com/shuozh/resLF), which is not testable because of the unavailable test images.

I notice that in the official code the test images are in the png format. However, most avaiable light field(LF) test images are in the mat format.

Demo 1

On the one hand, we transform the LF data into png format and have not change any code in resLF_test.py script.

Useage

Please download the pre-trained model in the folder.

python resLF_test.py -I 'data_png/' -M 'model/' -S save_path/ -o 9 -c 7 -g 0 -s 2 -i blur -C n
python resLF_test.py -I 'data_png/' -M 'model/' -S save_path/ -o 9 -c 7 -g 0 -s 2 -i bicubic -C n

Performance(PSNR/SSIM) on Budda and Mona

bicubic x2 Avg. max. min.
MonasRoom 41.17/0.9888 42.35/0.9918 39.15/0.9819
Buddha 39.57/0.9836 40.98/0.9877 38.46/0.9784
blur x2 Avg. max. min.
MonasRoom 39.37/0.9816 40.76/0.9870 38.08/0.9753
Buddha 37.54/0.9739 39.03/0.9801 36.03/0.9653

However, the outputs we get contain artifacts and do not reflect the results in the paper

Demo 2

On the other hand, we downsample the test images(in the mat format) in Matlab to get the low-resolution inputs and write our own script for testing.

Useage

Please download the pre-trained model in the folder. The test inputs can be generated by 'generate_lr.m' script.

python eval.py -image_path 'data_mat/' --model 'model/' --scale 2 --view_n 7 --interpolation bicubic --gpu_no 0

We only list the results of bicubic interpolation (x2) on the Buddha and Mona.

Performance(PSNR/SSIM) on Budda and Mona

Name Avg Max Min
Buddha 39.33/0.9825 40.66/0.9866 38.29/0.9744
MonasRoom 40.89/0.9879 41.93/0.9907 38.96/0.9809

We also made some attempts to achieve better results and got the following performance by clipping 7 edge pixels for testing

Name Avg Max Min
Buddha 39.82/0.9825 40.94/0.9866 38.71/0.9744
MonasRoom 41.19/0.9879 42.20/0.9907 39.30/0.9809

However, there is still a gap between the results and those in the paper

To do

Try to train the resLF from scratch.

Releases

No releases published

Packages

No packages published