decodeSsd3D: Decoding function for 3-D Y_train

View source: R/ssdUtilities.R

decodeSsd3DR Documentation

Decoding function for 3-D Y_train

Description

Function for translating the predictions from the SSD model output to boxes, (centerx, centery, width, height), for subsequent usage.

Usage

decodeSsd3D(
  yPredicted,
  imageSize,
  confidenceThreshold = 0.5,
  overlapThreshold = 0.45
)

Arguments

yPredicted

The predicted output produced by the SSD model expected to be an array of shape (batchSize, numberOfBoxes, numberOfClasses + 6 + 6 + 6) where the additional 6's along the third dimension correspond to the box coordinates (centerx, centery, width, height), dummy variables, and the variances. numberOfClasses includes the background class.

imageSize

3-D vector specifying the spatial domain of the input images.

confidenceThreshold

Float between 0 and 1. The minimum classification value required for a given box to be considered a "positive prediction." A lower value will result in better recall while a higher value yields higher precision results. Default = 0.5.

overlapThreshold

NULL or a float between 0 and 1. If NULL then no non-maximum suppression will be performed. Otherwise, a greedy non-maximal suppression is performed following confidence thresholding. In other words all boxes with Jaccard similarities > overlapThreshold will be removed from the set of predictions. Default = 0.45.

Details

This particular implementation was heavily influenced by the following python and R implementations:

    \url{https://github.com/pierluigiferrari/ssd_keras}
    \url{https://github.com/rykov8/ssd_keras}
    \url{https://github.com/gsimchoni/ssdkeras}

Value

a list of length batchSize where each element comprises a 2-D array where each row describes a single box using the following six elements (classId, confidenceValue, xmin, xmax, ymin, ymax, zmin, zmax).

Author(s)

Tustison NJ


ANTsX/ANTsRNet documentation built on March 27, 2024, 4:26 a.m.