Skip to main content

SILVA: SigLIP-based Illustration Visual Aesthetic Scorer (inference library)

Project description

silva-scorer

Scores an illustration by one person's aesthetic taste — an ordinal-regression head on top of frozen google/siglip2-so400m-patch14-384 embeddings. Only the head ships (~7 MB); it is not a universal quality model and won't match anyone else's preferences.

Install

The PyPI name is silva-scorer; it imports as silva.

pip install silva-scorer              # embedding -> score (torch + huggingface-hub only)
pip install "silva-scorer[backbone]"  # image -> score, adds the SigLIP2 backbone + `silva` CLI

Score an image

With the [backbone] extra, silva loads SigLIP2 for you — give it a path (or a list of them) and get a score back:

from silva import AestheticScorer

scorer = AestheticScorer.from_pretrained("Jannchie/silva-aesthetic")
scorer.score("image1.jpg")                  # 0.7421
scorer.score(["image1.jpg", "image2.jpg"])  # [0.7421, 0.3128]

Or from the CLI:

silva score image1.jpg image2.jpg --repo-id Jannchie/silva-aesthetic
# image1.jpg  score=0.7421

Score from an embedding

Already running google/siglip2-so400m-patch14-384 yourself? The core install (no transformers) scores a 1152-d embedding directly:

import torch
from silva import HubAestheticModel

head = HubAestheticModel.from_pretrained("Jannchie/silva-aesthetic").eval()
emb = torch.randn(1, 1152)        # raw pooler_output from the backbone above
print(head(emb)["score"].item())  # [0, 1] — fraction of quality bars cleared

The embedding must be the raw pooler_output of that exact backbone — it's what the head was trained against.

Training your own head

silva is inference-only. To fit a head on your own 1–5 ratings, see the silva-train package.

License

MIT

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

silva_scorer-0.4.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

silva_scorer-0.4.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file silva_scorer-0.4.0.tar.gz.

File metadata

  • Download URL: silva_scorer-0.4.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for silva_scorer-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2b377932e9a5c60e9cadf37c54c25e909ca8fb8135f09269ed717b2a027db7b2
MD5 ac2fdf40408239290113fed17a09c43c
BLAKE2b-256 9aa3b0c736880b7b7d5290a2ea64a76e0c373582cded13d6986242a3eb34d391

See more details on using hashes here.

Provenance

The following attestation bundles were made for silva_scorer-0.4.0.tar.gz:

Publisher: publish.yml on Jannchie/silva

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file silva_scorer-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: silva_scorer-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for silva_scorer-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e79e443e97e69f7cfdcbc79464a6084449d4c62d2917b409dc83204f02f88fd8
MD5 df44e2488d2522625f39e8b6819b3246
BLAKE2b-256 cf165ea7945f67c445996b856fbda7b27cfbede4037206c716878953699e79e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for silva_scorer-0.4.0-py3-none-any.whl:

Publisher: publish.yml on Jannchie/silva

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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