This repository contains machine learning for gizilo apps. The modles include image classification and nutrition grade system.
We pre trained models and do fine tune transfer learning. We also try build from scratch without help pre trained models
Model | Accuracy | Val Accuracy |
---|---|---|
Scratch | 0.74 | 0.26 |
InceptionV3 | 0.84 | 0.75 |
Resnet50V2 | 1.00 | 0.63 |
MobileNetV2 | 0.96 | 0.67 |
We trained nutrition models from scratch without help pre trained models.
Model | Accuracy | Val Accuracy |
---|---|---|
Model | 0.99 | 0.98 |
We have to datset, one image and another one is nutrition list.
Dataset | Link |
---|---|
Image | Datset |
Nutrition | Dataset |
To reproduce this model you can follow this step:
- Download what model you cen reproduce
Type | Dataset Link | Model Link |
---|---|---|
Nutrition | Data | Train Notebook |
Image (scratch) | Link included in notebook | Train Notebook |
Image (InceptionV3) | Link included in notebook | Train Notebook |
Image (Resnet50V2) | Link included in notebook | Train Notebook |
Image (MobileNetV2) | Link included in notebook | Train Notebook |
- Now after download the notebook and dataset you upload the notebook and dataset to use Kagggle or Google Collab for free resource training.
- After that you can run the kernel and run each cell.
- Clone the project
git clone https://github.com/annwarsa/model-gizilo.git
- Navigate to deployment folder
cd model-gizilo/deployment
- Run docker compose
docker compose up -d
NOTE: If the model cannot be loaded, you can try saving it again in a virtual machine, which will be deployed, so it will have the same environment.
The api will be at localhost:8080/api/v1/nutrient. To test and get the result you can use rest api tools such as postman or equivalent, and following this:
- Endpoint: localhost:8080/api/v1/nutrient
- Method: POST
- Payload:
{ "fat": 1, "sugar": 1, "sodium": 1 }
- Response:
{ "result": "A" }