--- license: cc-by-4.0 pretty_name: AINPAINT viewer: false size_categories: - 10K - 💻 **Code (models, training, eval, splits):** - 🤗 **Dataset:** - Maintained by [Truebees](https://www.truebees.eu/). ## Abstract The rapid evolution of generative artificial intelligence has made video inpainting and object removal highly realistic, posing a severe threat to multimedia integrity. While various forensic detectors have been proposed, they predominantly rely on high-frequency noise or specific artefact signatures that are easily destroyed by real-world degradations like H.264 and HEVC compression, and AI-based post-processing. To address this critical gap, we introduce **AINPAINT**, a large-scale forensic dataset containing **over 25,000 video sequences manipulated with nine diverse generative techniques**, explicitly including variants subjected to **temporal smoothing** and **heavy compression**. On top of AINPAINT, we propose two complementary architectures for video inpainting localization built upon a LoRA-adapted DINOv2 backbone. The first method extracts rich semantic spatial features, while the second augments these features with temporal motion anomalies derived from dense optical flow. Beyond merely establishing new performance baselines, our ablation provides a functional decision guide for the forensics community, clarifying when spatial features alone are preferable and when motion anomalies provide a measurable gain in the presence of post-processing, H.264 and HEVC compression, and data shifts. ## What's inside AINPAINT is built for **pixel-level video inpainting localization**: given a manipulated clip, find *where* it was inpainted. It pairs, for the same set of source clips at 432×240: - **`input_frames`** — the original, un-manipulated clips (**label 0** / real). - **9 inpainting methods** — the same clips after object-removal inpainting (**label 1** / fake): **OPN, STTN, FGVC, DSTT, CoCoCo, LDVI, FuseFormer, GMCNN, DiffuEraser**. - **`input_masks`** — the pixel-level ground-truth localization masks (`original` and `resized_432x240`), aligned frame-for-frame with the clips (same `0000.png, 0001.png, …` names). ### Scale - **312** videos per (container × variant) cell. - **28,080** total video instances = **25,272 inpainted** (9 methods × 9 variants × 312) + **2,808 real** (`input_frames` × 9 variants × 312). - **711,148** PNG frames and **1,422,264** decoded MP4 frames. ### Variants and processing provenance Each container carries **9 variants** — 3 delivered as PNG frame folders, 6 as re-compressed MP4s: | Variant | Type | How it was produced | |---|---|---| | `432x240` | PNG frames | Raw inpainting output at 432×240 | | `432x240_postprocessed` | PNG frames | Temporal smoothing via the OPN Temporal Consistency Network (TCN) | | `432x240_postprocessed_dvp` | PNG frames | Additionally passed through Deep Video Prior / IRT (*Blind Video Temporal Consistency via Deep Video Prior*, NeurIPS 2020) | | `432x240_recompressed_h264` | MP4 | `ffmpeg -c:v libx264 -crf 23` | | `432x240_recompressed_hevc` | MP4 | `ffmpeg -c:v libx265 -crf 23 -tag:v hvc1 -pix_fmt yuv420p` | | `432x240_postprocessed_recompressed_h264` | MP4 | postprocessed → H.264 (CRF 23) | | `432x240_postprocessed_recompressed_hevc` | MP4 | postprocessed → HEVC (CRF 23) | | `432x240_postprocessed_dvp_recompressed_h264` | MP4 | postprocessed + DVP → H.264 (CRF 23) | | `432x240_postprocessed_dvp_recompressed_hevc` | MP4 | postprocessed + DVP → HEVC (CRF 23) | `input_masks` instead ships two variants only: `original` and `resized_432x240`. ## Packaging To keep the repository fast to browse and download, the dataset is distributed as **one `tar` archive per container** (11 archives) rather than ~788k loose files. Archives are uncompressed (the PNG frames and MP4 clips are already compressed), so extraction is instant. | Archive | Size | Contents | |---|---:|---| | `input_frames.tar` | ~11 GB | Original clips (label 0) | | `input_masks.tar` | ~0.14 GB | Ground-truth localization masks | | `CoCoCo.tar` | ~5.4 GB | CoCoCo inpainting, all variants | | `DiffuEraser.tar` | ~10.3 GB | DiffuEraser inpainting | | `DSTT.tar` | ~10.3 GB | DSTT inpainting | | `FGVC.tar` | ~10.8 GB | FGVC inpainting | | `FuseFormer.tar` | ~10.4 GB | FuseFormer inpainting | | `GMCNN.tar` | ~10.8 GB | GMCNN inpainting | | `LDVI.tar` | ~11.0 GB | LDVI inpainting | | `OPN.tar` | ~10.4 GB | OPN inpainting | | `STTN.tar` | ~10.3 GB | STTN inpainting | Extracting an archive recreates its top-level folder, e.g. `tar -xf FGVC.tar` → `FGVC/…`. ## Usage Download and extract everything: ```bash hf download Truebees/AINPAINT --repo-type dataset --local-dir ./AINPAINT cd AINPAINT && for f in *.tar; do tar -xf "$f"; done ``` Download just one method (grab only what you need): ```bash hf download Truebees/AINPAINT FGVC.tar --repo-type dataset --local-dir ./AINPAINT tar -xf ./AINPAINT/FGVC.tar -C ./AINPAINT ``` Python: ```python from huggingface_hub import hf_hub_download path = hf_hub_download("Truebees/AINPAINT", "FGVC.tar", repo_type="dataset") ``` ### Layout after extraction ``` DATASET_AInpaint/ ├── input_frames/ 432x240//0000.png ... # real clips (label 0) ├── input_masks/ resized_432x240//0000.png # ground-truth masks └── / 432x240//0000.png ... # inpainted clips (label 1) 432x240_recompressed_h264/.mp4 # + recompressed / postprocessed variants ``` ` ∈ {OPN, STTN, FGVC, DSTT, CoCoCo, LDVI, FuseFormer, GMCNN, DiffuEraser}`. This matches the layout expected by the [AINPAINT-CVIU26](https://github.com/MMLab-unitn/AINPAINT-CVIU26) training and evaluation code — extract the archives into one folder and pass it as `--dataset_root`. ### Splits The exact paper splits are provided as `splits/{train,val,test}.json` in the [code repository](https://github.com/MMLab-unitn/AINPAINT-CVIU26/tree/main/splits) (their `path` fields are remapped to your machine via `--dataset_root`). ## Completeness Every (container × variant) cell contains the full **312** videos. Only **5 distinct clips** fall below 30 frames, all inherent source cases rather than processing defects: | Clip | Min frames | Cause | |---|---:|---| | `airplane_12_bis` | 16 | Deterministic DVP frame drop (DiffuEraser `_dvp` variants only) | | `airplane_3` | 21 | Inherently short source (input = 22) | | `bear` | 26 | Short mask (mask = 27, input = 42) | | `drift_1` | 22 | Deterministic DVP frame drop (DiffuEraser `_dvp` variants only) | | `youtube-8m_clip40` | 25 | Inherently short source (input = 27) | ## License The dataset is released under **Creative Commons Attribution 4.0 (CC-BY-4.0)**. Note that AINPAINT is *derived*: the manipulated clips are produced by nine third-party inpainting methods (OPN, STTN, FGVC, DSTT, CoCoCo, LDVI, FuseFormer, GMCNN, DiffuEraser), each governed by its own upstream license, and the source clips retain the terms of their original datasets. The companion [code](https://github.com/MMLab-unitn/AINPAINT-CVIU26) is released under Apache-2.0. ## Citation If you use AINPAINT, please cite: ```bibtex @article{montibeller2026ainpaint, title={AINPAINT: A comprehensive dataset and dual branch architecture for practical video inpainting localization}, author={Montibeller, Andrea and Boato, Giulia and Verdoliva, Luisa}, journal={Computer Vision and Image Understanding}, pages={104866}, year={2026}, publisher={Elsevier} } ```