The Tensorflow, Keras implementation of U-net, U-net++, R2U-net, Attention U-net, ResUnet-a, U^2-Net, and UNET 3+.
Project description
keras-unet-collection
The tensorflow.keras
implementation of U-net, U-net++, R2U-net, Attention U-net, ResUnet-a, U^2-Net, and UNET 3+.
keras_unet_collection.models
contains functions that configure keras models with user-specific hyper-parameter options, including network depth, hidden layer activations and batch normalization for all the U-net variants, and deep supervision for U-net++, U^2-Net and UNET 3+. See the User guide for more details.
keras_unet_collection.models |
Name | Reference |
---|---|---|
unet_2d |
U-net/Unet | Ronneberger et al. (2015) |
unet_plus_2d |
U-net++/Unet++ | Zhou et al. (2018) |
r2_unet_2d |
R2U-Net | Alom et al. (2018) |
att_unet_2d |
Attention U-net | Oktay et al. (2018) |
resunet_a_2d |
ResUnet-a | Diakogiannis et al. (2020) |
u2net_2d |
U^2-Net | Qin et al. (2020) |
unet_3plus_2d |
UNET 3+/Unet+++ | Huang et al. (2020) |
keras_unet_collection.backbones
contains functions that build the backone of Unet variants for model customization and debugging.
keras_unet_collection.backbones |
Notes |
---|---|
unet_2d_backbone , unet_plus_2d_backbone , r2_unet_2d_backbone , att_unet_2d_backbone , resunet_a_2d_backbone , u2net_2d_backbone , unet_3plus_2d_backbone |
Functions that accept an input tensor and hyper-parameters of the corresponded model, and produce output tensors of the backbone. |
keras_unet_collection.activations
and keras_unet_collection.losses
provide additional activation layers and loss functions.
keras_unet_collection.activations |
Name | Reference |
---|---|---|
GELU |
Gaussian Error Linear Units (GELU) | Hendrycks et al. (2016) |
Snake |
Snake activation | Liu et al. (2020) |
keras_unet_collection.losses |
Name | Reference |
---|---|---|
tversky |
Tversky loss | Hashemi et al. (2018) |
focal_tversky |
Focal Tversky loss | Abraham et al. (2019) |
crps2d_tf |
CRPS loss (experimental) |
Dependencies
-
TensorFlow 2.3.0
-
Keras 2.4.0
-
Numpy 1.18.2
Installation and usage
pip install keras-unet-collection
from keras_unet_collection import models
# e.g. models.unet_2d(...)
-
Note: Because of the changable hyper-parameter options, neural networks produced by this package may not be compatible with other pre-trained models of the same name. Training from scratch is recommended.
-
Jupyter notebooks are provided as user guides.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for keras-unet-collection-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef62c12e8868d4b4f92c6ee4c54bfc20f6c29bd01518236da270d5f6624ef37 |
|
MD5 | f4333ef5cd4df475c1d388cc4ee9bd9f |
|
BLAKE2b-256 | 14cbcb337ed3dfbdb686ae9c80c603d9695e6192e0b281da535fb0b29a302f9c |
Hashes for keras_unet_collection-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab21230516beafa249648dc7dcfc8e4748b846d5d49264812d8ada46ca58251e |
|
MD5 | 34c34ae948c2b043a056d9ebdd88bfe5 |
|
BLAKE2b-256 | 543d020e691d64b1a39c42b0a999d68dfe5f4779b914f584ced0689ceb721335 |