Learn R Programming

imageseg (version 0.5.0)

u_net_plusplus: Create a U-Net++ architecture

Description

Create a U-Net++ architecture.

Usage

u_net_plusplus(
  net_h,
  net_w,
  grayscale = FALSE,
  blocks = 4,
  n_class = 1,
  filters = 16,
  kernel_initializer = "he_normal"
)

Arguments

net_h

Input layer height.

net_w

Input layer width.

grayscale

Defines input layer color channels - 1 if `TRUE`, 3 if `FALSE`.

blocks

Number of blocks in the model.

n_class

Number of classes.

filters

Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution).

kernel_initializer

Initializer for the kernel weights matrix.

Value

U-Net++ model.

Details

The function was ported to R from Python code in https://github.com/albertsokol/pneumothorax-detection-unet/blob/master/models.py. For more details, see https://github.com/MrGiovanni/UNetPlusPlus.

Examples

Run this code
# NOT RUN {
# U-Net++ model for 256x256 pixel RGB input images with a single output class

model <- u_net_plusplus(net_h = 256, 
net_w = 256, 
filters = 32,
blocks = 3 
)
 
model

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab