torchvision-tinyimagenet
Dataset class for PyTorch and the TinyImageNet dataset.
Installation
pip install tinyimagenet
How to use
from tinyimagenet import TinyImageNet
from pathlib import Path
import logging
logging.basicConfig(level=logging.INFO)
split ="val"
dataset = TinyImageNet(Path("~/.torchvision/tinyimagenet/"),split=split)
n = len(dataset)
print(f"TinyImageNet, split {split}, has {n} samples.")
n_samples = 5
print(f"Showing info of {n_samples} samples...")
for i in range(0,n,n//n_samples):
image,klass = dataset[i]
print(f"Sample of class {klass:3d}, image {image}, words {dataset.idx_to_words[klass]}")
You can also check the quickstart notebook to peruse the dataset.
Finally, we also provide some example notebooks that use TinyImageNet with PyTorch models:
Metadata
Release files for tinyimagenet 0.9.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tinyimagenet-0.9.9.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinyimagenet-0.9.9-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 20.5 kB
Release files / tinyimagenet-0.9.9.tar.gz
| Download URL | tinyimagenet-0.9.9.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcbd21749abc63138fedf213501fd509c3e8495f2e78b8af5492338f876cc07a
|
|
BLAKE2b-256 checksum How to use checksums |
1e79a9284fd961664d6c23a4f85ca6ee7db82273f37d61cd7317bab83e4b223f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / tinyimagenet-0.9.9-py2.py3-none-any.whl
| Download URL | tinyimagenet-0.9.9-py2.py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
941c7d3b19cb2f3fa719799530745a3cc0e7095a1990f2f5be107d355ec359df
|
|
BLAKE2b-256 checksum How to use checksums |
5d0791f5937864082de49f5c32d2d79983829d38a1b911f5e0dc719e8cf16eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|