EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.92k stars 1.3k forks source link

ModuleNotFoundError: No module named 'tensorflow.compat' #596

Closed loppac closed 1 year ago

loppac commented 1 year ago

Trying the tutorial, and getting this error. Please help, thanks!

ModuleNotFoundError Traceback (most recent call last) Cell In[4], line 1 ----> 1 from object_detection.utils import ops as utils_ops 2 from object_detection.utils import label_map_util 3 from object_detection.utils import visualization_utils as vis_util

File ~\anaconda3\envs\OD\lib\site-packages\object_detection-0.1-py3.10.egg\object_detection\utils\ops.py:27 25 from six.moves import range 26 from six.moves import zip ---> 27 import tensorflow.compat.v1 as tf 28 import tf_slim as slim 29 from object_detection.core import standard_fields as fields

ModuleNotFoundError: No module named 'tensorflow.compat'

loppac commented 1 year ago

Seems that compat is no longer available in tensorflow 2.13. I had to switch from 2.13 to 2.10 which the code run through without error.