mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
[RKNPU2] Update quantitative model (#879)
* 对RKNPU2后端进行修改,当模型为非量化模型时,不在NPU执行normalize操作,当模型为量化模型时,在NUP上执行normalize操作 * 更新RKNPU2框架,输出数据的数据类型统一返回fp32类型 * 更新scrfd,拆分disable_normalize和disable_permute * 更新scrfd代码,支持量化 * 更新scrfd python example代码 * 更新模型转换代码,支持量化模型 * 更新文档 * 按照要求修改 * 按照要求修改 * 修正模型转换文档 * 更新一下转换脚本
This commit is contained in:
@@ -51,11 +51,17 @@ class SCRFD(FastDeployModel):
|
||||
return self._model.predict(input_image, conf_threshold,
|
||||
nms_iou_threshold)
|
||||
|
||||
def disable_normalize_and_permute(self):
|
||||
def disable_normalize(self):
|
||||
"""
|
||||
This function will disable normalize and hwc2chw in preprocessing step.
|
||||
This function will disable normalize in preprocessing step.
|
||||
"""
|
||||
self._model.disable_normalize_and_permute()
|
||||
self._model.disable_normalize()
|
||||
|
||||
def disable_permute(self):
|
||||
"""
|
||||
This function will disable hwc2chw in preprocessing step.
|
||||
"""
|
||||
self._model.disable_permute()
|
||||
|
||||
# 一些跟SCRFD模型有关的属性封装
|
||||
# 多数是预处理相关,可通过修改如model.size = [640, 640]改变预处理时resize的大小(前提是模型支持)
|
||||
|
Reference in New Issue
Block a user