The Problem Statement we have chosen for the same is to develop a system that can accurately generate a realistic human face image based on a given text description of facial features. The need for this project can be in domains like in cosmetics, for plastic surgery, customers can change and update their faces according to their needs. In Forensics, specially where the case is of the damaged face. Another case is to identify the suspects, forensic professionals use manual comparison techniques. It takes longer and requires more work to draw the portrait of the suspect. Plus a sketch artist will not be available 24/7 at the police station. Here our project can help as the user will just input the face description of the suspect and our project will draw/generate his/her image. It can also be used for industries and in gaming too .As anime lovers are increasing the project will be on demand and profitable, we just have to change the image dataset and train on the same model. It can also be used for industries and in gaming too, as anime lovers are increasing the project will be on demand and profitable, we just have to change the image dataset and train on the same model.
For this we created a complete project where the user can put the inputs (features of a person) and fetch the image accordingly. For this we prepared a website and are also willing to add many more extra functionalities but due to time constraints our team focused on the basic functionalities for now.
We have used DCGAN as our deep learning model,flask for frontend,python/pytorch for backend.
Firstly we have imported different libraries such as torch,pandas,numpy..etc.We have used feature engineering to extract relevant attributes and then assigned weights to them. .Our dataset contains about 2 lakh images of which we have selected only 10k due to time constraint. The 10k images are uniformly distributed based on features.
There are 3 parts of our code , Generator ,Discriminator and training loop.
Generator. Model that is used to generate new plausible examples from the problem domain.
Discriminator. Model that is used to classify examples as real (from the domain) or fake (generated).
We trained our model for 50 epochs and the results can be improved if we do for more.
Built With
- jupyter
- pytorch
- vscode
Log in or sign up for Devpost to join the conversation.