Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Could not read the parquet files: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
Error code:   FileSystemError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

image
image
mask
image
label
class label
image_name
string
0real
000000000036
0real
000000000049
0real
000000000061
0real
000000000009
0real
000000000034
0real
000000000025
0real
000000000030
0real
000000000042
0real
000000000071
0real
000000000064
0real
000000000081
0real
000000000078
0real
000000000074
0real
000000000072
0real
000000000089
0real
000000000073
0real
000000000086
0real
000000000092
0real
000000000109
0real
000000000110
0real
000000000094
0real
000000000113
0real
000000000133
0real
000000000127
0real
000000000136
0real
000000000138
0real
000000000142
0real
000000000144
0real
000000000149
0real
000000000151
0real
000000000143
0real
000000000154
0real
000000000165
0real
000000000194
0real
000000000192
0real
000000000164
0real
000000000196
0real
000000000201
0real
000000000208
0real
000000000247
0real
000000000241
0real
000000000250
0real
000000000257
0real
000000000260
0real
000000000263
0real
000000000283
0real
000000000294
0real
000000000315
0real
000000000307
0real
000000000308
0real
000000000312
0real
000000000309
0real
000000000322
0real
000000000321
0real
000000000326
0real
000000000338
0real
000000000332
0real
000000000349
0real
000000000328
0real
000000000357
0real
000000000359
0real
000000000360
0real
000000000387
0real
000000000370
0real
000000000382
0real
000000000368
0real
000000000384
0real
000000000394
0real
000000000395
0real
000000000389
0real
000000000404
0real
000000000397
0real
000000000419
0real
000000000415
0real
000000000400
0real
000000000436
0real
000000000438
0real
000000000446
0real
000000000443
0real
000000000450
0real
000000000459
0real
000000000428
0real
000000000431
0real
000000000471
0real
000000000472
0real
000000000474
0real
000000000488
0real
000000000491
0real
000000000508
0real
000000000490
0real
000000000502
0real
000000000510
0real
000000000514
0real
000000000531
0real
000000000529
0real
000000000532
0real
000000000540
0real
000000000542
0real
000000000536
0real
000000000560
End of preview.

DEAL-300K Dataset

DEAL-300K: Diffusion-based Editing Area Localization with a 300K-Scale Dataset and Frequency-Prompted Baseline

Paper Dataset

Overview

DEAL-300K is a large-scale dataset for Diffusion-based Image Manipulation Localization (DIML) containing over 300,000 annotated images. The dataset is specifically designed to address the challenges of localizing regions edited by diffusion models, which often blend seamlessly with original content.

Key Features

  • Scale: 330,979 training images, 3,989 validation images, and 5,500 test images
  • Annotation: Pixel-level segmentation masks for edited regions
  • Diversity: Covers a broad range of manipulations involving humans, animals, and objects
  • Quality: Automated annotation pipeline using SAM-CD (Segment Anything Model with Change Detection)

Dataset Structure

The dataset is stored in Parquet format for efficient loading and compatibility with Hugging Face Datasets:

train-00000-of-00067.parquet  # Training set (67 files)
train-00001-of-00067.parquet
...
val-00000-of-00001.parquet    # Validation set (1 file)
test-00000-of-00002.parquet   # Test set (2 files)
test-00001-of-00002.parquet

Data Fields

Field Type Description
image PIL.Image RGB image (512×384 or similar resolution)
mask PIL.Image Grayscale binary mask (L mode)
label ClassLabel 0=real, 1=fake
image_name string Original filename

Mask Details:

  • For real images: all-black mask (pixel value 0)
  • For fake images: segmentation mask of edited regions (white=255=edited, black=0=original)

Dataset Statistics

Split Real Images Fake Images Total Parquet Files
Train 115,814 215,165 330,979 67
Val 1,656 2,333 3,989 1
Test 1,901 3,599 5,500 2
Total 119,371 221,097 340,468 70

Usage

Loading from Hugging Face Hub (Recommended)

