Ubuntu16.04安装opencv-3.4.0和opencv_contrib-3.4.0以及配置yolo V3环境GPU版

Ubuntu16.04安装opencv-3.4.0和opencv_contrib-3.4.0以及配置yolo V3环境GPU版
配置环境:

Ubuntu16.04
GPU: gtx1060 6g
opencv-3.4.0
opencv-contrib-3.4.0




参考链接: 教程很详细

yolov3-tiny(yolov3)训练自己的数据集(一):DarkNet + Ubuntu16.04 + GPU + OpenCV3.4.0 配置篇




配出过程报错以及很难通过官网下载的资源:

1.cudnn下载官网下载很慢


2.OpenCV-3.4.0以及下载opencv_contrib-3.4.0下载不完全等各种问题,下载文件尽量不要下载zip,在Ubuntu下最好下载tar.gz



3.在进行cmake-gui的gennerate源码编译时候,提示IPPICV: Download: ippicv_2017u3_lnx_intel64_general_20170822.tgz 下载超时

解决办法:将文件提前下载,并在ippicv.cmake文件夹下找到下载的github网址,将其替换为下载保存的文件的路径
参考链接:安装opencv时下载ippicv报错
ubuntu下安装opencv3.2出现-- ICV: Downloading ippicv_linux_20151201.tgz…



4在进行cmake-gui的generate的时候,xfeatures2d模块缺失boostdesc_bgm.i文件等下载超时的问题

解决办法参考链接:安装opencv时,xfeatures2d模块缺失boostdesc_bgm.i文件,下载超时问题



5.在进行make-j4编译安装的时候虽然不显示报错,但是重复了几次类似于下面这种:

from /home/agent/opencv-3.4.5/modules/cudaoptflow/src/cuda/pyrlk.cu:47:
/usr/local/cuda-10.0/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
 #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead."
  ^~~~~~~
In file included from /home/agent/opencv-3.4.5/modules/core/include/opencv2/core/cuda/functional.hpp:50:0,
                 from /home/agent/opencv-3.4.5/modules/cudaoptflow/src/cuda/pyrlk.cu:47:
/usr/local/cuda-10.0/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
 #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead."
  ^~~~~~~
In file included from /home/agent/opencv-3.4.5/modules/core/include/opencv2/core/cuda/functional.hpp:50:0,
                 from /home/agent/opencv-3.4.5/modules/cudaoptflow/src/cuda/pyrlk.cu:47:
/usr/local/cuda-10.0/include/device_functions.h:54:2: warning: #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
 #warning "device_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead."

解决办法:忽略,静静等待即可,过一会也可以编译完成。
可以参考链接:jetson nano编译安装opencv3.4.5+opencv_contrib-3.4.5时,能通过编译,但是安装时报错,错误信息如下:
的评论中也有提到。



6.配置成功后,运行测试报错:测试yolov3时报错:cuda error: out of memory darknet: ./src/cuda.c:36: check_error: Assertion `0’ failed.

参考链接:https://blog.csdn.net/kevineeo/article/details/84572589?spm=1001.2014.3001.5501



7.进行视频检测的时候,报错:

Couldn't connect to webcam.
 : No such file or directory
darknet: ./src/utils.c:256: error: Assertion `0' failed.
Aborted (core dumped)

解决方法:可能是视频的分辨率太大,调整视频分辨率之后,再进行检测成功。





最后简单源码安装opencv的方法,但注意的是没有安装opencv-3.4.0-contrib,以及默认的安装路径。

ubuntu16.04 +opencv3.2.0安装笔记+Downloading ippicv_linux_20151201.tgz

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

求知小菜鸟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值