36 : _output(nullptr), _num_boxes(0), _method(), _extrapolation_value(0), _crop(), _scale(), _crop_results(), _scaled_results()
83 auto crop_tensor = std::make_unique<Tensor>();
86 crop_tensor->allocator()->init(crop_result_info);
88 auto scale_tensor = std::make_unique<Tensor>();
91 scale_tensor->allocator()->init(scaled_result_info);
93 auto crop_kernel = std::make_unique<NECropKernel>();
94 auto scale_kernel = std::make_unique<NEScale>();
97 _crop.emplace_back(std::move(crop_kernel));
100 _scale.emplace_back(std::move(scale_kernel));
112 _crop[i]->configure_output_shape();
Class describing the value of a pixel for any image format.
InterpolationPolicy
Interpolation method.
uint8_t * ptr_to_element(const Coordinates &id) const
Return a pointer to the element at the passed coordinates.
void configure(const ITensor *input, const ITensor *boxes, const ITensor *box_ind, ITensor *output, Coordinates2D crop_size, InterpolationPolicy method=InterpolationPolicy::BILINEAR, float extrapolation_value=0)
Configure kernel.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(...)
~NECropResize()
Default destructor.
std::vector< std::unique_ptr< NECropKernel > > _crop
float _extrapolation_value
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
1 channel, 1 F32 per channel
std::vector< std::unique_ptr< Tensor > > _scaled_results
Store the tensor's metadata.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Interface for Neon tensor.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
Copyright (c) 2017-2021 Arm Limited.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
static Status validate(const ITensorInfo *input, const ITensorInfo *boxes, const ITensorInfo *box_ind, const ITensorInfo *output, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
Static function to check if given info will lead to a valid configuration of NESlice.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Samples are taken at pixel top left corner.
static Status validate(const ITensorInfo *input, const ITensorInfo *crop_boxes, const ITensorInfo *box_ind, const ITensorInfo *output, uint32_t crop_box_ind=0, float extrapolation_value=0)
Static function to check if given info will lead to a valid configuration of CLStridedSliceKernel.
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
std::vector< std::unique_ptr< NEScale > > _scale
NECropResize()
Default constructor.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
void run() override
Run the kernels contained in the function.
Num samples, height, width, channels.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
InterpolationPolicy _method
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN(t,...)
std::vector< std::unique_ptr< Tensor > > _crop_results
static IScheduler & get()
Access the scheduler singleton.