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

相关推荐
GPU实战笔记2 分钟前
L40S 云端任务验证:从推理、微调到生成工作流的边界
人工智能·模型微调·gpu租用·nvidia l40s·gpu 云服务器
让学习成为一种生活方式3 分钟前
厚朴(Magnolia officinalis)染色体水平基因组--iScience
大数据·人工智能
m4Rk_3 分钟前
【论文阅读】Agent记忆机制(109):MemComposer——用强化学习学会选哪些记忆、选多少以及怎样排序
论文阅读·人工智能·学习·开源·github
加宝的起点雷达6 分钟前
多个 AI 编程代理之间,上下文怎么共享:三类做法和三个坑
人工智能·架构
Data-Miner8 分钟前
AI 大模型安全深度分析:风险演化、治理现状与前瞻路径
人工智能·安全
具身AGI9 分钟前
三维动态只当训练信号,不进推理
人工智能·深度学习·计算机视觉
乐迪信息11 分钟前
AI算法盒子船体烟火检测:港口火灾早预警
人工智能·深度学习·算法
cc_瀚海知行16 分钟前
资料检索 1|直接放入全文、按需读文件和先检索,有什么区别?
java·人工智能·ai
拜小白28 分钟前
【论文解读】用多标签图割从多视角全景图精确估计房间布局
深度学习·计算机视觉·全景图
BioRunYiXue36 分钟前
使用docker分析高通量测序数据
java·数据库·人工智能·spring cloud·docker·tomcat·html