Skip to content

Train script is not working #11

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

Open
Kirmani66 opened this issue Jun 21, 2021 · 2 comments
Open

Train script is not working #11

Kirmani66 opened this issue Jun 21, 2021 · 2 comments

Comments

@Kirmani66
Copy link

It is giving nonetype error

InvalidArgumentError: TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):

File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/script_ops.py", line 249, in call
ret = func(*args)

File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/autograph/impl/api.py", line 645, in wrapper
return func(*args, **kwargs)

File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 961, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))

File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 837, in wrapped_generator
for data in generator_fn():

File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/data_adapter.py", line 963, in generator_fn
yield x[i]

File "../utils.py", line 159, in getitem
X, y_tensor, y_bbox = self.__data_generation(lines)

File "../utils.py", line 179, in __data_generation
img_data, box_data = self.get_data(line)

File "../utils.py", line 190, in get_data
img = cv2.imread(os.path.join(self.folder_path, img_path))[:, :, ::-1]

TypeError: 'NoneType' object is not subscriptable

 [[{{node PyFunc}}]]
 [[IteratorGetNext]] [Op:__inference_train_function_74263]

Function call stack:
train_function

@Mahmood-Hussain
Copy link

Did you check your dataset? Are any images missing pre-defined bounding boxes?

@somesh-kb
Copy link

Facing the same issue. Same error as reported by Kirmani66. Any suggestion to overcome that.

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

3 participants