Skip to content

A simple aesthetic scorer + pruner + website you can run to view the results from the scoring with

Notifications You must be signed in to change notification settings

MNeMoNiCuZ/aesthetic-scorer

 
 

Repository files navigation

Aesthetic Scorer

This is a fork of https://github.com/Linaqruf/cafe-aesthetic-scorer

It adds a simple way of using the tool, as well as preview the results.

The tool is meant to rate the image aesthetically, as well as provide some other metadata based on the type of image it is.

Screenshot

image

Installation

Set up a virtual environment to run the script. Feel free to run the setup.bat to automatically set one up.

Install the requirements pip install -r requirements.txt. This is optionally done by the setup script.

Install the correct version of pytorch for your CUDA. It's usually:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

or

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Using the tool

  1. Place the images or folders of images in the /input/ directory.
  2. Run 1-rate.bat to rate the images with the system.

You can now view the images and their rating as a website:

  1. Run 2-view.bat to launch the server and website.

On the website, you can expand the arrow below the title to show the options.

image

  1. From the options, you can set the gallery column count, width and sorting options.
  2. You can also play with the filter/pruning settings. Use > or < and integers as % to set the filter values

Example: Aesthetics >50 will keep only images that are rated at 0.5 or higher in aesthetics

  1. By pressing the Prune-button, the pruning script will move any currently hidden images to a pruned directory, along with a json containing the pruned images data.

You can also do this by running the 3-prune.bat script. This will use the pruneconfig.ini as the pruning settings.

Alternatively:

  1. Place the images or folders of images in the /input/ directory.
  2. Activate your environment and run rate.py.
  3. (Optional) Launch a web server: python -m http.server 8000 and open http://localhost:8000/index.html in your web browser.
  4. Edit pruneconfig.ini with your pruning preferences (using < and > and full integers as %-values).
  5. Run prune.py.

Known Issues

  • The realistic value isn't properly being sorted with the drop-down menu (therefore commented out)

About

A simple aesthetic scorer + pruner + website you can run to view the results from the scoring with

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 44.0%
  • Python 38.7%
  • Batchfile 12.5%
  • CSS 4.8%