Skip to content

zutyhcx/Mask-Removal-Gradio

Repository files navigation

Mask Removal (Python: Streamlit)

日本語の説明: https://github.com/rtorii/Mask-Removal/blob/main/README_ja.md

Note: I originally deployed the app on Google App Engine, but since it costs about $20 / month, the app is currently disabled.

Description:

This app removes a face mask from an image of a person wearing it. Technically, it replaces the bottom half of the face with the face of another person.

  1. detects a face from an image using the pretrained Pytorch face detection model (MTCNN) from https://github.com/timesler/facenet-pytorch.
  2. replaces the bottom half of the face(face mask portion) with an image of a random person using GAN from https://github.com/zsyzzsoft/co-mod-gan.
  3. displays the processed image.
demo.mov

How to use the app:

  1. Open the app and press the START button.
  2. Allow the app to access the webcam if it ask for the permission. Then the app displays the image from the webcam.
  3. The app processes the image from the webcam and displays it.

Note: To run the app locally, please download co-mod-gan-ffhq-9-025000_net_G_ema.pth file from https://maildluteducn-my.sharepoint.com/:u:/g/personal/zengyu_mail_dlut_edu_cn/Ee1YPJG2Y7NDnUjJBf-SipoBBSlbv8QfFy6K7lsiiiiFHg?download=1. Then place the file in the same directory as app.py.

Home page
Screen Shot 2022-06-10 at 19 39 25

Created on 05/04/22 by team UUU.

About

Gradio version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published