首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tiny yolo v4 dnn模块opencv未检测到

Tiny yolo v4 dnn模块opencv未检测到
EN

Stack Overflow用户
提问于 2020-09-03 17:40:19
回答 1查看 1.5K关注 0票数 4

我已经在colab上训练了yolo-tiny v4,检测在colab上工作得很好。然后我尝试在集成了Gazebo/ROS的visual studio上以这种方式加载yolo- in v4:

未出现错误,但检测失败(未检测到对象,检测的输出是Nan的向量)。我在visual studio中使用的是OpenCV版本: 4.2.0和Python2.7.17。

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2020-12-04 22:22:03

尝试从源代码编译OpenCV >= v4.5.0

从源代码编译4.5.0版本为我在Python3中解决了这个问题,我检查了它在Python2.7中也可以工作。

我最初在Raspberry Pi 4和Windows7上的Yolo Tiny v4和Python3.7上都遇到了同样的问题,OpenCV是通过pip install opencv-contrib-python安装的(Python2.7似乎不可用?)。我迭代地尝试了不同的版本,从pip获得或从源代码重新编译(在Raspbian上通过pip获得的最新版本是4.1.0.25):

代码语言:javascript
复制
opencv-contrib-python==3.4.10.37 no detections (tested on Windows)
opencv-contrib-python==4.1.0.25: no detections (tested on Rasbian Buster and Windows)
opencv-contrib-python==4.2.0.34: no detections (tested on Windows)
opencv-contrib-python==4.3.0.38: no detections (tested on Windows)
opencv 4.4.0 compiled from sources: no detections (tested on  Rasbian Buster)
opencv-contrib-python==4.4.0.40: ok (tested on Windows)
opencv-contrib-python==4.4.0.46: ok (testd on Windows)
opencv 4.5.0 compiled from sources: ok (tested on Rasbian Buster)

opencv-contrib-python==4.4.0.40之后的版本似乎可以工作,所以Raspbian上的“下一个”版本是v4.5.0。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63720915

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档