Flutter project - done with the course :
"Deep Learning Course with Flutter & Python - Build 6 AI Apps"
https://www.udemy.com/course/flutter-deeplearning-course/
This project is about:
- finding if the image contain a one of 131 types of fruits or vegetables.
- use Python to train a Neural Network (NN) and export a model,tflite file, to use on mobile devices.
This project was made in order to train in developing applications for iOS using Flutter framework.
Before starting, verify that you have and configured Python on your system:
python --version
For linux/mac:
python3 --version
Also verify that you have and configured properly flutter on your system:
flutter doctor
Make sure you have installed VSCode on your system.
First, we need to create our tflite file to use in our app:
code lib/python
(This wiil create a virtual envirement(venv) to use in this project)
python -m venv .env
For linux/mac:
python3 -m venv .env
Platform |
Shell |
Command to activate virtual environment |
---|---|---|
POSIX |
bash/zsh |
$ source <venv>/bin/activate |
fish |
$ source <venv>/bin/activate.fish |
|
csh/tcsh |
$ source <venv>/bin/activate.csh |
|
PowerShell Core |
$ <venv>/bin/Activate.ps1 |
|
Windows |
cmd.exe |
C:\> <venv>\Scripts\activate.bat |
PowerShell |
PS C:\> <venv>\Scripts\Activate.ps1 |
pip install -r requirments.txt
For linux/mac:
pip3 install -r requirments.txt
NOTE
- dependes on your computer, this stage can take a few minutes. you can watch the progress in last cells in the notebook.
6. On the root dir of your project you should see many new files and directories, but we want only 2:
model.tflite
labels.txt
<flutter_projects>/assets/tflite
NOTE
- before running, make sure to have a picture of a fruit on your phone, or use your camera.