title: Tensorflow Custom Model in OpenCV
body: <p>I have trained new model on top of ssd_mobilenet_v1_coco for a custom data set. This model works fine in tensorflow. But now I want to use this in OpenCV.</p>
  
  <pre><code>net = cv2.dnn.readNetFromTensorflow("model/frozen_inference_graph.pb", "model/protobuf.pbtxt")
  detections = net.forward()
  </code></pre>
  
  <p>So for the config file I convert frozen_graph to pbtxt and add it. But then I got the following error </p>
  
  <pre><code>[libprotobuf ERROR /home/chamath/Projects/opencv/opencv/3rdparty/protobuf/src/google/protobuf/text_format.cc:298] Error parsing text-format tensorflow.GraphDef: 731:5: Unknown enumeration value of "DT_RESOURCE" for field "type".
  </code></pre>
  
  <p>As suggested <a href="https://github.com/opencv/opencv/issues/10043" rel="nofollow noreferrer">here</a> I try to use <a href="https://github.com/opencv/opencv_extra/blob/master/testdata/dnn/ssd_mobilenet_v1_coco.pbtxt" rel="nofollow noreferrer">this</a> config file mentioned in the thread but when I use it object detection is not working properly. Incorrect number of squares detected and they are misplaced.</p>
  
  <p>Is there any method to create a pbtxt config file that works with OpenCV? Or any suggestions how to make my model work in OpenCV?</p>