CV ↗

AI Engineering · Inference Systems

PRODUCTION-PATTERN DEMONSTRATION

VisionServe: CIFAR-10 Inference API

PROJECT BRIEF

A production-pattern demonstration: Dockerised FastAPI model serving with reproducible training, artifact tracking, and class probabilities with confidence scores.

Confusion matrix from CIFAR-10 inference APIFIG // 03.A

Problem

Most image-classification tutorials stop at a trained model in a notebook. Shipping that model as something another service can actually call — with reproducible training, versioned artifacts, and a container that runs the same way on a laptop as it does in CI — is a different problem, and the one this project was built to demonstrate end-to-end.

Approach

VisionServe wraps a CIFAR-10 classifier in a FastAPI service, with the surrounding tooling treated as first-class rather than an afterthought:

  • A single CLI handles the full lifecycle: preprocessing, training, metrics export, and artifact versioning, so a run is reproducible from one command instead of a chain of ad-hoc scripts.
  • Predictions return class probabilities and confidence scores so downstream consumers can inspect the model’s output rather than receiving only a hard label.
  • A confusion matrix and metrics summary are generated automatically per run, giving a fast QA check before anything ships.

Architecture

The service is packaged as a Docker image built on CPU-friendly PyTorch wheels — deliberately avoiding a CUDA base image so the container stays portable across environments that don’t have a GPU available, which is the common case for lightweight inference services.

Result

The result is a template for production-aware model serving: train reproducibly, version the artifact, containerize it, and expose it over a documented API — the same shape of work needed to take any classifier from notebook to service.

NEXT CASE STUDY // 04Zero-shot Sentiment Intelligence Pipeline