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

"Exception: Unsupported source type" #23

Open
charpng opened this issue Oct 14, 2024 · 1 comment
Open

"Exception: Unsupported source type" #23

charpng opened this issue Oct 14, 2024 · 1 comment

Comments

@charpng
Copy link

charpng commented Oct 14, 2024

import pyiqa
model = pyiqa.create_metric('unique', as_loss=False)
score = model(img)
#img = ..\image\10_1_C_1000_far_env1000.png

An error was encountered while running the above code

  File "D:\Tianma\UNIQUE\unique_.py", line 26, in <module>
    score = model(img)
            ^^^^^^^^^^
Exception: Unsupported source type

This is a png image with a resolution of 5218*2160. What do I need to change to solve this error?

@zwx8981
Copy link
Owner

zwx8981 commented Oct 14, 2024

Try: 1, If your image is a gray-scale one, convert it to RGB by duplicating it into three channels. 2, Resize your image such that the longest edge is lower than 1024.

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