Skip to content

generate_tfrecord.py #10

Open
Open
@AbdullahJirjees

Description

@AbdullahJirjees

Hello Abdelrahman
I am getting an error in the file of generate_tfrecord.py in

from object_detection.utils import dataset_util from object_detection.utils import label_map_util

I checked my environment and the TF object detection, everything seems good, can you share with me what you think about this issue?
Thank you

Activity

thiemoToadi

thiemoToadi commented on Nov 15, 2021

@thiemoToadi

It is because it seems like the object_detection library if you installed it from pypi uses tf1 code. You need to change line 132 in label_map_util to with tf.io.gfile.GFile(path, 'r') as fid: instead of tf.gfile.Gfile()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      generate_tfrecord.py · Issue #10 · abdelrahman-gaber/tf2-object-detection-api-tutorial