Introduction
Image inpainting is a computer vision task that involves filling in missing or damaged parts of an image. It has various applications including photo editing, image restoration, and object removal. In this project, we focus on image inpainting using PatchGAN, a type of Generative Adversarial Network (GAN), on the CelebA dataset, which contains over 200,000 celebrity images.
Methodology
-
Dataset Preparation:
- The CelebA dataset consists of images with various resolutions and annotations such as facial keypoints and attributes.
- We preprocess the dataset to extract the images and masks indicating the regions to be inpainted.
-
Model Architecture:
- We employ PatchGAN, which is a type of GAN specifically designed for image-to-image translation tasks.
- The PatchGAN Discriminator operates by classifying image patches as real or fake, enabling it to generate high-quality, coherent outputs.
-
Training:
- The model is trained using a combination of adversarial and reconstruction losses.
- Adversarial loss encourages the generator to produce realistic inpainted images, while reconstruction loss ensures that the inpainted regions match the surrounding context.
Results:
- The trained model demonstrates the ability to effectively inpaint missing regions in the CelebA dataset.
- Qualitative evaluation shows visually pleasing results with realistic textures and coherent structures.
Flask Website:
To make the trained model accessible and user-friendly, we develop a Flask-based website for hosting the image inpainting service.
-
Frontend:
- The frontend of the website allows users to upload images and crop out of portion of the image.
- Users can specify the areas to be inpainted or allow the model to automatically detect and inpaint missing regions.
-
Backend:
- The backend of the website integrates the trained PatchGAN model for inpainting.
- Upon receiving an image, the backend processes it through the model and returns the inpainted result to the user.
Conclusion:
In conclusion, this project demonstrates the effectiveness of PatchGAN for image inpainting on the CelebA dataset. The developed Flask website provides a convenient platform for users to utilize the trained model for inpainting tasks, showcasing the practical applications of this technology in real-world scenarios.
Project Mentors :
- Hemang J Jamadagni
- Adithya S Ubaradka
Project Mentees :
- Kalva kaushik
- Pranav Bhat
- Nakul Agrawal
- Swaraj Singh
- Adivi Sri Venkata Sashank
- Koya Anuj
- Durga Sai Pavan Gangabattula
- Karella Udayram
GoogleMeetLink : https://meet.google.com/srn-yaao-vtr
Report prepared on May 5, 2024, 6:15 p.m. by:
- Hemang J Jamadagni [CompSoc]
- Adithya S Ubaradka [CompSoc]
Report reviewed and approved by Aditya Pandia [CompSoc] on May 9, 2024, 10:49 p.m..