I am trying to resolve this issue. I am trying text recognition using pytesseract using OCR method.
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\dnn.cpp:4723: error: (-2:Unspecified error) Cannot determine an origin framework of files: in function 'cv::dnn::dnn4_v20191202::readNet'
please show resp. piece of code.
code:
"Cannot determine an origin framework of files: in function 'cv::dnn::dnn4_v20191202::readNet'"
so this expression args["east"] - does not returns a valid weights file(i.e it should be xxx.weights for yolo, xxx.pb for tensorflow, etc..) Just check your program argument - it most likely does not contain a file extension at all.
Thank you for your reply! But I am still not able to understand. Can you elaborate a little bit? What I think is that I have to install TensorFlow in my system, right?
No tensorflow installation necessary - thats why you use opencv dnn module for this. Lets start wtih the api
https://docs.opencv.org/4.2.0/d6/d0f/...readNet has 3 arguments
There 3rd parameter is optional and can be ignored if the weights and config files has the correct extension.They are decribed in the readNet api.In this case opencv tries to determine the framework by iteself.So just make sure to call this function correctly. For example: "yolo_tiny.weights", "yolo_tiny.cfg" Check the api doc. //if file extensions are correct
//if no or unusual file ext
this is most likely the problem here. please check if:
./sha1sum frozen_east_text_detection.pb
)Thank you again for the help1 So now I have to download and extract frozen_east_text_detection.pb and extract it and my code will rum, right?
if you havent done so yet -- yes, ofc !
...my code will rum...
Yes it will if it beers no mistake :-)
I downloaded the frozen_east_text_detection.pb and extracted it. The code is still not working and showing the same error. Please help!