按照要求更新

This commit is contained in:
Zheng-Bicheng
2023-02-16 10:38:10 +08:00
parent 8faca05280
commit 2b7c23683a
2 changed files with 13 additions and 1 deletions

View File

@@ -144,7 +144,7 @@ bool PPTinyPose::Postprocess(std::vector<FDTensor>& infer_result,
result_copy.Reshape({result_copy.shape[0], result_copy.shape[1], result_copy.Reshape({result_copy.shape[0], result_copy.shape[1],
result_copy.shape[2] * result_copy.shape[3]}); result_copy.shape[2] * result_copy.shape[3]});
infer_result.resize(2); infer_result.resize(2);
function::ArgMax(result_copy,&infer_result[1],-1); function::ArgMax(result_copy, &infer_result[1], -1);
} }
// Calculate output length // Calculate output length

View File

@@ -71,3 +71,15 @@ class PPTinyPose(FastDeployModel):
assert isinstance( assert isinstance(
value, bool), "The value to set `use_dark` must be type of bool." value, bool), "The value to set `use_dark` must be type of bool."
self._model.use_dark = value self._model.use_dark = value
def disable_normalize(self):
"""
This function will disable normalize in preprocessing step.
"""
self.disable_normalize()
def disable_permute(self):
"""
This function will disable hwc2chw in preprocessing step.
"""
self.disable_permute()