AestheticScore<T>
Models & Types · AiDotNet.Metrics
Aesthetic Score metric using CLIP for evaluating image aesthetics.
How It Works
Aesthetic Score uses CLIP embeddings trained on aesthetic preference data to predict how visually appealing an image is. This is commonly used in image generation to filter or rank outputs by aesthetic quality.
Typical aesthetic scores (1-10 scale):
-
7: High aesthetic quality
- 5-7: Average aesthetic quality
- <5: Low aesthetic quality
Constructors
| Constructor | Summary |
|---|---|
AestheticScore(IMultimodalEmbedding<T> clipModel, Vector<T> aestheticWeights, string[] positivePrompts, string[] negativePrompts, T? aestheticBias) |
Initializes a new instance of AestheticScore calculator. |
Methods
| Method | Summary |
|---|---|
T Compute(double[] imageData) |
Computes aesthetic score for an image. |
Vector<T> ComputeBatch(IList<double[]> images) |
Computes aesthetic scores for a batch of images. |
int[] RankByAesthetic(IList<double[]> images) |
Ranks images by aesthetic score. |
Fields
| Field | Summary |
|---|---|
string[] DefaultNegativePrompts |
Default negative aesthetic prompts used for zero-shot aesthetic scoring. |
string[] DefaultPositivePrompts |
Default positive aesthetic prompts used for zero-shot aesthetic scoring. |