当前位置: 首页 > news >正文

资源库网站开发可以做平面设计兼职的网站

资源库网站开发,可以做平面设计兼职的网站,兼职做网站挣钱么,大学网站建设图文章目录 Detectron2环境配置搭建python 环境安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit1、Cuda \CUDNN2、 PyTorch、 torchvision、cudatoolkit进入python测试:错误信息 3、detectron2环境在安装detecteron中,遇到报错:编译的时…

文章目录

  • Detectron2环境配置
    • 搭建python 环境
    • 安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit
      • 1、Cuda \CUDNN
      • 2、 PyTorch、 torchvision、cudatoolkit
        • 进入python测试:
        • 错误信息
      • 3、detectron2环境
        • 在安装detecteron中,遇到报错:
        • 编译的时候failed with exit status 1错误
    • 运行demo.py

Detectron2环境配置

需要配置好相应版本的NVIDIA驱动、CUDA、Pytorch、visual studio,visual stdio2019是为了配置gcc g++的。
配置pytorch的链接.
配置CUDA的链接
在这里插入图片描述

可参考项目中的官方安装说明

搭建python 环境

conda create -n detectron2 python
conda activate detectron2

安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit

1、Cuda \CUDNN

可以查询自己的nvcc-v查询自己cuda版本,查看安装指南

2、 PyTorch、 torchvision、cudatoolkit

终端输入:

nvcc -V
得到输出结果,cuda版本为12.1

在这里插入图片描述

# CUDA 11.8
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=11.8 -c pytorch -c nvidia
# CUDA 12.1
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia
# CPU Only
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 cpuonly -c pytorch
进入python测试:

import torch
import torchvision
torch.cuda.is_available()

在这里插入图片描述

错误信息

在这里插入图片描述
解决办法链接

Anaconda>DLLs,重启shell

3、detectron2环境

在此路径下,激活detectron2环境,输入:

python setup.py build develop

在这里插入图片描述
成功安装detectron2。

在安装detecteron中,遇到报错:

error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe’ failed with exit code 1
解决办法:

找到如下文件:

detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cudetectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu

// Copyright (c) Facebook, Inc. and its affiliates.
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#ifdef WITH_CUDA
#include "../box_iou_rotated/box_iou_rotated_utils.h"
#endif
// TODO avoid this when pytorch supports "same directory" hipification
#ifdef WITH_HIP
#include "box_iou_rotated/box_iou_rotated_utils.h"
#endif

修改为

// Copyright (c) Facebook, Inc. and its affiliates.
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
/*#ifdef WITH_CUDA
#include "../box_iou_rotated/box_iou_rotated_utils.h"
#endif
// TODO avoid this when pytorch supports "same directory" hipification
#ifdef WITH_HIP
#include "box_iou_rotated/box_iou_rotated_utils.h"
#endif*/
#include "box_iou_rotated/box_iou_rotated_utils.h"

修改完毕之后,再次运行 python setup.py build develop。

编译的时候failed with exit status 1错误

编译的时候,我们遇到了“command ‘…/…/bin/nvcc.exe’ failed with exit status 1”,修改策略
“…/…/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu” 文件中#include “…” 路径错误 ,然后编译成功。

运行demo.py

python demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input rgb.png --output 1.png --opts MODEL.WEIGHTS model_final_f10217.pkl
http://www.yayakq.cn/news/604849/

相关文章:

  • 加强机关网站内容建设2345浏览器网页版入口
  • 中国建盏大师排名东莞seo排名公司
  • 在贸易网站怎么做贸易厦门关键词seo排名网站
  • 仿别人的网站违法嘛数据库与网站
  • 北京做网站费用国内高端网站定制
  • 论述网站建设的主要步骤网页自助建站
  • 织梦个人网站免费域名怎么注册
  • 自己做网站除了域名还需要什么代做毕设要注册答疑网站
  • 网站服务器有哪几种肇庆网络推广
  • WordPress主题DUX主题seo网络营销公司
  • 自学做网站要学什么注册公司如何做网站
  • 体检网站源码怎么做网站下载链接
  • 房产信息网站模板无极县城内招聘临时工
  • 绵阳网站建设维护安徽做网站找谁
  • 网站服务费算什么费用湖南省建设厅官网查询证书
  • 网站建设中文摘要是什么全国信息企业公示网官网查询
  • 赣州做网站的公司有哪家南京自助网站推广建站
  • 淄博瓷砖网站建设中企动力软件开发技术培训课程
  • 计算机应用技术专业网站开发方向广东华业建设有限公司网站
  • 中国工程项目网站外贸推广方式
  • 响应式网站开发demo沙发网站建设
  • 宁波外贸网站设计公司无锡平台公司
  • 上海定制网站建设推广电商平台的优势有哪些
  • 怎么做网站运营海外购物网站建设
  • 商城网站开发文档国家建设执业资格注册中心网站
  • wordpress地址站点地址女生适合前端还是后端
  • 网站建设教程免费下载怎样做一个微信小程序
  • 济宁哪里做网站最便宜最近的国际新闻大事10条
  • 做网站如何用模板免费域名申请个人网站
  • 肇庆建网站12306网站为什么做那么差