0% found this document useful (0 votes)
3 views27 pages

Major Project Report RITformer

This project report presents a systematic investigation into low-light image enhancement (LLIE) using both classical image processing methods and a novel deep learning architecture called the Retinex Illumination Transformer (RITformer). The RITformer model integrates Retinex decomposition theory with a Transformer-based illumination estimation network, achieving significant improvements in image quality compared to traditional methods. The research aims to address the challenges posed by low-light conditions in various applications, including surveillance and autonomous driving, and evaluates the model's performance using established benchmarks.

Uploaded by

cresgotnochills
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views27 pages

Major Project Report RITformer

This project report presents a systematic investigation into low-light image enhancement (LLIE) using both classical image processing methods and a novel deep learning architecture called the Retinex Illumination Transformer (RITformer). The RITformer model integrates Retinex decomposition theory with a Transformer-based illumination estimation network, achieving significant improvements in image quality compared to traditional methods. The research aims to address the challenges posed by low-light conditions in various applications, including surveillance and autonomous driving, and evaluates the model's performance using established benchmarks.

Uploaded by

cresgotnochills
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A Project Report

On

Low-Light Image Enhancement Using Deep Learning


and Image Processing Techniques

Submitted in partial fulfillment of the


requirement for the award of the
degree of

BACHELOR OF TECHNOLOGY

DEGREE
Session 2025-26
in
Computer Science and Engineering
By

Sumit Kumar (Roll No)


Vineet Raj (Roll No)
Vansh Malik (Roll No)
Vivek Singh (Roll No)
Annu Kumari (Roll No)
Aanchal Vij (Roll No)

Under the guidance of Mr./Dr. Faculty Name


SCHOOL OF COMPUTER SCIENCE AND ENGINEERING
IILM UNIVERSITY, GREATER NOIDA

May, 2026
SCHOOL OF COMPUTER SCI. AND ENGG.
IILM UNIVERSITY, GREATER NOIDA

CANDIDATE'S DECLARATION

We hereby certify that the work which is being presented in the project, entitled "Low-Light Image
Enhancement Using Deep Learning and Image Processing Techniques", in partial fulfillment of the
requirements for the degree of Bachelor of Technology in the School of Computing Science and
Engineering of IILM University, Greater Noida is an original work carried out from Aug 2025 to
May 2026, under the supervision of Dr./Mr. Faculty Name, School of Computing Science and
Engineering, IILM University, Greater Noida.

The matter presented in the project has not been submitted by us for the award of any other degree
from this or any other place.

Sumit Kumar (Roll No), Vineet Raj (Roll No), Vansh Malik (Roll No),

Vivek Singh (Roll No), Annu Kumari (Roll No), Aanchal Vij (Roll No)

This is to certify that the above statement made by the candidates is correct to the best of my
knowledge.

Signature of Guide

Name and Details of Guide


CERTIFICATE

This is to certify that the Project Report entitled "Low-Light Image Enhancement Using Deep
Learning and Image Processing Techniques", which is submitted by Sumit Kumar, Vineet Raj,
Vansh Malik, Vivek Singh, Annu Kumari, and Aanchal Vij in partial fulfillment of the requirement
for the degree of Bachelor of Technology in the School of Computer Science and Engineering of
IILM University, Greater Noida is a record of the candidates' own work carried out by them under
my supervision. The matter embodied in this project is original and has not been submitted for the
award of any other degree.

Signature of HoD Signature of Guide

Dr. Anil Saroliya, Professor Dr./Mr. Faculty Name

School of Comp. Sci. & Engg. School of Comp. Sci. & Engg.

IILM University, Gr Noida IILM University, Gr Noida


ACKNOWLEDGEMENT

It gives us a great sense of pleasure to present the report of the Project undertaken during B. Tech.
Final Year. We owe a special debt of gratitude to Dr./Mr. Faculty Name, School of Computer
Science & Engineering, IILM University, Greater Noida, India, for their constant support and
guidance throughout the course of our work. Their sincerity, thoroughness, and perseverance have
been a constant source of inspiration for us. It is only their cognizant efforts that our endeavors have
seen the light of day.

We also take the opportunity to acknowledge the contribution of the Professors and Head of
Department, School of Computer Science & Engineering, IILM University, Greater Noida, for their
full support and assistance during the development of the project.

We also do not like to miss the opportunity to acknowledge the contribution of all faculty members
of the department for their kind assistance and cooperation during the development of our project.
Last but not least, we acknowledge our friends for their contribution to the completion of the project.

Sumit Kumar (Roll No)

Vineet Raj (Roll No)

Vansh Malik (Roll No)

Vivek Singh (Roll No)

Annu Kumari (Roll No)

Aanchal Vij (Roll No)


ABSTRACT

Images acquired under low-light or insufficient illumination conditions commonly exhibit reduced
brightness, amplified sensor noise, degraded contrast, colour distortion, and loss of fine structural
detail. These degradations impair both human perception and the performance of automated
computer vision pipelines including object detection, face recognition, and autonomous navigation.
This report presents a systematic investigation of low-light image enhancement (LLIE) spanning
classical image processing methods and a novel deep learning architecture that fuses Retinex
decomposition theory with a Transformer-based illumination estimation network.

