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 git+https://github.com/cainspencerm/image-manipulation-datasets.git@0.6

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.0.0.tar.gz (10.0 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.0.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_manipulation_datasets-1.0.0.tar.gz
  • Upload date:
  • Size: 10.0 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.0.0.tar.gz
Algorithm Hash digest
SHA256 cc031ec8e284d95e6dd699af703270af6dfb5244e8e1b88ffe51beed85416761
MD5 b0b27c91dc175545e05c8c36151ec96e
BLAKE2b-256 a4bdbe5aa7cec4bdc2998835131e838de4d13ee5f00114485ac1c36489aa3f70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for image_manipulation_datasets-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd121310d1c42be9c7e4d39c3072cab01eae18b7f7b2dc069585326a1102dca
MD5 90e83e0f084559bd0df7320a1113dfa5
BLAKE2b-256 35ac3923d8117afda05c8536be4e0794ec9781f20810da82770f506046b28307

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