Skip to main content

A deep learning-based tool for scoring anime-style (waifu) images, supporting multiple hardware backends and PyTorch environments.

Project description

waifu-scorer

A deep learning-based tool for scoring anime-style images, supporting multiple hardware backends and PyTorch environments.

Installation

You need Python 3.10+ and pip. It is recommended to use a virtual environment.

1. Install PyTorch for your platform

Pick the right command for your OS / hardware from the official selector: https://pytorch.org/get-started/locally/

A few common examples:

# CPU only (any OS)
pip install torch --index-url https://download.pytorch.org/whl/cpu

# NVIDIA GPU (pick the CUDA version that matches your driver)
pip install torch --index-url https://download.pytorch.org/whl/cu124
pip install torch --index-url https://download.pytorch.org/whl/cu128

# AMD GPU on Linux (ROCm)
pip install torch --index-url https://download.pytorch.org/whl/rocm6.2

# macOS (Apple Silicon, MPS backend) — just use the default PyPI wheel
pip install torch

2. Install waifu-scorer

pip install waifu-scorer

If you are using uv, you can let it pick a torch backend automatically:

uv pip install --torch-backend=auto waifu-scorer

Usage in Python

You can also use waifu-scorer directly in your Python code:

from waifu_scorer.predict import WaifuScorer

scorer = WaifuScorer()
results = scorer(["path/to/image1.jpg", "path/to/image2.png"])
for img_path, score in zip(["path/to/image1.jpg", "path/to/image2.png"], results, strict=False):
    print(f"{img_path}: {score:.3f}")

Usage from Command Line

After installation, you can use the command line interface to score images:

python -m waifu_scorer path/to/image1.jpg path/to/image2.png

Options

  • --model: Path to a custom model file
  • --device: Device to use
  • --verbose: Enable verbose output

Example:

python -m waifu_scorer examples/waifu1.png --verbose

Reference

This project refers to waifuset.


For more details, see the code and documentation in the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waifu_scorer-0.2.2.tar.gz (85.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waifu_scorer-0.2.2-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file waifu_scorer-0.2.2.tar.gz.

File metadata

  • Download URL: waifu_scorer-0.2.2.tar.gz
  • Upload date:
  • Size: 85.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for waifu_scorer-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b01a96973a389d01d0ff37f323b6239ea461357af63cc9455a4b4088ae55f96c
MD5 019036e2bce7155f7a55daa58e1a99b8
BLAKE2b-256 da368bde04c9a38aa1c01c2f9912d9ffa08481c2284a9530fadc1d60444fc4b1

See more details on using hashes here.

File details

Details for the file waifu_scorer-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: waifu_scorer-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for waifu_scorer-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81fc3f9660f5f367a6e624e0fcc842906acaa48372742206fb16fe596d76cb24
MD5 44535f89df0a1919b2a6b2ec4c233ad1
BLAKE2b-256 a4aaa486149ad74bae7bf645cf717485582d611fc50a3cb7d90edda0d5ba25d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page