File size: 8,233 Bytes
e4478b8
a64a6f4
e4478b8
 
 
 
a64a6f4
 
e4478b8
 
a64a6f4
e4478b8
 
 
 
 
 
 
a64a6f4
e4478b8
a64a6f4
e4478b8
a64a6f4
e4478b8
a64a6f4
 
 
3dfae9a
e4478b8
a64a6f4
e4478b8
a64a6f4
 
 
 
 
 
 
 
 
 
 
 
 
 
e4478b8
a64a6f4
e4478b8
a64a6f4
 
e4478b8
a64a6f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e4478b8
a64a6f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e4478b8
a64a6f4
e4478b8
 
 
a64a6f4
e4478b8
 
 
 
 
 
a64a6f4
e4478b8
 
 
 
 
 
 
 
 
 
 
 
 
a64a6f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e4478b8
a64a6f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e4478b8
 
 
a64a6f4
 
 
 
 
 
 
 
 
 
 
e4478b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
---
license: cc-by-4.0
pretty_name: AINPAINT
viewer: false
size_categories:
- 10K<n<100K
task_categories:
- image-segmentation
tags:
- video-inpainting
- inpainting-localization
- video-forensics
- media-authenticity
- deepfake-detection
---

# AINPAINT

**AINPAINT: A Comprehensive Dataset and Dual Branch Architecture for Practical Video Inpainting Localization**

Andrea Montibeller\*, Giulia Boato, Luisa Verdoliva — *Computer Vision and Image Understanding* (CVIU), 2026.

\* Corresponding author: `andrea.montibeller@unitn.it`, `andrea@truebees.eu`

- 📄 **Paper:** <https://www.sciencedirect.com/science/article/pii/S107731422600233X>
- 💻 **Code (models, training, eval, splits):** <https://github.com/MMLab-unitn/AINPAINT-CVIU26>
- 🤗 **Dataset:** <https://huggingface.co/datasets/Truebees/AINPAINT>
- 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/<video_id>/0000.png ...      # real clips (label 0)
├── input_masks/    resized_432x240/<video_id>/0000.png  # ground-truth masks
└── <TECHNIQUE>/    432x240/<video_id>/0000.png ...       # inpainted clips (label 1)
                    432x240_recompressed_h264/<video_id>.mp4   # + recompressed / postprocessed variants
```

`<TECHNIQUE> ∈ {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}
}
```