File size: 15,293 Bytes
fb6f704
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cbf7a6b
fb6f704
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cbf7a6b
 
 
 
 
 
 
 
 
fb6f704
 
 
 
 
 
 
 
 
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
---
pretty_name: MOZAIC
language:
- en
tags:
- deepfake
- deepfake-detection
- audio-visual
- video
- audio
task_categories:
- video-classification
size_categories:
- 100K<n<1M
configs:
- config_name: t1_spot_the_fake
  default: true
  data_files:
  - split: train
    path: qas/t1_spot_the_fake/t1_train.jsonl
  - split: val
    path: qas/t1_spot_the_fake/t1_val.jsonl
  - split: test
    path: qas/t1_spot_the_fake/t1_test.jsonl
- config_name: t2_manipulation_type
  data_files:
  - split: train
    path: qas/t2_manipulation_type/t2_train.jsonl
  - split: val
    path: qas/t2_manipulation_type/t2_val.jsonl
  - split: test
    path: qas/t2_manipulation_type/t2_test.jsonl
- config_name: t3_identity_check
  data_files:
  - split: train
    path: qas/t3_identity_check/t3_train.jsonl
  - split: val
    path: qas/t3_identity_check/t3_val.jsonl
  - split: test
    path: qas/t3_identity_check/t3_test.jsonl
- config_name: t1_spot_the_fake_small
  data_files:
  - split: train
    path: qas_small/t1_spot_the_fake/t1_train.jsonl
  - split: val
    path: qas_small/t1_spot_the_fake/t1_val.jsonl
  - split: test
    path: qas_small/t1_spot_the_fake/t1_test.jsonl
- config_name: t2_manipulation_type_small
  data_files:
  - split: train
    path: qas_small/t2_manipulation_type/t2_train.jsonl
  - split: val
    path: qas_small/t2_manipulation_type/t2_val.jsonl
  - split: test
    path: qas_small/t2_manipulation_type/t2_test.jsonl
- config_name: t3_identity_check_small
  data_files:
  - split: train
    path: qas_small/t3_identity_check/t3_train.jsonl
  - split: val
    path: qas_small/t3_identity_check/t3_val.jsonl
  - split: test
    path: qas_small/t3_identity_check/t3_test.jsonl
- config_name: t4_explanation_small
  data_files:
  - split: train
    path: qas_small/t4_explanation/t4_train.jsonl
  - split: val
    path: qas_small/t4_explanation/t4_val.jsonl
  - split: test
    path: qas_small/t4_explanation/t4_test.jsonl
---

<p align="center">
  <img src="assets/logo-icon-black.png" alt="Vector Institute" width="150" style="display: inline-block; vertical-align: middle;">
  &nbsp;&nbsp;&nbsp;&nbsp;
  <img src="assets/AIXPERTLogo.png" alt="AIXPERT" width="220" style="display: inline-block; vertical-align: middle;">
</p>

# MOZAIC

MOZAIC is an audio-visual deepfake dataset built from VoxCeleb2, with question files for testing
models. Every clip is a talking face with sound, in one of four classes: real or fake face, crossed
with real or fake voice. The fakes come from three video generators and one voice converter.

- Pairs at two lengths: 7,590 at 77 frames (3.08 s) and 7,424 at 153 frames (6.12 s)
- Split by person: nobody in the test split appears in training
- Four tasks with question files: T1 to T3 on the full set and on MOZAIC-Small, T4 on MOZAIC-Small
- MOZAIC-Small: a smaller set of whole pairs that mirrors the full one

`DATASHEET.md` says how it was made, what was checked and what its limits are. `summary.json` has
every count.

Made by Vector Institute with AIXPERT.

## Statistics

| | Clips | Hours | People | Pairs | Questions | Tasks |
|---|---|---|---|---|---|---|
| MOZAIC | 137,745 | 169.9 | 1,000 ids | 15,014 | 289,587 | T1 to T3 |
| MOZAIC-Small | 16,995 | 21.0 | the same 1,000 ids | 1,858 | 47,087 | T1 to T4 |

