Code Monkey home page Code Monkey logo

aesthetic-predictor's Introduction

aesthetic-predictor

CLIP+MLP Aesthetic Score Predictor, using ViT-H, based on improved-aesthetic-predictor

project by Miao Ju and hlky

Datasets used:

imageembeds.py

I had some issues with clip-retrieval, so this just computes the image embeds for every image in input-dir, and checks if the path already exists in output-dir (in case you need to resume)

usage: imageembeds.py [-h] --input-dir INPUT_DIR  
                      --output-dir OUTPUT_DIR     
                      [--batch-size BATCH_SIZE]   
                      [--num_preprocess_threads NUM_PREPROCESS_THREADS]
                      [--gpu-id GPU_ID] [--cpu]   
imageembeds.py: error: the following arguments are required: --input-dir, --output-dir

precomputed ViT-H embeds for sac+ava+logos

sacavalogo.py

prepares the data for training

dataset ratings files (to use with precomputed embeds)

usage: sacavalogo.py [-h] --laion-logo-parquet LAION_LOGO_PARQUET --laion-logo-embeddings-dir LAION_LOGO_EMBEDDINGS_DIR --ava-txt AVA_TXT --ava-embeddings-dir AVA_EMBEDDINGS_DIR --sac-sqlite
                     SAC_SQLITE --sac-embeddings-dir SAC_EMBEDDINGS_DIR --output-dir OUTPUT_DIR [--x-only] [--y-only]
sacavalogo.py: error: the following arguments are required: --laion-logo-parquet, --laion-logo-embeddings-dir, --ava-txt, --ava-embeddings-dir, --sac-sqlite, --sac-embeddings-dir, --output-dir

use --x-only or --y-only to only prepare one part of the data, in case you want to try something different for the ratings only

train_predictor.py

usage: train_predictor.py [-h] --x-npy X_NPY --y-npy Y_NPY [--output-dir OUTPUT_DIR] [--save-name SAVE_NAME] [--batch-size BATCH_SIZE] [--lr LR] [--optimizer {adam,adamw}]
                          [--val-percentage VAL_PERCENTAGE] [--epochs EPOCHS] [--val-count VAL_COUNT]
train_predictor.py: error: the following arguments are required: --x-npy, --y-npy

app.py

gradio demo

usage: app.py [-h] --model-path MODEL_PATH [--device {cuda,cpu}] [--port PORT]
app.py: error: the following arguments are required: --model-path

aesthetic-predictor's People

Contributors

hlky avatar

Forkers

c00renut

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.