Face Recognition(人脸识别)#
fastdeploy.vision.faceid.AdaFace#
- class fastdeploy.vision.faceid.AdaFace(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a AdaFace model exported by PaddleClas.
- Parameters
model_file – (str)Path of model file, e.g adaface/model.pdmodel
params_file – (str)Path of parameters file, e.g adaface/model.pdiparams, 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
- batch_predict(images)[source]#
Detect a batch of input image list
- Parameters
im – (list of numpy.ndarray) The input image list, each element is a 3-D array with layout HWC, BGR format
:return list of DetectionResult
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- property postprocessor#
Get AdaFacePostprocessor object of the loaded model
:return AdaFacePostprocessor
- predict(im)[source]#
Detect an input image
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
DetectionResult
- property preprocessor#
Get AdaFacePreprocessor object of the loaded model
:return AdaFacePreprocessor
fastdeploy.vision.faceid.CosFace#
- class fastdeploy.vision.faceid.CosFace(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a CosFace model exported by PaddleClas. :param model_file: (str)Path of model file, e.g CosFace/model.pdmodel :param params_file: (str)Path of parameters file, e.g CosFace/model.pdiparams, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string :param runtime_option: (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it’s None, will use the default backend on CPU :param model_format: (fastdeploy.ModelForamt)Model format of the loaded model
- batch_predict(images)#
Detect a batch of input image list
- Parameters
im – (list of numpy.ndarray) The input image list, each element is a 3-D array with layout HWC, BGR format
:return list of DetectionResult
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- property postprocessor#
Get InsightFaceRecognitionPostprocessor object of the loaded model
:return InsightFaceRecognitionPostprocessor
- predict(im)#
Detect an input image
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
DetectionResult
- property preprocessor#
Get InsightFaceRecognitionPreprocessor object of the loaded model
:return InsightFaceRecognitionPreprocessor
fastdeploy.vision.faceid.ArcFace#
- class fastdeploy.vision.faceid.ArcFace(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a ArcFace model exported by PaddleClas. :param model_file: (str)Path of model file, e.g ArcFace/model.pdmodel :param params_file: (str)Path of parameters file, e.g ArcFace/model.pdiparams, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string :param runtime_option: (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it’s None, will use the default backend on CPU :param model_format: (fastdeploy.ModelForamt)Model format of the loaded model
- batch_predict(images)#
Detect a batch of input image list
- Parameters
im – (list of numpy.ndarray) The input image list, each element is a 3-D array with layout HWC, BGR format
:return list of DetectionResult
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- property postprocessor#
Get InsightFaceRecognitionPostprocessor object of the loaded model
:return InsightFaceRecognitionPostprocessor
- predict(im)#
Detect an input image
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
DetectionResult
- property preprocessor#
Get InsightFaceRecognitionPreprocessor object of the loaded model
:return InsightFaceRecognitionPreprocessor
fastdeploy.vision.faceid.PartialFC#
- class fastdeploy.vision.faceid.PartialFC(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a PartialFC model exported by PaddleClas. :param model_file: (str)Path of model file, e.g PartialFC/model.pdmodel :param params_file: (str)Path of parameters file, e.g PartialFC/model.pdiparams, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string :param runtime_option: (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it’s None, will use the default backend on CPU :param model_format: (fastdeploy.ModelForamt)Model format of the loaded model
- batch_predict(images)#
Detect a batch of input image list
- Parameters
im – (list of numpy.ndarray) The input image list, each element is a 3-D array with layout HWC, BGR format
:return list of DetectionResult
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- property postprocessor#
Get InsightFaceRecognitionPostprocessor object of the loaded model
:return InsightFaceRecognitionPostprocessor
- predict(im)#
Detect an input image
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
DetectionResult
- property preprocessor#
Get InsightFaceRecognitionPreprocessor object of the loaded model
:return InsightFaceRecognitionPreprocessor
fastdeploy.vision.faceid.VPL#
- class fastdeploy.vision.faceid.VPL(model_file, params_file='', runtime_option=None, model_format=<ModelFormat.ONNX: 2>)[source]#
Load a VPL model exported by PaddleClas. :param model_file: (str)Path of model file, e.g VPL/model.pdmodel :param params_file: (str)Path of parameters file, e.g VPL/model.pdiparams, if the model_fomat is ModelFormat.ONNX, this param will be ignored, can be set as empty string :param runtime_option: (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it’s None, will use the default backend on CPU :param model_format: (fastdeploy.ModelForamt)Model format of the loaded model
- batch_predict(images)#
Detect a batch of input image list
- Parameters
im – (list of numpy.ndarray) The input image list, each element is a 3-D array with layout HWC, BGR format
:return list of DetectionResult
- get_profile_time()#
Get profile time of Runtime after the profile process is done.
- property postprocessor#
Get InsightFaceRecognitionPostprocessor object of the loaded model
:return InsightFaceRecognitionPostprocessor
- predict(im)#
Detect an input image
- Parameters
im – (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
- Returns
DetectionResult
- property preprocessor#
Get InsightFaceRecognitionPreprocessor object of the loaded model
:return InsightFaceRecognitionPreprocessor