createSsdModel3D: 3-D implementation of the SSD deep learning architecture.

View source: R/createSsdModel.R

createSsdModel3DR Documentation

3-D implementation of the SSD deep learning architecture.

Description

Creates a keras model of the SSD deep learning architecture for object detection based on the paper

Usage

createSsdModel3D(
  inputImageSize,
  numberOfOutputs,
  l2Regularization = 0.0005,
  minScale = 0.1,
  maxScale = 0.9,
  aspectRatiosPerLayer = list(c("1:1:1", "2:1:1", "1:2:1", "1:1:2"), c("1:1:1", "2:1:1",
    "1:2:1", "1:1:2", "3:1:1", "1:3:1", "1:1:3"), c("1:1:1", "2:1:1", "1:2:1", "1:1:2",
    "3:1:1", "1:3:1", "1:1:3"), c("1:1:1", "2:1:1", "1:2:1", "1:1:2", "3:1:1", "1:3:1",
    "1:1:3"), c("1:1:1", "2:1:1", "1:2:1", "1:1:2"), c("1:1:1", "2:1:1", "1:2:1",
    "1:1:2")),
  variances = rep(1, 6),
  style = 300
)

Arguments

inputImageSize

Used for specifying the input tensor shape. The shape (or dimension) of that tensor is the image dimensions followed by the number of channels (e.g., red, green, and blue). The batch size (i.e., number of training images) is not specified a priori.

numberOfOutputs

Number of classification labels. Needs to include the background as one of the labels.

l2Regularization

The L2-regularization rate. Default = 0.0005.

minScale

The smallest scaling factor for the size of the anchor boxes as a fraction of the shorter side of the input images.

maxScale

The largest scaling factor for the size of the anchor boxes as a fraction of the shorter side of the input images. All scaling factors between the smallest and the largest are linearly interpolated.

aspectRatiosPerLayer

A list containing one aspect ratio list for each predictor layer. The default lists follows the original implementation except each aspect ratio is defined as a character string (e.g. ⁠'1:1:2'⁠).

variances

A list of 6 floats > 0 with scaling factors for the encoded predicted box coordinates. A variance value of 1.0 would apply no scaling at all to the predictions, while values in (0,1) upscale the encoded predictions and values greater than 1.0 downscale the encoded predictions. Defaults to 1.0.

style

300 or 512

Details

W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C-Y. Fu, A. Berg. SSD: Single Shot MultiBox Detector.

available here:

    \url{https://arxiv.org/abs/1512.02325}

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

    https://github.com/pierluigiferrari/ssd_keras     
    https://github.com/rykov8/ssd_keras
    https://github.com/gsimchoni/ssdkeras

Value

an SSD keras model

Author(s)

Tustison NJ


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