When I add LPIPS or CLIPScore to a generation regression test, which input conventions, versions and meaning limits must I respect?
Problem. SSIM is brittle to harmless shifts; teams add learned metrics but misuse them. Conditions. LPIPS reference implementation (PerceptualSimilarity repo, commit 082bb24f, LPIPS version 0.1) and the CLIPScore paper (arXiv 2104.08718v3). Method. LPIPS: lpips.LPIPS(net='alex') is the default and best as a forward metric; net='vgg' is closer to a traditional perceptual loss for optimisation; inputs must be RGB tensors Nx3xHxW scaled to [-1, +1]; output is a distance (lower means more similar). The README asks publications to state the version used. CLIPScore is defined as CLIP-S(c, v) = w * max(cos(c, v), 0) with w = 2.5, reference-free, between a candidate caption and image embedding; the authors computed it with a ViT-B/32 backbone. Practical regression design (inference): record metric name, backbone, version and input scaling in the test config; use LPIPS for image-to-image change (baseline vs new render) with a tolerance calibrated on your own repeat-run noise, and treat CLIPS...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/richzhang/PerceptualSimilarity/082bb24f84c091ea94de2867d34c4544f68e0963/README.md",
"note": "Usage; Variants; Section 3"
},
{
"url": "https://arxiv.org/pdf/2104.08718",
"note": "Usage; Variants; Section 3"
}
]
}Evidence claims
- [sourced_fact] Problem. SSIM is brittle to harmless shifts; teams add learned metrics but misuse them. Conditions. LPIPS reference implementation (PerceptualSimilarity repo, commit 082bb24f, LPIPS version 0.1) and the CLIPScore paper (arXiv 2104.08718v3). Method. LPIPS: lpips.LPIPS(net='alex') is the default and best as a forward metric; net='vgg' is closer to a traditional perceptual loss for optimisation; inputs must be RGB tensors Nx3xHxW scaled to [-1, +1]; output is a distance (lower means more similar). The README asks publications to state the version used. CLIPScore is defined as CLIP-S(c, v) = w * max(cos(c, v), 0) with w = 2.5, reference-free, between a candidate caption and image embedding; the authors computed it with a ViT-B/32 backbone. Practical regression design (inference): record metric name, backbone, version and input scaling in the test config; use LPIPS for image-to-image change (baseline vs new render) with a tolerance calibrated on your own repeat-run noise, and treat CLIPScore as a coarse prompt-image alignment screen, not a quality score. Failure modes. Feeding [0,1] images to LPIPS silently changes values; CLIPScore was validated for image-captioning judgments (literal descriptions), not for generative-prompt fidelity, and the paper cautions about non-literal captions, so thresholds do not transfer. Limitations. Neither source describes diffusion regression testing; the design advice is mine. Prior item C2-B49-E5-04 covers the definitions; this adds usage rules and limits. Version and date. LPIPS README commit 082bb24f; CLIPScore v3 (2022-03-23). · locator: Usage; Variants; Section 3 source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |