Skip to content

MamMates/ml-food-rating

Repository files navigation

ml-food-rating

TensorFlow Keras Docker Google Colab LICENSE Docker Version Docker Pulls

Food Rating Classification using Convolutional Neural Network (CNN) and deployed using TensorFlow Serving.

Notebook: MamMates Food Rating

Dataset: Food Rating Dataset

Features 💡

Using Mammates Food Rating, you can categorize food images into 3 classes.

Class Label
0 Rating 1 (MamRates ⭐)
1 Rating 2 (MamRates ⭐⭐)
2 Rating 3 (MamRates 🌟🌟🌟)

Prerequisites 📋

Usage ✨

If you already have Docker installed, you only need to run the following command:

  • Pull the image from Docker Hub:
docker pull putuwaw/mammates-food-rating
  • Run the image:
docker run -p 8502:8502 --name ml-rating putuwaw/mammates-food-rating
curl -s https://raw.githubusercontent.com/MamMates/ml-food-rating/main/example.json | curl -X POST -d @- http://localhost:8502/v1/models/food_rating:predict
  • You will get the following response:
{
  "predictions": [[0.00170704955, 0.46321556, 0.535077393]]
}

Development 💻

If you want to develop this model, you can follow the steps below:

  • Clone this repository:
git clone https://github.com/MamMates/ml-food-rating.git
  • Update the model by changing the saved model in the model folder.

  • Build the Docker image:

docker build -t mammates-food-rating .
  • Run the image:
docker run -p 8502:8502 --name ml-rating mammates-food-rating
curl -d @example.json -X POST http://localhost:8502/v1/models/food_rating:predict
  • To stop the container:
docker stop ml-rating

Note

If you want to learn more about TensorFlow Serving, you can read the REST API documentation here.

License 📝

This project is licensed under the MIT License. See the LICENSE file for details.