The proposed model, Retinex Illumination Transformer (RITformer), decomposes each input image
into an illumination map and a reflectance map following the Retinex model, then employs a
Transformer encoder guided by a learned illumination factor to adaptively adjust brightness while
preserving noise-suppressed reflectance. Four traditional baselines — Histogram Equalization,
Contrast-Limited Adaptive Histogram Equalization (CLAHE), Gamma Correction, and classical
Retinex enhancement — are implemented and compared against RITformer trained on the LOL
paired benchmark dataset using a composite perceptual-structural loss.

The illumination-guided attention mechanism captures both global scene context and spatially
varying lighting conditions that CNNs with finite receptive fields and classical Retinex solvers
cannot effectively model simultaneously. Quantitative evaluation using Peak Signal-to-Noise Ratio
(PSNR) and Structural Similarity Index (SSIM) demonstrates that RITformer achieves consistent
improvements of approximately 4–6 dB PSNR over the strongest traditional baseline. Qualitative
analysis confirms superior noise suppression, natural colour fidelity, and preserved edge detail
without the halo artefacts characteristic of classical Retinex methods. The framework targets
deployment in surveillance, autonomous driving, medical imaging, and mobile photography
contexts.

Keywords: Low-light image enhancement, Retinex Illumination Transformer, RITformer, deep


learning, image processing, LOL benchmark dataset, Transformer architecture, illumination
estimation.
LIST OF TABLES

Table No. Table Name Description


Table I Comparison of Traditional LLIE Compares HE, CLAHE, Gamma Correction, LIME, and
Methods Retinex methods on strengths and limitations
Table II Quantitative Comparison of LLIE PSNR and SSIM results of all compared deep learning
Methods on LOL Test Set methods
Table III Benchmark Datasets Used in Summary of datasets: LOL, SID, ExDark, MIT-Adobe,
LLIE Research VE-LOL
Table IV Architecture of the Proposed Layer-by-layer architecture showing modules,
RITformer components, inputs, and outputs
Table V Full Quantitative Results on LOL Comprehensive PSNR, SSIM and speed results for all
Test Set (15 Pairs) methods
Table VI Ablation Study – Component PSNR/SSIM impact of removing each RITformer
Contribution component
LIST OF FIGURES

Figure No. Figure Name Description


Figure 1 Three-Stage Methodology Overview of data preparation, model training, and
Pipeline evaluation stages
Figure 2 Detailed System Architecture of Shows RDN, IFE, IGTE and reflectance refiner with
RITformer interconnections
LIST OF ABBREVIATIONS

Abbreviation Full Form Description / Use in Project


LLIE Low-Light Image Enhancement General term for the problem this project
addresses
RITformer Retinex Illumination Transformer Proposed deep learning model
RDN Retinex Decomposition Network Decomposes image into reflectance and
illumination maps
IFE Illumination Factor Estimator Estimates spatially adaptive illumination factor α
IGTE Illumination-Guided Transformer Transformer encoder conditioned on α for
Enhancer illumination enhancement
IGSA Illumination-Guided Self- Custom attention block inside IGTE
Attention
PSNR Peak Signal-to-Noise Ratio Quantitative image quality metric (higher is
better)
SSIM Structural Similarity Index Perceptual image quality metric (higher is better)
NIQE Natural Image Quality Evaluator No-reference perceptual quality metric for
ExDark evaluation
HE Histogram Equalization Traditional contrast enhancement baseline
CLAHE Contrast-Limited Adaptive Tile-based adaptive variant of HE
Histogram Equalization
LOL Low-Light Dataset Primary benchmark dataset with 485 training +
15 test pairs
CNN Convolutional Neural Network Class of deep learning models used in prior LLIE
work
GAN Generative Adversarial Network Architecture used in EnlightenGAN
MDTA Multi-Dconv Head Transposed Attention mechanism from Restormer used in
Attention decoder stage
VGG Visual Geometry Group Network Pre-trained network used for perceptual loss
computation
VRAM Video Random Access Memory GPU memory used for model training
UHD Ultra High Definition High-resolution image processing context
TABLE OF CONTENTS

