zhixuhao / unet

unet for image segmentation
MIT License
4.6k stars 2k forks source link

trainGenerator gets stuck #152

Closed parvez018 closed 5 years ago

parvez018 commented 5 years ago

I was trying to just reproduce the model with the data in this repository. However, I get the following warning. After this, the training seems to get stuck. I have waited for 12 hours with nothing happening. Does anyone have any solution to this?

UserWarning: An input could not be retrieved. It could be because a worker has died.We do not have any information on the lost sample.

I am running this in anaconda virtual environment. Python version 2.7.5 and Keras 2.3.0

parvez018 commented 5 years ago

I figured it out. Seems like the zip of two ImageDataGenerator was the issue. I replaced the line train_generator = zip(image_generator, mask_generator) with the following: train_generator = itertools.izip(image_generator, mask_generator)