FastDeploy
latest
Fast & Easy to Deploy!
|
Preprocessor object for YOLOv5 serials model. More...
#include <preprocessor.h>
Public Member Functions | |
RKYOLOPreprocessor () | |
Create a preprocessor instance for YOLOv5 serials model. | |
bool | Run (std::vector< FDMat > *images, std::vector< FDTensor > *outputs) |
Process the input image and prepare input tensors for runtime. More... | |
void | SetSize (const std::vector< int > &size) |
Set target size, tuple of (width, height), default size = {640, 640}. | |
std::vector< int > | GetSize () const |
Get target size, tuple of (width, height), default size = {640, 640}. | |
void | SetPaddingValue (const std::vector< float > &padding_value) |
Set padding value, size should be the same as channels. | |
std::vector< float > | GetPaddingValue () const |
Get padding value, size should be the same as channels. | |
void | SetScaleUp (bool is_scale_up) |
bool | GetScaleUp () const |
Get is_scale_up, default true. | |
Preprocessor object for YOLOv5 serials model.
bool fastdeploy::vision::detection::RKYOLOPreprocessor::Run | ( | std::vector< FDMat > * | images, |
std::vector< FDTensor > * | outputs | ||
) |
Process the input image and prepare input tensors for runtime.
[in] | images | The input image data list, all the elements are returned by cv::imread() |
[in] | outputs | The output tensors which will feed in runtime |
[in] | ims_info | The shape info list, record input_shape and output_shape |
|
inline |
Set is_scale_up, if is_scale_up is false, the input image only can be zoom out, the maximum resize scale cannot exceed 1.0, default true