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

CLIPImageQualityAssessment insists on prompt argument to be called 'beutiful' #2243

Closed
spezialspezial opened this issue Nov 27, 2023 · 3 comments
Assignees
Labels

Comments

@spezialspezial
Copy link

🐛 Bug

not working:
metric = CLIPImageQualityAssessment(prompts=("beautiful",))

working:
metric = CLIPImageQualityAssessment(prompts=("beutiful",))

This uses ClipVision, right? I assume it's not trained on 'beutiful' and there is just a typo in the CLIPImageQualityAssessment class

Expected behavior

prompt 'beautiful' should be valid

Environment

Linux, Python 3.10.13, torch 2.1.0+cu118, pip torchmetrics 1.2.0

@spezialspezial spezialspezial added bug / fix Something isn't working help wanted Extra attention is needed labels Nov 27, 2023
@Borda Borda added the v1.2.x label Nov 27, 2023
@SkafteNicki
Copy link
Member

SkafteNicki commented Nov 28, 2023

Hi @spezialspezial, thanks for reporting this issue.
I sadly cannot reproduce the error. For me it works with "beautiful" and does not work with "beutiful":
image
Here is the specific dictionary that we check prompts against:

_PROMPTS: Dict[str, Tuple[str, str]] = {
"quality": ("Good photo.", "Bad photo."),
"brightness": ("Bright photo.", "Dark photo."),
"noisiness": ("Clean photo.", "Noisy photo."),
"colorfullness": ("Colorful photo.", "Dull photo."),
"sharpness": ("Sharp photo.", "Blurry photo."),
"contrast": ("High contrast photo.", "Low contrast photo."),
"complexity": ("Complex photo.", "Simple photo."),
"natural": ("Natural photo.", "Synthetic photo."),
"happy": ("Happy photo.", "Sad photo."),
"scary": ("Scary photo.", "Peaceful photo."),
"new": ("New photo.", "Old photo."),
"warm": ("Warm photo.", "Cold photo."),
"real": ("Real photo.", "Abstract photo."),
"beautiful": ("Beautiful photo.", "Ugly photo."),
"lonely": ("Lonely photo.", "Sociable photo."),
"relaxing": ("Relaxing photo.", "Stressful photo."),
}

as you can see it says beautiful in the dictionary.

@SkafteNicki SkafteNicki added waiting on author and removed bug / fix Something isn't working labels Nov 28, 2023
@SkafteNicki SkafteNicki self-assigned this Nov 28, 2023
@SkafteNicki
Copy link
Member

I rechecked and it was fixed in this PR: #2103
That change is available in the newest release of torchmetrics v1.2.1 released today.
Closing issue.

@spezialspezial
Copy link
Author

Thanks a lot

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

No branches or pull requests

3 participants