FastDeploy  latest
Fast & Easy to Deploy!
Public Member Functions | List of all members
fastdeploy::vision::classification::YOLOv5ClsPreprocessor Class Reference

Preprocessor object for YOLOv5Cls serials model. More...

#include <preprocessor.h>

Public Member Functions

 YOLOv5ClsPreprocessor ()
 Create a preprocessor instance for YOLOv5Cls 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 = {224, 224}.
 
std::vector< int > GetSize () const
 Get target size, tuple of (width, height), default size = {224, 224}.
 

Detailed Description

Preprocessor object for YOLOv5Cls serials model.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::classification::YOLOv5ClsPreprocessor::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.

Parameters
[in]imagesThe input image data list, all the elements are returned by cv::imread()
[in]outputsThe output tensors which will feed in runtime
[in]ims_infoThe shape info list, record input_shape and output_shape
Returns
true if the preprocess successed, otherwise false

The documentation for this class was generated from the following files: