esrgan-tf2 icon indicating copy to clipboard operation
esrgan-tf2 copied to clipboard

image with lower psnr , appearing visually good

Open nanmehta opened this issue 3 years ago • 7 comments

nanmehta avatar Jul 11 '20 06:07 nanmehta

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

nanmehta avatar Jul 11 '20 06:07 nanmehta

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

peteryuX avatar Jul 11 '20 14:07 peteryuX

okay .. and thanks for the code

nanmehta avatar Jul 11 '20 16:07 nanmehta

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

nanmehta avatar Jul 13 '20 06:07 nanmehta

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

peteryuX avatar Jul 13 '20 08:07 peteryuX

thanks a lot sir. wish u good luck.

nanmehta avatar Jul 13 '20 11:07 nanmehta

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

nanmehta avatar Jul 16 '20 13:07 nanmehta