[PYTHON] DeepIE3D environment construction

things to do

https://github.com/ukuleleplayer/DeepIE3D We will build the environment of Deep IE 3D in.

With the developer's github Frontend

webdev build--output web:build

Backend

gcloud app deploy

However, since these are commands for release, they are not suitable for development.

environment

macOS Catalina 10.15.4 Python 3.7.4 Dart VM version: 2.6.0 webdev 2.5.6 pip 19.0.3

(Click here for how to downgrade dart sdk https://qiita.com/sk161717/items/d44fed3464bc7c9f0d6b)

Method

https://github.com/ukuleleplayer/DeepIE3D Will be cloned locally. Frontend In the local DeepIE3D_Frontend folder

webdev serve --auto=restart --launch-in-chrome --debug

Execute. You will be able to access the front desk at localhost: 8080. Backend Modify main.py in the local / DeepIE3D / DeepIE3D_Backend.

main.py


@APP.after_request
def add_cors(response):
    '''
    Add CORS header(s) to every response from valid sites

    Allow:
    - Origin from everywhere
    - Content-Type to be shown in headers
    - GET, POST and OPTIONS methos
    '''
    #r = request.referrer[:-1]
    #if r in ['http://localhost:8080', 'localhost:8080', 'https://localhost:8080',
    #         'https://adrianwesth.dk', 'https://www.adrianwesth.dk']:
    response.headers.add('Access-Control-Allow-Origin', '*')
    response.headers.add('Access-Control-Allow-Headers',
                            'Content-Type,Authorization')
    response.headers.add('Access-Control-Allow-Methods',
                            'GET,POST,OPTIONS')

    return response

Changes: Comment out the middle three lines.

python main.py

Backend is set on localhost: 5000.

Run

http://127.0.0.1:8080/

If you access, you should be able to move it freely as soon as the initialization is completed.

Recommended Posts

DeepIE3D environment construction
Django environment construction
Emacs-based environment construction
Linux environment construction
Python environment construction
Environment construction (python)
django environment construction
CodeIgniter environment construction
python environment construction
Python --Environment construction
Python environment construction
Golang environment construction
python environment construction
Word2vec environment construction
Environment construction: GCP + Docker
Django project environment construction
python windows environment construction
Go language environment construction
ConoHa environment construction memo
homebrew python environment construction
PyData related environment construction
Anaconda-4.2.0-python3 environment construction (Mac)
Python development environment construction
YOLO v4 environment construction ①
pyenv + fish environment construction
python2.7 development environment construction
BigGorilla environment construction memo
grip environment construction onCentOS6.5
Anaconda environment construction memo
Golang environment construction [goenv]
Mac environment construction Python
Pyxel environment construction (Mac)
Python environment construction @ Win7
Python + Anaconda + Pycharm environment construction
About Linux environment construction (CentOS)
PyTorch C ++ (LibTorch) environment construction
Anaconda environment construction on CentOS7
Django development environment construction memo
First LAMP environment construction (Linux)
Python environment construction (Windows10 + Emacs)
Environment
CI environment construction ~ Python edition ~
[Memo] Construction of cygwin environment
ML environment construction with Miniconda
Python environment construction For Mac
Anaconda3 python environment construction procedure
Docker + Django + React environment construction
Anaconda3 × Pycharm environment construction memo
Python3 environment construction (for beginners)
Python environment construction and TensorFlow
NumPy and matplotlib environment construction
Machine learning environment construction macbook 2021
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Ubuntu14.04 + GPU + TensorFlow environment construction
[Tensorflow] Tensorflow environment construction on Windows 10
Environment construction, Build -Go edition-
django project development environment construction
Linux environment construction (on WSL environment)
Environment construction of python2 & 3 (OSX)
[MEMO] [Development environment construction] wine