Skip to content
A Machine Learning App for an Age-Old Debate. Coming April 1st 2019.
Branch: master
Clone or download
mclark4386 Merge pull request #1 from wad3g/update-readme
Add 🥪 media + update README
Latest commit 8266b1f Apr 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets *remove old/test models Apr 1, 2019
ios *release Mar 28, 2019
lib *remove debug text Mar 27, 2019
media 👀 x 2 Apr 5, 2019
test *init Mar 16, 2019
tf_files *added journal to the model Mar 27, 2019
training_images *working on training scripts Mar 25, 2019
pubspec.yaml *should hope fully fix android Apr 1, 2019 add model testing helper script Mar 20, 2019


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


Built With

Getting Started

Building from Source

Clone the repository

git clone
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

│   ├── 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

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 -

Prepare to wait a while.


To test the new model, run ./ $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


MotionMobs Website


Sandwhich icon was created by Chad Remsing from the Noun Project

You can’t perform that action at this time.