thangvubk / FEQE

Official code (Tensorflow) for paper "Fast and Efficient Image Quality Enhancement via Desubpixel Convolutional Neural Networks"
MIT License
128 stars 19 forks source link

division by 0 error #11

Open RyukAD opened 3 years ago

RyukAD commented 3 years ago

Hi, Im running the test command

python3 test.py --dataset B100

and it gives the following error :

Traceback (most recent call last): File "test.py", line 108, in main() File "test.py", line 104, in main print('Average PSNR: %.4f' %(psnr_avr/len(hr_paths))) ZeroDivisionError: division by zero

any help would be appreciated

RyukAD commented 3 years ago

Also all the images get blurry after your model does its thing. Enhancement?

mimikyudesu commented 2 years ago

Also all the images get blurry after your model does its thing. Enhancement?

Hi, I'm also running this code, and have this problem I found a small bug in the test.py At line 94 of test.py [sr] = sess.run([t_sr], {t_lr: lr, t_hr: hr}) it set t_lr as the image which downsampling with hr, that make the result of FEQE would be more blurry than before. In addition, there is no need to do vgg during test, which means you don't need t_hr. You can just change [sr] = sess.run([t_sr], {t_lr: lr, t_hr: hr}) to [sr] = sess.run([t_sr], {t_lr: hr}) that would output what you want. Hope this can help you.