You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pbtxt file from frozen tf trained graph cant work #15817
Situation:
I have trained own model with google colab (tensorflow 1.15). it works good.
Trying to prepare pbtxt file for opencv with this tutorial https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API
Recieve file which is only 24Kb (last worked file prepared at June was 124Kb).
This pbtxt file with frozen model raise mistake (core dumped).
I have test saved previous own frozen graph model prepared before and generate good worked pbtxt file.
That means problem is in new tf 1.15 or with colab environments probably... somebody have this mistakes?
name of nodes is different in last and new pbtxt files.
fine_tuned_model.zip
this model prerared with colab standart tensorflow environment (tf1.15) (base model ssd_mobilenet_v2 (2019_03_29)
plus 2 hours
I have found that locally trained model with Tensorflow 1.13 reproduce good pbtxt file (~123Kb) and works good with Opencv dnn
plus 6 hours
train graph with tensorflow 1.15
make fine_tuned_model with tensorflow 1.14.1(from train_dir) (could be other version I have checked 1.14)
pbtxt prepared correct - inference with cv2.dnn.readNetFromTensorflow(frozen_graph, pbtxt) is ok.
problem is in between tensorflow 1.15 and tf_text_graph_ssd.py with high possibility... :)
Activity
dkurt commentedon Oct 31, 2019
We cannot help you without reproducer.
toborobot commentedon Oct 31, 2019
how better prepare You reproducer? Colab notebook will be ok?
dkurt commentedon Oct 31, 2019
@toborobot,
.pbmodel withpipeline.configwould be enough. Thanks.toborobot commentedon Oct 31, 2019
fine_tuned_model.zip
this model prerared with colab standart tensorflow environment (tf1.15) (base model ssd_mobilenet_v2 (2019_03_29)
I have found that locally trained model with Tensorflow 1.13 reproduce good pbtxt file (~123Kb) and works good with Opencv dnn
pbtxt prepared correct - inference with cv2.dnn.readNetFromTensorflow(frozen_graph, pbtxt) is ok.
problem is in between tensorflow 1.15 and tf_text_graph_ssd.py with high possibility... :)
addons:
tensorflow backward and forward compatibility policy - https://www.tensorflow.org/guide/versions
dkurt commentedon Dec 30, 2019
@toborobot, thanks for bug report!
Please try to run this script first to get
opt_graph.pb:Then using the changes from #16263 generate a
.pbtxtfile:Please let us know if the accuracy won't match or add a sample image so we can check.