Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 4.61 KB

File metadata and controls

52 lines (31 loc) · 4.61 KB

Facial-Reconstruction-of-Masked-Face-using-GAN

Why

With the advent of COVID-19 facial coverings like masks have become increasingly prevalent. Even though advanced facial recognition systems have been developed and produce satisfactory results, obstructions and covering on facial features is a major issue that render these systems useless. Since mask is one of the things that can be classified as obstruction to a face, we developed project that removes the mask and generates or reconstructs the hidden part of the face covered by mask.

Who

It was developed by Arpita Nanda, Dawood Damda, Gagan V, Emaad Jaffer

Methodology

We developed a model using two main modules:

  • Map Module, a modified version of the U-Net, it creates a segmentation map of the mask.
  • Editing Module, composed of GAN(one generator and two discriminator) and a Perceptual Network, it generates the hidden part of the face covered by mask.

This project will take all the required images the model needs (masked images) from the directory testing/test_mask. First, it will generate the maps from the masked images and will save them in testing/test_map. Then, it uses these maps for the editing module, and it generates the unmasked images, saved in testing/results.

How to run the project

  • Download or clone this repository.
  • Download the Dataset.
  • Run Unmask.ipynb
  • To skip the training process, you can download the pre-trained model from Model.

Results

After the training process, accuracy and loss graphs were plotted.

alt text alt text

Check out "Facial Reconstruction of Masked Face Using Generative Adversarial Networks.pdf" for more detailed explanation about the project.

Here's some sample outputs:

------------------Input--------------------------Mask Segmentation---------------------Generated Output---------

alt text alt text alt text

alt text alt text alt text

alt text alt text alt text

The ground truth images for above examples:

alt text alt text alt text

As you can see, even with the few resources we had, the outcomes are still more than adequate. Overfitting of the model was seen, which resulted in poor generalisation. The issue might have been resolved by making the dataset more diverse and heterogeneous.

NOTE:

We recommend you to use system with higher processor, higher RAM and a better GPU for smooth training and processing.

OR

Use Google Colab Pro to avoid "ResourceExhaustedError" error during the training process due to insufficient RAM.