GithubHelp home page GithubHelp logo

razyoboy / food_for_thoughts Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 19.67 MB

Tensorflow-based ML model for food classification and detection

License: MIT License

Dockerfile 0.30% Python 4.58% Jupyter Notebook 95.12%

food_for_thoughts's Introduction

Food for Thoughts

Frame 68

A Tensorflow-based ML model for food classification and detection, based on the Kaggle dataset food-101 and thfood-50 - utilizing the InceptionV3 Convolutional Neural Network (CNN) model.

Usage (via API)

This can be done locally, or via a Cloud serverless provider of your choice. In our case, we used Google Cloud Platform as the main Cloud provider.

Deployment via Google Cloud Run (CLI-method)

  1. Install gcloud CLI and follow the instructions as shown here
  2. Clone this repository and navigate to its root directory
git clone https://github.com/razyoboy/food_for_thoughts/
cd food_for_thoughts
  1. Deploy to your project by using the following command (more options can be found here)
gcloud run deploy

Deployment via Local PC

  1. Clone this repository and navigate to the root directory
git clone https://github.com/razyoboy/food_for_thoughts/
cd food_for_thoughts
  1. Ensure all requirements are met
pip install -r requirements.txt
  1. Run the local server
python -u "src/main.py"

API Endpoints and Interaction

Currently, food_for_thoughts supports two endpoints:

GET Check Health

  • <base_url>/api/

Returns

{
    "status": 200,
    "text": "Up and Running!"
}

POST Predict Food

  • <base_url>/api/predict-food/
  • form-data body with image-file as the key
  • Attach image via the image-file key

Returns

{
 "status": 200,
 "prediction_results": {
     "food_type": <food_result>,
     "confidence": <percentage>
 }
}

DISCLAIMER: This project is part of EGBI443 Image Processing in Medicine class project, and is not intended to be a production ready implementation for food prediction via API calls

food_for_thoughts's People

Contributors

razyoboy avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.