EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi

GraphDef

XxJoHnCeExX opened this issue · 3 comments

After installing everything and running the Object_detection_picamera.py python script, I am getting this error:

Traceback (most recent call last):
File "Object_detection_picamera.py", line 82, in
od_graph_def = tf.GraphDef()
AttributeError: module 'tensorflow' has no attribute 'GraphDef'

Any way of fixing this?

I'm pretty sure this is because you have TensorFlow v2.0 installed, and Object_detection_picamera.py isn't compatible with 2.0 yet. Could you try installing an older version of TensorFlow using

pip3 install tensorflow==1.13

and then try re-running the script? Please let me know if that works!

LefiS commented

python3 Object_detection_picamera.py --usbcam Traceback (most recent call last): File "Object_detection_picamera.py", line 82, in <module> od_graph_def = tf.GraphDef() AttributeError: module 'tensorflow' has no attribute 'GraphDef'

pi@raspberrypi:~/tensorflow/models/research/object_detection $ pip3 install tensorflow==1.13 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting tensorflow==1.13 Could not find a version that satisfies the requirement tensorflow==1.13 (from versions: 0.11.0, 1.12.0, 1.13.1, 1.14.0) No matching distribution found for tensorflow==1.13 pi@raspberrypi:~/tensorflow/models/research/object_detection $

Unfortunately its not working for me :(

LefiS commented

Ha I figured it out !
Its pip3 install tensorflow==1.13.1

1.13 is not enough :)