decodeSsd2D: Decoding function for 2-D Y_train

View source: R/ssdUtilities.R

decodeSsd2DR Documentation

Decoding function for 2-D Y_train

Description

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

Usage

decodeSsd2D(
  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 + 4 + 4 + 4) where the additional 4'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

2-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)

Author(s)

Tustison NJ


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