https://www.youtube.com/watch?v=k0afb3yEyGo
This project is a simple demonstration of how to integrate a machine learning model in a Flutter application. There are three demos that are trained and a demo app that uses the trained models to make predictions. There is also a presentation for Flutter meetup. The trained models are:
- Color classifier (very simple model that can be trained in a few seconds)
- Face detection model
- Eye segmentation model
Important note: The trained models and datasets are not included in the repository for storage reasons. I am not the owner of the datasets used in the project. The datasets are available on Kaggle and the links are provided below.
- For training files, I use Jupyter notebooks. You can use any Python IDE or VSCode with Jupyter and Python extensions.
- For training, Python 3.10 is used. I recommend using a virtual environment (venv) before running the code. The required packages are in
requirements.txt
. To install the required packages, runpip install -r requirements.txt
or uncomment the first cell in the notebooks and run it. - For demo and presentation, Flutter is used. I ran on Android (demo) and macos (presentation). For other targets or if it doesn't start, refer to https://pub.dev/packages/tflite_flutter