An AI Diet Mobile Application which aims to helps users lose weight in order to avoid health problems, such as heart-related issues and asthma.
The application consists of three main parts: front end (client), back end API, and the machine learning application. Each of these three services communicate between each other, sending and receiving requests for each of the application's features. The back end API and the machine learning application are containerised using Docker. The Darknet YOLO Model used for the food detector in the machine learning application has been set up with Tensorflow Serving to future-proof the application by easing the process of using a new or enhanced model in a production setting without changing any of the service architecture or APIs.
To find out more about deploying deep learning models using Tensorflow Serving, Docker, and Flask, click here.
To find out more about training a YOLO Food Detection Model using Darknet, click here.
- Nardiena Althafia Pratama - 46223713
- Muhammad Naufal - 46223638
- Davin Iddo Irawan Alfian - 46223740
- Owen Jordan - 45802942
- Huu Minh Quan Tran - 45262612
- Aditya S Hadinata - 43642498
- Docker
- Python 3.6.0 and 3.7.0
- Tensorflow serving - it is recommended to set this up using docker
- React Native and its development environment - choose the React Native CLI Quickstart option in this link
Two python environments are needed to run this project, one with Python 3.6.0 and one with Python 3.7.0.
- Run
cd plateducate-ml/flask_server
and runpip install -r darkflow.txt
.
If your system does not have a dedicated GPU, replace the
tensorflow-GPU
module withtensorflow
. Otherwise, leave the file as it is.
- Enter the
darkflow
directory by runningcd /darkflow
. - Run
python setup.py build_ext --inplace
andpip install .
to install the darkflow open source library.
- Run
cd plateducate-be/
and runpip install -r requirements.txt
.
- Install MySQL here.
- Export the schema using the
.sql
file included in the repository.
On one terminal, do this step:
- Run tensorflow serving by running this command in your terminal:
docker run -p 8501:8501 --name=object-detection --mount type=bind,source=PATH-TO-PROJECT/plateducate-ml/serving/conf/,target=/tensorflow-serving/conf/ --mount type=bind,source=PATH-TO-PROJECT/plateducate-ml/serving/model-data/,target=/tensorflow-serving/models/ -t tensorflow/serving:1.13.1 --model_config_file=/tensorflow-serving/conf/tensorflow-serving.conf --model_config_file_poll_wait_seconds=60
Open a different terminal and do these steps:
- Run
cd/plateducate-ml/flask_server/
- Run
flask run
.
Open another terminal and do these steps:
- Run
cd/plateducate-be/
. - Run
flask run -p 4000
. - Ensure that the URLs in the backend endpoints refer to
localhost
instead of the Docker container name, since we are not using Docker Compose.
Open a terminal and do these steps:
- Run
cd plateducateFE/
. - Run
npm i
to install the needed modules. - Run
npx react-native start
.
On a different terminal, do these:
- Run
cd plateducateFE/
. - Run
npx react-native android-start
.
The application should now start running on Android Studio.
- Linux Distribution from this list
- NVIDIA GPU
- Docker and Docker Compose
- NVIDIA Container Toolkit
- Tensorflow serving - it is recommended to set this up using docker
- React Native and its development environment - choose the React Native CLI Quickstart option in this link
- Install MySQL here.
- Export the schema using the
.sql
file included in the repository.
On one terminal, do the following:
- Enter the
plateducate-ml
directory by runningcd plateducate-ml/
. - Run
sudo docker-compose up --build
.
Open another terminal and do the following:
- Enter the
Plateducate
project directory (highest level). - Run
sudo docker-compose up --build
.
Open a terminal and do these steps:
- Run
cd plateducateFE/
. - Run
npm i
to install the needed modules. - Run
npx react-native start
.
On a different terminal, do these:
- Run
cd plateducateFE/
. - Run
npx react-native android-start
.
The application should now start running on Android Studio.