Deep Learning · 2026
Image Classification (PyTorch + FastAPI)
CNN training, evaluation, REST inference, structured logging and automated tests.
Model
- CNN trained from scratch with batch normalization and dropout
- Standard augmentation (crop, flip, color jitter)
- Checkpoint selection on validation accuracy
Dataset
Image classification dataset with a fixed train/val/test split and class-index mapping stored with the model.
Results & metrics
- Test accuracy
- ~0.90
- Tests
- Pytest suite for API + model
- Logging
- structured JSON logs
Deployment steps
- 1Train and evaluate the CNN; save checkpoints + class map
- 2Serve POST /predict through FastAPI (upload image → class + confidence)
- 3Add structured logging around every inference
- 4Cover the API and preprocessing with Pytest
Tech stack
- PyTorch
- FastAPI
- Pytest