Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

image-evaluator

image-evaluator is a lightweight CLI utility for generative AI practitioners and researchers. It evaluates six core quality dimensions of synthetic images: predicted visual aesthetics, text-to-image semantic alignment, facial identity preservation, and pairwise image fidelity (deep perceptual distance LPIPS, structural similarity SSIM, and peak signal-to-noise ratio PSNR).

Evaluation Workflow

flowchart LR
    A[Task Goal] --> B{Choose --metrics}
    B -->|aesthetic| C[LAION Aesthetic]
    B -->|clip| D[CLIP Similarity]
    B -->|arcface| E[ArcFace Distance]
    B -->|lpips| F[LPIPS Distance]
    B -->|ssim| G[SSIM Similarity]
    B -->|psnr| H[PSNR Ratio]
    C --> I[Float, Higher Better]
    D --> J[Cosine Sim, Higher Better]
    E --> K[Cosine Dist, Lower Better]
    F --> L[Distance, Lower Better]
    G --> M[Index, Higher Better]
    H --> N[dB, Higher Better]

Metric Selection

Target Goal Metric Name Required Options Output Direction Technical Details
Visual appeal & quality aesthetic --image Higher is better docs/aesthetic-score.md
Prompt semantic match clip --image, --prompt Higher is better docs/clip-similarity.md
Facial identity consistency arcface --image, --reference Lower is better docs/arcface-distance.md
Deep perceptual similarity lpips --image, --reference Lower is better docs/pairwise-fidelity.md
Structural degradation ssim --image, --reference Higher is better docs/pairwise-fidelity.md
Pixel reconstruction SNR psnr --image, --reference Higher is better docs/pairwise-fidelity.md

Quick Start

Installation

0.1.0a1 is an alpha preview and requires Python 3.11–3.14. Install the preview explicitly because package installers normally exclude prereleases:

python -m pip install --pre image-evaluator==0.1.0a1

The supported runtime path is macOS or Linux with CPU ONNX Runtime. Linux users who want the GPU runtime can replace onnxruntime with onnxruntime-gpu after installation. Windows is currently unverified.

Tutorial

The CLI enforces explicit metric selection via --metrics and initializes only selected models:

  • --metrics (required): One or more of aesthetic, clip, arcface, lpips, ssim, psnr.
  • --image (required): Path to an image file or directory.
  • --prompt: Required when clip is selected; prohibited otherwise.
  • --reference: Required when reference-based metrics (arcface, lpips, ssim, psnr) are selected; prohibited otherwise.
  1. Aesthetic evaluation only:

    image-evaluator --metrics aesthetic --image path/to/image.png
    
  2. CLIP text alignment only:

    image-evaluator --metrics clip --image path/to/image.png --prompt "a cat in oil painting style"
    
  3. Pairwise fidelity triad (LPIPS, SSIM, PSNR):

    image-evaluator --metrics lpips ssim psnr --image path/to/image.png --reference path/to/ref.png
    
  4. Multi-metric evaluation across folders:

    image-evaluator --metrics aesthetic clip arcface lpips ssim psnr \
        --image path/to/images/ \
        --prompt path/to/prompts/ \
        --reference path/to/refs/
    

Interpretation & Protocol Guidelines

  1. Protocol Consistency: Always compare scores under identical model backbones and preprocessing pipelines.
  2. Relative Comparison: Avoid universal absolute thresholds; interpret scores relative to a baseline control.
  3. Fail-Fast Spatial Dimension Policy: Pairwise metrics (lpips, ssim, psnr) strictly reject mismatched image dimensions with ValueError to prevent artificial interpolation distortion. Align sizes beforehand via downsampling or super-resolution.
  4. SSIM Minimum Size: SSIM requires both image dimensions to be at least 11 pixels because it uses the documented 11 × 11 Gaussian window. Smaller inputs fail with ValueError.

Preview Status

Area 0.1.0a1 status
Metrics Aesthetic, CLIP, ArcFace, LPIPS, SSIM, PSNR
macOS Verified on Apple Silicon with Python 3.11
Linux Clean install and test suite verified on GitHub Actions with Python 3.11
Windows External Python 3.12 smoke test passed for CLIP, LPIPS, SSIM, and PSNR; full support remains unverified
Dataset metrics FID/KID planned for M4; not included

See CHANGELOG.md for the accepted user-facing changes and known preview limitations.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_evaluator-0.1.0a1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_evaluator-0.1.0a1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file image_evaluator-0.1.0a1.tar.gz.

File metadata

  • Download URL: image_evaluator-0.1.0a1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for image_evaluator-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 a5ed87cb6194cc3acd0e48fad0b8ac3bb739657695f690a31b1ecb4433b8f45d
MD5 25109239e484d01b9b97cd394b10fc22
BLAKE2b-256 8caca3175522b335d68753edbe193c004daa8f2044544a537fd90d9d23869089

See more details on using hashes here.

File details

Details for the file image_evaluator-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for image_evaluator-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 72a13672968f07843683e6aa5db1762819da1f69e08f72c9718a88413dd4679d
MD5 1e515ac68bac47cbb812a5c611439c2f
BLAKE2b-256 5ddea67aee350919acc1d300a771ae74844d68fb0bed73b5c52c4b3caa68e9cc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.0a1 This release

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page