kaira.data.ImageDataset

Inheritance diagram of ImageDataset

Inheritance diagram for ImageDataset

class kaira.data.ImageDataset(name: str = 'cifar10', train: bool = True, size: Tuple[int, int] | None = None, normalize: bool = True, root: str = '~/.cache/kaira')[source]

Bases: Dataset

Simple wrapper for common image datasets.

Provides easy access to CIFAR-10, CIFAR-100, and MNIST datasets with consistent interface and optional preprocessing.

Methods

__init__

Initialize the image dataset.

subset

Create a random subset of the dataset.

Examples using kaira.data.ImageDataset

Image Quality Metrics

Image Quality Metrics

Original DeepJSCC Model (Bourtsoulatze 2019) with Training

Original DeepJSCC Model (Bourtsoulatze 2019) with Training

Deep Joint Source-Channel Coding (DeepJSCC) Model - Bourtsoulatze2019 Implementation

Deep Joint Source-Channel Coding (DeepJSCC) Model - Bourtsoulatze2019 Implementation

Image Compressors Comparison

Image Compressors Comparison
__init__(name: str = 'cifar10', train: bool = True, size: Tuple[int, int] | None = None, normalize: bool = True, root: str = '~/.cache/kaira')[source]

Initialize the image dataset.

Parameters:
  • name – Dataset name (“cifar10”, “cifar100”, “mnist”)

  • train – Whether to use training split

  • size – Target image size (H, W). If None, uses original size

  • normalize – Whether to normalize images to [0, 1]

  • root – Root directory for dataset storage

subset(size: int, seed: int | None = None) Subset[source]

Create a random subset of the dataset.

Parameters:
  • size – Number of samples in the subset

  • seed – Random seed for reproducibility

Returns:

Subset of the dataset