shuozh / resLF

Residual Networks for Light Field Image Super-Resolution
38 stars 6 forks source link

Testing on HCI dataset. #8

Open zsameem opened 4 years ago

zsameem commented 4 years ago

Hi,

I am trying to run the testing script 'resLF_test.py' on the HCI with the command mentioned in the readme as follows:

python resLF_test.py -I datasets/heidelberg/test/bicycle/ -M model/ -S save_path/ -o 9 -c 3 -g 0 -s 2 -i blur -C y

I get the following errors.

========================================
create save directory...
done
========================================
build network and load model...
done
========================================
predict image...
----------------------------------------------------------------------------------------------------
[1/83] input_Cam025.png
Traceback (most recent call last):
  File "resLF_test.py", line 348, in <module>
    gpu_no=gpu_no)
  File "resLF_test.py", line 108, in main
    gt_ycbcr, lr_ycbcr = image_input(image_path + image_name, scale, view_n, view_n_ori, interpolation)
  File "/home/samim/Desktop/ms/resLF/func_input.py", line 49, in image_input
    j + num_vew_gap::view_num_ori, :]
ValueError: could not broadcast input array from shape (57,57,3) into shape (56,56,3)

I don't understand why the input becomes (57,57,3). Could you explain how I can test a single sequence from HCI e.g for 7x7, 9x9 or even 3x3 light fields.

I have also tried running with my own script where I basically setup the tensors and do the forward pass. However, the output I get contains artifacts and does not reflect the results in the paper so I want to test with the original. Any help would be highly appreciated.

wxywhu commented 4 years ago

@zsameem I have the same issue. Do you have any progress? I release my own script at https://github.com/wxywhu/demo-resLF. Maybe we could refer to each other to find out the problem

zsameem commented 4 years ago

@wxywhu I was able to reproduce results from their paper for HCI dataset. The problem was the input. The resLF_test.py script takes the input light field in a different format. The format is one image containing all the views of the LF. This big image is filled with pixels from separate views in the corresponding position. Let me know if this is helpful. I can also share the code that I used to synthesize this big light field from seperate views for the LF if you want.

wxywhu commented 4 years ago

@mamamya88 So nice of you. It is really helpful. I transform the LF data from 'mat' to 'png' format as you say. However, the performance(PSNR&SSIM) is really worse than that in the paper. I list the results below.

| 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    | 

I did not change any code in resLF_test.py script. Could you get the results the same as the paper? if you can, could you please share your code and the LF data? My email is wangxinya@whu.edu.cn. Thank you so much.

Judith0107 commented 4 years ago

I have the same issue, How can I solve it?

bebemdjd commented 6 months ago

I have the same issue, How can I solve it?@zsameem