Metadata-Version: 2.4
Name: tiny-imagenet-torch
Version: 0.1.0
Summary: TinyImageNet dataset for PyTorch
Home-page: https://github.com/ligerlac/tiny-imagenet-torch
Author: Lino Gerlach
Author-email: lino.oscar.gerlach@cern.ch
Project-URL: Bug Tracker, https://github.com/ligerlac/tiny-imagenet-torch/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=1.7.0
Requires-Dist: torchvision>=0.8.0
Requires-Dist: numpy>=1.18.0
Requires-Dist: pillow>=8.0.0
Requires-Dist: tqdm>=4.50.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=2.10.0; extra == "dev"
Requires-Dist: flake8>=3.8.0; extra == "dev"
Requires-Dist: black>=20.8b1; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: build>=0.7.0; extra == "dev"
Requires-Dist: twine>=3.4.0; extra == "dev"
Dynamic: license-file

# tiny-imagenet-torch

A PyTorch-compatible implementation of the TinyImageNet dataset, following the pattern of torchvision datasets like MNIST, FashionMNIST, and CIFAR-10.

## About TinyImageNet

Tiny ImageNet contains 100000 images of 200 classes (500 for each class) downsized to 64×64 colored images. Each class has 500 training images, 50 validation images and 50 test images. More information can be found here: https://paperswithcode.com/dataset/tiny-imagenet. This implementation ingores the unlabeled test images to match the structure of MNIST, FashionMNIST, and CIFAR-10. 

## Installation

```bash
pip install tiny-imagenet-torch
```

Or install from source:

```bash
git clone https://github.com/ligerlac/tiny-imagenet-torch.git
cd tiny-imagenet-torch
pip install -e .
```

## Usage

```python
import torch
from torch.utils.data import DataLoader
from torchvision import transforms
from tiny_imagenet_torch import TinyImageNet

# Simple transformation - just convert to tensor
transform = transforms.ToTensor()

# Create dataset
train_dataset = TinyImageNet(
    root='./data',
    train=True,
    download=True,
    transform=transform
)

test_dataset = TinyImageNet(
    root='./data',
    train=False,
    download=True,
    transform=transform
)

# Create data loaders
train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True, num_workers=4)
test_loader = DataLoader(test_dataset, batch_size=128, shuffle=False, num_workers=4)

# Usage example
for images, labels in train_loader:
    # Your training code here
    pass
```

## Dataset Details

- 200 classes from ImageNet
- 500 training images per class (100,000 total)
- 50 validation images per class (10,000 total)
- All images are 64×64 color images

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Acknowledgments

- The TinyImageNet dataset was created by Stanford for the CS231N course
- The implementation follows torchvision's dataset pattern
