tgxs002 / HPSv2

Human Preference Score v2: A Solid Benchmark for Evaluating Human Preferences of Text-to-Image Synthesis
Apache License 2.0
354 stars 12 forks source link

Can it be a metric for image to image Local inpainting #19

Open magichero23 opened 11 months ago

tgxs002 commented 11 months ago

Sure.

learn01one commented 10 months ago

Sure. How to do it? Isn’t there no prompt for the image-to-image task?hope to reply,thanks

tgxs002 commented 10 months ago

You can compare full images. For example, there are 5 images (different left hands) and scores are listed below:

1 HPSv2: 26.32 2 HPSv2: 26.25 3 HPSv2: 26.44 4 HPSv2: 26.32 5 HPSv2: 26.42

The score somehow reflects the difference in visual quality.

tgxs002 commented 10 months ago

The prompt is "A young adult Japanese delinquent with a pompadour hairstyle named Jotaro Kujo stands in an action pose ready for a fight on the cover of a manga issue.", in case you want to reproduce it.

tgxs002 commented 10 months ago
>>> import hpsv2
>>> result = hpsv2.score(["1.png", "2.png", "3.png", "4.png", "5.png"], "A young adult Japanese delinquent with a pompadour hairstyle named Jotaro Kujo stands in an action pose ready for a fight on the cover of a manga issue.")
>>> result
[0.2632, 0.2625, 0.2644, 0.2632, 0.2642]