Skip to content

This repository contains code for the project on Active Learning completed as a part of the course EE 610 (Image Processing) at IIT Bombay during the Autumn semester of 2021 under Prof. Amit Sethi.

Notifications You must be signed in to change notification settings

TheShiningVampire/MIRNET_for_low_light_image_improvement

Repository files navigation

MIRNet for Low-Light Image Enhancement

This repository implements and experiments with MIRNet, a deep learning architecture for enhancing low-light images. The project is inspired by the work presented in Learning Enriched Features for Real Image Restoration and Enhancement and was developed as part of the EE610: Image Processing course under the guidance of Prof. Amit Sethi at IIT Bombay.


Table of Contents

  1. Introduction
  2. MIRNet Architecture
  3. Experiments Conducted
  4. Results
  5. Dataset
  6. Installation
  7. Usage
  8. References

Introduction

Low-light conditions degrade image quality, resulting in issues like noise, low contrast, and color distortion. Enhancing such images is a challenging problem in computer vision. This project uses MIRNet, a multi-scale convolutional neural network that:

  • Captures spatial accuracy.
  • Reduces noise and preserves details.
  • Improves perceptual quality using hybrid loss functions.

The work focuses on restoring high-quality content from low-light images, particularly using the LoL Dataset.


MIRNet Architecture

MIRNet introduces the following key components:

  1. Multi-Scale Residual Block (MRB): Captures multi-scale contextual information while maintaining high-resolution details.
  2. Dual Attention Unit (DAU): Combines channel attention and spatial attention for better feature refinement.

The network is trained using a hybrid loss function combining:

  • Charbonnier loss: Robust loss for image restoration.

Optimizer: Adam
Learning Rate Scheduler: ReduceLROnPlateau


Experiments Conducted

1. Baseline Implementation

  • Implemented MIRNet with original architecture and parameters.
  • Loss Function: Charbonnier Loss.

2. Modified Architecture

  • Experimented with Dual Attention Units (DAU) for refining features.
  • Improved SSIM and PSNR metrics.

3. Alternative Loss Functions

  • Added SSIM Loss alongside the Charbonnier loss to emphasize perceptual quality.\

4. Added regularization

  • Experimented with the addition of L1 and L2 regularization

Each experiment can be found in:

  • mirnet.ipynb: Baseline implementation.
  • mirnet_modified.ipynb: Modified architecture.
  • mirnet_modified_SSIM_loss.ipynb: Alternative loss functions.
  • mirnet_modified_regularisation.ipynb: Added regularization.

Sample Outputs

Input Enhanced (Baseline) Enhanced (Modified)
Input Baseline Modified
Input Baseline Modified

Dataset

The LoL Dataset was used for training and evaluation. It contains paired low-light and well-exposed images:

  • Training: 485 image pairs.
  • Testing: 15 image pairs.

Dataset link: LoL Dataset


Installation

  1. Clone the repository:

    git clone https://github.com/TheShiningVampire/MIRNET_for_low_light_image_improvement.git
    cd MIRNET_for_low_light_image_improvement
  2. Set up the environment:

    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt

Usage

To run the experiments, execute the following Jupyter notebooks:

  1. Baseline Implementation:

    jupyter notebook mirnet.ipynb
  2. Modified Architecture:

    jupyter notebook mirnet_modified.ipynb
  3. SSIM Loss Implementation:

    jupyter notebook mirnet_modified_SSIM_loss.ipynb

References

  1. Learning Enriched Features for Real Image Restoration and Enhancement
  2. Keras MIRNet Example
  3. LoL Dataset

About

This repository contains code for the project on Active Learning completed as a part of the course EE 610 (Image Processing) at IIT Bombay during the Autumn semester of 2021 under Prof. Amit Sethi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published