Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model modelNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem image description

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model modelNet mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem image description

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem image description

The detection architecture used is Faster RCNN

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem image description

The detection architecture used is Faster RCNN

image description

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem

The detection architecture used is Faster RCNN

image descriptionand here is the code in which I am getting errors

import cv2

net = cv2.dnn.readNetFromTensorflow("forzen_inference_graph.pb","graph.pbxt");

and here are the models i am using https://1drv.ms/u/s!Ar3jCIzrHUwWga4sS39sNBk55kNY5Q?e=EGQ7aY

click to hide/show revision 6
None

updated 2020-07-08 04:50:07 -0600

berak gravatar image

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem

The detection architecture used is Faster RCNN

and here is the code in which I am getting errors

import cv2

cv2

net = cv2.dnn.readNetFromTensorflow("forzen_inference_graph.pb","graph.pbxt");

cv2.dnn.readNetFromTensorflow("forzen_inference_graph.pb","graph.pbxt");

and here are the models i am using https://1drv.ms/u/s!Ar3jCIzrHUwWga4sS39sNBk55kNY5Q?e=EGQ7aY

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem

The detection architecture used is Faster RCNN

and here is the code in which I am getting errors

import cv2

net = cv2.dnn.readNetFromTensorflow("forzen_inference_graph.pb","graph.pbxt");

Error:


error Traceback (most recent call last) <ipython-input-5-c39683f1b643> in <module>() 2 # Load a model imported from Tensorflow 3 # net = cv2.dnn.readNetFromTensorflow('../frozen_inference_graph.pb', '../graph.pbtxt') ----> 4 net = cv2.dnn.readNetFromTensorflow('frozen_inference_graph.pb', 'graph.pbtxt')

error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\tensorflow\tf_importer.cpp:544: error: (-2:Unspecified error) Input layer not found: FeatureExtractor/MobilenetV2/Conv/weights in function 'cv::dnn::dnn4_v20191202::`anonymous-namespace'::TFImporter::connect'

and here are the models i am using https://1drv.ms/u/s!Ar3jCIzrHUwWga4sS39sNBk55kNY5Q?e=EGQ7aY

My graph.pbxt file is not working with frozen_inference_graph.pb file

so i am following object detection api for the first time i used mobileNet v1 model and trained it on Tom and jerry and finally convert the graph.pbxt and used it with cv2.dnn.readnetfromtesnsorlfow it was working perfect but now i took another model mobileNet v2 and trained gun detection so inference with tensorflow its working fine but when when i read it with opencv dnn module it throws errors and i don't understand where is the actual problem

The detection architecture used is Faster RCNN

and here is the code in which I am getting errors

import cv2

net = cv2.dnn.readNetFromTensorflow("forzen_inference_graph.pb","graph.pbxt");

Error:


error Traceback (most recent call last)
<ipython-input-5-c39683f1b643> in <module>()
2 # Load a model imported from Tensorflow
3 # net = cv2.dnn.readNetFromTensorflow('../frozen_inference_graph.pb', '../graph.pbtxt')
----> 4 net = cv2.dnn.readNetFromTensorflow('frozen_inference_graph.pb', 'graph.pbtxt')

'graph.pbtxt') error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\tensorflow\tf_importer.cpp:544: error: (-2:Unspecified error) Input layer not found: FeatureExtractor/MobilenetV2/Conv/weights in function 'cv::dnn::dnn4_v20191202::`anonymous-namespace'::TFImporter::connect'

'cv::dnn::dnn4_v20191202::`anonymous-namespace'::TFImporter::connect'

and here are the models i am using https://1drv.ms/u/s!Ar3jCIzrHUwWga4sS39sNBk55kNY5Q?e=EGQ7aY