TannerGilbert / Tensorflow-Object-Detection-with-Tensorflow-2.0

Use the Tensorflow Object Detection API with Tensorflow 2
https://gilberttanner.com/blog/object-detection-with-tensorflow-2
MIT License
131 stars 78 forks source link

Outdated tutorial in offical documentation #9

Closed naga-k closed 3 years ago

naga-k commented 3 years ago

Hey, I'm trying to learn object detection on Tensorflow

Tensotflow object detection

And on line, category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)

I get the error:

AttributeError: module 'tensorflow' has no attribute 'gfile'

image

According to what I understand the error is because the function has been moved after Tensorflow 1.14.0 but the API has not been updated.

TannerGilbert commented 3 years ago

Are you sure you installed the newest version of the Tensorflow 2 OD API, because for the newest version they already changed the code to use tf.io.gfile.GFile instead of tf.gfile.GFile.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days