Metrics
In-tree metric registry and categorized distribution, perceptual, and scorer compute APIs.
WorldFoundry ships an in-tree metric layer — a registry of categorized compute routines and multimodal scorers that runners invoke through a stable contract. Benchmarks decide what to measure on which data; metrics decide how to turn predictions into numbers. Each entry declares inputs, optional checkpoint dependencies, and output shape; runners reference metric IDs and the registry resolves aliases, validates availability, and routes to the right compute_*. This keeps model code out of scoring while making scoring reproducible across machines. This hub documents what the repository actually implements — it is not a survey of every published score.
The in-tree catalog is organized into three compute families mirroring worldfoundry/evals/tasks/metrics/{distribution,perceptual,scorer}/: scorers (CLIP, VQA, ITM, LAION aesthetic, FaceScore, ArtScore, OpenS2V, editing/alignment), distribution (FID, IS, KID, CMMD, Clean-FID, diversity/coverage, FVD, FVMD, JEDi), and perceptual (LPIPS, SSIM, MS-SSIM, PSNR, DINO, DreamSim, FSIM, CPBD, IRS, masks, detection, layout). Metrics that need pretrained backbones declare those dependencies explicitly — missing checkpoints fail loudly, never silently substitute a proxy. Registry & reference covers discovery (wf metric list), parameterized ids, checkpoint staging, and package layout. For benchmark-specific evaluator assets and commands, see Benchmark Hub; individual pages call out approximations and cases where official scripts must be used instead of the generic compute API.
Getting started
Three steps:
source WorldFoundry/tmp/worldfoundry_unified_env.shandpip install -e ".[distribution_metrics]"wf metric show <id>to resolve ids and aliases- Open the metric page below and copy the recipe for your id
Only built-in existing-results metrics use wf evaluate; everything else is Python (compute_* or scorer classes).
Metric imports are lazy: checkpoints are required only when a metric loads a feature extractor, multimodal scorer, or API judge. Default caches follow Hugging Face / Torch / torchvision layout:
export WORLDFOUNDRY_HFD_ROOT=${HF_HOME:-$HOME/.cache/huggingface}
export WORLDFOUNDRY_T2V_METRICS_CACHE_DIR=$WORLDFOUNDRY_HFD_ROOT
export WORLDFOUNDRY_CKPT_DIR=$HOME/.cache/worldfoundry/checkpoints
Built-in existing-results metrics
These metrics score an existing GenerationResult JSON/JSONL file with wf evaluate and load no model checkpoint.
| Metric | Value per result |
|---|---|
artifact_count | Number of output artifacts. |
required_artifacts_present | 1 when every --required-artifact name is present, otherwise 0. |
has_artifact:<name> | 1 when the named artifact is present, otherwise 0. |
numeric | All numeric metrics, scores, and timings recorded on the result. |
numeric:<name> | One named numeric value recorded on the result, such as numeric:reward. |
wf evaluate \
--mode existing-results \
--results-path runs/results.jsonl \
--output-dir runs/eval/builtin \
--required-artifact video \
--metric artifact_count \
--metric required_artifacts_present \
--metric has_artifact:video \
--metric numeric:reward \
--jsonThe scorecard JSON is written under --output-dir.
Pages
- Scorers — CLIPScore, VQAScore, ITMScore, LAION aesthetic, FaceScore, ArtScore, OpenS2V, and editing/alignment scorers (
family=scorer). - Distribution — FID, IS, KID, CMMD, Clean-FID, diversity/coverage, conditional distance, FVD, FVMD, and JEDi (
family=distribution). - Perceptual — LPIPS, SSIM, MS-SSIM, PSNR, DINO similarity, DreamSim, FSIM, CPBD, IRS, mask accuracy, object detection, and layout (
family=perceptual). - Registry & reference —
MetricRegistry, registered-metric tables, CLI surface, checkpoints, architecture.
Related pages
- Evaluation — run contract,
evaluate, and scorecard outputs. - Benchmark Hub — benchmark-specific metric assets and evaluator requirements.
- Local asset preparation — checkpoint staging including FVD I3D weights.