Skip to main content

A collection of image manipulation dataset classes implemented in PyTorch

Project description

Image Manipulation Datasets (IMDS)

This Python package provides PyTorch-compatible dataset classes for common image manipulation datasets used in digital forensics and deepfake detection research.

Supported Datasets

  • CASIA 2.0 - Forgery classification dataset with 4,795 images
  • Defacto - Collection of manipulation datasets:
    • Copy/Move (~19,000 forgeries)
    • Splicing (~105,000 forgeries)
    • Inpainting (~25,000 forgeries)
  • Coverage - Copy-move forgery database with similar genuine objects
  • IMD2020 - Real-life manipulated images from the Internet (2,010 images)

Installation

pip install image-manipulation-datasets

Quick Start

from imds import casia
from torch.utils.data import DataLoader

# Load any dataset
dataset = casia.CASIA2(data_dir='data/CASIA2.0', split='train')
dataloader = DataLoader(dataset, batch_size=32, shuffle=True)

for images, masks in dataloader:
    # images: torch.Tensor shape (batch_size, 3, H, W)
    # masks: torch.Tensor shape (batch_size, 1, H, W) 
    pass

Documentation

For comprehensive API documentation, usage examples, and advanced features, see:

📖 API Documentation

The documentation includes:

  • Complete API reference for all dataset classes
  • Usage examples and common patterns
  • Directory structure requirements for each dataset
  • Performance optimization tips
  • Error handling guidelines

Sample Quality

Datasets are not always perfect. Of the available datasets, COVERAGE, CASIA 2, and Defacto Splicing had images and masks that didn't match in size, though they have been verified as pairs. For this reason, the dataset classes resize the masks to the size of the original image, with the hopes that the masks line up correctly with the image. This is unverified as it would require manually verifying each of the over 110,000 image and mask pairs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_manipulation_datasets-1.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_manipulation_datasets-1.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file image_manipulation_datasets-1.1.0.tar.gz.

File metadata

  • Download URL: image_manipulation_datasets-1.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.9.23 Linux/6.11.0-1015-azure

File hashes

Hashes for image_manipulation_datasets-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e0a8abe98639782c97e5c1fa7b066763c6cf0540dc46c4af99e70f349249491f
MD5 358f411237a82698cf17efef708c1256
BLAKE2b-256 23ca13742b695f083ab8737282127c7882591aa75a9472aea6cd29d11fa60828

See more details on using hashes here.

File details

Details for the file image_manipulation_datasets-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for image_manipulation_datasets-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1f64039b146313cd1e3d8869c018aca28e1bb6f0b9e4c28b45377a787d38311
MD5 168ed80a71a6aa90b55f8f9fb3535c8f
BLAKE2b-256 142f2bb85ebf7db774484610ee372244915cc2038c915d5cd4c487be19a21fe0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page