Add PPOCR example for ascend deploy

This commit is contained in:
yunyaoXYY
2022-12-28 12:56:53 +00:00
parent 471f0f62c8
commit b6903b0aa4
21 changed files with 235 additions and 74 deletions

View File

@@ -36,6 +36,34 @@ class FASTDEPLOY_DECL DBDetectorPostprocessor {
std::vector<std::vector<std::array<int, 8>>>* results,
const std::vector<std::array<int, 4>>& batch_det_img_info);
/// Set det_db_thresh for the detection postprocess, default is 0.3
void SetDetDBThresh(double det_db_thresh) { det_db_thresh_ = det_db_thresh; }
/// Get det_db_thresh of the detection postprocess
double GetDetDBThresh() const { return det_db_thresh_; }
/// Set det_db_box_thresh for the detection postprocess, default is 0.6
void SetDetDBBoxThresh(double det_db_box_thresh)
{ det_db_box_thresh_ = det_db_box_thresh; }
/// Get det_db_box_thresh of the detection postprocess
double GetDetDBBoxThresh() const { return det_db_box_thresh_; }
/// Set det_db_unclip_ratio for the detection postprocess, default is 1.5
void SetDetDBUnclipRatio(double det_db_unclip_ratio)
{ det_db_unclip_ratio_ = det_db_unclip_ratio; }
/// Get det_db_unclip_ratio_ of the detection postprocess
double GetDetDBUnclipRatio() const { return det_db_unclip_ratio_; }
/// Set det_db_score_mode for the detection postprocess, default is 'slow'
void SetDetDBScoreMode(std::string det_db_score_mode)
{ det_db_score_mode_ = det_db_score_mode; }
/// Get det_db_score_mode_ of the detection postprocess
std::string GetDetDBScoreMode() const { return det_db_score_mode_; }
/// Set use_dilation for the detection postprocess, default is fasle
void SetUseDilation(int use_dilation) { use_dilation_ = use_dilation; }
/// Get use_dilation of the detection postprocess
int GetUseDilation() const { return use_dilation_; }
double det_db_thresh_ = 0.3;
double det_db_box_thresh_ = 0.6;
double det_db_unclip_ratio_ = 1.5;