Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CATastrophe: Image Inpainting with GANs

image

CATastrophe is a Generative Adversarial Network (GAN) model for image inpainting. It generates realistic images by filling in missing regions based on the surrounding content. The model consists of a generator and a discriminator, trained in an adversarial setting to improve over time.

Model Overview

  • Generator: A U-Net style network with an encoder-decoder architecture and skip connections. It takes an image with missing parts and reconstructs the missing content.
  • Discriminator: A CNN that distinguishes between real and generated images, encouraging the generator to produce realistic inpainted results. The generator uses a combination of adversarial loss and L1 loss to ensure realistic image generation, while the discriminator's binary cross-entropy loss helps improve realism.

Training Process

The model is trained on masked images from the Animal Faces Dataset, which contains photos of animals with varied facial features. During training, random masks are applied to images, and the generator learns to fill in these masked areas. The training uses mini-batch gradient descent with the Adam optimizer, and both the generator and discriminator are updated iteratively.

image

Results

After training, the generator is able to fill in missing regions, producing inpainted images. The model is evaluated by comparing generated images to real ones, and it steadily improves as training progresses.

Demo

You can interact with the trained model: https://huggingface.co/spaces/akrasi/CATastrophe

image

Releases

Packages

Contributors

Languages