Giter VIP home page Giter VIP logo

sandwhich's Introduction

Sandwhich

sandwhich-icon
Website | Twitter

Sandwhich is a mobile app built to solve the sandwich debate by determining if the picture you've taken is a sandwich using machine learning, Flutter, and TensorFlow Lite.

Available on Google Play and the App Store

Screenshots

Built With

Getting Started

Building from Source

Clone the repository

git clone https://github.com/MotionMobs/Sandwhich
cd Sandwhich

Run Sandwhich

flutter run

Train Your Model/ How To ๐Ÿš‹ Your ๐Ÿฅช

To train your ๐Ÿฅช, you need to install Docker and ImageMagick.

brew update && brew install imagemagick

Set up file structure for your images

training_images
โ”‚   โ”œโ”€โ”€ input
โ”‚   โ”‚   โ”œโ”€โ”€ not-sandwich
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ processed  # processed not-sandwich images
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ unprocessed  # original, not yet processed not-sandwich images
โ”‚   โ”‚   โ”œโ”€โ”€ sandwich
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ processed  # processed sandwich imagess
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ unprocessed  # original, not yet processed sandwich images
โ”‚   โ”œโ”€โ”€ output  # ready for model
โ”‚   โ”‚   โ”œโ”€โ”€ not-sandwich  # minimum 20 images to train
โ”‚   โ”‚   โ””โ”€โ”€ sandwich  # minimum 20 images to train
โ””โ”€โ”€

Once original images are loaded into the folders, as described above, process the images

cd training_images
./conversion.sh

After all images have been processed we need to build the Docker image, run the script to retrain the model, and run the script to convert the retrained model to a .tflite model we can use in the app.

Go back to the root of the project and run:

cd -
./train.sh

Prepare to wait a while.

Testing

To test the new model, run ./test_model.sh $IMAGE_PATH where $IMAGE_PATH is any path to an image you want to test with. For convenience, you can even drag an image into the terminal to have its path placed at the end of whatever is currently in the terminal.

  • When ready to use the new model, move it to the assets folder and overwrite the old model. Backup old model if desired.
  • Run the app, find some sandwiches, and enjoy!

To release on Android:

flutter build apk --target-platform android-arm64

Team

MotionMobs Website

Credits

Sandwhich icon was created by Chad Remsing from the Noun Project

sandwhich's People

Contributors

mclark4386 avatar motionmobs avatar wad3g 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.