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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for waifu_scorer-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6e9dc0f97d34561035f13769216c8826051b26af28d7f5746dfb932cd39c6bde
MD5 08582a7112bd1b3f1c5ff4ea2aa29023
BLAKE2b-256 95b417036004c6cccc41a8498c38e303506486adf0338ac1718acd65fbae8af4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for waifu_scorer-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 699908650ffe63bf798a62c4ef13187d264df2f22e03b14fd696a65699dcfd45
MD5 87d23d6dfe3c4201c5864eb1a352adcc
BLAKE2b-256 a9dafa5d8bca4e3ed0ba660362ae8a61a61defe969ebf38b79c0a93a6f09f1ee

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