peteryuX / esrgan-tf2

ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks, published in ECCV 2018) implemented in Tensorflow 2.0+. This is an unofficial implementation. With Colab.
MIT License
136 stars 42 forks source link

image with lower psnr , appearing visually good #2

Open nanmehta opened 4 years ago

nanmehta commented 4 years ago

can u please tell me the reason, though esrgan has good results visually, but the psnr is low as compaired to psnr results

peteryuX commented 4 years ago

Hey, @nan-rock. Higher PSNR dose not mean better visual quality but fidelity.

nanmehta commented 4 years ago

okay .. and thanks for the code

nanmehta commented 4 years ago

hey,i need your help. when i am using imresize_np() to generte set 14 low resolution images, my images are getting distorted. this is my code `path="D:/SR_testing_datasets/Set14" savepath="d:" for img_name in os.listdir(path): raw_img = cv2.imread(os.path.join(path, img_name)) shape=raw_img.shape

print(shape)

            new_image=imresize_np(raw_img, (2)).astype(np.uint8)
            #print("new",new_image.shape)

            #new_image=tf.image.resize( raw_img, [shape[0]+1,shape[1]+1], method ='bilinear'4
            result_img_path = os.path.join(savepath,img_name)
            #print(  result_img_path)
            #print(result_img_path)
            #print(os.listdir(result_img_path))
            a=cv2.imwrite(result_img_path, new_image)
            print(a)  `

image

peteryuX commented 4 years ago

Try np.clip() value to 0 - 255 before astype to uint8

nanmehta commented 4 years ago

thanks a lot sir. wish u good luck.

nanmehta commented 4 years ago

hello sir, is the result evaluated on y channel or RGB