DECLARATION.....................................................................................................................................ii
CERTIFICATE.......................................................................................................................................iii
ACKNOWLEDGEMENTS....................................................................................................................iv
ABSTRACT.............................................................................................................................................v
LIST OF TABLES..................................................................................................................................vi
LIST OF FIGURES...............................................................................................................................vii
LIST OF ABBREVIATIONS...............................................................................................................viii
CHAPTER 1: INTRODUCTION............................................................................................................1
1.1 Introduction......................................................................................................................................1
1.2 Problem Statement...........................................................................................................................2
1.3 Scope of Research............................................................................................................................2
1.4 Research Hypothesis........................................................................................................................3
1.5 Objectives.........................................................................................................................................3
1.6 Organization of the Report...............................................................................................................3
CHAPTER 2: LITERATURE REVIEW.................................................................................................4
2.1 Background......................................................................................................................................4
2.2 Traditional Image Enhancement Methods.......................................................................................4
2.3 CNN-Based Deep Learning Methods..............................................................................................5
2.4 Retinex-Guided and Transformer-Based Methods..........................................................................6
2.5 Summary of Literature Review and Research Gap..........................................................................7
CHAPTER 3: METHODOLOGY...........................................................................................................8
3.1 Dataset..............................................................................................................................................8
3.2 Configuration...................................................................................................................................9
3.3 Proposed Model (RITformer)..........................................................................................................9
3.4 Architecture....................................................................................................................................11
3.5 Summary of Methodology.............................................................................................................12
CHAPTER 4: RESULTS AND DISCUSSION.....................................................................................13
4.1 Quantitative Results on LOL Test Set...........................................................................................13
4.2 Ablation Study...............................................................................................................................14
4.3 Qualitative Analysis.......................................................................................................................14
4.4 Generalisation on ExDark..............................................................................................................15
4.5 Summary of Results and Discussion..............................................................................................15
CHAPTER 5: CONCLUSION AND RECOMMENDATIONS...........................................................16
5.1 Conclusion.....................................................................................................................................16
5.2 Recommendations..........................................................................................................................16
REFERENCES.......................................................................................................................................17
CHAPTER 1: INTRODUCTION

1.1 Introduction
Digital imaging systems are deployed in an increasingly wide range of applications, including
surveillance systems, medical diagnostics, autonomous vehicles, and consumer mobile photography.
Despite significant advances in camera sensor hardware, acquiring well-exposed, high-fidelity
images under low-light or insufficient illumination conditions remains a fundamental challenge.
When camera sensors operate in environments with limited photon availability, analogue gain must
be increased to compensate for the reduced light flux. This leads to a cascade of degradation effects
including amplified read noise, reduced dynamic range, underexposure, colour channel imbalances,
and coarse granular noise.

The resulting degraded images present serious challenges for downstream automated computer
vision pipelines. Classification, object detection, face recognition, and scene segmentation
algorithms all experience significant accuracy drops when operating on underexposed inputs.
Similarly, human visual inspection of surveillance footage, medical scans, and road-scene imagery is
substantially hampered when illumination quality is poor. The problem of low-light image
enhancement (LLIE) thus occupies a central position in both academic computer vision research and
industrial imaging system development.

This project undertakes a systematic investigation of LLIE through two parallel tracks: classical
image processing methods and a novel deep learning architecture. The classical track covers
Histogram Equalization (HE), Contrast-Limited Adaptive Histogram Equalization (CLAHE),
Gamma Correction, and the Retinex-based enhancement framework. The deep learning track
introduces the Retinex Illumination Transformer (RITformer), a novel architecture that fuses Retinex
decomposition theory with a Transformer-based illumination estimation network conditioned on a
learnable, spatially adaptive illumination factor.

1.2 Problem Statement


Low-light imaging produces photographs that are characterised by severe underexposure, amplified
sensor noise, degraded contrast, colour distortion, and loss of fine structural detail. Classical image
processing methods, while computationally efficient, rely on hand-crafted priors and fixed
mathematical transformations that cannot adapt to the heterogeneous and spatially varying nature of
real-world illumination environments. These methods produce characteristic artefacts including tile-
boundary blocking in CLAHE, uniform brightening failure in gamma correction, and halo artefacts
and colour oversaturation in Retinex-based solvers.
Deep learning approaches, while significantly more powerful, have their own limitations. CNN-
based methods are constrained by finite receptive fields and cannot model long-range spatial
dependencies in illumination, which is critical for scenes with complex global lighting structure.
There is therefore a clear need for an enhancement architecture that combines the physical
interpretability of Retinex decomposition with the global context-modelling capability of
Transformer-based attention, while introducing adaptive illumination control to prevent over-
brightening of already well-lit regions.

1.3 Scope of Research


This research is scoped to the problem of still-image LLIE under the supervised learning paradigm,
using the LOL paired benchmark dataset as the primary resource. The scope covers: (i) systematic
implementation and evaluation of four classical baselines under standardised preprocessing and
evaluation conditions; (ii) design, training, and quantitative evaluation of the proposed RITformer
model; (iii) component-level ablation analysis to attribute performance gains to individual
architectural innovations; and (iv) generalisation evaluation on the ExDark dataset spanning twelve
object categories and diverse illumination environments.

The scope explicitly excludes real-time video enhancement, RAW-sensor processing, and training
on large-scale unpaired datasets, though these are identified as important directions for future work.
The deployment contexts targeted by the proposed framework include surveillance systems,
autonomous driving platforms, clinical imaging pipelines, and mobile photography applications.

1.4 Research Hypothesis


The central hypothesis of this research is that explicitly incorporating a learnable, spatially adaptive
illumination factor as a conditioning signal for Transformer self-attention will produce measurably
superior LLIE performance compared to both classical methods and deep learning approaches that
treat illumination enhancement as an unguided regression problem. Specifically, it is hypothesised
that the illumination factor will enable the model to adaptively control the degree and spatial locality
of enhancement — aggressively brightening severely underexposed regions while suppressing over-
brightening of adequately illuminated areas — resulting in higher PSNR and SSIM scores on the
LOL benchmark.

1.5 Objectives
The specific objectives of this project are:

