encodeUnet: One-hot encoding function

View source: R/unetUtilities.R

encodeUnetR Documentation

One-hot encoding function

Description

Function for translating the segmentations to a one-hot representation.

Usage

encodeUnet(segmentationsArray, segmentationLabels = NULL)

Arguments

segmentationsArray

an array of shape (batchSize, width, height, <depth>)

segmentationLabels

vector of segmentation labels. Note that a background label (typically 0) needs to be included.

Value

an n-D array of shape batchSize \times width \times height \times <depth> \times numberOfSegmentationLabels

Author(s)

Tustison NJ


ANTsX/ANTsRNet documentation built on Nov. 21, 2024, 4:07 a.m.