xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.49k stars 318 forks source link

Error on Vid4 dataset #5

Closed surfingnirvana closed 5 years ago

surfingnirvana commented 5 years ago

This error occurs with the testing codes:

19-05-28 13:52:03.735 - INFO: Data: Vid4 - ../datasets/Vid4/BIx4/ 19-05-28 13:52:03.736 - INFO: Padding mode: new_info 19-05-28 13:52:03.736 - INFO: Model path: ../experiments/pretrained_models/EDVR_Vimeo90K_SR_L.pth 19-05-28 13:52:03.736 - INFO: Save images: True 19-05-28 13:52:03.736 - INFO: Flip Test: False Traceback (most recent call last): File "test_Vid4_REDS4_with_GT.py", line 275, in main() File "test_Vid4_REDS4_with_GT.py", line 228, in main crt_psnr = util.calculate_psnr(cropped_output 255, cropped_GT * 255) EDVR-master\codes\utils\util.py", line 138, in calculate_psnr mse = np.mean((img1 - img2)**2) ValueError: operands could not be broadcast together with shapes (576,720) (144,180)

xinntao commented 5 years ago

Did you use windows? It works on my computer with Ubuntu.

Form your error EDVR-master\codes\utils\util.py , you can try change sub_folder_GT = sub_folder.replace('/BIx4/', '/GT/') to sub_folder_GT = sub_folder.replace('BIx4', 'GT')

surfingnirvana commented 5 years ago

Yes Windows 10. That did the trick it is working. I also changed sub_folder_GT = sub_folder.replace('/{}/'.format(data_mode), '/GT/') to sub_folder_GT = sub_folder.replace('{}'.format(data_mode), 'GT') Thank you.

surfingnirvana commented 5 years ago

Are the models (EDVR_REDS_deblurcomp_L.pth) specifically trained for the 1280x720 resolution? Or is there any way to modify the input resolution? Thank you.

xinntao commented 5 years ago

This model is trained for REDS. You can test inputs with other resolution but the performance may drop.