matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.75k stars 11.71k forks source link

How to set config file when convert .pb to .pbtxt? #1941

Open gaowq2017 opened 4 years ago

gaowq2017 commented 4 years ago

Hi,everyone: In recently, i want to inference by maskrcnn model in the envirment of C++. I need the problem that using the opencv\sources\samples\dnn\tf_text_graph_mask_rcnn.py to convert .pb to .pbtxt, but i don't known how to set the config file according to Mask_RCNN\mrcnn\config.py. Change the mask_rcnn_inception_v2_coco_2018_01_28\pipeline.config gain the problem: Number of classes: 8 Scales: [0.25, 0.5, 1.0, 2.0] Aspect ratios: [0.5, 1.0, 2.0] Width stride: 16.000000 Height stride: 16.000000 Features stride: 16.000000 Traceback (most recent call last): File ".\tf_text_graph_mask_rcnn.py", line 86, in assert(graph_def.node[0].op == 'Placeholder') IndexError: list index out of range Anyone can give me some advice? Thank you very much!!!

Jeffin21 commented 3 years ago

@gaowq2017 did you got any solution for this? am struggling to find the pipeline.config to convert thte pbtxt for opencv dnn