@@ -12,7 +12,7 @@ _Last updated: 2026-03-02_
1212
1313| Metric | Category | Status | Location | Trust |
1414| --------| ----------| --------| ----------| -------|
15- | ** FVD** | Distribution | ✅ Implemented | ` benchmarks /fvd/` | High |
15+ | ** FVD** | Distribution | ✅ Implemented | ` fastvideo/eval/metrics/common /fvd/` | High |
1616| ** SSIM** | Reference | ✅ Implemented | ` fastvideo/tests/ssim/ ` | High |
1717| ** LPIPS** | Perceptual | ✅ Implemented | ` scripts/lora_extraction/ ` | Medium |
1818| ** Loss trajectory** | Training signal | ✅ Implemented | W&B ` train_loss ` | Medium |
@@ -27,8 +27,8 @@ _Last updated: 2026-03-02_
2727### FVD — Fréchet Video Distance
2828
2929** Category** : Distribution-level quality metric
30- ** Status** : ✅ Fully implemented in ` benchmarks /fvd/`
31- ** Trust** : High — standard protocol, I3D feature extractor
30+ ** Status** : ✅ Registered as the ` common.fvd ` eval metric in ` fastvideo/eval/metrics/common /fvd/`
31+ ** Trust** : High — standard protocol, I3D feature extractor (CLIP / VideoMAE backbones also available, research-grade)
3232
3333#### What It Measures
3434FVD measures the distance between the ** distribution** of generated videos and
@@ -59,30 +59,39 @@ Lower FVD = generated videos are more statistically similar to real videos.
5959#### How to Use
6060
6161``` python
62- # Programmatic
63- from benchmarks.fvd import compute_fvd_with_config, FVDConfig
62+ # Programmatic — drive the metric directly for custom kwargs
63+ from fastvideo.eval import get_metric
6464
65- config = FVDConfig.fvd2048_16f() # Standard: 2048 videos, 16 frames
66- results = compute_fvd_with_config(' data/real/' , ' outputs/gen/' , config)
67- print (f " FVD: { results[' fvd' ]:.2f } " )
65+ metric = get_metric(" common.fvd" , extractor = " i3d" ) # or "clip" / "videomae"
66+ metric.to(" cuda" )
67+ metric.setup()
68+ metric.reset()
69+
70+ # First sample carries the reference set; later samples reuse the cache.
71+ metric.accumulate({" video" : gen_tensors[0 ], " reference" : real_tensors})
72+ for gen in gen_tensors[1 :]:
73+ metric.accumulate({" video" : gen})
74+
75+ result = metric.finalize()
76+ print (f " FVD: { result.score:.2f } " )
6877```
6978
7079``` bash
71- # CLI
72- python -m benchmarks.fvd.cli \
73- --real-path data/real/ \
74- --gen-path outputs/gen/ \
75- --protocol fvd2048_16f
80+ # CLI — folder of generated mp4s vs a reference folder
81+ python examples/inference/eval/eval_fvd.py \
82+ --gen-dir outputs/gen/ \
83+ --reference-dir data/real/ \
84+ --extractor i3d \
85+ --output fvd_scores.json
7686```
7787
78- ** Preset protocols** :
79- | Protocol | Videos | Frames | Use Case |
80- | ----------| --------| --------| ----------|
81- | ` fvd2048_16f ` | 2048 | 16 | Standard benchmark (papers) |
82- | ` fvd2048_128f ` | 2048 | 128 | Long video evaluation |
83- | ` quick_test ` | 100 | 16 | Fast dev iteration |
88+ ** Feature extractors** : ` i3d ` (default, standard FVD spec used in papers),
89+ ` clip ` , ` videomae ` (research-grade; not directly comparable to published
90+ FVD numbers).
8491
85- ** Feature extractors** : ` i3d ` (default, standard), ` clip ` , ` videomae `
92+ ** Protocol** : standard FVD uses 2048 generated + 2048 reference videos at
93+ 16 frames each. A warning fires below 256 — the score becomes
94+ statistically unreliable.
8695
8796#### Interpretation
8897| FVD Range | Interpretation |
0 commit comments