21.02
|
Basic function to detect multiple objects (or the same object at different scales) on the same input image using HOG. More...
#include <CLHOGMultiDetection.h>
Public Member Functions | |
CLHOGMultiDetection (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
CLHOGMultiDetection (const CLHOGMultiDetection &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLHOGMultiDetection & | operator= (const CLHOGMultiDetection &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
~CLHOGMultiDetection () | |
Default destructor. More... | |
void | configure (ICLTensor *input, const ICLMultiHOG *multi_hog, ICLDetectionWindowArray *detection_windows, ICLSize2DArray *detection_window_strides, BorderMode border_mode, uint8_t constant_border_value=0, float threshold=0.0f, bool non_maxima_suppression=false, float min_distance=1.0f) |
Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, const ICLMultiHOG *multi_hog, ICLDetectionWindowArray *detection_windows, ICLSize2DArray *detection_window_strides, BorderMode border_mode, uint8_t constant_border_value=0, float threshold=0.0f, bool non_maxima_suppression=false, float min_distance=1.0f) |
Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Basic function to detect multiple objects (or the same object at different scales) on the same input image using HOG.
This function calls the following kernels:
Definition at line 61 of file CLHOGMultiDetection.h.
CLHOGMultiDetection | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 40 of file CLHOGMultiDetection.cpp.
References CLHOGMultiDetection::~CLHOGMultiDetection().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default destructor.
Referenced by CLHOGMultiDetection::CLHOGMultiDetection().
void configure | ( | ICLTensor * | input, |
const ICLMultiHOG * | multi_hog, | ||
ICLDetectionWindowArray * | detection_windows, | ||
ICLSize2DArray * | detection_window_strides, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value = 0 , |
||
float | threshold = 0.0f , |
||
bool | non_maxima_suppression = false , |
||
float | min_distance = 1.0f |
||
) |
Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression.
[in,out] | input | Input tensor. Data type supported: U8 (Written to only for border_mode != UNDEFINED) |
[in] | multi_hog | Container of multiple HOG data object. Each HOG data object describes one HOG model to detect. This container should store the HOG data-objects in descending or ascending cell_size width order. This will help to understand if the HOG descriptor computation can be skipped for some HOG data-objects |
[out] | detection_windows | Array of DetectionWindow used for locating the detected objects |
[in] | detection_window_strides | Array of Size2D used to specify the distance in pixels between 2 consecutive detection windows in x and y directions for each HOG data-object The dimension of this array must be the same of multi_hog->num_models() The i-th detection_window_stride of this array must be multiple of the block_stride stored in the i-th multi_hog array |
[in] | border_mode | Border mode to use. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
[in] | threshold | (Optional) Threshold for the distance between features and SVM classifying plane |
[in] | non_maxima_suppression | (Optional) Flag to specify whether the non-maxima suppression is required or not. True if the non-maxima suppression stage has to be computed |
[in] | min_distance | (Optional) Radial Euclidean distance to use for the non-maxima suppression stage |
Definition at line 61 of file CLHOGMultiDetection.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
const ICLMultiHOG * | multi_hog, | ||
ICLDetectionWindowArray * | detection_windows, | ||
ICLSize2DArray * | detection_window_strides, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value = 0 , |
||
float | threshold = 0.0f , |
||
bool | non_maxima_suppression = false , |
||
float | min_distance = 1.0f |
||
) |
Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression.
[in] | compile_context | The compile context to be used. |
[in,out] | input | Input tensor. Data type supported: U8 (Written to only for border_mode != UNDEFINED) |
[in] | multi_hog | Container of multiple HOG data object. Each HOG data object describes one HOG model to detect. This container should store the HOG data-objects in descending or ascending cell_size width order. This will help to understand if the HOG descriptor computation can be skipped for some HOG data-objects |
[out] | detection_windows | Array of DetectionWindow used for locating the detected objects |
[in] | detection_window_strides | Array of Size2D used to specify the distance in pixels between 2 consecutive detection windows in x and y directions for each HOG data-object The dimension of this array must be the same of multi_hog->num_models() The i-th detection_window_stride of this array must be multiple of the block_stride stored in the i-th multi_hog array |
[in] | border_mode | Border mode to use. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
[in] | threshold | (Optional) Threshold for the distance between features and SVM classifying plane |
[in] | non_maxima_suppression | (Optional) Flag to specify whether the non-maxima suppression is required or not. True if the non-maxima suppression stage has to be computed |
[in] | min_distance | (Optional) Radial Euclidean distance to use for the non-maxima suppression stage |
Definition at line 68 of file CLHOGMultiDetection.cpp.
References CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_INVALID_MULTI_HOG, IArray< T >::at(), HOGInfo::block_size(), HOGInfo::block_stride(), HOGInfo::cell_size(), ICLMultiHOG::cl_model(), CLHOGGradient::configure(), CPPDetectionWindowNonMaximaSuppressionKernel::configure(), ITensorInfo::dimension(), Window::DimX, Window::DimY, arm_compute::F32, CLScheduler::get(), Size2D::height, IHOG::info(), ITensor::info(), ITensorAllocator::init(), MemoryGroup::manage(), ICLArray< T >::map(), ICLMultiHOG::model(), arm_compute::test::validation::reference::non_maxima_suppression(), HOGInfo::num_bins(), IMultiHOG::num_models(), IArray< T >::num_values(), HOGInfo::phase_type(), arm_compute::S16, TensorShape::set(), ITensorInfo::tensor_shape(), arm_compute::test::validation::reference::threshold(), arm_compute::U8, ICLArray< T >::unmap(), and Size2D::width.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 244 of file CLHOGMultiDetection.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, IArray< T >::clear(), Window::DimY, CLScheduler::enqueue(), Scheduler::get(), CLScheduler::get(), ICLArray< T >::map(), CLHOGGradient::run(), IScheduler::schedule(), and ICLArray< T >::unmap().