Compute Library
 23.11
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 790 of file Types.h.

Constructor & Destructor Documentation

◆ DetectionOutputLayerInfo() [1/2]

Default Constructor.

Definition at line 794 of file Types.h.

795  : _num_classes(),
796  _share_location(),
798  _keep_top_k(),
799  _nms_threshold(),
800  _top_k(),
801  _background_label_id(),
802  _confidence_threshold(),
803  _variance_encoded_in_target(false),
804  _eta(),
805  _num_loc_classes()
806  {
807  _num_loc_classes = _share_location ? 1 : _num_classes;
808  }

References arm_compute::CORNER.

◆ 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 822 of file Types.h.

832  : _num_classes(num_classes),
833  _share_location(share_location),
834  _code_type(code_type),
835  _keep_top_k(keep_top_k),
836  _nms_threshold(nms_threshold),
837  _top_k(top_k),
838  _background_label_id(background_label_id),
839  _confidence_threshold(confidence_threshold),
840  _variance_encoded_in_target(variance_encoded_in_target),
841  _eta(eta),
842  _num_loc_classes()
843  {
844  _num_loc_classes = _share_location ? 1 : _num_classes;
845  }

Member Function Documentation

◆ background_label_id()

int background_label_id ( ) const
inline

Get background label ID.

Definition at line 882 of file Types.h.

883  {
884  return _background_label_id;
885  }

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

◆ code_type()

DetectionOutputLayerCodeType code_type ( ) const
inline

Get detection output code type.

Definition at line 857 of file Types.h.

858  {
859  return _code_type;
860  }

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

◆ confidence_threshold()

float confidence_threshold ( ) const
inline

Get confidence threshold.

Definition at line 887 of file Types.h.

888  {
889  return _confidence_threshold;
890  }

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

◆ eta()

float eta ( ) const
inline

Get eta.

Definition at line 877 of file Types.h.

878  {
879  return _eta;
880  }

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

◆ keep_top_k()

int keep_top_k ( ) const
inline

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

Definition at line 867 of file Types.h.

868  {
869  return _keep_top_k;
870  }

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

◆ nms_threshold()

float nms_threshold ( ) const
inline

Get nms threshold.

Definition at line 872 of file Types.h.

873  {
874  return _nms_threshold;
875  }

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

◆ num_classes()

int num_classes ( ) const
inline

Get num classes.

Definition at line 847 of file Types.h.

848  {
849  return _num_classes;
850  }

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

◆ num_loc_classes()

int num_loc_classes ( ) const
inline

Get number of location classes.

Definition at line 897 of file Types.h.

898  {
899  return _num_loc_classes;
900  }

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

◆ share_location()

bool share_location ( ) const
inline

Get share location.

Definition at line 852 of file Types.h.

853  {
854  return _share_location;
855  }

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

◆ top_k()

int top_k ( ) const
inline

Get top K.

Definition at line 892 of file Types.h.

893  {
894  return _top_k;
895  }

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

◆ variance_encoded_in_target()

bool variance_encoded_in_target ( ) const
inline

Get if variance encoded in target.

Definition at line 862 of file Types.h.

863  {
864  return _variance_encoded_in_target;
865  }

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


The documentation for this class was generated from the following file:
arm_compute::DetectionOutputLayerInfo::variance_encoded_in_target
bool variance_encoded_in_target() const
Get if variance encoded in target.
Definition: Types.h:862
arm_compute::DetectionOutputLayerInfo::share_location
bool share_location() const
Get share location.
Definition: Types.h:852
arm_compute::DetectionOutputLayerInfo::num_classes
int num_classes() const
Get num classes.
Definition: Types.h:847
arm_compute::DetectionOutputLayerInfo::keep_top_k
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
Definition: Types.h:867
arm_compute::DetectionOutputLayerCodeType::CORNER
@ CORNER
Use box corners.
arm_compute::DetectionOutputLayerInfo::confidence_threshold
float confidence_threshold() const
Get confidence threshold.
Definition: Types.h:887
arm_compute::DetectionOutputLayerInfo::background_label_id
int background_label_id() const
Get background label ID.
Definition: Types.h:882
arm_compute::DetectionOutputLayerInfo::top_k
int top_k() const
Get top K.
Definition: Types.h:892
arm_compute::DetectionOutputLayerInfo::eta
float eta() const
Get eta.
Definition: Types.h:877
arm_compute::DetectionOutputLayerInfo::nms_threshold
float nms_threshold() const
Get nms threshold.
Definition: Types.h:872
arm_compute::DetectionOutputLayerInfo::code_type
DetectionOutputLayerCodeType code_type() const
Get detection output code type.
Definition: Types.h:857