densepose安装过程记录

3 篇文章 0 订阅

Table of Contents

 

1.配置

2.CAFFE2安装

2.1 安装过程


1.配置

python:一定要用python2

cuda:9.0

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


2.CAFFE2安装

参考官网:https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=prebuilt

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

  conda install protobuf

ImportError: No module named past.builtins

solution:conda install future

# To check if Caffe2 build was successful
python2 -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

# To check if Caffe2 GPU build was successful
# This must print a number > 0 in order to use Detectron
python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'

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

error: option --user not recognized

solution:修改makefile

export COCOAPI="/home/hellboy/yhwang/1_projects/3_Densepose/1_densepose/cocoapi"
#此命令仅在该bash下生效

3.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

solution:https://blog.csdn.net/zziahgf/article/details/79141879

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值