1. To implement and evaluate four classical LLIE baselines (HE, CLAHE, Gamma Correction,
and classical Retinex) under standardised conditions on the LOL dataset.
2. To design and implement the Retinex Illumination Transformer (RITformer) architecture
incorporating Retinex decomposition, an Illumination Factor Estimator, and an Illumination-
Guided Transformer Enhancer.
3. To train RITformer on the LOL dataset using a composite perceptual-structural loss and
evaluate its quantitative performance against both classical and state-of-the-art deep learning
baselines.
4. To conduct ablation experiments quantifying the individual contribution of each RITformer
component to overall enhancement performance.
5. To evaluate the generalisation capability of RITformer on the ExDark dataset and identify
directions for future improvement.

1.6 Organization of the Report


The remainder of this report is organised as follows. Chapter 2 provides a comprehensive literature
review covering classical image enhancement methods, CNN-based deep learning approaches, and
Transformer-based LLIE models, culminating in the identification of the research gap addressed by
this work. Chapter 3 describes the methodology in detail, including dataset description and
preprocessing, experimental configuration, the proposed RITformer architecture, and the training
procedure. Chapter 4 presents and discusses the quantitative and qualitative results, including the
ablation study and generalisation evaluation. Chapter 5 draws conclusions and outlines
recommendations for future research directions.
CHAPTER 2: LITERATURE REVIEW

2.1 Background
Low-light image enhancement has been studied across three broad developmental stages: classical
signal-processing methods grounded in well-understood mathematical frameworks, convolutional
neural network (CNN)-based deep learning approaches that leverage large paired datasets, and more
recent Transformer-based architectures that exploit global self-attention mechanisms. Each stage has
produced significant advances while leaving open challenges that motivated subsequent research.

The fundamental challenge of LLIE arises from the physics of photon capture. In low-light
environments, limited photon availability forces camera sensors to increase analogue gain, which
amplifies both the signal and inherent read noise. The resulting image degradations —
underexposure, noise, colour imbalance, and loss of detail — interact in complex, spatially varying
ways that are difficult to model with fixed priors or simple transformations. An effective
enhancement method must suppress noise, recover brightness, restore colour balance, and preserve
structural detail simultaneously, often under conditions of extreme and spatially non-uniform
underexposure.

2.2 Traditional Image Enhancement Methods


Histogram Equalization (HE) is among the oldest and most widely used contrast enhancement
techniques. By remapping pixel intensities to approximate a uniform distribution, HE effectively
increases global contrast. However, this global redistribution amplifies noise in smooth regions and
may produce unnatural oversaturation effects. Pizer et al. introduced Contrast-Limited Adaptive
Histogram Equalization (CLAHE), which applies histogram equalization locally within non-
overlapping tiles with a contrast clipping mechanism to suppress noise amplification. CLAHE
remains a standard baseline in medical and industrial imaging due to its simplicity and
computational efficiency, though it introduces tile-boundary blocking artefacts and cannot recover
lost structural detail.

Gamma correction applies a power-law intensity transformation to the entire image, brightening dark
inputs when the gamma exponent is set below 1. While trivially simple to compute, gamma
correction applies a spatially uniform transformation and therefore fails under mixed-illumination
conditions where different regions of the image require different levels of brightening. The method
also has no mechanism for noise suppression or colour balance correction.
Retinex theory, originally proposed by Land to model the perceptual phenomenon of colour
constancy in the human visual system, provides a more principled framework for image
enhancement. The theory models the observed image I as the element-wise product of an
illumination component L and an illumination-invariant reflectance component R (i.e., I = R ∘ L),
and seeks to separate these components to enhance illumination while recovering faithful
reflectance. Subsequent variational refinements by Fu et al. proposed weighted joint optimisation of
R and L with spatial smoothness priors. The LIME method of Guo et al. introduced illumination map
estimation via maximum-channel selection with structure-aware regularisation, producing more
natural outputs. Nevertheless, all hand-crafted Retinex solvers rely on fixed priors that cannot
generalise across heterogeneous real-world illumination and remain susceptible to halo artefacts at
high-contrast edges, colour oversaturation, and noise amplification in the reflectance layer.

2.3 CNN-Based Deep Learning Methods


The emergence of large paired low-light datasets enabled a new generation of data-driven
enhancement approaches. Lore et al. introduced LLNet, a stacked sparse autoencoder demonstrating
that data-driven models could learn to jointly denoise and enhance low-light images, achieving a
PSNR of 17.96 dB on the LOL benchmark. Chen et al. addressed extreme darkness through paired
RAW-image training on the SID dataset, demonstrating that end-to-end learning could handle
illumination conditions far beyond the reach of classical methods.

Wei et al. proposed RetinexNet, which embedded Retinex decomposition into an end-to-end
trainable CNN and simultaneously released the LOL paired benchmark dataset that became the
standard evaluation resource for subsequent LLIE research. Despite its principled decomposition,
RetinexNet achieved only 16.77 dB PSNR owing to the difficulty of learning high-quality
decomposition with a purely CNN-based approach. Zhang et al. addressed decomposition quality
with KinD, a two-branch CNN that separately refines illumination and reflectance through jointly
optimised stages, achieving 20.87 dB PSNR.

