Uses existing CLiP model with an additional small pretrained model to calculate perceived aesthetic score of an image.
Go to file
Vladimir Mandic b60c3c8254 add score to extra params and allow usage in filename 2023-05-21 11:23:49 -04:00
models create 2023-01-14 12:10:39 -05:00
scripts add score to extra params and allow usage in filename 2023-05-21 11:23:49 -04:00
.gitignore add gitignore 2023-01-28 11:01:03 -05:00
README.md add cli 2023-01-31 07:57:07 -05:00
aesthetic-scorer-cli.py update clip import 2023-04-13 11:18:56 -04:00
aesthetic-scorer.jpg create 2023-01-14 12:10:39 -05:00
exif.py update 2023-04-22 11:30:47 -04:00

README.md

Aesthetic Scorer extension for SD Automatic WebUI

Uses existing CLiP model with an additional small pretrained model to calculate perceived aesthetic score of an image

Enable or disable via Settings -> Aesthetic scorer

This is an "invisible" extension, it runs in the background before any image save and
appends score as PNG info section and/or EXIF comments field

Notes

  • Configuration via SettingsAesthetic scorer
    screenshot
  • Extension obeys existing Move VAE and CLiP to RAM settings
  • Models will be auto-downloaded upon first usage (small)
  • Score values are 0..10
  • Supports both CLiP-ViT-L/14 and CLiP-ViT-B/16

This extension uses different method than Aesthetic Image Scorer extension which:

  • Uses modified SD Chad scorer implementation
  • Windows-only!
  • Executes as to replace image.save so limited compatibity with other non-txt2img use-cases

CLI

As a utility for batch processing, this extension can be used from CLI as well
Input param provided can be image, list of images, wildcards or folder
Score is only output to console and does not modify original file

python aesthetic-scorer-cli.py ~/generative/Demo/*.jpg

Loading CLiP model: ViT-L/14
Loading Aesthetic Score model: sac_public_2022_06_29_vit_l_14_linear.pth
Aesthetic score: 5.0 for image /home/vlado/generative/Demo/abby.jpg
Aesthetic score: 4.18 for image /home/vlado/generative/Demo/ana.jpg
Aesthetic score: 4.12 for image /home/vlado/generative/Demo/dreamkelly.jpg

Credits