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

相关推荐
2601_956743683 小时前
上海GEO营销公司技术评估解析|以盾码无界公开产品路线为观察对象,梳理问题池构建、知识库事实锚定、内容审核与跨模型监测流程,明确现场演示和任务追溯的核验要求
大数据·人工智能·产品运营·技术分享·geo·上海
梦仔生信进阶3 小时前
【机器学习】ACC = 1 是否意味着过拟合?还是数据泄露?一个好的模型应该是什么样的
人工智能·深度学习·机器学习
救救孩子把3 小时前
AI面试八股文-12_11-多模态大模型面试题
人工智能·面试·职场和发展·多模态·clip·rag·llave
zxz520zmg3 小时前
地质学笔记
人工智能·深度学习·机器学习
0春华秋实3 小时前
团队落地 RAGAS 的五阶段路线图(13/13)
人工智能·aigc·开源软件
QinHsiu3 小时前
5种方案、3个工程问题、1个务实路线图:AI Agent上下文管理的“战国时代”
人工智能
y = xⁿ3 小时前
拆解cloud code记忆系统
java·人工智能·python·github
Dawson Zhu3 小时前
【AI Infra小白入门④】AI Infra学习路线图:从入门到精通的完整指南(附核心思维方法)
人工智能·语言模型·架构·aigc·agi
QinHsiu3 小时前
99%的AI短剧创作者月入不足10元:工具已经白菜价,但赚钱的依然是那1%
人工智能
愤怒火龙果3 小时前
AI攻防 LLM中间件
人工智能·网络安全·中间件