[INFO] loading Mask R-CNN from disk...
[libprotobuf ERROR /io/opencv/3rdparty/protobuf/src/google/protobuf/text_format.cc:288] Error parsing text-format opencv_tensorflow.GraphDef: 60540:5: Unknown enumeration value of "DT_RESOURCE" for field "type".
Traceback (most recent call last):
File "mask_rcnn.py", line 48, in
net = cv2.dnn.readNetFromTensorflow(weightsPath, configPath)
cv2.error: OpenCV(4.1.0) /io/opencv/modules/dnn/src/tensorflow/tf_io.cpp:54: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse GraphDef file: mask-rcnn-coco/dent.pbtxt in function 'ReadTFNetParamsFromTextFileOrDie'
I have converted the .h5 file to .pb file using
https://github.com/bendangnuksung/mrcnn_serving_ready
and converted .pb file to .pbtxt file using
https://gist.github.com/Arafatk/c063bddb9b8d17a037695d748db4f592
after then I have a .pb file and .pbtxt file yes, so I used your blogpost
https://www.pyimagesearch.com/2018/11/19/mask-r-cnn-with-opencv/
I have used above generated .pb and .pbtxt to produce masked result image so I am getting the error like this :
python3 mask_rcnn.py --mask-rcnn mask-rcnn-coco --image /home/deepedge/mask_rcnn-master/mask-rcnn-bottle-training-master/dataset/val/car39.jpg
[INFO] loading Mask R-CNN from disk... [libprotobuf ERROR /io/opencv/3rdparty/protobuf/src/google/protobuf/text_format.cc:288] Error parsing text-format opencv_tensorflow.GraphDef: 60540:5: Unknown enumeration value of "DT_RESOURCE" for field "type". Traceback (most recent call last): File "mask_rcnn.py", line 48, in net = cv2.dnn.readNetFromTensorflow(weightsPath, configPath) cv2.error: OpenCV(4.1.0) /io/opencv/modules/dnn/src/tensorflow/tf_io.cpp:54: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse GraphDef file: mask-rcnn-coco/dent.pbtxt in function 'ReadTFNetParamsFromTextFileOrDie'
How to solve?
please help @bendangnuksung