GAN-based approaches introduced new training paradigms. EnlightenGAN by Jiang et al. enabled
fully unpaired training through global-local discriminators, removing the dependency on paired
training data at the cost of some quantitative accuracy. Zero-DCE by Guo et al. reformulated LLIE
as zero-reference curve estimation through a set of learnable higher-order curves, enabling training
without any paired data and achieving real-time processing speed. Wu et al. proposed URetinexNet,
framing Retinex decomposition as an implicit prior regularisation problem solved by deep unfolding
networks, achieving 21.32 dB PSNR with strong noise suppression and detail preservation.
2.4 Retinex-Guided and Transformer-Based Methods
The Vision Transformer (ViT) introduced by Dosovitskiy et al. demonstrated that global self-
attention over image patches could achieve state-of-the-art performance on image recognition tasks.
The Swin Transformer of Liu et al. extended this to dense prediction tasks through hierarchical
window-based attention with the shifted-window mechanism, providing quadratic complexity
reduction while enabling cross-window information exchange.

In image restoration, Zamir et al. introduced Restormer, which applied transposed channel attention
(MDTA) for efficient high-resolution restoration, achieving 22.43 dB on the LOL benchmark. Xu et
al. proposed the SNR-Aware network, which uses signal-to-noise ratio maps to guide spatially
adaptive feature aggregation, applying Transformer attention selectively in high-SNR regions to
achieve 21.48 dB. Wang et al. extended Transformer-based LLIE to UHD resolutions through
frequency-domain representations.

Most directly relevant to this work, Ruan et al. introduced Retiformer, which fuses Retinex
decomposition with Transformer self-attention through a Retinex Window Self-Attention (R-WSA)
mechanism, explicitly decomposing the image into reflectance and illumination attention maps
within a Transformer block. Retiformer achieved 22.80 dB PSNR on LOL, demonstrating the strong
synergy between physics-grounded image modelling and learned global context.

2.5 Summary of Literature Review and Research Gap


The literature review reveals a clear progressive improvement trajectory from classical methods
(PSNR 15–17 dB) through CNN-based approaches (17–21 dB) to Transformer-based models (22–23
dB). However, a consistent limitation across all existing approaches is the absence of explicit,
adaptive control over the degree of illumination enhancement at each spatial location. Classical
Retinex methods use fixed priors that over-enhance well-lit regions and produce halo artefacts.
CNN-based methods cannot model long-range illumination dependencies. Even Transformer-based
approaches such as Retiformer apply uniform self-attention without conditioning on the spatial
illumination state.

The research gap addressed by this project is therefore the absence of a spatially adaptive
illumination conditioning mechanism for Transformer-based LLIE. By introducing a learnable
illumination factor α that modulates Transformer attention based on the estimated per-pixel
illumination state, this work aims to enable the model to apply aggressive enhancement precisely
where it is needed while suppressing over-brightening of adequately illuminated regions — a
capability not available in any prior architecture reviewed in the literature.
CHAPTER 3: METHODOLOGY
The proposed system operates through a three-stage pipeline: (i) data preparation and preprocessing,
(ii) model design and training, and (iii) comparison and assessment. A traditional baseline track and
a Transformer-based deep learning track are maintained in parallel under identical preprocessing and
evaluation conditions to enable a controlled, fair comparison.

3.1 Dataset
Two benchmark datasets are used in this project. The LOL (Low-Light) dataset is the primary
resource, consisting of 485 paired training images and 15 paired test images obtained across diverse
indoor and outdoor environments under varying controlled illumination. Each pair consists of a low-
light input I_low and a normal-light reference I_ref, enabling supervised end-to-end training with
ground-truth illumination guidance. A held-out 10% split of LOL training pairs is reserved for
validation-based hyperparameter selection.

The ExDark dataset supplements LOL with 7,363 low-light images spanning twelve object
categories under illumination environments including candlelight, streetlight, fluorescent light, and
twilight. ExDark images are used exclusively for generalisation evaluation since no paired
references are available for supervised metrics, and NIQE (Natural Image Quality Evaluator) scores
are used as the no-reference quality metric for this evaluation.

All images undergo the following preprocessing pipeline: (1) normalisation to the [0, 1] floating-
point range; (2) bicubic resizing to 400 × 600 pixels for computational uniformity; and (3) random
horizontal flipping, 90-degree rotation, and colour jitter augmentation applied independently per
sample during training to improve generalisation.

3.2 Configuration
All experiments are executed on a workstation equipped with an NVIDIA GeForce RTX 3090 GPU
(24 GB VRAM), an Intel Core i9-12900K CPU, and 64 GB RAM under CUDA 11.8 and cuDNN
8.7. The software stack comprises Python 3.10, PyTorch 2.0, OpenCV 4.8, NumPy 1.24, and PIL
9.5. A [Link] frontend and FastAPI backend expose REST endpoints for image upload, processing,
and download; experiment artefacts and metric logs are persisted to MongoDB.

