21.02
|
CPP Function to perform non maximum suppression on the bounding boxes and scores. More...
#include <CPPNonMaximumSuppressionKernel.h>
Public Member Functions | |
const char * | name () const override |
Name of the kernel. More... | |
CPPNonMaximumSuppressionKernel () | |
Default constructor. More... | |
CPPNonMaximumSuppressionKernel (const CPPNonMaximumSuppressionKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CPPNonMaximumSuppressionKernel & | operator= (const CPPNonMaximumSuppressionKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CPPNonMaximumSuppressionKernel (CPPNonMaximumSuppressionKernel &&)=default | |
Allow instances of this class to be moved. More... | |
CPPNonMaximumSuppressionKernel & | operator= (CPPNonMaximumSuppressionKernel &&)=default |
Allow instances of this class to be moved. More... | |
~CPPNonMaximumSuppressionKernel ()=default | |
Default destructor. More... | |
void | configure (const ITensor *input_bboxes, const ITensor *input_scores, ITensor *output_indices, unsigned int max_output_size, const float score_threshold, const float iou_threshold) |
Configure the kernel to perform non maximal suppression. More... | |
void | run (const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
virtual void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input_bboxes, const ITensorInfo *input_scores, const ITensorInfo *output_indices, unsigned int max_output_size, const float score_threshold, const float iou_threshold) |
Static function to check if given arguments will lead to a valid configuration of CPPNonMaximumSuppressionKernel. More... | |
CPP Function to perform non maximum suppression on the bounding boxes and scores.
Definition at line 38 of file CPPNonMaximumSuppressionKernel.h.
Default constructor.
Definition at line 57 of file CPPNonMaximumSuppressionKernel.cpp.
Referenced by CPPNonMaximumSuppressionKernel::name().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
Referenced by CPPNonMaximumSuppressionKernel::name().
void configure | ( | const ITensor * | input_bboxes, |
const ITensor * | input_scores, | ||
ITensor * | output_indices, | ||
unsigned int | max_output_size, | ||
const float | score_threshold, | ||
const float | iou_threshold | ||
) |
Configure the kernel to perform non maximal suppression.
[in] | input_bboxes | The input bounding boxes. Data types supported: F32. |
[in] | input_scores | The corresponding input confidence. Same as input_bboxes . |
[out] | output_indices | The kept indices of bboxes after nms. Data types supported: S32. |
[in] | max_output_size | An integer tensor representing the maximum number of boxes to be selected by non max suppression. |
[in] | score_threshold | The threshold used to filter detection results. |
[in] | iou_threshold | The threshold used in non maximum suppression. |
Definition at line 62 of file CPPNonMaximumSuppressionKernel.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::calculate_max_window(), ITensorInfo::dimension(), ITensor::info(), arm_compute::U8, and arm_compute::validate_arguments().
Referenced by CPPNonMaximumSuppressionKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 41 of file CPPNonMaximumSuppressionKernel.h.
References CPPNonMaximumSuppressionKernel::configure(), CPPNonMaximumSuppressionKernel::CPPNonMaximumSuppressionKernel(), arm_compute::test::validation::info, CPPNonMaximumSuppressionKernel::operator=(), CPPNonMaximumSuppressionKernel::run(), CPPNonMaximumSuppressionKernel::validate(), IKernel::window(), and CPPNonMaximumSuppressionKernel::~CPPNonMaximumSuppressionKernel().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by CPPNonMaximumSuppressionKernel::name().
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
[in] | info | Info about executing thread and CPU. |
Reimplemented from ICPPKernel.
Definition at line 92 of file CPPNonMaximumSuppressionKernel.cpp.
References ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, arm_compute::mlgo::parser::end(), ITensor::ptr_to_element(), and IKernel::window().
Referenced by CPPNonMaximumSuppressionKernel::name().
|
static |
Static function to check if given arguments will lead to a valid configuration of CPPNonMaximumSuppressionKernel.
[in] | input_bboxes | The input bounding boxes tensor info. Data types supported: F32. |
[in] | input_scores | The corresponding input confidence tensor info. Same as input_bboxes . |
[out] | output_indices | The kept indices of bboxes after nms tensor info. Data types supported: S32. |
[in] | max_output_size | An integer tensor representing the maximum number of boxes to be selected by non max suppression. |
[in] | score_threshold | The threshold used to filter detection results. |
[in] | iou_threshold | The threshold used in non maximum suppression. |
Definition at line 85 of file CPPNonMaximumSuppressionKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and arm_compute::validate_arguments().
Referenced by CPPNonMaximumSuppressionKernel::name(), and CPPNonMaximumSuppression::validate().