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

asked 2019-04-08 04:45:50 -0500

palbha gravatar image

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

berak gravatar image

System information (version) OpenCV => :4.0.0 Operating System / Platform => :Windows 64 bit Compiler => :Visual Studio 2015 Detailed description Referring .. 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)
    modelFile = "opencv_face_detector_uint8.pb"
    configFile = "opencv_face_detector.pbtxt"
    net = cv2.dnn.readNetFromTensorflow(modelFile, configFile)
edit retag flag offensive close merge delete


FAILED: fs.is_open()

it isn't there.

berak gravatar imageberak ( 2019-04-08 05:48:23 -0500 )edit

The file is there I kept the file, I followed the link as added above and tried to clone gihtub directory to run , is this related to version issue or anything

palbha gravatar imagepalbha ( 2019-04-08 08:48:42 -0500 )edit