Major Project Report RITformer
Major Project Report RITformer
On
BACHELOR OF TECHNOLOGY
DEGREE
Session 2025-26
in
Computer Science and Engineering
By
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
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.
School of Comp. Sci. & Engg. School of Comp. Sci. & Engg.
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.
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.
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.
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.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.
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.
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.
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.
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.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.
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.
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.
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: