Installation dependencies
pip install -r requirements.txt
Start flask server
python app.py
Start docker:
sudo docker-compose up
Server Usage:
-
Ingredient Detection:
-
Method: POST
-
Example input:
base64
encoding of this image in key-value format.{ "image": "/9j/4...5//Z" }
-
Example output:
id
withbase64
encoding of cropped ingredient images.id=-1
mean the original image with bounding box of detected ingredients.[ { "ingredient_id": -1, "image": "/9j/4...5//Z" }, { "ingredient_id": 1789, "image": "/9j/4...2P/Z" }, { "ingredient_id": 1789, "image": "/9j/4...2Q==" }, { "ingredient_id": 2478, "image": "/9j/4...2Q==" } ]
-
-
Food Recommendation:
-
Method: POST
-
Example input: 1789 (Cheese), 2478 (Corn)
{ "ingredient_ids": [1789, 2478] }
-
Example output:
{"food_ids": [8756, 9718, 2728, ... , 1189, 1418]}
-