|
FastDeploy
latest
Fast & Easy to Deploy!
|
Preprocessor object for YOLOv8 serials model. More...
#include <preprocessor.h>
Public Member Functions | |
| YOLOv8Preprocessor () | |
| Create a preprocessor instance for YOLOv8 serials model. | |
| bool | Run (std::vector< FDMat > *images, std::vector< FDTensor > *outputs, std::vector< std::map< std::string, std::array< float, 2 >>> *ims_info) |
| 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. | |
| void | SetMiniPad (bool is_mini_pad) |
| bool | GetMiniPad () const |
| Get is_mini_pad, default false. | |
| void | SetStride (int stride) |
| Set padding stride, only for mini_pad mode. | |
| bool | GetStride () const |
| Get padding stride, default 32. | |
Preprocessor object for YOLOv8 serials model.
| bool fastdeploy::vision::detection::YOLOv8Preprocessor::Run | ( | std::vector< FDMat > * | images, |
| std::vector< FDTensor > * | outputs, | ||
| std::vector< std::map< std::string, std::array< float, 2 >>> * | ims_info | ||
| ) |
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_mini_pad, pad to the minimum rectange which height and width is times of stride
|
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
1.8.13