Modification of convolutional neural net "UNET" for image segmentation in Keras framework
Python 3.*, Keras 2.1, Tensorflow 1.4
from zf_unet_224_model import ZF_UNET_224, dice_coef_loss, dice_coef from keras.optimizers import Adam model = ZF_UNET_224(weights='generator') optim = Adam() model.compile(optimizer=optim, loss=dice_coef_loss, metrics=[dice_coef]) model.fit(...)
Weights were obtained with random image generator (generator code available here: train_infinite_generator.py). See example of images from generator below.
Dice coefficient for pretrained weights: ~0.998. See history of learning below: