From 6040d929b1af10e39a3d14c113aeb81d209f31e6 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Wed, 11 Sep 2024 03:36:09 +0800 Subject: [PATCH] feat: default face detect --- demo/ui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/demo/ui.py b/demo/ui.py index 872ea97c..cd7209c4 100644 --- a/demo/ui.py +++ b/demo/ui.py @@ -16,12 +16,15 @@ def create_ui( ): DEFAULT_LANG = "zh" DEFAULT_HUMAN_MATTING_MODEL = "modnet_photographic_portrait_matting" - DEFAULT_FACE_DETECT_MODEL = "mtcnn" + DEFAULT_FACE_DETECT_MODEL = "retinaface-resnet50" if DEFAULT_HUMAN_MATTING_MODEL in human_matting_models: human_matting_models.remove(DEFAULT_HUMAN_MATTING_MODEL) human_matting_models.insert(0, DEFAULT_HUMAN_MATTING_MODEL) + if DEFAULT_FACE_DETECT_MODEL not in face_detect_models: + DEFAULT_FACE_DETECT_MODEL = "mtcnn" + demo = gr.Blocks(title="HivisionIDPhotos") with demo: