gpt4 book ai didi

opencv - cv2.dnn.readNetFromDarknet 错误 : (-212:Parsing error) Unsupported activation: relu in function 'cv::dnn::darknet::ReadDarknetFromCfgStream'

转载 作者:行者123 更新时间:2023-12-02 16:05:00 31 4
gpt4 key购买 nike

我尝试在暗网上运行 Openpose 并使用从这里下载的权重和配置文件:https://github.com/lincolnhard/openpose-darknet

这是我尝试在 Opencv 中创建网络时出现的错误

modelConfiguration = path to cfg file
modelWeights = path to weights file
darknet = cv2.dnn.readNetFromDarknet(modelConfiguration, modelWeights)


error Traceback (most recent call last) in () ----> 1 darknet = cv2.dnn.readNetFromDarknet(modelConfiguration, modelWeights)

error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:552: error: (-212:Parsing error) Unsupported activation: relu in function 'cv::dnn::darknet::ReadDarknetFromCfgStream'

最佳答案

解决方法是安装最新的 openCV 主分支或 OpenCV 版本 3.4.XX.XX 只有这些分支支持 yolo4。
您可以通过以下代码段安装另一个版本的 OpenCV:

!pip install opencv-contrib-python==3.4.13.47 --force-reinstall

关于opencv - cv2.dnn.readNetFromDarknet 错误 : (-212:Parsing error) Unsupported activation: relu in function 'cv::dnn::darknet::ReadDarknetFromCfgStream' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55452305/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com