nicknochnack / RealTimeObjectDetection

370 stars 587 forks source link

Getting error when trying to create TF records #48

Open Rockntt opened 4 months ago

Rockntt commented 4 months ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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