mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
[Other]Update pptinypose python predict api with detection_result (#692)
* Add pptinypose python api predict_with_detection_result * Update keypointdetection result docs * Update pptinypose predict api with detection_result
This commit is contained in:
@@ -41,13 +41,17 @@ class PPTinyPose(FastDeployModel):
|
|||||||
model_format)
|
model_format)
|
||||||
assert self.initialized, "PPTinyPose model initialize failed."
|
assert self.initialized, "PPTinyPose model initialize failed."
|
||||||
|
|
||||||
def predict(self, input_image):
|
def predict(self, input_image, detection_result=None):
|
||||||
"""Detect keypoints in an input image
|
"""Detect keypoints in an input image
|
||||||
|
|
||||||
:param im: (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
|
:param im: (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
|
||||||
|
:param detection_result: (DetectionResult)Pre-detected boxes result, default is None
|
||||||
:return: KeyPointDetectionResult
|
:return: KeyPointDetectionResult
|
||||||
"""
|
"""
|
||||||
assert input_image is not None, "The input image data is None."
|
assert input_image is not None, "The input image data is None."
|
||||||
|
if detection_result:
|
||||||
|
return self._model.predict(input_image, detection_result)
|
||||||
|
else:
|
||||||
return self._model.predict(input_image)
|
return self._model.predict(input_image)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user