Code Monkey home page Code Monkey logo

nutrify's Introduction

Nutrify - take a photo of food and learn about it

Work in progress.

To make this a thing, we're going to need lots of food images...

Start uploading your food images here: https://share.streamlit.io/mrdbourke/nutrify/main/food_image_collector.py

Streaming progress on Twitch/making videos about it on YouTube.

End goal: take a photo of food an learn about it (nutrition information, where it's from, recipes, etc).

Something like this (a data flywheel for food images):

Status: making a small application to collect large amounts of food images.

What's in this repo?

  • images/ - folder with misc images for the project
  • data_exploration/ - notebooks & data exploring the USDA FoodData Central data (this has info about the nutrition content of foods)
  • food_image_collector.py - Streamlit-powered app that collects photos and uploads them to a Google Storage bucket and stores metadata in Google Sheets (these are private), see the workflow below.
  • save_to_gsheets.py - Small utility script that saves a bunch of metadata about an uploaded image to a Google Sheet (this will likely move into a dedicated utils/ folder later on.
  • utils.py - Series of helper functions used in food_image_collector.py, for example, upload_blod(), a function that uploads a photo to Google Storage.
  • requirements.txt - A text file with the dependency requirements for this project.

Image uploading workflow

The script food_image_collector.py is currently hosted using Streamlit Cloud. It does this:

Master plan

As of: 15 March 2022

Note: this is very likely to change.

Stage 1 (done)

Build food image collection app, need a way to store images at large scale, images: object storage (Google Storage), info about images: relational database (PostgreSQL).

Build small prototype computer vision app to take a photo of ~100 different types of foods and return back their nutrition information (this'll be done via a public nutrition API, if you know of one, please let me know).

Stage 3

Merge inputs to stage 1 and stage 2 into a database (start linking together the data flywheel, more images get taken, models get improved, more images, better models, more images, better models, etc).

Stage 4

Upgrade stage 1, 2, 3 to work with world's 100 most commonly eaten foods (start with top of the Pareto curve and then start working backwards towards the tail).

Stage 5

Repeat the above until almost every food you can eat is covered.

Updates

  • 14 Mar 2022 - added macronutrient details for ~100 foods, see release notes
  • 17 Jan 2022 - cleaned up the data by removing duplicates/fixing some low performing classes (see the update comment)
  • 14 Jan 2022 - Nutrify can now identify 100 foods (see release notes)
  • 22 Dec 2021 - Nutrify can now identify 78 foods

nutrify's People

Contributors

mrdbourke 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.