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

Postprocessor object for YOLOv5Cls serials model. More...

#include <postprocessor.h>

Public Member Functions

 YOLOv5ClsPostprocessor ()
 Create a postprocessor instance for YOLOv5Cls serials model.
 
bool Run (const std::vector< FDTensor > &tensors, std::vector< ClassifyResult > *results, const std::vector< std::map< std::string, std::array< float, 2 >>> &ims_info)
 Process the result of runtime and fill to ClassifyResult structure. More...
 
void SetTopK (const int &topk)
 Set topk, default 1.
 
float GetTopK () const
 Get topk, default 1.
 

Detailed Description

Postprocessor object for YOLOv5Cls serials model.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::classification::YOLOv5ClsPostprocessor::Run ( const std::vector< FDTensor > &  tensors,
std::vector< ClassifyResult > *  results,
const std::vector< std::map< std::string, std::array< float, 2 >>> &  ims_info 
)

Process the result of runtime and fill to ClassifyResult structure.

Parameters
[in]tensorsThe inference result from runtime
[in]resultThe output result of classification
[in]ims_infoThe shape info list, record input_shape and output_shape
Returns
true if the postprocess successed, otherwise false

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