[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

@@ -65,6 +65,29 @@ class DBDetectorPreprocessor:
"""
self._preprocessor.set_normalize(mean, std, is_scale)
@property
def static_shape_infer(self):
return self._preprocessor.static_shape_infer
@static_shape_infer.setter
def static_shape_infer(self, value):
assert isinstance(
value,
bool), "The value to set `static_shape_infer` must be type of bool."
self._preprocessor.static_shape_infer = value
def disable_normalize(self):
"""
This function will disable normalize in preprocessing step.
"""
self._preprocessor.disable_normalize()
def disable_permute(self):
"""
This function will disable hwc2chw in preprocessing step.
"""
self._preprocessor.disable_permute()
class DBDetectorPostprocessor:
def __init__(self):
@@ -358,6 +381,18 @@ class ClassifierPreprocessor:
list), "The value to set `cls_image_shape` must be type of list."
self._preprocessor.cls_image_shape = value
def disable_normalize(self):
"""
This function will disable normalize in preprocessing step.
"""
self._preprocessor.disable_normalize()
def disable_permute(self):
"""
This function will disable hwc2chw in preprocessing step.
"""
self._preprocessor.disable_permute()
class ClassifierPostprocessor:
def __init__(self):
@@ -581,6 +616,18 @@ class RecognizerPreprocessor:
list), "The value to set `rec_image_shape` must be type of list."
self._preprocessor.rec_image_shape = value
def disable_normalize(self):
"""
This function will disable normalize in preprocessing step.
"""
self._preprocessor.disable_normalize()
def disable_permute(self):
"""
This function will disable hwc2chw in preprocessing step.
"""
self._preprocessor.disable_permute()
class RecognizerPostprocessor:
def __init__(self, label_path):