aurora95 / Keras-FCN

Keras-tensorflow implementation of Fully Convolutional Networks for Semantic Segmentation(Unfinished)
MIT License
650 stars 268 forks source link

Keras 2.1.x update #56

Closed ahundt closed 6 years ago

ahundt commented 6 years ago

It seems the Keras iterator APIs have changed, so SegDataGenerator must be updated...

lr: 0.010000
Epoch 1/250
Traceback (most recent call last):
  File "/home/ahundt/src/Keras-FCN/train.py", line 231, in <module>
    label_suffix=label_suffix, ignore_label=ignore_label, label_cval=label_cval)
  File "/home/ahundt/src/Keras-FCN/train.py", line 163, in train
    class_weight=class_weight
  File "/home/ahundt/.local/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/home/ahundt/.local/lib/python2.7/site-packages/keras/engine/training.py", line 2115, in fit_generator
    generator_output = next(output_generator)
  File "/home/ahundt/.local/lib/python2.7/site-packages/keras/utils/data_utils.py", line 557, in get
    six.raise_from(StopIteration(e), e)
  File "/home/ahundt/.local/lib/python2.7/site-packages/six.py", line 737, in raise_from
    raise value
StopIteration

If anyone would like to help with this I'd appreciate a PR!

ahundt commented 6 years ago

Seems to work for me now, could somebody try it?