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.1.1.tar.gz (9.3 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.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: silva_scorer-0.1.1.tar.gz
  • Upload date:
  • Size: 9.3 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.1.1.tar.gz
Algorithm Hash digest
SHA256 010d91ef1ddf8bd05c0c619c3e11455eb97be25a9feedfe2c47ad92935750ab9
MD5 e1edab8cc60d7011ca89ff808da8399b
BLAKE2b-256 11469a1c6bc4a64d61d257d6f508d16d121084dfb78296eb9fa961443782fb1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for silva_scorer-0.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: silva_scorer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29c27f3aa18eceee6d7097964c0995d259fe7fb4da3ca979dea73d2bc2426dad
MD5 48c3d75664fd8b77f078a876474da73f
BLAKE2b-256 0370a34417fe1d654b7ee4e241ed2773732fdac0d751a2e4e6c12d3123470067

See more details on using hashes here.

Provenance

The following attestation bundles were made for silva_scorer-0.1.1-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