Created .pbtxt using this code (dkurt (Dmitry Kurtaev) · GitHub) tried this solution didn’t worked for me #16622
link to pb file mask_rcnn_landing.pb - Google Drive
pbtxt file
model.pbtxt - Google Drive
code i tried to generate pbtxt file
import tensorflow as tf
with tf.gfile.FastGFile('data/gaze_model.pb', "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
for i in reversed(range(len(graph_def.node))):
if graph_def.node[i].op == 'Const':
del graph_def.node[i]
graph_def.library.Clear()
tf.train.write_graph(graph_def, "", 'data/gaze_model.pbtxt', as_text=True)
error loading to opencv dnn
and loaded my .pb and generated pbtxt file to opencv dnn ang got error
Failed to parse GraphDef file: E:/model.pbtxt in function 'cv::dnn::ReadTFNetParamsFromTextFileOrDie'