TinyImageNet dataset for PyTorch
Project description
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
pip install tiny-imagenet-torch
Or install from source:
git clone https://github.com/ligerlac/tiny-imagenet-torch.git
cd tiny-imagenet-torch
pip install -e .
Usage
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiny_imagenet_torch-0.1.0.tar.gz.
File metadata
- Download URL: tiny_imagenet_torch-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35d3a9f53af3b32e040fd8c4797022e344f1995298c781090993ce81ef4bafe8
|
|
| MD5 |
1480bd70c24fc93ff362267a0c81bd7f
|
|
| BLAKE2b-256 |
d84c52cb00bf606fdbdf24255e7f5809c909c93df70afd1aa987851fffccdd29
|
File details
Details for the file tiny_imagenet_torch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tiny_imagenet_torch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a975d07ffeac2cc03f8a4532ca32ac20c056a23c7f6b0764b18921bae7cddc
|
|
| MD5 |
bb87d8ddccaa8e16e401b96ba790b891
|
|
| BLAKE2b-256 |
d97678c9c3bfdb8488a8c7ee48d0b2515680d7e0301fdfd407daed43e1901bf5
|