mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[Model] add PFLD model (#433)
* support face alignment PFLD * add PFLD demo * fixed FaceAlignmentResult * fixed bugs * fixed img size * fixed readme * deal with comments * fixed readme * add pfld testcase * update infer.py * add gflags for example * update c++ readme * add gflags in example * fixed for ci * fixed gflags.cmake * deal with comments * update infer demo Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
10
python/fastdeploy/vision/visualize/__init__.py
Normal file → Executable file
10
python/fastdeploy/vision/visualize/__init__.py
Normal file → Executable file
@@ -36,6 +36,10 @@ def vis_face_detection(im_data, face_det_result, line_size=1, font_size=0.5):
|
||||
font_size)
|
||||
|
||||
|
||||
def vis_face_alignment(im_data, face_align_result, line_size=1):
|
||||
return C.vision.vis_face_alignment(im_data, face_align_result, line_size)
|
||||
|
||||
|
||||
def vis_segmentation(im_data, seg_result, weight=0.5):
|
||||
return C.vision.vis_segmentation(im_data, seg_result, weight)
|
||||
|
||||
@@ -63,12 +67,14 @@ def swap_background_matting(im_data,
|
||||
"DEPRECATED: fastdeploy.vision.swap_background_matting is deprecated, please use fastdeploy.vision.swap_background function instead."
|
||||
)
|
||||
assert isinstance(
|
||||
result, C.vision.MattingResult), "The result must be MattingResult type"
|
||||
result,
|
||||
C.vision.MattingResult), "The result must be MattingResult type"
|
||||
return C.vision.Visualize.swap_background_matting(
|
||||
im_data, background, result, remove_small_connected_area)
|
||||
|
||||
|
||||
def swap_background_segmentation(im_data, background, background_label, result):
|
||||
def swap_background_segmentation(im_data, background, background_label,
|
||||
result):
|
||||
logging.warning(
|
||||
"DEPRECATED: fastdeploy.vision.swap_background_segmentation is deprecated, please use fastdeploy.vision.swap_background function instead."
|
||||
)
|
||||
|
Reference in New Issue
Block a user