spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
21.02k stars 11.57k forks source link

error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse GraphDef file : mask_rcnn_inception_v2_coco_2018_01_28.pbtxt in function 'cv::dnn::ReadTFNetParamsFromTextFileOrDie' #300

Open goldwater668 opened 5 years ago

mujeebishaque commented 5 years ago

Replace this

mask_rcnn_inception_v2_coco_2018_01_28.pbtxt

by this

mask_rcnn_inception_v2_coco_2018_01_28.pbtxt.txt

in short, let the program know that the extension of the protofile being called is .txt-

mujeebishaque commented 5 years ago

Also for the people that were trying to implement age and gender classification program (AgeGender.py).

replace this


faceProto = "opencv_face_detector.pbtxt"
faceModel = "opencv_face_detector_uint8.pb"

ageProto = "age_deploy.prototxt" ageModel = "age_net.caffemodel"

genderProto = "gender_deploy.prototxt" genderModel = "gender_net.caffemodel"

>with this

faceProto = "opencv_face_detector.pbtxt.txt" faceModel = "opencv_face_detector_uint8.pb"

ageProto = "age_deploy.prototxt.txt" ageModel = "age_net.caffemodel"

genderProto = "gender_deploy.prototxt.txt" genderModel = "gender_net.caffemodel"