MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.param.ssd.PriorBoxParameter Class Reference

Specifies the parameters for the PriorBoxParameter. More...

Inheritance diagram for MyCaffe.param.ssd.PriorBoxParameter:
MyCaffe.param.LayerParameterBase MyCaffe.basecode.BaseParameter MyCaffe.basecode.IBinaryPersist

Public Types

enum  CodeType { CORNER = 1 , CENTER_SIZE = 2 , CORNER_SIZE = 3 }
 Defines the encode/decode type. More...
 
- Public Types inherited from MyCaffe.param.LayerParameterBase
enum  LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE }
 Defines the label type. More...
 

Public Member Functions

 PriorBoxParameter ()
 The constructor. More...
 
override object Load (BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. More...
 
override void Copy (LayerParameterBase src)
 Copy on parameter to another. More...
 
override LayerParameterBase Clone ()
 Creates a new copy of this instance of the parameter. More...
 
override RawProto ToProto (string strName)
 Convert the parameter into a RawProto. More...
 
- Public Member Functions inherited from MyCaffe.param.LayerParameterBase
 LayerParameterBase ()
 Constructor for the parameter. More...
 
virtual string PrepareRunModelInputs ()
 This method gives derivative classes a chance specify model inputs required by the run model. More...
 
virtual void PrepareRunModel (LayerParameter p)
 This method gives derivative classes a chance to prepare the layer for a run-model. More...
 
void Save (BinaryWriter bw)
 Save this parameter to a binary writer. More...
 
- Public Member Functions inherited from MyCaffe.basecode.BaseParameter
 BaseParameter ()
 Constructor for the parameter. More...
 
virtual bool Compare (BaseParameter p)
 Compare this parameter to another parameter. More...
 

Static Public Member Functions

static CodeType CodeTypeFromString (string str)
 Convert a string into a CodeType. More...
 
static PriorBoxParameter FromProto (RawProto rp)
 Parses the parameter from a RawProto. More...
 
static List< float > GetAspectRatios (PriorBoxParameter p)
 Return the list of aspect ratios to use based on the parameters. More...
 
static List< int > Reshape (PriorBoxParameter p, int nLayerWid, int nLayerHt, int? nNumPriors=null)
 Calculate the reshape size based on the parameters. More...
 
- Static Public Member Functions inherited from MyCaffe.basecode.BaseParameter
static double ParseDouble (string strVal)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out double df)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static float ParseFloat (string strVal)
 Parse float values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out float f)
 Parse doufloatble values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 

Properties

List< float > min_size [getset]
 Specifies the minimum box size (in pixels) and is required! More...
 
List< float > max_size [getset]
 Specifies the maximum box size (in pixels) and is required! More...
 
List< float > aspect_ratio [getset]
 Specifies various aspect ratios. Duplicate ratios are ignored. If none are provided, a default ratio of 1 is used. More...
 
bool flip [getset]
 Specifies whether or not to flip each aspect ratio. For example, if there is an aspect ratio 'r' we will generate aspect ratio '1.0/r' as well. More...
 
bool clip [getset]
 Specifies whether or not to clip the prior so that it is within [0,1]. More...
 
List< float > variance [getset]
 Specifies the variance for adjusting the prior boxes. More...
 
uint? img_size [getset]
 Specifies the image size. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here. More...
 
uint? img_h [getset]
 Specifies the image height. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here. More...
 
uint? img_w [getset]
 Specifies the image width. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here. More...
 
float? step [getset]
 Specifies the excplicit step size to use. More...
 
float? step_h [getset]
 Specifies the explicit step size to use along height. More...
 
float? step_w [getset]
 Specifies the explicit step size to use along width. More...
 
float offset [getset]
 Specifies the offset to the top left corner of each cell. More...
 

Detailed Description

Specifies the parameters for the PriorBoxParameter.

See also
SSD: Single Shot MultiBox Detector by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, Alexander C. Berg, 2016.
GitHub: SSD: Single Shot MultiBox Detector, by weiliu89/caffe, 2016

Definition at line 21 of file PriorBoxParameter.cs.

Member Enumeration Documentation

◆ CodeType

Defines the encode/decode type.

Enumerator
CORNER 

Encode the corner.

CENTER_SIZE 

Encode the center size.

CORNER_SIZE 

Encode the corner size.

Definition at line 40 of file PriorBoxParameter.cs.

Constructor & Destructor Documentation

◆ PriorBoxParameter()

MyCaffe.param.ssd.PriorBoxParameter.PriorBoxParameter ( )

The constructor.

Definition at line 82 of file PriorBoxParameter.cs.

Member Function Documentation

◆ Clone()

override LayerParameterBase MyCaffe.param.ssd.PriorBoxParameter.Clone ( )
virtual

Creates a new copy of this instance of the parameter.

Returns
A new instance of this parameter is returned.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 287 of file PriorBoxParameter.cs.

◆ CodeTypeFromString()

static CodeType MyCaffe.param.ssd.PriorBoxParameter.CodeTypeFromString ( string  str)
static

Convert a string into a CodeType.

Parameters
strSpecifies the string.
Returns
The associated CodeType is returned.

Definition at line 61 of file PriorBoxParameter.cs.

◆ Copy()

override void MyCaffe.param.ssd.PriorBoxParameter.Copy ( LayerParameterBase  src)
virtual

Copy on parameter to another.

