问题描述
File "/home/<username>/Documents/carm/stage1.py",line 68,in <module>
net = cv2.dnn.readNetFromCaffe(protoPath,modelPath)
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-ddpkm6fn/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) Failed: fs.is_open(). Can't open "hed_model/deploy.prototxt" in function 'ReadProtoFromTextFile'
我不确定我哪里出错了。我使用的代码与我从该网站获得的代码基本相同:
这是代码的一部分:
print("[INFO] loading edge dectector...")
protoPath = os.path.sep.join([args["edge_detector"],"deploy.prototxt"])
modelPath = os.path.sep.join([args["edge_detector"],"hed_pretrained_bsds.caffemodel"])
net = cv2.dnn.readNetFromCaffe(protoPath,modelPath)
我将不胜感激任何有助于解决此问题的意见。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)