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
  • --emb-cache-dir: Directory for image embedding cache
  • --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.1.0.tar.gz (51.0 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.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for waifu_scorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68f0e319637a7f3f2a5c58b83c735351ac5e339c0c3676979ab373056b0b859e
MD5 379c0cebefd001e1db141e60f6164a59
BLAKE2b-256 1d2c7cd4700a25d0f493640b716ffbaccccc0fba720f3cb9334112f3a7ab809d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for waifu_scorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e30a894b11d6ef7fe6ac362a01ab7d3b80f8b50835d372b1a152c03d0367966
MD5 1a8d2cb4abbd6bfcb2c668e496dacb3d
BLAKE2b-256 5931b7ff2e09ec8f7a5960b1261a2e248a2b872b26736085f9aaa1096fefc36d

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