Ask Your Question

Revision history [back]

Issue in function 'cv::dnn::ReadProtoFromBinaryFile'

System information (version) OpenCV => :4.0.0 Operating System / Platform => :Windows 64 bit Compiler => :Visual Studio 2015 Detailed description Referring https://www.learnopencv.com/face-detection-opencv-dlib-and-deep-learning-c-python/ .. tried to run the first python code .. in the below section 2. DNN Face Detector in OpenCV

Steps to reproduce loaded the file in the particualr directory and tried to run it but i am getting error as

error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\dnn\src\caffe\caffe_io.cpp:1132: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "opencv_face_detector_uint8.pb" in function 'cv::dnn::ReadProtoFromBinaryFile'

import cv2 DNN = "TF" if DNN == "CAFFE": modelFile = "res10_300x300_ssd_iter_140000_fp16.caffemodel" configFile = "deploy.prototxt" net = cv2.dnn.readNetFromCaffe(configFile, modelFile) else: modelFile = "opencv_face_detector_uint8.pb" configFile = "opencv_face_detector.pbtxt" net = cv2.dnn.readNetFromTensorflow(modelFile, configFile)

click to hide/show revision 2
None

updated 2019-04-08 05:47:18 -0600

berak gravatar image

Issue in function 'cv::dnn::ReadProtoFromBinaryFile'

System information (version) OpenCV => :4.0.0 Operating System / Platform => :Windows 64 bit Compiler => :Visual Studio 2015 Detailed description Referring https://www.learnopencv.com/face-detection-opencv-dlib-and-deep-learning-c-python/ .. tried to run the first python code .. in the below section 2. DNN Face Detector in OpenCV

Steps to reproduce loaded the file in the particualr directory and tried to run it but i am getting error as

error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\dnn\src\caffe\caffe_io.cpp:1132: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "opencv_face_detector_uint8.pb" in function 'cv::dnn::ReadProtoFromBinaryFile'

'cv::dnn::ReadProtoFromBinaryFile'

import cv2 DNN = "TF" if DNN == "CAFFE": modelFile = "res10_300x300_ssd_iter_140000_fp16.caffemodel" configFile = "deploy.prototxt" net = cv2.dnn.readNetFromCaffe(configFile, modelFile) else: modelFile = "opencv_face_detector_uint8.pb" configFile = "opencv_face_detector.pbtxt" net = cv2.dnn.readNetFromTensorflow(modelFile, configFile)

configFile)