Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image with lower psnr , appearing visually good #2

Open
nanmehta opened this issue Jul 11, 2020 · 7 comments
Open

image with lower psnr , appearing visually good #2

nanmehta opened this issue Jul 11, 2020 · 7 comments

Comments

@nanmehta
Copy link

No description provided.

@nanmehta
Copy link
Author

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

@peteryuX
Copy link
Owner

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

@nanmehta
Copy link
Author

okay .. and thanks for the code

@nanmehta
Copy link
Author

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
Copy link
Owner

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

@nanmehta
Copy link
Author

thanks a lot sir.
wish u good luck.

@nanmehta
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants