Keypoint Detection(关键点检测)#

fastdeploy.vision.keypointdetection.PPTinyPose#

class fastdeploy.vision.keypointdetection.PPTinyPose(model_file, params_file, config_file, runtime_option=None, model_format=<ModelFormat.PADDLE: 1>)[source]#

load a PPTinyPose model exported by PaddleDetection.

Parameters
  • model_file – (str)Path of model file, e.g pptinypose/model.pdmodel

  • params_file – (str)Path of parameters file, e.g pptinypose/model.pdiparams, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string

  • config_file – (str)Path of configuration file for deployment, e.g pptinypose/infer_cfg.yml

  • runtime_option – (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it’s None, will use the default backend on CPU

  • model_format – (fastdeploy.ModelForamt)Model format of the loaded model

disable_normalize()[source]#

This function will disable normalize in preprocessing step.

disable_permute()[source]#

This function will disable hwc2chw in preprocessing step.

get_profile_time()#

Get profile time of Runtime after the profile process is done.

predict(input_image, detection_result=None)[source]#

Detect keypoints in an input image

Parameters
  • im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format

  • detection_result – (DetectionResult)Pre-detected boxes result, default is None

Returns

KeyPointDetectionResult

property use_dark#

Atrribute of PPTinyPose model. Stating whether using Distribution-Aware Coordinate Representation for Human Pose Estimation(DARK for short) in postprocess, default is True

Returns

value of use_dark(bool)