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

相关推荐
禾高网络1 分钟前
养老系统开发:背景、架构与养老行业展望
java·大数据·人工智能·小程序·架构
小雨笙笙2 分钟前
机器学习:评估模型与选择
人工智能·算法·机器学习
lifallen6 分钟前
长任务怎样选择遗忘:clearing、compaction 与 memory
人工智能·学习·ai·ai编程
Luhui Dev7 分钟前
大角几何如何保证图片导出尺寸一致性?
人工智能·数学·ai·luhuidev
yyk3332410 分钟前
卷积神经网络
人工智能·神经网络·cnn
翼龙云_cloud14 分钟前
腾讯云国际代理商:如何用云服务器快速部署WorkBuddy AI助手?
服务器·人工智能·云计算·腾讯云
我爱写代码i26 分钟前
边缘计算与小模型在工业预测性维护、机器视觉质检中有哪些具体的落地实施案例与架构设计?
人工智能·边缘计算
CCYe、33 分钟前
新模型上线、旧模型下线:企业AI网关如何管住模型版本
java·网络·数据库·人工智能
2601_9623008136 分钟前
机器学习的理想基石
人工智能·python·机器学习·编程语言·数据处理