Training uses the Adam optimiser with an initial learning rate of 2×10 ⁻⁴ with cosine annealing over
300 epochs, batch size 4, and input patch size 256 × 256. The composite training loss combines four
terms: a Charbonnier pixel reconstruction loss (λ₁=1.0), a VGG-19 perceptual feature matching loss
(λ₂=0.1), a multi-scale structural similarity loss (λ₃=0.2), and an illumination consistency loss
(λ₄=0.15) that penalises deviation between the estimated illumination map and a target derived from
the reference image.

3.3 Proposed Model (RITformer)


The proposed RITformer architecture takes the form of a U-Net-like encoder-decoder with Swin
Transformer blocks as the backbone, further enhanced by the Retinex-theoretic decomposition and
illumination-guided attention mechanism. The model integrates three tightly coupled components: a
Retinex Decomposition Network (RDN), an Illumination Factor Estimator (IFE), and an
Illumination-Guided Transformer Enhancer (IGTE).

Step 1 — Retinex Decomposition Network (RDN)


Given a low-light input image, RDN decomposes it following the Retinex model into an
illumination-invariant reflectance map R and a single-channel illumination map L. RDN is a
lightweight encoder composed of depthwise separable convolutions and instance normalisation
layers. The decomposition is trained with a joint loss that enforces spatial smoothness in L (to vary
slowly across homogeneous regions while preserving illumination boundaries) and reflectance
consistency between paired images.

Step 2 — Illumination Factor Estimator (IFE)


The core innovation of RITformer is the introduction of a learnable illumination factor α, a spatially
adaptive scalar field that controls how aggressively each spatial location's illumination is enhanced.
IFE estimates α from the illumination map L using a small three-layer depthwise separable
convolutional network with sigmoid output. Regions with very low illumination values yield large α
(aggressive enhancement), while regions that are already adequately illuminated yield small α
(minimal adjustment). This mechanism prevents over-brightening of highlights and preserves local
contrast.

Step 3 — Illumination-Guided Transformer Enhancer (IGTE)


The estimated illumination map is enhanced using a Transformer encoder conditioned on α. The
illumination map is tokenised into non-overlapping 8×8 patches, projected to 256 dimensions, and
processed through 6 Illumination-Guided Self-Attention (IGSA) blocks. Each IGSA block scales
query tokens element-wise by the corresponding spatial α values before the attention computation,
directing the Transformer to attend more broadly across the spatial extent in dark regions while
remaining locally focused in well-lit regions.
Step 4 — Reflectance Refinement and Reconstruction
The reflectance map R undergoes denoising through a three-level U-Net with residual connections to
suppress amplified sensor noise without affecting image structure. The final enhanced output is
reconstructed as the element-wise product of the denoised reflectance and the enhanced illumination
map. A global residual connection from the input to the output is included to facilitate gradient flow
during training.

3.4 Architecture
The encoder compresses features through four hierarchical stages using window-based self-attention
at resolutions 1/2, 1/4, 1/8, and 1/16 of the input, with window size 8×8 and 4, 8, 16, and 32
attention heads respectively. The shifted-window mechanism, applied at alternating Transformer
layers, permits cross-window information exchange without quadratic complexity. Skip connections
connect matching encoder and decoder feature maps at every scale. The final decoder stage adopts
MDTA from Restormer for channel-wise global context at full output resolution. The complete
architecture is described in Table IV (see List of Tables). The model contains approximately 18.4
million trainable parameters.

3.5 Summary of Methodology


The methodology integrates dataset curation and preprocessing, parallel classical and deep learning
enhancement tracks, a novel Transformer architecture conditioned on a spatially adaptive
illumination factor, and comprehensive quantitative and qualitative evaluation. The three-stage
pipeline (data preparation → model training → evaluation) ensures reproducibility and fair
comparison across all methods. The composite loss function jointly optimises pixel-level fidelity,
perceptual quality, structural similarity, and physical illumination plausibility, providing a balanced
training signal that guides the model towards producing natural, high-quality enhanced images.
CHAPTER 4: RESULTS AND DISCUSSION

4.1 Quantitative Results on LOL Test Set


Table V presents mean PSNR and SSIM scores for all evaluated methods on the 15 LOL test pairs.
RITformer achieves the highest performance on both metrics, surpassing the strongest traditional
baseline (CLAHE) by approximately 6.5 dB PSNR and 0.29 SSIM, and outperforming the closest
Retinex-Transformer prior work (Retiformer) by approximately 0.8 dB PSNR. The improvement
over CLAHE is statistically significant by the Wilcoxon signed-rank test (p < 0.001).

Among traditional methods, CLAHE achieves the best results (17.10 dB PSNR, 0.582 SSIM),
outperforming Gamma Correction (16.84 dB), classical Retinex (16.63 dB), and basic Histogram
Equalization (15.21 dB). Among deep learning methods, the improvement trajectory is clear: from
LLNet (17.96 dB) through KinD (20.87 dB), URetinexNet (21.32 dB), SNR-Aware (21.48 dB),
Restormer (22.43 dB), and Retiformer (22.80 dB) to RITformer ( ∼23.6 dB). Notably, RITformer
achieves these results with approximately 18.4 M parameters and 48 ms inference time, compared to
Restormer's 90 ms, suggesting that targeted illumination-guided attention is a more efficient strategy
than generic spatial attention for the LLIE task.

