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

相关推荐
程序媛Dev1 小时前
用这个开源AI,实现了与数据库的“自然语言对话”
数据库·人工智能
leo__5209 小时前
基于MATLAB的交互式多模型跟踪算法(IMM)实现
人工智能·算法·matlab
脑极体9 小时前
云厂商的AI决战
人工智能
njsgcs9 小时前
NVIDIA NitroGen 是强化学习还是llm
人工智能
知乎的哥廷根数学学派9 小时前
基于多模态特征融合和可解释性深度学习的工业压缩机异常分类与预测性维护智能诊断(Python)
网络·人工智能·pytorch·python·深度学习·机器学习·分类
mantch10 小时前
Nano Banana进行AI绘画中文总是糊?一招可重新渲染,清晰到可直接汇报
人工智能·aigc
编程小白_正在努力中10 小时前
第1章 机器学习基础
人工智能·机器学习
wyw000010 小时前
目标检测之SSD
人工智能·目标检测·计算机视觉
AKAMAI10 小时前
圆满循环:Akamai 的演进如何为 AI 推理时代奠定基石
人工智能·云计算
幻云201011 小时前
AI自动化编排:从入门到精通(基于Dify构建AI智能系统)
运维·人工智能·自动化