matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.7k stars 11.71k forks source link

RuntimeError: generator raised StopIteration #1988

Open amuthalingeswaranbose opened 4 years ago

amuthalingeswaranbose commented 4 years ago

Hello, when i run mask rcnn get the following error

Epoch 1/100 Traceback (most recent call last): File "C:\Users\HP\Anaconda3\envs\tf-gpu\lib\site-packages\keras\utils\data_utils.py", line 710, in get raise StopIteration() StopIteration

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

Traceback (most recent call last): File ".\NamePlate.py", line 384, in train(model) File ".\NamePlate.py", line 219, in train layers='heads') File "D:\gpu\projects1\Mask_RCNN-Multi-Class-Detection\mrcnn\model.py", line 2381, in train use_multiprocessing=True, File "C:\Users\HP\Anaconda3\envs\tf-gpu\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper return func(*args, **kwargs) File "C:\Users\HP\Anaconda3\envs\tf-gpu\lib\site-packages\keras\engine\training.py", line 2065, in fit_generator generator_output = next(output_generator) RuntimeError: generator raised StopIteration

What are the other changes that i would have to bring in the code, and the parameters. Kindly help.

ClearThree commented 4 years ago

Hi, @amuthalingeswaranbose ! I faced the same problem as you, and I was a little confused what to do with that. However, after some days, I've found this topic, and the solution proposed there helped me. (Spoiler: just install correct version of Keras)

1825 generator raised StopIteration at the very beginning of epoch

https://github.com/matterport/Mask_RCNN/issues/1825#issuecomment-549767122

Hope this will help you too!

Nhatcao99 commented 3 years ago

can you get me the right version of keras ?

ClearThree commented 3 years ago

can you get me the right version of keras ?

Keras==2.2.5 Tensorflow==1.15.0

Nhatcao99 commented 3 years ago

can you get me the right version of keras ?

Keras==2.2.5 Tensorflow==1.15.0

Thank a lot that work like a champ

moatifbutt commented 3 years ago

can you get me the right version of keras ?

Keras==2.2.5 Tensorflow==1.15.0

This solution worked for me. Thanks dear. Much Respect.