Hi,
I have been trying to load pretrained caffe model in opencv by following approaches. I checked my prototxt file it is well formatted and
First Attempt
net = cv2.dnn.readNetFromCaffe("C:/Users/SP.000/Documents/ComputerVisionDeepLearning/FaceDetectorwithOpenCVandDeepLearning/deploy.prototxt","C:/Users/SP.000/Documents/ComputerVisionDeepLearning/FaceDetectorwithOpenCVandDeepLearning/res10_300x300_ssd_iter_140000.caffemodel")
error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-nxx381if\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "C:/Users/SP.000/Documents/ComputerVisionDeepLearning/FaceDetectorwithOpenCVandDeepLearning/deploy.prototxt" in function 'cv::dnn::ReadProtoFromTextFile'
Second Attempt
net = cv2.dnn.readNetFromCaffe("deploy.prototxt","res10_300x300_ssd_iter_140000.caffemodel")
error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-nxx381if\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "deploy.prototxt" in function 'cv::dnn::ReadProtoFromTextFile'
I also tried cv2.dnn.readNet
but it gives the same error. Can anyone please guide me through this? it would really help me continue my learning and understand the concepts
Thanks