uvaSeg: Unsupervised variational autoencoder segmentation

View source: R/uvaSeg.R

uvaSegR Documentation

Unsupervised variational autoencoder segmentation

Description

Trains a variational autoencoding with a convolutional network. This is followed by k-means clustering to produce a segmentation and probabilities.

Usage

uvaSeg(
  image,
  model,
  k,
  mask,
  returnProbabilities = FALSE,
  batchSize = 1028,
  standardize = TRUE,
  verbose = FALSE
)

Arguments

image

input image

model

the model output from uvaSegTrain

k

number of clusters or cluster centers

mask

defining output segmentation space

returnProbabilities

boolean

batchSize

for the prediction

standardize

boolean controlling whether patches are standardized

verbose

boolean

Value

segmentation and probability images are output

Author(s)

Avants BB

Examples

## Not run: 
library(ANTsR)
img <- ri( 1 )  %>% resampleImage( c(4,4) )  %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), 50 )
patch = getNeighborhoodInMask( img, mask, c(3,3), boundary.condition = "NA" )
uvaSegModel = uvaSegTrain( patch, k = 6 )
tarImg = ri( 3 ) %>% resampleImage( c(4,4) )
uvaSegmentation = uvaSeg(tarImg, uvaSegModel, k = 3, getMask( tarImg ) )

## End(Not run)

ANTsX/ANTsRNet documentation built on April 23, 2024, 1:24 p.m.