Skip to content

Latest commit

 

History

History
129 lines (89 loc) · 4.34 KB

README.md

File metadata and controls

129 lines (89 loc) · 4.34 KB

ml-food-classification

TensorFlow Keras Docker Google Colab LICENSE Docker Version Docker Pulls

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

Notebook: MamMates Food Classification

Dataset: MamMates Dataset

Features 💡

Using Mammates Food Classification, you can categorize food images into 10 classes.

Class Label
0 bika_ambon
1 dadar_gulung
2 donat
3 kue_cubit
4 kue_klepon
5 kue_lapis
6 kue_lumpur
7 kue_risoles
8 putu_ayu
9 roti

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-classification
  • Run the image:
docker run -p 8501:8501 --name ml-clf putuwaw/mammates-food-classification
curl -s https://raw.githubusercontent.com/MamMates/ml-food-classification/main/example.json | curl -X POST -d @- http://localhost:8501/v1/models/food_clf:predict
  • You will get the following response:
{
  "predictions": [
    [
      6.28405522e-11, 7.40732e-6, 0.998946607, 1.49191326e-8, 0.000139753625,
      2.86315444e-5, 0.000863699941, 6.22894277e-7, 1.15933371e-5, 1.64414064e-6
    ]
  ]
}

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-classification.git
  • Update the model by changing the saved model in the model folder.

  • Build the Docker image:

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

Note

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

Acknowledgements 🙏

Our sincere gratitude goes to the creators and maintainers of these datasets. Their generosity in sharing these resources has been instrumental in driving the progress and success of this project.

License 📝

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