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

相关推荐
江润舟9 小时前
万物|炼器:从零手搓工业级旋转目标检测网络·卷7 —— OBB检测头与DFL解码(三)
人工智能·python·深度学习
峯5809 小时前
清华博士90分钟AI与神经网络-内容梳理
人工智能
AI创界者9 小时前
Python 进阶实战(五十六):KV Cache 驱逐闭环反馈与 Prefill / Decode 分离协同调度
人工智能·python·aigc
乌鲁木齐德润恒圣信息科技有限公司9 小时前
43引擎自动测试系统:GEO工程化怎么按月迭代
人工智能
Yeats_Liao9 小时前
SoduWork 实战:1,210 条物联网报警的标准化与分诊
网络·人工智能·物联网·ai
Dawson Zhu9 小时前
【模型量化⑨】量化选型决策树:如何为你的模型选择最优量化方案
人工智能·语言模型·架构·aigc·agi
数字供应链安全产品选型9 小时前
中国信通院可信AI供应链评估三款产品获证:从测评视角看悬镜灵脉CodeAI的复杂业务逻辑漏洞检测能力
人工智能
Dawson Zhu10 小时前
【模型量化⑪】FP8量化:E4M3/E5M2格式、细粒度Scaling与训练推理全解析
人工智能·语言模型·架构·aigc·agi
甲维斯11 小时前
PC党太无聊了,用 Opus5.5 挑战下 GTA6!
人工智能