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.1.tar.gz (51.1 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.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for waifu_scorer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 211c996c60ecfaf14ac94f243deef22873bcb40c3388ce2d73a94daf6ebb74e8
MD5 40ef938db901f1f207c8373c08af5cab
BLAKE2b-256 1cda347a791522a51d1942fecaa54ffe4993a716bcc5fbede2e9656f3e298edd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for waifu_scorer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4167fb77579a2540d06d46398b94479c848318e7019f269fc31d5eb342d319a
MD5 8ee0e5f3983efcc51be292a5f38b56ed
BLAKE2b-256 9190247b87c420a9cd751f34d9a814626c0cff1ff47a4d074e2f726bcd2e5502

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