1. 程式人生 > >densepose安裝過程記錄

densepose安裝過程記錄

Table of Contents

1.配置

1.配置

參考:https://github.com/facebookresearch/DensePose/blob/master/INSTALL.md

2.CAFFE2安裝

conda create -n caffe2 python=2.7
conda create caffe2
conda install pytorch-nightly -c pytorch

ImportError: No module named google.protobuf.internal

solution:conda install cython

ImportError: No module named past.builtins

solution:conda install future

3.COCOAPI

# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install

eeror: gcc: error: pycocotools/_mask.c: No such file or directory

solution:conda install cython

error: Setup script exited with

Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3.3, or 3.4.

Beginning with Matplotlib 3.0, Python 3.5 and above is required.

solution:conda install python = 3.6

export PATH=$PATH:"/home/hellboy/yhwang/1_projects/3_Densepose/1_densepose/cocoapi"

4.DensePOSE

記得退回densepose目錄

git clone https://github.com/facebookresearch/densepose $DENSEPOSE
export DENSEPOSE=/home/hellboy/yhwang/1_projects/3_Densepose/1_densepose/densepose
pip install -r $DENSEPOSE/requirements.txt
cd $DENSEPOSE && make
python2 $DENSEPOSE/detectron/tests/test_spatial_narrow_as_op.py

ImportError: No module named past.builtins

solution:

conda remove python=3.6

pip install future(用conda install future總是會自動安裝python3.6)

error: no module named numpy

solution:conda install numpy

error:AssertionError: Detectron ops lib not found; make sure that your Caffe2 version includes Detectron module