Copy What Is Seen, Generate What Is Not: Training-Free Anomaly-Aware Video Restoration
Organizations: Department of Computer Science and Engineering, Tandon School of Engineering, New York University · Australian AI Institute, University of Technology Sydney
Abstract
A surveillance system that detects an anomaly often has to repair the footage as well, yet the two tasks are studied in isolation: training-free anomaly detectors stop at a score or a label, while training-free video editing answers to a user prompt rather than to a detector. This paper proposes AVR (Anomaly-aware Video Restoration), which closes that gap with frozen pretrained models alone and generates content only where the clip offers no evidence to copy. Motion evidence first gates open-vocabulary proposals into spatio-temporal masks. A background prior computed from the clip then fills every pixel the anomaly ever uncovers, leaving diffusion to synthesize only what no frame showed, and a frozen verifier decides per clip whether to trust a classical, a prior-anchored, or a background-conditioned restorer. Extensive experiments on three surveillance datasets, under both full-reference anomaly injection and real anomalies, show that AVR leads full-frame fidelity under oracle masks, matches three trained video inpainters inside the edited region, and outperforms a detect-then-generate pipeline on the masks it produces itself, while suppressing both the residual anomaly and the flicker of free diffusion.
Figures & tables
| Method | Region | Content | Train | Temporal model | |
| Detect | LAVAD [ 42 ] | Detector | — | ✗ | — |
| SphereVAD [ 14 ] | Detector | — | ✗ | — | |
| Edit | T2V-Zero [ 16 ] | User | ✗ | Attention | |
| TokenFlow [ 9 ] | User | ✗ | Feature prop. | ||
| Inpaint | E2FGVI [ 22 ] | Given | ✓ | Learned prop. | |
| ProPainter [ 45 ] | Given | ✓ | Learned prop. |
| CUHK Avenue | UCSD Ped2 | ShanghaiTech | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | PSNR | PSNR | LPIPS | FVD | PSNR | PSNR | LPIPS | FVD | PSNR | PSNR | LPIPS | FVD |
| Classical (Spatial) | 39.76 | 18.79 | 0.008 | 5.86 | 48.84 | 27.96 | 0.004 | 2.78 | 52.09 | 31.22 | 0.004 | 1.97 |
| Classical (Flow) | 40.36 | 19.50 | 0.007 | 6.12 | 49.31 | 28.61 | 0.004 | 2.51 | 51.88 | 31.26 | 0.004 | 2.30 |
| ProPainter [ 45 ] | 43.73 | 25.34 | 0.004 | 0.64 | 50.56 | 32.08 | 0.004 | 0.49 | 53.88 | 35.21 | 0.003 | 0.64 |
| E2FGVI [ 22 ] | 45.97 | 27.34 | 0.004 | 0.57 | 51.90 | 33.33 | 0.004 | 0.53 | 55.26 | 36.41 | 0.004 | 0.67 |
| FloED [ 12 ] | 45.39 | 26.19 | 0.005 | 0.77 | 51.00 | 32.47 | 0.004 | 0.51 | 54.35 | 35.95 | 0.004 | 0.76 |
| Benchmark | Method | PSNR | PSNR | SSIM | LPIPS | tLP | FVD | Warp | RD | IoU |
|---|---|---|---|---|---|---|---|---|---|---|
| CUHK Avenue | Grounded-SD (base) | 29.00 | 15.78 | 0.972 | 0.048 | 0.036 | 46.13 | 1.93 | 1.202 | 0.097 |
| ProPainter (SAM2 masks) | 28.63 | 13.38 | 0.974 | 0.057 | 0.017 | 51.32 | 1.18 | 0.117 | 0.095 | |
| ProPainter (gated masks) | 32.52 | 14.63 | 0.986 | 0.035 | 0.012 | 28.33 | 1.09 | 0.201 | 0.205 | |
| E2FGVI (gated masks) | 33.34 | 15.05 | 0.987 | 0.033 | 0.014 | 28.16 | 1.13 | 0.238 | 0.205 | |
| FloED (gated masks) | 32.72 | 14.89 | 0.986 | 0.038 | 0.016 | 29.97 | 1.15 | 0.271 | 0.205 | |
| AVR (Ours) | 33.79 | 15.00 | 0.988 | 0.031 | 0.013 | 27.07 | 1.10 | 0.123 | 0.205 |
| CUHK Avenue | UCSD Ped2 | ShanghaiTech | |||||
|---|---|---|---|---|---|---|---|
| Detector | Restorer | PSNR | RD | PSNR | RD | PSNR | RD |
| SAM2 | Prior-anchored | 27.84 | 0.255 | 34.86 | 2.550 | 23.90 | 1.413 |
| SAM2 | Selection (2 cand.) | 28.59 | 0.071 | 37.25 | 1.220 | 24.79 | 0.870 |
| Motion-gated | BG-diffusion | 33.19 | 0.145 | 43.23 | 4.282 | 39.74 | 0.072 |
| Motion-gated | Selection (3 cand.) | 33.79 | 0.123 | 44.00 | 0.970 | 40.08 | 0.255 |
| CUHK Avenue | ShanghaiTech | |||||||
|---|---|---|---|---|---|---|---|---|
| Detector | PSNR | LPIPS | FVD | IoU | PSNR | LPIPS | FVD | IoU |
| Heuristic | 31.07 | 0.035 | 20.67 | 0.177 | 32.86 | 0.058 | 34.63 | 0.334 |
| Grounded-SAM | 30.60 | 0.045 | 24.79 | 0.097 | 29.15 | 0.251 | 95.35 | 0.119 |
| Grounded-SAM2 | 30.14 | 0.050 | 45.36 | 0.095 | 26.84 | 0.326 | 121.62 | 0.128 |
| TAO [ 15 ] | 32.12 | 0.038 | 23.78 | 0.117 | 35.59 | 0.103 | 25.23 | 0.257 |
| Motion-gated (ours) | 33.19 | 0.032 | 20.17 | 0.205 | 39.74 | 0.047 | 20.47 | 0.343 |
| Sec/clip | Sec/frame | Peak mem. | |
|---|---|---|---|
| Detection (Grounding DINO SAM) | 6.81 | 0.43 | 9.2 |
| Motion gate | 0.05 | 0.01 | |
| Classical | 0.21 | 0.01 | |
| Prior-anchored | 19.11 | 1.19 | |
| BG-diffusion | 20.74 | 1.30 | |
| Verifier | 3.72 | 0.23 |
| Flicker | Warp Err. | |||||
|---|---|---|---|---|---|---|
| Pipeline | before | after | before | after | RD | impr. |
| Grounded-SD (base) | 12.77 | 27.71 | 0.95 | 3.22 | 0.513 | 7/20 |
| AVR (Ours) | 21.12 | 3.32 | 0.95 | 0.84 | 0.721 | 20/20 |
Video Restoration
Video restoration reconstructs clearer, more faithful, temporally consistent footage from blur, noise, compression, weather, and other degradations.
See all 59 papers