Forums

getting error while running cv2.dnn.readNetFromTensorflow(r"frozen_east_text_detection.pb") in pythonanywhere

pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'

net = cv2.dnn.readNetFromTensorflow("frozen_east_text_detection.pb")

Exception Type: error at / Exception Value: OpenCV(4.5.1) /tmp/pip-req-build-ms668fyv/opencv/modules/dnn/src/caffe/caffe_io.cpp:1133: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "frozen_east_text_detection.pb" in function 'ReadProtoFromBinaryFile'

please advise how to resolve this?

Is there a file called frozen_east_text_detection.pb in your working directory? See https://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/