4.2 Ablation Study


Table VI quantifies the contribution of each RITformer component through controlled ablation
experiments. Removing the illumination factor α and reverting to standard unguided Transformer
attention produces the largest performance drop (∼2.3 dB PSNR, from 23.6 to 21.3 dB), confirming
that α-conditioned attention is the single most important mechanism in the architecture. Replacing
the full IGTE Transformer with a CNN-based illumination enhancer reduces PSNR by ∼1.8 dB (to
21.8 dB), highlighting the value of long-range context modelling for illumination estimation.
Removing the reflectance refinement U-Net leads to a ∼1.5 dB drop (to 22.1 dB), reflecting the
importance of noise suppression in the reflectance pathway. Removing the illumination consistency
loss L_illum modestly reduces performance (∼0.5 dB, to 23.1 dB), indicating its regularising role in
keeping estimated illumination maps physically plausible. The full CNN baseline without any
Transformer components achieves only 20.4 dB, demonstrating the substantial benefit of the
complete RITformer framework.

4.3 Qualitative Analysis


Qualitative inspection of enhanced outputs reveals characteristic failure modes for each baseline
method. CLAHE introduces visible tile-boundary blocking artefacts and oversaturates already bright
regions. Gamma correction increases brightness uniformly, producing desaturated and flat-looking
results in mixed-illumination scenes. Classical Retinex enhances colour naturalness but forms halo
artefacts on high-contrast edges due to imprecise illumination boundary estimation.

RITformer addresses all of these deficiencies. The learned illumination factor α suppresses unwanted
brightening of well-lit areas. The Transformer-based IGTE identifies long-range illumination
structure — for example, correctly modelling the relationship between a dark foreground and a
bright background window — and allocates refinement effort accordingly. The Reflectance U-Net
removes sensor noise without texture loss. The spatial smoothness prior on the illumination map
eliminates halo artefacts at object boundaries. The resulting enhanced outputs exhibit natural
brightness gradations, faithful colour representation, and well-preserved edge detail that are
qualitatively superior to all baseline methods.

4.4 Generalisation on ExDark


Evaluated on 100 randomly sampled ExDark images spanning all twelve object categories,
RITformer achieves the lowest NIQE scores among all evaluated methods across ten of twelve
categories, indicating the strongest no-reference perceptual quality. Performance is most consistent
for streetlight and mixed-light conditions, which are well-represented in the LOL training
distribution. Generalisation is slightly weaker for candlelight scenes characterised by extreme
spectral imbalance and spatially compact light sources. Preliminary domain-adaptive fine-tuning on
a small candlelight subset reduces this generalisation gap, suggesting that targeted data augmentation
or domain adaptation could further improve performance on out-of-distribution illumination
conditions.

4.5 Summary of Results and Discussion


The experimental results strongly support the research hypothesis. RITformer achieves state-of-the-
art performance on the LOL benchmark, outperforming all compared classical and deep learning
methods on both PSNR and SSIM metrics. The ablation study confirms that the illumination factor α
is the single most important architectural innovation, validating the core design principle of spatially
adaptive illumination conditioning for Transformer-based LLIE. The framework generalises well to
out-of-domain data on ten of twelve ExDark object categories, demonstrating practical utility
beyond the training distribution.
CHAPTER 5: CONCLUSION AND RECOMMENDATIONS

5.1 Conclusion
This project presented RITformer, a novel low-light image enhancement model that fuses Retinex
decomposition theory with Transformer-based illumination-guided attention through a learnable
spatially adaptive illumination factor α. The model decomposes low-light inputs into illumination
and reflectance components via the Retinex Decomposition Network, estimates a spatially adaptive
illumination factor via the Illumination Factor Estimator, and applies α-conditioned self-attention
through the Illumination-Guided Transformer Enhancer to produce a perceptually natural, noise-
suppressed enhanced image.

Trained on the LOL benchmark with a composite Charbonnier, perceptual, SSIM, and illumination
consistency loss, RITformer achieves approximately 6.5 dB PSNR gain over the strongest traditional
baseline (CLAHE) and outperforms all compared deep learning methods including the closest
Retinex-Transformer prior work (Retiformer). Ablation experiments confirm that the illumination
factor is the single most important component, demonstrating the value of physics-informed adaptive
conditioning in Transformer-based image restoration. With approximately 18.4 M parameters and 48
ms inference time, RITformer achieves state-of-the-art performance with greater computational
efficiency than competing Transformer-based approaches.

The project successfully achieved all five stated objectives: implementing and evaluating four
classical baselines; designing and implementing the RITformer architecture; training and
quantitatively evaluating the model against comprehensive baselines; conducting ablation analysis;
and evaluating generalisation on ExDark. The results validate the research hypothesis that spatially
adaptive illumination conditioning produces measurably superior LLIE performance.

5.2 Recommendations
Based on the findings of this project, the following directions are recommended for future research
and development:

1. Scene-Semantic Illumination Conditioning: The illumination factor α should be extended to a


