Batch aesthetics score predictor with statistics on Gradio

Hello, this is my first project on this platform as well as first time coding on python and gradio.

I’ve noticed a proof-of-concept space which implemented LAION scoring for a single file with json output and decided to improve the GUI, adding the ability to collect statistics over a bunch of files and export individial file scores as well as basic statistical data (min/max/etc) to csv.

I used Colab for development, so you will find that my code does not use (m)any of the HF abilities and callbacks, so I appreciate advices on integrating it with the infrastructure of Spaces.

Also since this is my first project on Python as well, I’d be glad to learn how to make my code more pythonic. I mainly code in Javascript.

3 Likes

At the point of creation I couldn’t think of a good Examples dataset to include in the GUI, but now I found one, so I’ll provide it here along with the demonstration of the Space’s UI.
Perhaps you’ve heard of the faceresearch project that averages faces of many people to produce a typical image of every ethnic group. Those usually look fairly pretty since averaging takes away any irregularities and wrinkles, but more importantly, it provides an objective image that can’t be accused of cherrypicking. What better dataset could there be for estimating aesthetics?

The whole dataset is in the /faces folder of my space, I’ll just provide screenshots of results, leaving it up to the reader to draw conclusions.

The UI and stats

Note the different modes of overall stats display - in relation to the maximum value or to the spread.

And the photos in question

2 Likes