View source: R/createResUnetModel.R
createResUnetModel3D | R Documentation |
Creates a keras model of the U-net + ResNet deep learning architecture for image segmentation and regression with the paper available here:
createResUnetModel3D(
inputImageSize,
numberOfOutputs = 1,
numberOfFiltersAtBaseLayer = 32,
bottleNeckBlockDepthSchedule = c(3, 4),
convolutionKernelSize = c(3, 3, 3),
deconvolutionKernelSize = c(2, 2, 2),
dropoutRate = 0,
weightDecay = 1e-04,
mode = c("classification", "regression")
)
inputImageSize |
Used for specifying the input tensor shape. The shape (or dimension) of that tensor is the image dimensions followed by the number of channels (e.g., red, green, and blue). The batch size (i.e., number of training images) is not specified a priori. |
numberOfOutputs |
Meaning depends on the |
numberOfFiltersAtBaseLayer |
number of filters at the beginning and end
of the |
bottleNeckBlockDepthSchedule |
vector that provides the encoding layer schedule for the number of bottleneck blocks per long skip connection. |
convolutionKernelSize |
2-d vector defining the kernel size during the encoding path |
deconvolutionKernelSize |
2-d vector defining the kernel size during the decoding |
dropoutRate |
float between 0 and 1 to use between dense layers. |
weightDecay |
weighting parameter for L2 regularization of the kernel weights of the convolution layers. Default = 0.0. |
mode |
'classification' or 'regression'. |
\url{https://arxiv.org/abs/1608.04117}
This particular implementation was ported from the following python implementation:
\url{https://github.com/veugene/fcn_maker/}
a res/u-net keras model
Tustison NJ
library( ANTsRNet )
library( keras )
model <- createResUnetModel3D( c( 64, 64, 64, 1 ) )
metric_multilabel_dice_coefficient <-
custom_metric( "multilabel_dice_coefficient",
multilabel_dice_coefficient )
loss_dice <- function( y_true, y_pred ) {
-multilabel_dice_coefficient(y_true, y_pred)
}
attr(loss_dice, "py_function_name") <- "multilabel_dice_coefficient"
model %>% compile( loss = loss_dice,
optimizer = optimizer_adam( lr = 0.0001 ),
metrics = c( metric_multilabel_dice_coefficient,
metric_categorical_crossentropy ) )
print( model )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.