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

Postprocessor object for YOLOv5 serials model. More...

#include <postprocessor.h>

Public Member Functions

 RKYOLOPostprocessor ()
 Create a postprocessor instance for YOLOv5 serials model.
 
bool Run (const std::vector< FDTensor > &tensors, std::vector< DetectionResult > *results)
 Process the result of runtime and fill to DetectionResult structure. More...
 
void SetNMSThreshold (float nms_threshold)
 Set nms_threshold, default 0.45.
 
void SetConfThreshold (float conf_threshold)
 Set conf_threshold, default 0.25.
 
float GetConfThreshold () const
 Get conf_threshold, default 0.25.
 
float GetNMSThreshold () const
 Get nms_threshold, default 0.45.
 
void SetHeightAndWeight (int height, int width)
 Set height and weight.
 
void SetPadHWValues (const std::vector< std::vector< int >> &pad_hw_values)
 Set pad_hw_values.
 
void SetScale (const std::vector< float > &scale)
 Set scale.
 
void SetAnchor (const std::vector< int > &anchors, int anchor_per_branch)
 Set Anchor.
 
void SetClassNum (int num)
 Set the number of class.
 
int GetClassNum ()
 Get the number of class.
 

Detailed Description

Postprocessor object for YOLOv5 serials model.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::detection::RKYOLOPostprocessor::Run ( const std::vector< FDTensor > &  tensors,
std::vector< DetectionResult > *  results 
)

Process the result of runtime and fill to DetectionResult structure.

Parameters
[in]tensorsThe inference result from runtime
[in]resultThe output result of detection
[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: