Skip to content

A sketch to face image translation model which uses Contextual GANs, GFPGANs and DeOldify to generate results.

Notifications You must be signed in to change notification settings

0sparsh2/Sketch-to-Face-using-Multi-GANs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sketch-to-Face-using-Multi-GANs

The project involves converting a sketch image to a real life face like image using a series of GANs (Generative Adversarial Network) models. Contextual GANs, GFPGANs and DeOldify were used to implement our model which was hosted over Anvil server.

Steps to implement :

Step 1

Train the model for Contextual GANs and save them. For the code of training the model, you can refer to this link Sketch to Face Code. The code doesn't support Python 3.10 so I have made changes and uploaded the updated Python files in the current repository for referral.

Step 2

Once the model is trained, save it in an H5 file as per the code. The training takes months over a CPU so it's suggested to use GPUs or TPUs to train. Save the H5 file over your google drive which you can refer to your colab notebook.

Step 3

Fire up the colab notebook. Run all imports and installations including accessing h5 model from google drive.

Step 4

Alterations in the notebook. gfpgan_inference.py file present in the GFPGANs folder after github pull command needs to be edited. The replacement of the specific code is provided towards the end in the colab notebook.

Step 5

Open Anvil. Link to colab notebook . Tutorial link which helped me - Sample Anvil article. You can also refer to the official documentations .


## Layers of Processing:

f-042-01-sz1 Screenshot 2022-04-27 at 2 19 16 AM Screenshot 2022-04-27 at 2 37 33 AM Screenshot 2022-04-27 at 2 43 04 AM

Actual Face:
f-042-01

Evaluation

We used two metrics in our method of multigan.
Structural Similarity Index Measure and L2-Normalization score

Structural Similarity Index Measure : 0.7804028372700662

L2-Normalization Score : 93.7520664666667

About

A sketch to face image translation model which uses Contextual GANs, GFPGANs and DeOldify to generate results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published