Compute Library
 21.02
DetectionOutputLayerInfo Class Referencefinal

Detection Output layer info. More...

#include <Types.h>

Public Member Functions

 DetectionOutputLayerInfo ()
 Default Constructor. More...
 
 DetectionOutputLayerInfo (int num_classes, bool share_location, DetectionOutputLayerCodeType code_type, int keep_top_k, float nms_threshold, int top_k=-1, int background_label_id=-1, float confidence_threshold=std::numeric_limits< float >::lowest(), bool variance_encoded_in_target=false, float eta=1)
 Constructor. More...
 
int num_classes () const
 Get num classes. More...
 
bool share_location () const
 Get share location. More...
 
DetectionOutputLayerCodeType code_type () const
 Get detection output code type. More...
 
bool variance_encoded_in_target () const
 Get if variance encoded in target. More...
 
int keep_top_k () const
 Get the number of total bounding boxes to be kept per image. More...
 
float nms_threshold () const
 Get nms threshold. More...
 
float eta () const
 Get eta. More...
 
int background_label_id () const
 Get background label ID. More...
 
float confidence_threshold () const
 Get confidence threshold. More...
 
int top_k () const
 Get top K. More...
 
int num_loc_classes () const
 Get number of location classes. More...
 

Detailed Description

Detection Output layer info.

Definition at line 976 of file Types.h.

Constructor & Destructor Documentation

◆ DetectionOutputLayerInfo() [1/2]

Default Constructor.

Definition at line 980 of file Types.h.

981  : _num_classes(),
982  _share_location(),
984  _keep_top_k(),
985  _nms_threshold(),
986  _top_k(),
987  _background_label_id(),
988  _confidence_threshold(),
989  _variance_encoded_in_target(false),
990  _eta(),
991  _num_loc_classes()
992  {
993  _num_loc_classes = _share_location ? 1 : _num_classes;
994  }

◆ DetectionOutputLayerInfo() [2/2]

DetectionOutputLayerInfo ( int  num_classes,
bool  share_location,
DetectionOutputLayerCodeType  code_type,
int  keep_top_k,
float  nms_threshold,
int  top_k = -1,
int  background_label_id = -1,
float  confidence_threshold = std::numeric_limits<float>::lowest(),
bool  variance_encoded_in_target = false,
float  eta = 1 
)
inline

Constructor.

Parameters
[in]num_classesNumber of classes to be predicted.
[in]share_locationIf true, bounding box are shared among different classes.
[in]code_typeType of coding method for bbox.
[in]keep_top_kNumber of total bounding boxes to be kept per image after NMS step.
[in]nms_thresholdThreshold to be used in NMS.
[in]top_k(Optional) Number of boxes per image with top confidence scores that are fed into the NMS algorithm. Default set to -1.
[in]background_label_id(Optional) Background label ID. If there is no background class, set it as -1.
[in]confidence_threshold(Optional) Only consider detections whose confidences are larger than a threshold. Default set to -FLT_MAX.
[in]variance_encoded_in_target(Optional) If true, variance is encoded in target. Otherwise we need to adjust the predicted offset accordingly.Default set to false.
[in]eta(Optional) Eta.

Definition at line 1008 of file Types.h.

1010  : _num_classes(num_classes),
1011  _share_location(share_location),
1012  _code_type(code_type),
1013  _keep_top_k(keep_top_k),
1014  _nms_threshold(nms_threshold),
1015  _top_k(top_k),
1016  _background_label_id(background_label_id),
1017  _confidence_threshold(confidence_threshold),
1018  _variance_encoded_in_target(variance_encoded_in_target),
1019  _eta(eta),
1020  _num_loc_classes()
1021  {
1022  _num_loc_classes = _share_location ? 1 : _num_classes;
1023  }
int num_classes() const
Get num classes.
Definition: Types.h:1025
bool share_location() const
Get share location.
Definition: Types.h:1030
float eta() const
Get eta.
Definition: Types.h:1055
int top_k() const
Get top K.
Definition: Types.h:1070
bool variance_encoded_in_target() const
Get if variance encoded in target.
Definition: Types.h:1040
float nms_threshold() const
Get nms threshold.
Definition: Types.h:1050
DetectionOutputLayerCodeType code_type() const
Get detection output code type.
Definition: Types.h:1035
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
Definition: Types.h:1045
int background_label_id() const
Get background label ID.
Definition: Types.h:1060
float confidence_threshold() const
Get confidence threshold.
Definition: Types.h:1065

Member Function Documentation

◆ background_label_id()

int background_label_id ( ) const
inline

Get background label ID.

Definition at line 1060 of file Types.h.

Referenced by CPPDetectionOutputLayer::configure(), arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1061  {
1062  return _background_label_id;
1063  }

◆ code_type()

DetectionOutputLayerCodeType code_type ( ) const
inline

Get detection output code type.

Definition at line 1035 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1036  {
1037  return _code_type;
1038  }

◆ confidence_threshold()

float confidence_threshold ( ) const
inline

Get confidence threshold.

Definition at line 1065 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1066  {
1067  return _confidence_threshold;
1068  }

◆ eta()

float eta ( ) const
inline

Get eta.

Definition at line 1055 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1056  {
1057  return _eta;
1058  }

◆ keep_top_k()

int keep_top_k ( ) const
inline

Get the number of total bounding boxes to be kept per image.

Definition at line 1045 of file Types.h.

Referenced by DetectionOutputLayerNode::compute_output_descriptor(), CPPDetectionOutputLayer::configure(), arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1046  {
1047  return _keep_top_k;
1048  }

◆ nms_threshold()

float nms_threshold ( ) const
inline

Get nms threshold.

Definition at line 1050 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1051  {
1052  return _nms_threshold;
1053  }

◆ num_classes()

int num_classes ( ) const
inline

Get num classes.

Definition at line 1025 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1026  {
1027  return _num_classes;
1028  }

◆ num_loc_classes()

int num_loc_classes ( ) const
inline

Get number of location classes.

Definition at line 1075 of file Types.h.

Referenced by CPPDetectionOutputLayer::configure(), arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1076  {
1077  return _num_loc_classes;
1078  }

◆ share_location()

bool share_location ( ) const
inline

Get share location.

Definition at line 1030 of file Types.h.

Referenced by CPPDetectionOutputLayer::configure(), arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1031  {
1032  return _share_location;
1033  }

◆ top_k()

int top_k ( ) const
inline

Get top K.

Definition at line 1070 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1071  {
1072  return _top_k;
1073  }

◆ variance_encoded_in_target()

bool variance_encoded_in_target ( ) const
inline

Get if variance encoded in target.

Definition at line 1040 of file Types.h.

Referenced by arm_compute::operator<<(), and CPPDetectionOutputLayer::run().

1041  {
1042  return _variance_encoded_in_target;
1043  }

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