Getting this error while deploying the app to heroku :
net = cv.dnn.readNetFromCaffe("pose_iter_160000.caffemodel","pose_deploy_linevec_faster_4_stages.prototxt")
2021-04-07T06:50:28.290720+00:00 app[web.1]: cv2.error: OpenCV(3.4.13) /tmp/pip-req-build-j269xpzo/opencv/modules/dnn/src/caffe/caffe_io.cpp:1157: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: pose_iter_160000.caffemodel in function 'ReadNetParamsFromTextFileOrDie'
2021-04-07T06:50:28.290720+00:00 app[web.1]:
Here is the code :
net = cv.dnn.readNetFromCaffe("pose_deploy_linevec_faster_4_stages.prototxt","pose_iter_160000.caffemodel")
Both these files exist.
It gives the same error for opencv 4 as well :
net = cv.dnn.readNetFromCaffe("./pose_deploy_linevec_faster_4_stages.prototxt", "./pose_iter_160000.caffemodel")
2021-04-07T06:15:06.532379+00:00 app[web.1]: cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-j6tkfxml/opencv/modules/dnn/src/caffe/caffe_io.cpp:1171: error: (-2:Unspecified error) FAILED: ReadProtoFromBinaryFile(param_file, param). Failed to parse NetParameter file: ./pose_iter_160000.caffemodel in function 'ReadNetParamsFromBinaryFileOrDie'