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.0.1.tar.gz (9.8 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.1-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_manipulation_datasets-1.0.1.tar.gz
  • Upload date:
  • Size: 9.8 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.1.tar.gz
Algorithm Hash digest
SHA256 1955f92987c35d48ca00e9fb2b2dd38f3a18192f02e61d4fe7e0876ae10a072d
MD5 b79c25f81585ff213a0f6153ba7d9c14
BLAKE2b-256 71a835750d16456b7fac6acecefe30ee2ec1a0947fa173ff8025455804739265

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for image_manipulation_datasets-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98429144d2eef0a7a8c38b49e9d15e9e6b5c4dd515f87700b5d999b862c76994
MD5 6d568e8108538fc768a482bf6bed2c51
BLAKE2b-256 39af466df8339e2414a790cb4fbf6664c4fea663ed60d67e285395b09cc3bd4c

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