24.02
|
Go to the documentation of this file.
39 : _memory_group(std::move(memory_manager)),
41 _detection_post_process(),
43 _run_dequantize(false)
59 input_box_encoding->
info(), input_scores->
info(), input_anchors->
info(), output_boxes->
info(),
60 output_classes->
info(), output_scores->
info(), num_detection->
info(),
info));
61 ARM_COMPUTE_LOG_PARAMS(input_box_encoding, input_scores, input_anchors, output_boxes, output_classes, output_scores,
64 const ITensor *input_scores_to_use = input_scores;
70 _memory_group.
manage(&_decoded_scores);
72 _dequantize.
configure(input_scores, &_decoded_scores);
74 input_scores_to_use = &_decoded_scores;
77 std::array<float, 4> scales_values{
info.scale_value_y(),
info.scale_value_x(),
info.scale_value_h(),
78 info.scale_value_w()};
80 info.max_detections(),
info.max_classes_per_detection(),
info.nms_score_threshold(),
info.iou_threshold(),
81 info.num_classes(), scales_values,
info.use_regular_nms(),
info.detection_per_class(),
false);
82 info_to_use = info_quantized;
85 _detection_post_process.
configure(input_box_encoding, input_scores_to_use, input_anchors, output_boxes,
86 output_classes, output_scores, num_detection, info_to_use);
106 output_boxes, output_classes, output_scores,
107 num_detection,
info));
121 _detection_post_process.
run();
void manage(IMemoryManageable *obj) override
Sets a object to be managed by the given memory group.
void configure(const ITensor *input_box_encoding, const ITensor *input_score, const ITensor *input_anchors, ITensor *output_boxes, ITensor *output_classes, ITensor *output_scores, ITensor *num_detection, DetectionPostProcessLayerInfo info=DetectionPostProcessLayerInfo())
Configure the detection output layer CPP function.
Interface for CPU tensor.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
NEDetectionPostProcessLayer(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Constructor.
void configure(const ITensor *input, ITensor *output)
Configure the kernel.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
void configure(const ITensor *input_box_encoding, const ITensor *input_score, const ITensor *input_anchors, ITensor *output_boxes, ITensor *output_classes, ITensor *output_scores, ITensor *num_detection, DetectionPostProcessLayerInfo info=DetectionPostProcessLayerInfo())
Configure the detection output layer NE function.
void run() override
Run the kernels contained in the function.
Detection Output layer info.
static Status validate(const ITensorInfo *input_box_encoding, const ITensorInfo *input_class_score, const ITensorInfo *input_anchors, ITensorInfo *output_boxes, ITensorInfo *output_classes, ITensorInfo *output_scores, ITensorInfo *num_detection, DetectionPostProcessLayerInfo info=DetectionPostProcessLayerInfo())
Static function to check if given info will lead to a valid configuration of CPPDetectionPostProcessL...
void run() override
Run the kernels contained in the function.
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
Store the tensor's metadata.
static Status validate(const ITensorInfo *input_box_encoding, const ITensorInfo *input_class_score, const ITensorInfo *input_anchors, ITensorInfo *output_boxes, ITensorInfo *output_classes, ITensorInfo *output_scores, ITensorInfo *num_detection, DetectionPostProcessLayerInfo info=DetectionPostProcessLayerInfo())
Static function to check if given info will lead to a valid configuration of NEDetectionPostProcessLa...
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
Memory group resources scope handling class.
Copyright (c) 2017-2024 Arm Limited.
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
Store the tensor's metadata.
@ F32
32-bit floating-point number
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEDequantizationLayer.
#define ARM_COMPUTE_LOG_PARAMS(...)
void run() override
Run the kernels contained in the function.