Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when trying to create TF records #48

Open
Rockntt opened this issue Jul 11, 2024 · 4 comments
Open

Getting error when trying to create TF records #48

Rockntt opened this issue Jul 11, 2024 · 4 comments

Comments

@Rockntt
Copy link

Rockntt commented Jul 11, 2024

Hi, @nicknochnack . Trying to follow your object detection guide, but getting this error:

TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. tensorflow.python.lib.io._pywrap_file_io.BufferedInputStream(filename: str, buffer_size: int, token: tensorflow.python.lib.io._pywrap_file_io.TransactionToken = None)

Got no thoughts how to fix it. Looking for help!

@AbuNim61
Copy link

AbuNim61 commented Nov 21, 2024

i got the error like this
Traceback (most recent call last):
File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in
label_map = label_map_util.load_labelmap(args.labels_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap
with tf.gfile.GFile(path, 'r') as fid:
^^^^^^^^
AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'?
Traceback (most recent call last):
File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in
label_map = label_map_util.load_labelmap(args.labels_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap
with tf.gfile.GFile(path, 'r') as fid:
^^^^^^^^
AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'?

@Rockntt
Copy link
Author

Rockntt commented Nov 21, 2024

i got the error like this Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'? Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'?

Hi,

The repository seems to be dead and the notebook is outdated. Try to look for a newer guides.

@AbuNim61
Copy link

i got the error like this Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'? Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'?

Hi,

The repository seems to be dead and the notebook is outdated. Try to look for a newer guides.

i've solve that eror but now i found other one

Traceback (most recent call last):
File "E:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in
from object_detection.utils import dataset_util, label_map_util
ModuleNotFoundError: No module named 'object_detection'
Traceback (most recent call last):
File "E:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in
from object_detection.utils import dataset_util, label_map_util
ModuleNotFoundError: No module named 'object_detection'

how to fix it?

@Rockntt
Copy link
Author

Rockntt commented Nov 21, 2024

i got the error like this Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'? Traceback (most recent call last): File "e:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 61, in label_map = label_map_util.load_labelmap(args.labels_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "e:\RealTimeObjectDetection.venv\Lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap with tf.gfile.GFile(path, 'r') as fid: ^^^^^^^^ AttributeError: module 'tensorflow' has no attribute 'gfile'. Did you mean: 'fill'?

Hi,
The repository seems to be dead and the notebook is outdated. Try to look for a newer guides.

i've solve that eror but now i found other one

Traceback (most recent call last): File "E:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in from object_detection.utils import dataset_util, label_map_util ModuleNotFoundError: No module named 'object_detection' Traceback (most recent call last): File "E:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in from object_detection.utils import dataset_util, label_map_util ModuleNotFoundError: No module named 'object_detection'

how to fix it?

Try install Tensorflow Object Detection Library Packaged

pip install tensorflow-object-detection-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants