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.3.0.tar.gz (10.2 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.3.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: silva_scorer-0.3.0.tar.gz
  • Upload date:
  • Size: 10.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 ceda0195e896cbb2c9a5143ac46add55757b60f2bbd9c8768dcade013d3df2aa
MD5 f153d4e5013e19a2c49b5582460d75e7
BLAKE2b-256 a5e45a59db0ad37a8348eea9223ac6ad9bca0d17ebb949995d7c0c31e11b7696

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: silva_scorer-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e80006b5fbb4909002548726f3954d601bc47bae9aca4b3f1c542d7f6270711
MD5 7c3a5e0833269d8e8baa6213d7e898c1
BLAKE2b-256 705c1654289760847b86e1df4fa37e8aa3d7f1f2b95be7807f86bf0439f15217

See more details on using hashes here.

Provenance

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