| Split | Men | Women | Pairs | Clips |
|---|---|---|---|---|
| train | 350 | 350 | 10,541 | 96,957 |
| val | 75 | 75 | 2,232 | 20,553 |
| test | 75 | 75 | 2,241 | 20,235 |

Gender is as recorded by VoxCeleb2. Across all clips, 51.4% show men and 48.6% show women. MOZAIC has
no age or race labels. The 1,000 ids are 999 people, because VoxCeleb2 lists one person under two ids.

![Bar charts of questions per task, clips by gender, clips per class and clips per face source](assets/statistics.png)

## The four classes

| Label | Face | Voice | Clips |
|---|---|---|---|
| RVRA | real | real | 30,028 |
| RVFA | real | fake | 15,014 |
| FVRA | fake | real | 61,802 |
| FVFA | fake | fake | 30,901 |

## Generators

| Name | Makes | What it does | Clips |
|---|---|---|---|
| facefusion | fake face | Swaps the inner face; hair and head stay the original person's | 41,565 |
| s2v | fake face | Wan2.2-S2V: makes the whole video from one picture of the target plus the audio | 37,917 |
| animate | fake face | Wan2.2-Animate (replace mode); 77 frames only | 13,221 |
| seed_vc | fake voice | Seed-VC voice conversion | 45,915 |

