applyDeepBackProjectionModel: Apply a pretrained deep back projection model for super...

View source: R/deepBackProjectionUtilities.R

applyDeepBackProjectionModelR Documentation

Apply a pretrained deep back projection model for super resolution.

Description

Helper function for applying a pretrained deep back projection model. Apply a patch-wise trained network to perform super-resolution. Can be applied to variable sized inputs. Warning: This function may be better used on CPU unless the GPU can accommodate the full image size. Warning 2: The global intensity range (min to max) of the output will match the input where the range is taken over all channels.

Usage

applyDeepBackProjectionModel(
  image,
  model,
  targetRange = c(-127.5, 127.5),
  batchSize = 32,
  regressionOrder = NA,
  verbose = FALSE
)

Arguments

image

input image.

model

pretrained model or filename (cf getPretrainedNetwork).

targetRange

a vector defining the c(min, max) of each input image (e.g., -127.5, 127.5). Output images will be scaled back to original intensity. This range should match the mapping used in the training of the network.

batchSize

batch size used for the prediction call.

regressionOrder

if specified, then apply the function regressionMatchImage with polyOrder = regressionOrder.

verbose

If TRUE, show status messages.

Value

super-resolution image upscaled to resolution specified by the network.

Author(s)

Avants BB

Examples

## Not run: 
image <- applyDeepBackProjectionModel( ri( 1 ), getPretrainedNetwork( "dbpn4x" ) )

## End(Not run)

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