from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("FlyHorseJ/DEAL-300K")

# Or load specific splits
train_dataset = dataset["train"]
val_dataset = dataset["val"]
test_dataset = dataset["test"]

# Access a sample
sample = train_dataset[0]
image = sample["image"]   # PIL Image (RGB)
mask = sample["mask"]     # PIL Image (grayscale mask)
label = sample["label"]   # 0 (real) or 1 (fake)
name = sample["image_name"]  # Original filename

PyTorch DataLoader Example

from torch.utils.data import DataLoader
from torchvision import transforms
import torch

def collate_fn(batch):
    transform = transforms.Compose([
        transforms.ToTensor(),
        transforms.Resize((512, 512))
    ])
    
    images = []
    masks = []
    labels = []
    
    for item in batch:
        images.append(transform(item["image"]))
        masks.append(transform(item["mask"]))
        labels.append(item["label"])
    
    return {
        "images": torch.stack(images),
        "masks": torch.stack(masks),
        "labels": torch.tensor(labels)
    }

# Load dataset from Hugging Face Hub
dataset = load_dataset("FlyHorseJ/DEAL-300K")

# Create DataLoader
train_loader = DataLoader(
    dataset["train"], 
    batch_size=32, 
    shuffle=True,
    collate_fn=collate_fn,
    num_workers=4
)

Visualization Example

import matplotlib.pyplot as plt
import numpy as np
from datasets import load_dataset

# Load from Hugging Face Hub
dataset = load_dataset("FlyHorseJ/DEAL-300K")

sample = dataset["train"][0]
fig, axes = plt.subplots(1, 3, figsize=(15, 5))

# Original image
axes[0].imshow(sample["image"])
axes[0].set_title(f"Image ({'Real' if sample['label'] == 0 else 'Fake'})")
axes[0].axis('off')

# Mask
axes[1].imshow(sample["mask"], cmap='gray')
axes[1].set_title("Mask")
axes[1].axis('off')

# Overlay
img_array = np.array(sample["image"])
mask_array = np.array(sample["mask"].convert('RGB'))
overlay = (img_array * 0.7 + mask_array * 0.3).astype(np.uint8)

axes[2].imshow(overlay)
axes[2].set_title("Overlay")
axes[2].axis('off')

plt.tight_layout()
plt.show()

Dataset Generation Pipeline

  1. Instruction Generation: Fine-tuned Qwen-VL generates editing instructions for MS COCO images
  2. Image Editing: InstructPix2Pix performs mask-free editing based on instructions
  3. Annotation: SAM-CD (Segment Anything Model with Change Detection) generates pixel-level masks

Comparison with Existing Datasets

Dataset Year Source Images Edited Images Image Size Scenario Generative Model
CoCoGlide 2023 512 512 256×256 General GLIDE (Mask-Required)
AutoSplice 2023 2,273 3,621 256×256–4232×4232 General DALL-E2 (Mask-Required)
MagicBrush 2023 5,313 10,388 1024×1024 General DALL-E2 (Mask-Required)
Repaint-P2/CelebA-HQ 2024 10,800 41,472 256×256 Face Repaint (Mask-Required)
DEAL-300K 2025 119,371 221,097 128×512–512×576 General InstructPix2Pix (Mask-Free)

Citation

If you use this dataset in your research, please cite:

@article{zhang2025deal300k,
  title={DEAL-300K: Diffusion-based Editing Area Localization with a 300K-Scale Dataset and Frequency-Prompted Baseline},
  author={Zhang, Rui and Wang, Hongxia and Liu, Hangqing and Zhou, Yang and Zeng, Qiang},
  journal={arXiv preprint arXiv:2511.23377},
  year={2025}
}

Contact

For questions or issues about the dataset, please:

License

This dataset is released for academic research purposes. Please refer to the original MS COCO and MagicBrush licenses for usage restrictions.

Related Links

Downloads last month
201

Paper for FlyHorseJ/DEAL-300K