**Source and target:** the *source* is the person in the original clip; the *target* is the person
the fake turns them into. (FaceFusion's own documentation uses these two words the other way round.)

## Arms

- `main`: the clip as made.
- `vocoded`: the same clip with its real voice passed through BigVGAN, the vocoder Seed-VC uses. The
  label does not change: a vocoded RVRA clip is still real. This stops "vocoder sound = fake" from
  being a shortcut.

## Tasks

| Task | Question | Answers | Input | Full: train / val / test | Small: train / val / test |
|---|---|---|---|---|---|
| T1 spot the fake | Which part of this audio-visual clip, if any, is AI-generated or manipulated? | the video, the audio, both, neither | frames and sound | 64,638 / 13,702 / 13,490 | 6,664 / 1,332 / 3,334 |
| T2 manipulation type | Which part of this video, if any, was generated or altered by AI? | real, face swap, full-body swap, fully generated | frames | 32,319 / 6,851 / 6,745 | 3,332 / 666 / 1,667 |
| T3 identity check | Is the face (or voice) in clip 1 real or fake, and is it the same person as in clip 2? | real, same person; real, different person; fake of this person; fake of a different person | frames of two clips, or sound of two clips | 106,802 / 22,586 / 22,454 | 11,012 / 2,200 / 5,550 |
| T4 explanation | Which parts of this audio-visual clip, if any, were generated or altered by AI, where, and what in the clip shows it? | a written answer, with its facts in `gt_target` | frames and sound | none | 6,664 / 1,332 / 3,334 |

Which clips each task asks about:

- **T1 and T4:** the vocoded view: RVRA vocoded, RVFA main, FVRA vocoded and FVFA main.
- **T2:** RVRA main and FVRA main. It is only about the video.
- **T3:** clip 1 is RVRA main or FVRA main for a face question, RVRA vocoded or RVFA main for a voice
  question. Clip 2 is a real recording (RVRA main) of the pair's source or target, of the same length,
  from a YouTube video the pair never used. Each clip 1 is asked twice, once for each person. Four val
  pairs (source id09056, target id05938) are left out of T3 because the target has no such recording;
  T1 and T2 still use them.

T1 to T3 answers come from the clip's labels. T4 answers were written by language models from the
clip's facts, then checked by code and by a second model; each row's `meta` names the models, and those
models should not be tested on T4. `meta.human_checked` is true on 400 test rows, the set three people
reviewed.

Do not show a model the file names or question ids: they contain the label.

## MOZAIC-Small

Whole pairs, each Small split drawn from the same full split, in the same mix as the full set, with
every person the source of at least one pair. Its files sit next to the full ones with `_small` added,
and every row is the full set's row, unchanged.

Small has no clips of its own: it uses the same `videos/`. T3 on Small also uses 2,913 real clips
outside `metadata_small.jsonl` as clip 2. They are listed in `metadata.jsonl`.

## Folders

```
mozaic/
├── README.md, DATASHEET.md, requirements.txt, assets/
├── metadata.jsonl           one row per clip with everything about it
├── metadata_table.parquet   the same rows, typed, for fast loading
├── pairs.jsonl              one row per pair: its people, clips and the generators that kept it
├── splits.json              person -> train, val or test
├── summary.json             version, settings, generators, all counts
├── the same four files for Small, with _small in their names (no splits file: Small uses the same one)
├── SHA256SUMS               the sha256 of every clip, manifest and question file
├── qas/                     T1, T2 and T3: one folder per task, with train, val and test files
├── qas_small/               the same for Small, and T4
└── videos/
    ├── train.tar            26.2 GB
    ├── val.tar              5.6 GB
    └── test.tar             5.5 GB
```

## Download and unpack

The whole dataset is 38 GB. Unpacking needs the same space again, until you delete the tars.

```bash
pip install huggingface_hub
hf download vector-institute/Mozaic --repo-type dataset --local-dir mozaic
cd mozaic
for t in videos/*.tar; do tar -xf "$t"; done
sha256sum -c SHA256SUMS
```

Every clip then sits at the path in `file_name`: `videos/<label>/<generator>/<length>/<arm>/*.mov`, where
`<generator>` is `real` for RVRA and `seed_vc` for RVFA. A tar holds each clip unchanged, so its bytes
are the ones `SHA256SUMS` lists.

To get only the test split's clips (5.5 GB):

```bash
hf download vector-institute/Mozaic --repo-type dataset --local-dir mozaic --exclude "videos/train.tar" --exclude "videos/val.tar"
cd mozaic
tar -xf videos/test.tar
sha256sum -c --ignore-missing SHA256SUMS
```

To get one clip, take its `split` and `file_name` from `metadata.jsonl`. It is in `videos/<split>.tar`:

```bash
tar -xf videos/test.tar videos/FVFA/animate/77f/main/FVFA__animate__77f__main__id00024_3ysHAigPe68_00005__id00330.mov
```

## File names

`<label>__<generator>__<length>__<arm>__<source_clip>__<target_id>.mov`

Example: `FVFA__s2v__153f__main__id00058_6PiUqI-q-1w_00025__id03180.mov`

A clip id such as `id00058_6PiUqI-q-1w_00025` is the VoxCeleb2 clip `id00058/6PiUqI-q-1w/00025`: the
person is the first 7 characters, the segment the last 5, and the YouTube video id the part in between.
Video ids can contain `_` and `-`, so do not split names on underscores; read the fields from
`metadata.jsonl`.

## Video and audio

`.mov`, H.264, 224x224, 25 fps; audio is uncompressed PCM, 16 kHz, mono. Every clip was brought to the
same brightness, colour and loudness targets (see `summary.json`), and encoder version text was removed
from every file. Every clip carries the same 1:1 aspect-ratio tag, and every clip's sound starts with
50 ms of silence and a 10 ms fade-in (converted voices used to fade in on their own). This largely
removes these differences between real and fake; `DATASHEET.md` (section 5) lists what was measured and
what remains.

## Question files

One row per question, one file per task and split. Clip paths are relative to the dataset folder.

| Field | Meaning |
|---|---|
| `id` | the question's id |
| `task` | the task's name |
| `split` | train, val or test |
| `clips` | the clip paths: one, or two for T3 |
| `question` | the question text |
| `options` | the answers to choose from, shuffled per question; for T4 the regions |
| `part` | T3 only: face or voice |
| `gt_answer` | the right answer; for T4 the written answer |
| `gt_label` | the clip's label: RVRA, RVFA, FVRA or FVFA |
| `gt_target` | the answer as data; for T4 the fake parts, their regions and each part's facts |
| `gt_target_name` | T2 and T3 only: the answer as an id |
| `meta` | the clip's generators, frames, arm, people and pair; T3 also says whose recording clip 2 is |

## Manifests

- `metadata.jsonl`, one row per video (137,745 rows), everything about it in one place.

| Field | Type | Meaning |
|---|---|---|
| `file_name` | string | path of the video inside the dataset folder |
| `label` | string | RVRA, RVFA, FVRA or FVFA |
| `video_generator` | string | real, facefusion, s2v or animate |
| `audio_generator` | string | none, seed_vc or bigvgan |
| `length` | string | 77f (3.08 s) or 153f (6.12 s) |
| `arm` | string | main or vocoded |
| `split` | string | train, val or test |
| `face_id` | string | whose face you see (VoxCeleb2 person id) |
| `voice_id` | string | whose voice you hear (VoxCeleb2 person id) |
| `gender` | string | m or f |
| `face_real` | bool | the face is real |
| `voice_real` | bool | the voice is real |
| `pair_id` | string | the pair the video belongs to |
| `source_id` | string | the source person: who is in the original clip |
| `target_id` | string | the target person: who the fake turns them into |
| `source_clip` | string | the VoxCeleb2 clip the video was made from |
| `target_face_clip` | string | the target's clip the face picture came from |
| `target_voice_clip` | string | the target's recording Seed-VC used as its voice reference |
| `kept_by` | list of strings | the generators that kept the pair |
| `sha256` | string | checksum of the video file |

- `metadata_table.parquet`: the same rows and fields as `metadata.jsonl`, with the types above stored in
  the file, so it loads much faster.
- `pairs.jsonl`, one row per pair: `pair_id`, `length`, `split`, `gender`, `source_id`, `target_id`,
  `source_clip`, `target_clips` (`face`: the target clip the face picture came from; `voice`: the target
  recording Seed-VC used as its voice reference) and `kept_by` (the generators that kept the pair).
- `splits.json`: person -> split.
- `summary.json`: version, settings, generators and every count.
- `SHA256SUMS`: the sha256 of every clip, manifest and question file. It leaves out `README.md`,
  `DATASHEET.md`, `summary.json` and `summary_small.json`, which are text and may still be edited.

## Loading

`requirements.txt` lists the packages these examples use. The fastest way to read the clip table is
`metadata_table.parquet`:

```python
import pandas as pd

clips = pd.read_parquet("mozaic/metadata_table.parquet")
test_fakes = clips[(clips["split"] == "test") & ~clips["face_real"]]
```

A task's questions:

```python
from datasets import load_dataset

t1_test = load_dataset("vector-institute/Mozaic", "t1_spot_the_fake", split="test")
row = t1_test[0]
print(row["question"], row["options"], row["gt_answer"], row["clips"])
```

**One generator only.** Real clips are stored once and shared by all generators, but each generator
kept different pairs. To build a clean set for one generator, keep the pairs it kept (`kept_by`):

```python
facefusion_77f = clips[(clips["length"] == "77f")
                       & clips["kept_by"].apply(lambda kept: "facefusion" in kept)
                       & clips["video_generator"].isin(["real", "facefusion"])]
```

## Good to know

- Splits are by person: no face or voice in the test split appears in training.
- Train on decoded frames, not on file bytes or sizes: how the video is packed still differs between
  real and generated clips (`DATASHEET.md`, section 5).
- To test audio without the vocoder trace, use the vocoded view: RVRA vocoded against RVFA, FVRA vocoded
  and FVFA.
- Known limitations are listed in `DATASHEET.md`.

## Access and licence

This repository is private for now. When it is public, access will be gated with manual approval.

Licence: TO FILL. MOZAIC is built on VoxCeleb2, so please also cite VoxCeleb2.

If you appear in a clip and want it removed, contact: TO FILL. We remove that person's clips, and
every fake made with them, in the next version.

## Citation

MOZAIC: TO FILL

VoxCeleb2: Chung, Nagrani, Zisserman. *VoxCeleb2: Deep Speaker Recognition.* Interspeech 2018.

## Changes

- 1.0: first version.