Nerdward/inverse_cooking

PureBasic

0

64 commits

updated Sep 7, 2022

See the code

README

FoodAI

Table of contents

  1. Installation guide
  2. Backend
  3. Frontend

Installation

This code uses Python 3.6 and PyTorch 0.4.1 cuda version 9.0.

  • Packages setup
$ pip install --editable .
  • Creating virtual environment:
conda create -n inv_cooking
  • Activate the virtual environment
conda activate inv_cooking
  • Installing PyTorch:
$ conda install pytorch=0.4.1 cuda90 -c pytorch
  • Install dependencies
$ pip install -r requirements.txt

Pretrained model

  • To download the Ingredient, Instruction vocabularies and pretrained model weights. Run:
$ make artifacts

Backend Server

  • To start up the fast api and uvicorn server
$ cd app
$ uvicorn app.api:app \       # location of app (`app` directory >`api.py` script > `app` object)
    --host 0.0.0.0 \        # localhost
    --port 8000 \           # port 8000
    --reload \              # reload every time we update
    --reload-dir tagifai \  # only reload on updates to `tagifai` directory
    --reload-dir app        # and the `app` directory

Frontend

  • To start up the streamlit frontend server, run
$ cd frontend
$ streamlit run home.py

Code supporting the paper:

Amaia Salvador, Michal Drozdzal, Xavier Giro-i-Nieto, Adriana Romero. Inverse Cooking: Recipe Generation from Food Images. CVPR 2019

@InProceedings{Salvador2019inversecooking,
author = {Salvador, Amaia and Drozdzal, Michal and Giro-i-Nieto, Xavier and Romero, Adriana},
title = {Inverse Cooking: Recipe Generation From Food Images},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}

Nerdward/inverse_cooking

PureBasic

0

64 commits

updated Sep 7, 2022

See the code

README

FoodAI

Table of contents

  1. Installation guide
  2. Backend
  3. Frontend

Installation

This code uses Python 3.6 and PyTorch 0.4.1 cuda version 9.0.

  • Packages setup
$ pip install --editable .
  • Creating virtual environment:
conda create -n inv_cooking
  • Activate the virtual environment
conda activate inv_cooking
  • Installing PyTorch:
$ conda install pytorch=0.4.1 cuda90 -c pytorch
  • Install dependencies
$ pip install -r requirements.txt

Pretrained model

  • To download the Ingredient, Instruction vocabularies and pretrained model weights. Run:
$ make artifacts

Backend Server

  • To start up the fast api and uvicorn server
$ cd app
$ uvicorn app.api:app \       # location of app (`app` directory >`api.py` script > `app` object)
    --host 0.0.0.0 \        # localhost
    --port 8000 \           # port 8000
    --reload \              # reload every time we update
    --reload-dir tagifai \  # only reload on updates to `tagifai` directory
    --reload-dir app        # and the `app` directory

Frontend

  • To start up the streamlit frontend server, run
$ cd frontend
$ streamlit run home.py

Code supporting the paper:

Amaia Salvador, Michal Drozdzal, Xavier Giro-i-Nieto, Adriana Romero. Inverse Cooking: Recipe Generation from Food Images. CVPR 2019

@InProceedings{Salvador2019inversecooking,
author = {Salvador, Amaia and Drozdzal, Michal and Giro-i-Nieto, Xavier and Romero, Adriana},
title = {Inverse Cooking: Recipe Generation From Food Images},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}