- Python 3.6.4
- Keras 2.0.3
- theano 1.0.3
- pygpu 0.7.6
train_generator.py中添加如下:
import os
os.environ['KERAS_BACKEND'] = 'theano'
import keras.backend as K
K.set_image_dim_ordering('th')
data.py、u_net.py、u_model.py均已修改为keras2.0支持,其中u_model的结构相应修改如下:
//train文件中,用于train与validation的图片数量之比为4:1,test文件中由于没有对应的掩模标注,只能拿来做预测
python data.py
//边训练边加载数据
python train_generator.py
Epoch 50/150
187/187 [==============================] - 146s - loss: -0.2555 - main_output_loss: -0.5227 - aux_output_loss: 0.5344 - main_output_dice_coef: 0.5227 - aux_output_acc: 0.7200 - val_loss: 0.0510 - val_main_output_loss: -0.3890 - val_aux_output_loss: 0.8801 - val_main_output_dice_coef: 0.3890 - val_aux_output_acc: 0.5856
Epoch 51/150
187/187 [==============================]...