Ubuntu20 安装 带cuda的opencv遇到的问题

问题1:

CUDA 12.2 fp16 dnn 编译错误 错误 C2666: 'operator !=': 具有类似的转换重载函数

解决:

CUDA 12.2 fp16 dnn compilation error · Issue #23893 · opencv/opencv · GitHub

Solution:

I "solved" this by using static_cast.

You want to change line 114 in opencv/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp:

from:
if (weight != 1.0)

to:
if (weight != static_cast<T>(1.0))

As well as line 124 in opencv/modules/dnn/src/cuda4dnn/primitives/region.hpp (due to a similar error):

from:
if (nms_iou_threshold > 0) {

to:
if (nms_iou_threshold > static_cast<T>(0)) {

Explanation:

Since both variables, weight and nms_iou_threshold, are templated and finally boil down to a primitive type during compilation, it is meaningful to use a static_cast to convert the respective constant (1.0 (by default double) and 0 (by default int)) to the template type. Based on the operator candidates the required types should all be compatible, i.e., the constant values are safe to be casted to the target template type.

问题2:

undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'

解决:

https://stackoverflow.com/questions/38729954/error-installing-opencv-on-ubuntu-16-04

cmake 增加 -D BUILD_TIFF=ON

相关推荐
Blossom.1183 分钟前
基于机器学习的智能故障预测系统:构建与优化
人工智能·python·深度学习·神经网络·机器学习·分类·tensorflow
DisonTangor19 分钟前
【字节拥抱开源】字节团队开源视频模型 ContentV: 有限算力下的视频生成模型高效训练
人工智能·开源·aigc
吴声子夜歌28 分钟前
OpenCV——图像基本操作(一)
python·opencv·计算机视觉
春末的南方城市37 分钟前
腾讯开源视频生成工具 HunyuanVideo-Avatar,上传一张图+一段音频,就能让图中的人物、动物甚至虚拟角色“活”过来,开口说话、唱歌、演相声!
人工智能·计算机视觉·自然语言处理·aigc·音视频·视频生成
UQI-LIUWJ39 分钟前
论文笔记:Urban Computing in the Era of Large Language Models
人工智能·语言模型·自然语言处理
张较瘦_40 分钟前
[论文阅读] 人工智能+软件工程 | MemFL:给大模型装上“项目记忆”,让软件故障定位又快又准
论文阅读·人工智能·软件工程
yzx99101343 分钟前
基于 PyTorch 和 OpenCV 的实时表情检测系统
人工智能·pytorch·opencv
ICscholar1 小时前
生成对抗网络(GAN)损失函数解读
人工智能·机器学习·生成对抗网络
我不是小upper1 小时前
L1和L2核心区别 !!--part 2
人工智能·深度学习·算法·机器学习
geneculture1 小时前
融智学本体论体系全景图
人工智能·数学建模·融智学的重要应用·道函数·三类思维坐标