Installation

Install from PyPI

pip install image-classification-tools

This installs the package and its core dependencies (PyTorch, torchvision, numpy, matplotlib).

Requirements

  • Python ≥ 3.10

  • PyTorch ≥ 2.0.0

  • torchvision ≥ 0.15.0

Optional dependencies

For hyperparameter optimization:

pip install optuna

Or install with all optional dependencies:

pip install image-classification-tools[all]

Install from source

To install the development version:

git clone https://github.com/gperdrizet/CIFAR10.git
cd CIFAR10
pip install -e .

Verify installation

import image_classification_tools
from image_classification_tools.pytorch import data, training, evaluation

print("Installation successful")

GPU support

The package works with both CPU and GPU. To verify CUDA availability:

import torch

print(f'CUDA available: {torch.cuda.is_available()}')

if torch.cuda.is_available():
    print(f'CUDA version: {torch.version.cuda}')
    print(f'Device count: {torch.cuda.device_count()}')

Next steps