Parameters
srcSpecifies the parameter to copy.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 264 of file PriorBoxParameter.cs.

◆ FromProto()

static PriorBoxParameter MyCaffe.param.ssd.PriorBoxParameter.FromProto ( RawProto  rp)
static

Parses the parameter from a RawProto.

Parameters
rpSpecifies the RawProto to parse.
Returns
A new instance of the parameter is returned.

Definition at line 346 of file PriorBoxParameter.cs.

◆ GetAspectRatios()

static List< float > MyCaffe.param.ssd.PriorBoxParameter.GetAspectRatios ( PriorBoxParameter  p)
static

Return the list of aspect ratios to use based on the parameters.

Parameters
pSpecifies the prior box parameters.
Returns
The list of aspect ratios is returned.

Definition at line 400 of file PriorBoxParameter.cs.

◆ Load()

override object MyCaffe.param.ssd.PriorBoxParameter.Load ( BinaryReader  br,
bool  bNewInstance = true 
)
virtual

Load the parameter from a binary reader.

Parameters
brSpecifies the binary reader.
bNewInstanceWhen true a new instance is created (the default), otherwise the existing instance is loaded from the binary reader.
Returns
Returns an instance of the parameter.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 249 of file PriorBoxParameter.cs.

◆ Reshape()

static List< int > MyCaffe.param.ssd.PriorBoxParameter.Reshape ( PriorBoxParameter  p,
int  nLayerWid,
int  nLayerHt,
int?  nNumPriors = null 
)
static

Calculate the reshape size based on the parameters.

Parameters
pSpecifies the PriorBox parameter.
nLayerWidSpecifies the image width.
nLayerHtSpecifies the image height.
nNumPriorsOptionally, specifies a num priors override (default = null).
Returns
The new shape is returned.

Definition at line 439 of file PriorBoxParameter.cs.

◆ ToProto()

override RawProto MyCaffe.param.ssd.PriorBoxParameter.ToProto ( string  strName)
virtual

Convert the parameter into a RawProto.

Parameters
strNameSpecifies the name to associate with the RawProto.
Returns
The new RawProto is returned.

Implements MyCaffe.basecode.BaseParameter.

Definition at line 299 of file PriorBoxParameter.cs.

Property Documentation

◆ aspect_ratio

List<float> MyCaffe.param.ssd.PriorBoxParameter.aspect_ratio
getset

Specifies various aspect ratios. Duplicate ratios are ignored. If none are provided, a default ratio of 1 is used.

Definition at line 111 of file PriorBoxParameter.cs.

◆ clip

bool MyCaffe.param.ssd.PriorBoxParameter.clip
getset

Specifies whether or not to clip the prior so that it is within [0,1].

Definition at line 133 of file PriorBoxParameter.cs.

◆ flip

bool MyCaffe.param.ssd.PriorBoxParameter.flip
getset

Specifies whether or not to flip each aspect ratio. For example, if there is an aspect ratio 'r' we will generate aspect ratio '1.0/r' as well.

Definition at line 123 of file PriorBoxParameter.cs.

◆ img_h

uint? MyCaffe.param.ssd.PriorBoxParameter.img_h
getset

Specifies the image height. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here.

Either the img_h and img_w are used or the img_size, but not both.

Definition at line 175 of file PriorBoxParameter.cs.

◆ img_size

uint? MyCaffe.param.ssd.PriorBoxParameter.img_size
getset

Specifies the image size. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here.

Either the img_h and img_w are used or the img_size, but not both.

Definition at line 159 of file PriorBoxParameter.cs.

◆ img_w

uint? MyCaffe.param.ssd.PriorBoxParameter.img_w
getset

Specifies the image width. By default we calculate the img_height, img_width, step_x and step_y based on bottom[0] (feat) and bottom[1] (img). Unless these values are explicitly provided here.

Either the img_h and img_w are used or the img_size, but not both.

Definition at line 191 of file PriorBoxParameter.cs.

◆ max_size

List<float> MyCaffe.param.ssd.PriorBoxParameter.max_size
getset

Specifies the maximum box size (in pixels) and is required!

Definition at line 100 of file PriorBoxParameter.cs.

◆ min_size

List<float> MyCaffe.param.ssd.PriorBoxParameter.min_size
getset

Specifies the minimum box size (in pixels) and is required!

Definition at line 90 of file PriorBoxParameter.cs.

◆ offset

float MyCaffe.param.ssd.PriorBoxParameter.offset
getset

Specifies the offset to the top left corner of each cell.

Definition at line 237 of file PriorBoxParameter.cs.

◆ step

float? MyCaffe.param.ssd.PriorBoxParameter.step
getset

Specifies the excplicit step size to use.

Definition at line 201 of file PriorBoxParameter.cs.

◆ step_h

float? MyCaffe.param.ssd.PriorBoxParameter.step_h
getset

Specifies the explicit step size to use along height.

Either the step_h and step_w are used or the step, but not both.

Definition at line 214 of file PriorBoxParameter.cs.

◆ step_w

float? MyCaffe.param.ssd.PriorBoxParameter.step_w
getset

Specifies the explicit step size to use along width.

Either the step_h and step_w are used or the step, but not both.

Definition at line 227 of file PriorBoxParameter.cs.

◆ variance

List<float> MyCaffe.param.ssd.PriorBoxParameter.variance
getset

Specifies the variance for adjusting the prior boxes.

Definition at line 143 of file PriorBoxParameter.cs.


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