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.12+ and pip. It is recommended to use a virtual environment.

pip install .[cpu]      # For CPU only
pip install .[cu121]    # For CUDA 12.1
pip install .[cu124]    # For CUDA 12.4

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.0.tar.gz (78.9 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.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: waifu_scorer-0.2.0.tar.gz
  • Upload date:
  • Size: 78.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for waifu_scorer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b42e7a672638b937b0de213128717ca81bb173e30a9e07657f26b6d078ec313
MD5 08c6338e7cf52af6b308abef2c9bebd7
BLAKE2b-256 7c9c7c91585314f7a6e9b1a814b72cf1737b1ea689ba5af2fb36eebf54eb52cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for waifu_scorer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a9e3cc1be29633baff1240faf94dd85f64d380665343392ed379045f2fedb8e
MD5 20c955f48b2495827dc1f9354a97668f
BLAKE2b-256 616d675b962e91f13177942d0c3ae04c1e5d6f6539763b11c809fd4dcbb35341

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