l_q_q123
林清浅
2021-01-26 15:58

用opencv时遇到以下错误,请问该怎么解决?

  • python
print("[INFO] loading face detector...")
protoPath = os.path.sep.join([args["detector"], "deploy.prototxt"])
modelPath = os.path.sep.join([args["detector"],
	"res10_300x300_ssd_iter_140000.caffemodel"])
detector = cv2.dnn.readNetFromCaffe(protoPath, modelPath)

 detector = cv2.dnn.readNetFromCaffe(protoPath, modelPath)
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-r2ue8w6k\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "./D:/opencv-face-recognitions/face_detection_model\deploy.prototxt" in function 'cv::dnn::ReadProtoFromTextFile'
 

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答