Pythia Installation

Introduction

I will leave the method when I installed Pythia, a framework of multimodal deep learning model published by Facebook AI Research. It may not be appropriate because it is a flow that I got caught in various ways and asked a friend and as a result I was able to move it.

Introduce how to install Pythia which is Framework of Multimodal AI models from Facebook AI Research.

Container preparation Create Docker Contena

First, build the following Dockerfile to create a container.

First, creating Docker contena using following Dockerfile.

https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/docker/Dockerfile

In that container, install it by referring to the Coloab demo code in Quickstart of Pythia's Documentation.

Let's install Pythia according to the Documentation. Follow the code of Quickstart Colab file.

Installation

Execute the following code in order on the terminal.

Run following codes on terminal.

cd
mkdir content

# Install dependencies
pip install ninja yacs cython matplotlib demjson
pip install git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
cd ~/content/
rm -rf fastText
git clone https://github.com/facebookresearch/fastText.git fastText
cd /content/fastText
pip install -e .
cd ~/content/
rm -rf pythia
git clone https://github.com/facebookresearch/pythia.git pythia
cd /content/pythia

# Don't modify torch version
sed -i '/torch/d' requirements.txt
pip install -e .

Add the following to .bashrc

Add the next PATH to bashrc.

PATH="$PATH":~/content/pythia
# Install maskrcnn-benchmark to extract detectron features
cd /content
git clone https://gitlab.com/meetshah1995/vqa-maskrcnn-benchmark.git
cd /content/vqa-maskrcnn-benchmark
# Compile custom layers and build mask-rcnn backbone
python setup.py build
python setup.py develop

Add the following to .bashrc Add the next PATH to bashrc.

PATH="$PATH":~/content/vqa-maskrcnn-benchmark

Also, I do the following with pythia dir with insurance

python setup.py develop

When I do this, I get the following error If run the above code, following error may return.

error: tqdm 4.19.9 is installed but tqdm>=4.27 is required by {'transformers'}

However, Pythia seems to be installed, so I manually insert transformers. Transformers lib requires tqdm>=4.27 , so you should update tqdm and install transformers manually using pip.

pip install -U tqdm
pip install transformers

You can now use transformers. Then you can use (it means import) transformers.

Installation is now complete. After that, I will leave the appearance of using it. Instllation of Pythia is finished. From now on, I'll record how I used it.

Recommended Posts

Pythia Installation
Django installation
Cuda installation
boto3 installation
Docker installation
Volatility installation
Python installation
pip installation
Sphinx installation
InstantOS 1 installation
Jupyter installation
Python installation
pip installation
Kivy installation
ChaSen installation
Backtrader installation
pip installation
Jupyter installation error
Installation of Anaconda3
Mecab installation notes
centOS 7 installation error
Installation of CentOS 8
Theano installation notes
Pylearn 2 installation procedure
GMT installation part 2.
[PyTorch] Installation method
GMT installation part 1.
PHP installation (CentOS 8)
Tkinter installation (homebrew)
OpenCV3 installation battle
Python installation (Windows)
pyenv installation notes
phycopg2 installation failed
ipython notebook installation
Hydrogen installation notes
django installation location
PostgreSQL 10.0 installation procedure
PyPM-Local Package Installation
blockdiag installation procedure
Python installation 2020 (macOS)
RDKit easy installation
Python3.4 installation notes
Cabocha installation notes
CentOS 7 + ffmpeg installation