win+cuda10.2+VS2019+detectron2配置

VS2019_Community
python-3.6.0-amd64
Anaconda3-2020.11-Windows-x86_64
pycharm-community-2020.3.5
cuda_10.2.89_441.22_win10
cudnn-10.2-windows10-x64-v7.6.5.32

1.安装cuda

安装完cuda后,配置环境变量
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64

2.设置cl.exe环境变量

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64
然后,进入cmd,输入cl
在这里插入图片描述

3.下载依赖包

以管理员方式打开Anaconda Prompt (Anaconda3)
创建并激活conda环境
conda create -n detectron2_test python=3.6
conda activate detectron2_test

4.安装Cython等

pip install cython pyyaml tabulate termcolor yacs iopath ninja
pip install opencv-python
pip install omegaconf==2.1.0.dev22
pip install cloudpickle
pip install Matplotlib
pip install pydot
pip install tensorboard
pip install pycocotools>=2.0.2

5.安装torch,torchvision

下载地址:https://download.pytorch.org/whl/torch_stable.html
cd到下载路径。cd D:\detectron2-test
pip install torch-1.6.0-cp36-cp36m-win_amd64.whl
pip install torchvision-0.7.0-cp36-cp36m-win_amd64.whl
如果提示让更新pip,最好更新下
python -m pip install --upgrade pip

6.安装cocoapi

下载地址:https://github.com/philferriere/cocoapi
cd到下载路径。cd D:\detectron2-test\cocoapi-master\PythonAPI
python setup.py build_ext --inplace
python setup.py build_ext install

7.安装fvcore

下载地址:https://github.com/facebookresearch/fvcore
cd到下载路径。cd D:\detectron2-test\fvcore-master
python setup.py build --force develop

8.安装detectron2

下载地址:https://github.com/facebookresearch/detectron2
cd到下载路径。cd D:\detectron2-test\detectron2-master
python setup.py build --force develop

9.图像识别

demo.py
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值