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
Metadata
Release files for tiny-imagenet-torch 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tiny_imagenet_torch-0.1.0.tar.gz | 7.1 kB | Without provenance | Details for tiny_imagenet_torch-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tiny_imagenet_torch-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tiny_imagenet_torch-0.1.0-py3-none-any.whl |
Total release size: 14.1 kB
Release files / tiny_imagenet_torch-0.1.0.tar.gz
| Download URL | tiny_imagenet_torch-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35d3a9f53af3b32e040fd8c4797022e344f1995298c781090993ce81ef4bafe8
|
|
BLAKE2b-256 checksum How to use checksums |
d84c52cb00bf606fdbdf24255e7f5809c909c93df70afd1aa987851fffccdd29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / tiny_imagenet_torch-0.1.0-py3-none-any.whl
| Download URL | tiny_imagenet_torch-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17a975d07ffeac2cc03f8a4532ca32ac20c056a23c7f6b0764b18921bae7cddc
|
|
BLAKE2b-256 checksum How to use checksums |
d97678c9c3bfdb8488a8c7ee48d0b2515680d7e0301fdfd407daed43e1901bf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Security for tiny-imagenet-torch 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.