Skip to content

Deep learning project using Convolutional Neural Networks (CNNs) for Image Inpainting- to restore missing or damaged regions in images. Highlights skills in CNN model development, image restoration, and data-driven experimentation with TensorFlow/PyTorch.

Notifications You must be signed in to change notification settings

UK183/Image-Inpainting-using-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Image Inpainting using CNN

** Images used are from celeba_hq dataset

A deep learning project applying convolutional neural networks (CNNs) to perform image inpainting β€” restoring missing or corrupted regions in images. This project demonstrates skills in computer vision, neural network design, and image processing pipeline development.

πŸ” Project Overview

Image inpainting is the task of reconstructing missing or damaged parts of an image in a visually plausible way. This repository implements a CNN-based model that learns to fill missing patches by understanding the context of surrounding pixels.

The goal is to restore images with masked regions, whether randomly masked blocks or real-world corruptions, and produce seamless, realistic inpainted output.

πŸ› οΈ Features & Components

  • Data Preparation & Masking Generation of input images with masked regions (e.g. square patches, random missing pixels).

  • CNN Architecture Build encoder-decoder or U-Net style convolutional network for inpainting.

  • Training & Optimization
    Loss functions (e.g. MSE, perceptual loss), regularization, epochs, checkpoints.

  • Evaluation & Visualization
    Side-by-side comparisons: original, masked, and inpainted images.

  • Prediction / Inference Pipeline
    A script or notebook to apply the trained model to new images for inpainting.

πŸ“‚ Repository Structure

Image-Inpainting-using-CNN/

β”œβ”€β”€ data/ # (optional) training / testing image datasets

β”œβ”€β”€ models/ # saved model weights / checkpoints

β”œβ”€β”€ notebooks/ # Jupyter notebooks for experiments & visualization

β”œβ”€β”€ scripts/ # scripts for training, testing, inference

β”œβ”€β”€ requirements.txt # project dependencies

└── README.md # this file

🧰 Technologies & Skills Demonstrated

Area Tools / Libraries
Deep Learning TensorFlow / Keras or PyTorch
Computer Vision image processing, masks, data augmentation
Model Architecture CNNs, encoder-decoder, skip connections
Training & Evaluation loss functions, metrics, tuning
Data Visualization matplotlib, PIL / OpenCV
Project Engineering modular code, checkpointing, reproducibility

πŸ“‹ Installation & Usage

Prerequisites

  • Python 3.7+
  • GPU (optional but recommended)
  • pip or conda environment

Steps

  1. Clone the repo:

    git clone https://github.com/UK183/Image-Inpainting-using-CNN.git
    cd Image-Inpainting-using-CNN
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Prepare dataset or provide image folder (with masks). Train the model:

    python scripts/train.py
  4. Perform inference / inpainting on new images:

    python scripts/inference.py --input path/to/image.jpg
    

Visualize results (in notebooks or output folder) β€” compare original vs masked vs inpainted.

πŸ“Š Results & Examples:

Demonstrative examples showing original, masked, and inpainted images side by side.

Quantitative metrics (PSNR, SSIM, MSE) comparing performance across epochs or architectures.

Visual comparisons and qualitative evaluation of inpainted outputs.

🧠 Key Learnings:

Gained hands-on experience designing CNN architectures for contextual image reconstruction.

Understood loss design (e.g. pixel-wise loss vs perceptual loss) and trade-offs in image generation tasks.

Learned scalable training, checkpointing, and inference workflows for CV tasks.

Improved ability to process and augment image data for neural network input.

⚠️ Note: This is a research/portfolio project. For production use, you may want to include more advanced architectures, handle edge cases, and ensure robustness.


πŸ‘€ Author

Kazi Umar
Linkedin profile: https://www.linkedin.com/in/umar-kazi18
πŸ’Ό Data Analyst | ML Engineer | Data Science & AI Enthusiast | Power BI | Python | SQL

About

Deep learning project using Convolutional Neural Networks (CNNs) for Image Inpainting- to restore missing or damaged regions in images. Highlights skills in CNN model development, image restoration, and data-driven experimentation with TensorFlow/PyTorch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published