[Hackathon 182 Model] Update PPOCRV3 For RKNPU2 (#1403)

* update ppocrv3 for rknpu2

* add config

* add config

* detele unuseful

* update useful results

* Repair note

* Repair note

* fixed bugs

* update
This commit is contained in:
Zheng-Bicheng
2023-02-27 15:01:17 +08:00
committed by GitHub
parent b6e8773b2f
commit 8c3ccc2cc2
27 changed files with 958 additions and 132 deletions

View File

@@ -56,7 +56,16 @@ class FASTDEPLOY_DECL ClassifierPreprocessor {
/// Get cls_image_shape for the classification preprocess
std::vector<int> GetClsImageShape() const { return cls_image_shape_; }
/// This function will disable normalize in preprocessing step.
void DisableNormalize() { disable_permute_ = true; }
/// This function will disable hwc2chw in preprocessing step.
void DisablePermute() { disable_normalize_ = true; }
private:
// for recording the switch of hwc2chw
bool disable_permute_ = false;
// for recording the switch of normalize
bool disable_normalize_ = false;
std::vector<float> mean_ = {0.5f, 0.5f, 0.5f};
std::vector<float> scale_ = {0.5f, 0.5f, 0.5f};
bool is_scale_ = true;