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-0.6.5.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-0.6.5-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_manipulation_datasets-0.6.5.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.2 Linux/6.8.0-62-generic

File hashes

Hashes for image_manipulation_datasets-0.6.5.tar.gz
Algorithm Hash digest
SHA256 7da3b3ac9eb1a6b4fef85299f00c3c541ccdd3364f3c9913588c42bb98e8c147
MD5 ad552adc934ca9e303fd6749a5689030
BLAKE2b-256 9072635f5642cbcbb736c1d729d917459e0b3de0bd0dfadb9fad1f37294202cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for image_manipulation_datasets-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 26edca718e86163b8a4f6bfbb5202d2f4e13c8a2f1c516b4902e1a94fe613d9e
MD5 87600c687673ebd8580203863313c67e
BLAKE2b-256 0ba27fdca5c38d96a93d364a99c43daa5f830fd6c1ff7060fdbeec160a2e7f9b

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