ahmetozlu / tensorflow_object_counting_api

🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
https://www.youtube.com/watch?v=yT_1eKJTdfk
MIT License
1.32k stars 546 forks source link

AttributeError: module 'tensorflow' has no attribute 'GraphDef' #37

Closed chitz1 closed 5 years ago

chitz1 commented 5 years ago

hello I am getting this error saying module tensor flow has no attribute 'GraphDef ' but i installed latest version of tensor flow in my machine and i am getting this error at all files like vehicle-counting, real_time_counting_targeted_object etc . can somebody help me because i am new to this deep learning ..

this is what it shows .

PS C:\Users\DELL\desktop\tensor\tflw> python vehicle_counting.py Traceback (most recent call last): File "vehicle_counting.py", line 17, in detection_graph, category_index = backbone.set_model('ssd_mobilenet_v1_coco_2018_01_28') File "C:\Users\DELL\desktop\tensor\tflw\utils\backbone.py", line 38, in set_model od_graph_def = tf.GraphDef() AttributeError: module 'tensorflow' has no attribute 'GraphDef'

thanks.

ahmetozlu commented 5 years ago

Since TensorFlow provides version compatibility, project runs with the version of TensorFlow is newer than 1.5.0. If you have problem with the latest version, you should check your TensorFlow installation configuration because there must be some problems.

Also, you can uninstall your current version, install TensorFlow 1.5.0 and try again. This project originally has been developed on the 1.5.0 version so you can run this project with that version, then copy the configuration of that version and paste it on the latest version configuration if you want to run project on the latest version.

chitz1 commented 5 years ago

It works! Thank you so much for the reply sir

ahmetozlu commented 3 years ago

UPDATE: Current program is compatible with TensorFlow 1.5.0 version. Please uncomment these lines to run the program with TensorFlow 2.x: #1, #2, #3, #4.