Skip to content

Repository files navigation

image-classification

Transfer learning using pytorch GPU acceleration on the ResNet50 model to train on the Food101 dataset

Documentation in ipynb file.

Installation Process

  1. Create a virtualenv and install deps: python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt

  2. Train (downloads Food-101 automatically to ./data): python scripts/train.py --config configs/default.yaml

  3. Evaluate a checkpoint: python scripts/eval.py --config configs/default.yaml --checkpoint models/checkpoints/your-file.pth

  4. Predict on an image: python scripts/predict.py --config configs/default.yaml --checkpoint models/checkpoints/your-file.pth --image path/to/image.jpg

Notes:

  • Device is auto-detected; force with device: cpu or device: cuda in config.
  • Number of classes is inferred from the dataset.
  • Checkpoints include model/optimizer state and epoch.

About

Transfer learning using pytorch GPU acceleration on the ResNet50 model to train on the Food101 dataset

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages