Headpose(头部姿态)#
fastdeploy.vision.headpose.FSANet#
- class fastdeploy.vision.headpose.FSANet(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a headpose model exported by FSANet.
- Parameters
model_file – (str)Path of model file, e.g fsanet/fsanet-var.onnx
params_file – (str)Path of parameters file, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string
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, default is ONNX
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- predict(input_image)[source]#
Predict an input image headpose
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
HeadPoseResult
- property size#
Returns the preprocess image size, default (64, 64)