ubuntu16安装densepose完整版--深度解决protobuf问题

本机环境:

RTX 2070

ubuntu 16.04

cuda 10.1

cudnn 7.05

在RTX2070安装densepose的话,只能安装cuda10, cuda9本人测试过程中仍存在bug

上个版本的“吐血版本”存在许多瑕疵,可能借鉴意义不大,本篇文章作为上一篇文章的补充版,应该能给大家一个很好的借鉴。

1. 首先,先安装cuda

下载deb包,按照网站说明,一步步运行即可,无须进入黑屏,方便快捷。

2. 安装caffe2

因为使用的是cuda10,而且caffe2已经被pytorch合并,因此直接安装最新cuda10版本的pytorch即可。

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch


# 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())'

如果测试第一句有问题,可以进入python,然后import caffe2.python具体看一下是什么bug

我的是

ImportError: No module named google.protobuf.internal

解决方案

conda install -c conda-forge protobuf

这一步安装还是相当顺利,在验证这一块,我也比较顺利地通过了。

3.  安装coco API

# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install
# Alternatively, if you do not have permissions or prefer
# not to install the COCO API into global site-packages
python2 setup.py install --user

4. 下载densepose代码并安装python依赖包

git clone https://github.com/facebookresearch/densepose

pip install -r $DENSEPOSE/requirements.txt

5. 编译make

cd $DENSEPOSE && make
python2 $DENSEPOSE/detectron/tests/test_spatial_narrow_as_op.py

BUG:

No handlers could be found for logger "caffe2.python.net_drawer"
net_drawer will not run correctly. Please install the correct dependencies.
[E init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
[E init_intrinsics_check.cc:43] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It mean
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值