Virtual Expo 2024

Image Inpainting using GAN

Envision
CompSoc

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

  1. 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.
  2. 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.
  3. 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.

  1. 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.
  2. 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 :

  1. Hemang J Jamadagni
  2. Adithya S Ubaradka

Project Mentees : 

  1. Kalva kaushik
  2. Pranav Bhat
  3. Nakul Agrawal
  4. Swaraj Singh
  5. Adivi Sri Venkata Sashank
  6. Koya Anuj
  7. Durga Sai Pavan Gangabattula
  8. Karella Udayram

 

GoogleMeetLink  :  https://meet.google.com/srn-yaao-vtr

 

METADATA

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..

Check out more projects!