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
- Flutter Packages
- Flare by 2Dimensions
- Link to our flare file ๐คทโโ๏ธ
- Google Fonts
Clone the repository
git clone https://github.com/MotionMobs/Sandwhich
cd Sandwhich
Run Sandwhich
flutter run
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.
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!
flutter build apk --target-platform android-arm64
Sandwhich icon was created by Chad Remsing from the Noun Project