clDNN
cldnn::prior_box Struct Reference

Generates a set of default bounding boxes with different sizes and aspect ratios. More...

#include <prior_box.hpp>

Inheritance diagram for cldnn::prior_box:
Collaboration diagram for cldnn::prior_box:

Public Types

typedef cldnn_prior_box_desc dto
 

Public Member Functions

 prior_box (const primitive_id &id, const primitive_id &input, const tensor &img_size, const std::vector< float > &min_sizes, const std::vector< float > &max_sizes={}, const std::vector< float > &aspect_ratios={}, const bool flip=true, const bool clip=false, const std::vector< float > &variance={}, const float step_width=0.f, const float step_height=0.f, const float offset=0.5f, const padding &output_padding=padding())
 Constructs prior-box primitive. More...
 
 prior_box (const dto *dto)
 Constructs a copy from C API cldnn_prior-box_desc.
 
- Public Member Functions inherited from cldnn::primitive_base< prior_box, cldnn_prior_box_desc >
const cldnn_primitive_descget_dto () const override
 Returns pointer to a C API primitive descriptor casted to cldnn_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive
 primitive (const primitive_type_id &type, const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive (const cldnn_primitive_desc *dto)
 Constructs a copy from basic C API cldnn_primitive_desc.
 
std::vector< std::reference_wrapper< primitive_id > > dependecies ()
 Returns references to all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
std::vector< primitive_iddependecies () const
 Returns copy of all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
 operator primitive_id () const
 Implicit conversion to primiitive id.
 

Static Public Member Functions

static primitive_type_id type_id ()
 

Public Attributes

tensor img_size
 Image width and height.
 
std::vector< float > min_sizes
 Minimum box sizes in pixels.
 
std::vector< float > max_sizes
 Maximum box sizes in pixels.
 
std::vector< float > aspect_ratios
 Various of aspect ratios. Duplicate ratios will be ignored.
 
bool flip
 If true, will flip each aspect ratio. For example, if there is aspect ratio "r", aspect ratio "1.0/r" we will generated as well.
 
bool clip
 If true, will clip the prior so that it is within [0, 1].
 
std::vector< float > variance
 Variance for adjusting the prior boxes.
 
float step_width
 Step width.
 
float step_height
 Step height.
 
float offset
 Offset to the top left corner of each cell.
 
- Public Attributes inherited from cldnn::primitive
const primitive_type_id type
 Primitive's type id.
 
const primitive_id id
 Primitive's id.
 
fixed_size_vector_ref input
 List of ids of input primitives.
 
padding output_padding
 Requested output padding.
 

Additional Inherited Members

- Protected Member Functions inherited from cldnn::primitive_base< prior_box, cldnn_prior_box_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_prior_box_desc *dto)
 
- Protected Member Functions inherited from cldnn::primitive
virtual std::vector< std::reference_wrapper< const primitive_id > > get_dependencies () const
 
- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

Generates a set of default bounding boxes with different sizes and aspect ratios.

The prior-boxes are shared across all the images in a batch (since they have the same width and height). First feature stores the mean of each prior coordinate. Second feature stores the variance of each prior coordinate.

Definition at line 38 of file prior_box.hpp.

Constructor & Destructor Documentation

◆ prior_box()

cldnn::prior_box::prior_box ( const primitive_id id,
const primitive_id input,
const tensor img_size,
const std::vector< float > &  min_sizes,
const std::vector< float > &  max_sizes = {},
const std::vector< float > &  aspect_ratios = {},
const bool  flip = true,
const bool  clip = false,
const std::vector< float > &  variance = {},
const float  step_width = 0.f,
const float  step_height = 0.f,
const float  offset = 0.5f,
const padding output_padding = padding() 
)
inline

Constructs prior-box primitive.

Parameters
idThis primitive id.
inputInput primitive id.
img_sizeImage width and height.
min_sizesMinimum box sizes in pixels.
max_sizesMaximum box sizes in pixels.
aspect_ratiosVarious of aspect ratios. Duplicate ratios will be ignored.
flipIf true, will flip each aspect ratio. For example, if there is aspect ratio "r", aspect ratio "1.0/r" we will generated as well.
clipIf true, will clip the prior so that it is within [0, 1].
varianceVariance for adjusting the prior boxes.
step_widthStep width.
step_heightStep height.
offsetOffset to the top left corner of each cell.

Definition at line 55 of file prior_box.hpp.


The documentation for this struct was generated from the following file: