keras-unet-collection


The tensorflow.keras
implementation of U-net, V-net, U-net++, UNET 3+, Attention U-net, R2U-net, ResUnet-a, U^2-Net, TransUNET, and Swin-UNET with optional ImageNet-trained backbones.
keras_unet_collection.models
contains functions that configure keras models with hyper-parameter options.
- Pre-trained ImageNet backbones are supported for U-net, U-net++, UNET 3+, Attention U-net, and TransUNET.
- Deep supervision is supported for U-net++, UNET 3+, and U^2-Net.
- See the User guide for other options and use cases.
Note: the two Transformer models are incompatible with Numpy 1.20
; NumPy 1.19.5
is recommended.
keras_unet_collection.base
contains functions that build the base architecture (i.e., without model heads) of Unet variants for model customization and debugging.
keras_unet_collection.base | Notes |
---|
unet_2d_base , vnet_2d_base , unet_plus_2d_base , unet_3plus_2d_base , att_unet_2d_base , r2_unet_2d_base , resunet_a_2d_base , u2net_2d_base , transunet_2d_base , swin_unet_2d_base | Functions that accept an input tensor and hyper-parameters of the corresponded model, and produce output tensors of the base architecture. |
keras_unet_collection.activations
and keras_unet_collection.losses
provide additional activation layers and loss functions.
Installation and usage
pip install keras-unet-collection
from keras_unet_collection import models
-
Note: Currently supported backbone models are: VGG[16,19]
, ResNet[50,101,152]
, ResNet[50,101,152]V2
, DenseNet[121,169,201]
, and EfficientNetB[0-7]
. See Keras Applications for details.
-
Note: Neural networks produced by this package may contain customized layers that are not part of the Tensorflow. It is reommended to save and load model weights.
-
Changelog
Examples
Dependencies
-
TensorFlow 2.5.0, Keras 2.5.0, Numpy 1.19.5.
-
(Optional for examples) Pillow, matplotlib, etc.
Overview
U-net is a convolutional neural network with encoder-decoder architecture and skip-connections, loosely defined under the concept of "fully convolutional networks." U-net was originally proposed for the semantic segmentation of medical images and is modified for solving a wider range of gridded learning problems.
U-net and many of its variants take three or four-dimensional tensors as inputs and produce outputs of the same shape. One technical highlight of these models is the skip-connections from downsampling to upsampling layers, which benefit the reconstruction of high-resolution, gridded outputs.
Contact
Yingkai (Kyle) Sha <yingkai@eoas.ubc.ca> <yingkaisha@gmail.com>
License
MIT License
Citation
@misc{keras-unet-collection,
author = {Sha, Yingkai},
title = {Keras-unet-collection},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/yingkaisha/keras-unet-collection}},
doi = {10.5281/zenodo.5449801}
}