Merge branch 'develop' into matting

This commit is contained in:
huangjianhui
2023-02-14 18:49:39 +08:00
committed by GitHub
6 changed files with 55 additions and 8 deletions

5
python/fastdeploy/runtime.py Normal file → Executable file
View File

@@ -532,9 +532,10 @@ class RuntimeOption:
logging.warning(" option = fd.RuntimeOption()")
logging.warning(" option.use_gpu(0)")
logging.warning(" option.use_paddle_infer_backend()")
logging.warning(" option.paddle_infer_option.enabel_trt = True")
logging.warning(" option.paddle_infer_option.enable_trt = True")
logging.warning(" ==============================================")
return self._option.enable_paddle_to_trt()
self._option.use_paddle_backend()
self._option.paddle_infer_option.enable_trt = True
def set_trt_max_workspace_size(self, trt_max_workspace_size):
"""Set max workspace size while using TensorRT backend.

View File

@@ -107,6 +107,13 @@ class Yolov7FacePostprocessor:
"""
return self._postprocessor.nms_threshold
@property
def landmarks_per_face(self):
"""
landmarks per face for postprocessing, default is 5
"""
return self._postprocessor.landmarks_per_face
@conf_threshold.setter
def conf_threshold(self, conf_threshold):
assert isinstance(conf_threshold, float),\
@@ -119,6 +126,11 @@ class Yolov7FacePostprocessor:
"The value to set `nms_threshold` must be type of float."
self._postprocessor.nms_threshold = nms_threshold
@landmarks_per_face.setter
def landmarks_per_face(self, landmarks_per_face):
assert isinstance(landmarks_per_face, int),\
"The value to set `landmarks_per_face` must be type of int."
self._postprocessor.landmarks_per_face = landmarks_per_face
class YOLOv7Face(FastDeployModel):
def __init__(self,