mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-08 18:11:00 +08:00
[Model] Add Picodet RKNPU2 (#635)
* * 更新picodet cpp代码 * * 更新文档 * 更新picodet cpp example * * 删除无用的debug代码 * 新增python example * * 修改c++代码 * * 修改python代码 * * 修改postprocess代码 * 修复没有scale_factor导致的bug * 修复错误 * 更正代码格式 * 更正代码格式
This commit is contained in:
@@ -32,11 +32,28 @@ class FASTDEPLOY_DECL PaddleDetPostprocessor {
|
||||
* \return true if the postprocess successed, otherwise false
|
||||
*/
|
||||
bool Run(const std::vector<FDTensor>& tensors,
|
||||
std::vector<DetectionResult>* result);
|
||||
std::vector<DetectionResult>* result);
|
||||
|
||||
/// Apply box decoding and nms step for the outputs for the model.This is
|
||||
/// only available for those model exported without box decoding and nms.
|
||||
void ApplyDecodeAndNMS();
|
||||
|
||||
bool DecodeAndNMSApplied();
|
||||
|
||||
/// Set scale_factor_ value.This is only available for those model exported
|
||||
/// without box decoding and nms.
|
||||
void SetScaleFactor(float* scale_factor_value);
|
||||
|
||||
private:
|
||||
// Process mask tensor for MaskRCNN
|
||||
bool ProcessMask(const FDTensor& tensor,
|
||||
std::vector<DetectionResult>* results);
|
||||
std::vector<DetectionResult>* results);
|
||||
|
||||
bool apply_decode_and_nms_ = false;
|
||||
std::vector<float> scale_factor_{1.0, 1.0};
|
||||
std::vector<float> GetScaleFactor();
|
||||
bool ProcessUnDecodeResults(const std::vector<FDTensor>& tensors,
|
||||
std::vector<DetectionResult>* results);
|
||||
};
|
||||
|
||||
} // namespace detection
|
||||
|
Reference in New Issue
Block a user