The goal of this repo is to learn two things:
- How to train a neural network on the cloud.
- How to serve the model on the cloud.
Hence, in this project, I will:
- Create a training pipeline using transfer learning with a custom dataset.
- Train the model on Google Cloud AI Platform
- Create a web app that interacts with the model prediction
- Deploy the web app through Google Cloud Run.
The trainer folder contains scripts and dockerfile for the training pipeline. For more detail, checkout trainer/README.md.
The app folder contains the web app for classifing images using the model prediction. For more detail, checkout app/README.md.
For simplicity, the dataset I used for this project is food-11, containing 16,643 food images grouped in 11 major food categories. You can download the dataset at Kaggle, which originates from EPFL-Food Image Dataset.
The dataset comes in three folders, Evaluate, Train, and Validation. There are, in total, 11 categories. Each image file has a naming format of <class_id>_<img_id>.jpg
. For example, 0_1.jpg means the first image in class 0 (Bread). I further processed the dataset by grouping them into classes to simplify later operations.
Original Dataset | Preprocessed Dataset |
---|---|
|
|