Skip to content

Commit

Permalink
feat: default face detect
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 10, 2024
1 parent 28e861e commit 6040d92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demo/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6040d92

Please sign in to comment.