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

[ERROR] StopIteration: index 117 is out of bounds for axis 1 with size 66 #4

Closed
MathiasGilson opened this issue Mar 12, 2018 · 3 comments

Comments

@MathiasGilson
Copy link

Hi,
I tried to run the model but I get the following error

Epoch 1/100
Traceback (most recent call last):
File "/home/user/.local/lib/python3.5/site-packages/keras/utils/data_utils.py", line 578, in get
inputs = self.queue.get(block=True).get()
File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
raise self._value
File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/user/.local/lib/python3.5/site-packages/keras/utils/data_utils.py", line 401, in get_index
return _SHARED_SEQUENCES[uid][i]
File "/home/user/Desktop/Keras-ICNet/utils.py", line 95, in getitem
self.Y1[n] = to_categorical(cv2.resize(label, (label.shape[1]//4, label.shape[0]//4)), self.n_classes).reshape((label.shape[0]//4, label.shape[1]//4, -1))
File "/home/user/.local/lib/python3.5/site-packages/keras/utils/np_utils.py", line 31, in to_categorical
categorical[np.arange(n), y] = 1
IndexError: index 117 is out of bounds for axis 1 with size 66

The above exception was the direct cause of the following exception:

Traceback`(most recent call last):
File "train", line 63, in
use_multiprocessing=False, shuffle=True, max_queue_size=10, initial_epoch=opt.epoch)
File "/home/user/.local/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.5/site-packages/keras/engine/training.py", line 2192, in fit_generator
generator_output = next(output_generator)
File "/home/user/.local/lib/python3.5/site-packages/keras/utils/data_utils.py", line 584, in get
six.raise_from(StopIteration(e), e)
File "", line 3, in raise_from
StopIteration: index 117 is out of bounds for axis 1 with size 66

Any ideas ?

Many thanks

@MathiasGilson
Copy link
Author

Labels need to be in greyscale like in the mapillary dataset

@mrgloom
Copy link

mrgloom commented Mar 30, 2018

@MathiasGilson @aitorzip

Aslo have index 117 is out of bounds for axis 1 with size 66

I just downloaded research sample :
https://s3-eu-west-1.amazonaws.com/static.mapillary.com/MVD_research_samples.zip

Can it be used to check things work?

Masks look like they are in color, should they be converted to other format?

Also where is to find config?

with open('datasets/mapillary/config.json') as config_file:

@MathiasGilson
Copy link
Author

The samples are not in the same format as the full dataset, you should request for the whole dataset on the website https://www.mapillary.com/dataset/vistas
I personally set classes for my labelled images myself

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