score_aesthetics
Evaluate visual aesthetics of photographs, focusing on lighting, composition, and clarity, independent of subject matter. Compare two images to determine which is more aesthetically pleasing.
Instructions
Rate how aesthetically pleasing an image looks, independent of its content.
Uses a CLIP-based predictor trained on human aesthetic ratings (the LAION "improved aesthetic predictor"). Reflects visual qualities like lighting, composition and clarity — not whether the subject matter is correct or matches a prompt. A technically accurate but flatly-lit, cluttered photo can score low; a blurry but beautifully lit one can score comparatively higher.
In v0.8.0, the returned payload is enriched. The legacy score is duplicated
as photographic_aesthetic. If a Reasoner is configured at the server level,
an artistic_judgment is generated. If the server is installed with the [iqa]
extra, a technical_quality score (0-100) is included via the MUSIQ ONNX model.
Returns one {"score": float, "rating": str} object per page/image. score
is roughly on a 1-10 scale; rating buckets it coarsely for quick triage —
read score for anything comparative.
Its training set was photographic, so it rates photographs, not fine art: celebrated paintings and illustrations score middling (Hokusai's "The Great Wave" comes back around 5.8) without that meaning anything is wrong with them. Use it to compare like with like — several shots of the same subject, or successive edits of one image — and do not read a single absolute score as a verdict on quality.
Set style_context=true to also get the medium the score is being read in.
The CLIP backbone (already loaded for scoring) classifies the image as a
photograph, oil painting, digital illustration, etc., and that style plus
its style_distribution are added to each result. This is the local-model
answer to the photography bias: it doesn't make the head understand fine art,
but it tells you that the score is for a non-photographic medium, so you
read it with the documented caveat instead of as an absolute verdict.
Set compare_with to a reference image to switch to relative mode: both
images are scored and the result becomes one entry per image page carrying
{image, reference, delta, preferred}, with preferred being "image" /
"reference" / "tie" (tie when |delta| < 0.05). This is the predictor's
calibrated use -- like-with-like comparison -- so it sidesteps the absolute
photography bias that makes a single score misleading across media. With
style_context=true, both media are classified and a cross_medium_warning
is added when they differ (cross-medium comparison is out of calibrated
scope). The absolute score is not recalibrated; the relative delta is the
actionable output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| src | Yes | Local file path or http(s) URL of the image to process. PDFs are also accepted and are rendered one image per page, so tools that return a list return one entry per page. | |
| compare_with | No | Path or URL of a reference image to compare against. The predictor's documented valid use is like-with-like comparison (edits of one image, or several shots of one subject), so this routes you there instead of a single bias-affected absolute number: both images are scored and the result carries the per-image scores, the `delta`, and `preferred` ('image'/'reference'/'tie', tie when |delta| < 0.05). With style_context=true, both media are classified and a `cross_medium_warning` is added when they differ (cross-medium comparison is out of calibrated scope). Each image page is compared to the first page of the reference. Omit (default) for the original single-image scoring shape. | |
| style_context | No | When true, also classify the image's medium/genre (photograph, oil painting, digital illustration, ...) using the already-loaded CLIP backbone, and return it alongside the score. The aesthetic head was trained on photographs, so a non-photographic medium is the context the score must be read in -- an oil painting scoring ~5.8 is not 'wrong'. Default false keeps the original {score, rating} shape; true adds {style, style_distribution} to each result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |