Chu Xuan Khoi
Chu Xuan Khoi

Reputation: 81

Opencv and tensorflow's pbtxt files

I'm a newbie in working with opencv and DNN models. When I walked through some very basic examples, I saw that they need 2 files to read net: config file (pbtxt) and weight file (pb). I checked tensorflow and just found the way to export pb file (data file) or pbtxt file (text file). I also saw some articles about how to convert pb to pbtxt in opencv. My concerns are:

  1. When I work with tensorflow, how can I export pbtxt file to feed to opencv? Should I export pb file then use opencv to export pbtxt file?
  2. If I can export pbtxt file from pb file, why does opencv need both files?

Upvotes: 0

Views: 2031

Answers (1)

rok
rok

Reputation: 2765

The pbtxt is a text graph representation used by openCV DNN module, but it's not mandatory. It contains the model configuration. It is only required under specific circumstances, for example if you are using a model generated using the Tensorflow Object Detection API, as described here.

Upvotes: 1

Related Questions