nwojke / deep_sort

Simple Online Realtime Tracking with a Deep Association Metric
GNU General Public License v3.0
5.27k stars 1.47k forks source link

"The name 'net/images:0' refers to a Tensor which does not exist" while running generate_detections.py #217

Open dpsdev14091998 opened 4 years ago

usamahjundia commented 4 years ago

are you using tf2? this happens when i used tf2, changing to tf 1.15.0 solved the problem for me

reason unknown

artykbayevk commented 4 years ago

If you are using tf2, you can do like a following:

change self.input_var = tf.get_default_graph().get_tensor_by_name( "net/%s:0" % input_name) self.output_var = tf.get_default_graph().get_tensor_by_name( "net/%s:0" % output_name) to self.input_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % input_name) self.output_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % output_name)

fspider commented 3 years ago

@artykbayevk
Thanks!, You saved my day!!! Its working ...

But it looks using tf-nightly-gpu 2.5.0.dev20201207 the speed was not improved

RTX-3090, CUDA11.1, CUDNN 805 Only YoloV4 Speed is over 24 FPS but including tracking, its fps goes down to 8 FPS

Any idea?

Xiaodong0219 commented 2 years ago

If you are using tf2, you can do like a following:

change self.input_var = tf.get_default_graph().get_tensor_by_name( "net/%s:0" % input_name) self.output_var = tf.get_default_graph().get_tensor_by_name( "net/%s:0" % output_name) to self.input_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % input_name) self.output_var = tf.compat.v1.get_default_graph().get_tensor_by_name( "%s:0" % output_name)

It really works, thank you!