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

Uploaded Python 3

File details

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

File metadata

  • Download URL: silva_scorer-0.1.0.tar.gz
  • Upload date:
  • Size: 9.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.1.0.tar.gz
Algorithm Hash digest
SHA256 dcfe91570e05ddd07651dff2a1148a7a200a8b993ac0d7a0a7c97623dbe93067
MD5 f6294aadcb22eb533d7bfdb99a169d80
BLAKE2b-256 a2f9e247a2701695d18705dd27f273294b575f3f36738629c2902cbb8570261f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: silva_scorer-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b6745a06ee79f0a10dfc007332912a72976ad7d13a8b2743437020d5480d7cd
MD5 e5b7e4cb6981ad00bb17329fa39c1fed
BLAKE2b-256 f931ecc45164c48f6ae1d048e7f96fc080479ec150de8e1b7d827d6e029807de

See more details on using hashes here.

Provenance

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