Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Getting inaccurate results using tensorflow net and opencv dnn

I'm trying to use a tensorflow frozen graph to detect hands in an image. I get some weird extra boxes when I'm loading the net with opencv.

I am using the frozen graph from this handtracking github repo, for which I am generating the text graph using tf_text_graph_ssd.py

Result from Tensorflow: image description

Result from OpenCV: image description

The code and files are here: Github

System configuration: Ubuntu 16.04 Python 2.7 OpenCV 3.4.1 Tensorflow 1.6.0

The only difference between the two methods that I can think about is the graph generation. Tensorflow loads directly the *.pb file, whereas opencv needs the *.pbtxt. Maybe the tool generating the text graph isn't completely accurate? Any suggestions are welcome.

Getting inaccurate results using tensorflow net and opencv dnn

I'm trying to use a tensorflow frozen graph to detect hands in an image. I get some weird extra boxes when I'm loading the net with opencv.

I am using the frozen graph from this handtracking github repo, for which I am generating the text graph using tf_text_graph_ssd.py

Result from Tensorflow: image description

Result from OpenCV: image description

The code and files are here: Github

System configuration: configuration:

  • Ubuntu 16.04 16.04
  • Python 2.7 2.7
  • OpenCV 3.4.1 3.4.1
  • Tensorflow 1.6.0

The only difference between the two methods that I can think about is the graph generation. Tensorflow loads directly the *.pb file, whereas opencv needs the *.pbtxt. Maybe the tool generating the text graph isn't completely accurate? Any suggestions are welcome.