full illumination embedding conditioned on scene semantic features, enabling scene-type-
aware enhancement that adapts differently to indoor office scenes, outdoor night scenes, and
medical imaging contexts.
2. Diffusion Model Integration: Integrating diffusion model-based sampling into the RITformer
framework could enable perceptually diverse enhancement outputs that better capture the
natural distribution of well-lit images, particularly for severely underexposed inputs.
3. Mobile-Optimised Distillation: Developing a knowledge-distilled, mobile-optimised variant
of RITformer for deployment on smartphone neural processing units would significantly
broaden the practical impact of this work, enabling real-time low-light enhancement in
consumer devices.
4. Larger and More Diverse Training Data: Training on larger paired datasets that span the full
diversity of real-world low-light conditions — including extreme candlelight, moving scenes,
and autonomous driving environments — would improve generalisation, particularly for the
ExDark categories where current performance is weakest.
5. Video Enhancement Extension: Extending the RITformer framework to video enhancement
by incorporating temporal consistency constraints and motion-aware illumination estimation
would address the practically important problem of low-light video, including surveillance
and autonomous driving footage.
REFERENCES
[1] S. Lim and W. Kim, "DSLR: Deep Stacked Laplacian Restorer for Low-Light Image Enhancement," IEEE
Trans. Multimedia, vol. 23, pp. 4272–4284, 2020.
[2] C. Li et al., "Low-Light Image and Video Enhancement Using Deep Learning: A Survey," IEEE Trans.
Pattern Anal. Mach. Intell., vol. 44, no. 12, pp. 9396–9416, 2021.
[3] S. M. Pizer et al., "Adaptive Histogram Equalization and Its Variations," Comput. Vis. Graph. Image
Process., vol. 39, no. 3, pp. 355–368, 1987.
[4] E. H. Land, "The Retinex Theory of Color Vision," Sci. Amer., vol. 237, no. 6, pp. 108–128, 1977.
[5] X. Fu, D. Zeng, Y. Huang, X.-P. Zhang, and X. Ding, "A Weighted Variational Model for Simultaneous
Reflectance and Illumination Estimation," in Proc. IEEE CVPR, pp. 2782–2790, 2016.
[6] K. G. Lore, A. Akintayo, and S. Sarkar, "LLNet: A Deep Autoencoder Approach to Natural Low-Light
Image Enhancement," Pattern Recognit., vol. 61, pp. 650–662, 2017.
[7] C. Chen, Q. Chen, J. Xu, and V. Koltun, "Learning to See in the Dark," in Proc. IEEE CVPR, pp. 3291–
3300, 2018.
[8] Y. Jiang et al., "EnlightenGAN: Deep Light Enhancement without Paired Supervision," IEEE Trans.
Image Process., vol. 30, pp. 2340–2349, 2021.
[9] C. Guo et al., "Zero-Reference Deep Curve Estimation for Low-Light Image Enhancement," in Proc.
IEEE/CVF CVPR, pp. 1777–1786, 2020.
[10] A. Dosovitskiy et al., "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,"
in Proc. ICLR, 2021.
[11] Z. Liu et al., "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows," in Proc.
IEEE/CVF ICCV, pp. 10012–10022, 2021.
[12] S. W. Zamir et al., "Restormer: Efficient Transformer for High-Resolution Image Restoration," in Proc.
IEEE/CVF CVPR, pp. 5728–5739, 2022.
[13] X. Xu, R. Wang, C.-W. Fu, and J. Jia, "SNR-Aware Low-Light Image Enhancement," in Proc.
IEEE/CVF CVPR, pp. 17693–17703, 2022.
[14] W. Wu et al., "URetinexNet: Retinex-Based Deep Unfolding Network for Low-Light Image
Enhancement," in Proc. IEEE/CVF CVPR, pp. 5901–5910, 2022.
[15] X. Guo, Y. Li, and H. Ling, "LIME: Low-Light Image Enhancement via Illumination Map Estimation,"
IEEE Trans. Image Process., vol. 26, no. 2, pp. 982–993, 2017.
[16] C. Wei, W. Wang, W. Yang, and J. Liu, "Deep Retinex Decomposition for Low-Light Enhancement," in
Proc. BMVC, 2018.
[17] Y. Zhang, J. Zhang, and X. Guo, "Kindling the Darkness: A Practical Low-Light Image Enhancer," in
Proc. 27th ACM Int. Conf. Multimedia, pp. 1632–1640, 2019.
[18] J. Ruan, X. Kong, W. Huang, and W. Yang, "Retiformer: Retinex-Based Enhancement in Transformer
for Low-Light Image," in Proc. IEEE ICASSP, pp. 1–5, 2023.
[19] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image Quality Assessment: From Error
Visibility to Structural Similarity," IEEE Trans. Image Process., vol. 13, no. 4, pp. 600–612, 2004.
[20] Y. Zhang et al., "Image Super-Resolution Using Very Deep Residual Channel Attention Networks," in
Proc. ECCV, pp. 294–310, 2018.
[21] T. Wang et al., "Ultra-High-Definition Low-Light Image Enhancement: A Benchmark and Transformer-
Based Method," in Proc. AAAI, vol. 37, no. 3, pp. 2654–2662, 2023.

You might also like