Anchor box layer for SSD architecture (2-D).

Value

a 5-D tensor with shape \( batchSize \times widthSize \times heightSize \times numberOfBoxes \times 8 \) In the last dimension, the first 4 values correspond to the 2-D coordinates of the bounding boxes and the other 4 are the variances.

Usage

anchorBoxGenerator <- AnchorBoxLayer2D$new( imageSize,
     scale, nextScale, aspectRatios = c( '1:1', '2:1', '1:2' ),
     variances = 1.0 )

anchorBoxGenerator$call( x, mask = NULL )
anchorBoxGenerator$compute_output_shape( input_shape )

Arguments

anchorBoxGenerator

A process object.

imageSize

size of the input image.

scale

scale of each box (in pixels).

nextScale

next scale of each box (in pixels).

aspectRatios

vector describing the geometries of the anchor boxes for this layer.

variances

a list of 4 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.

x

mask

input_shape

Details

$initialize instantiates a new class.

$call main body.

$compute_output_shape computes the output shape.

Author

Tustison NJ

Examples

x = AnchorBoxLayer2D$new(imageSize = c(20, 20), scale = 2, nextScale = 2)
#> Error in py_discover_config(required_module, use_environment): Python specified in RETICULATE_PYTHON (/Users/ntustison/anaconda3/envs/antsx/bin/python3) does not exist
x$build()
#> Error in eval(expr, envir, enclos): object 'x' not found