- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| cidnet | ||
| input | ||
| methods | ||
| output | ||
| results | ||
| retinex | ||
| .gitignore | ||
| cidnet_boat.png | ||
| evaluate.py | ||
| he.py | ||
| image_resize.py | ||
| metrics.py | ||
| README.md | ||
| requirements.txt | ||
| test_cidnet.py | ||
Image Enhancement Comparison Framework
Overview
The Image Enhancement Comparison Framework is a standalone benchmarking framework for evaluating classical, deep learning, and quantum-assisted image enhancement algorithms using a unified evaluation pipeline.
The framework automatically processes a set of input images, applies multiple enhancement methods, computes objective image quality metrics, and saves both the enhanced images and evaluation results.
Features
-
Classical image enhancement methods
- Histogram Equalization (HE)
- Contrast Limited Adaptive Histogram Equalization (CLAHE)
-
Deep learning methods
- RetinexFormer
- CIDNet
-
Quantum-assisted methods
- Adaptive Image Enhancement through Quantum Variance Maximization (AIEQVM)
-
Automatic computation of image quality metrics
-
Automatic generation of
- Enhanced images
- CSV summary
- Excel summary
Directory Structure
ImageEnhancementComparison/
│
├── input/ # Input images
│
├── output/ # Generated results
│ ├── HE/
│ ├── CLAHE/
│ ├── RetinexFormer/
│ ├── CIDNet/
│ └── AIEQVM/
│
├── methods/ # Wrapper classes for enhancement methods
│
├── retinex/ # RetinexFormer implementation and weights
│
├── cidnet/ # CIDNet implementation and weights
│
├── evaluate.py # Main evaluation script
├── metrics.py # Image quality metrics
├── requirements.txt
└── README.md
Installation
Install all required packages.
pip install -r requirements.txt
Input Images
Place all test images inside the input/ directory.
Example:
input/
Boat.png
Lena.png
Cloth.png
Peppers.png
Supported image formats include
- PNG
- JPG
- JPEG
- BMP
- TIFF
Running the Framework
Execute
python evaluate.py
The framework automatically
- Reads every image from the input folder.
- Applies all enabled enhancement methods.
- Computes evaluation metrics.
- Saves enhanced images.
- Generates CSV and Excel reports.
Output
After execution, the following structure is generated.
output/
│
├── HE/
├── CLAHE/
├── RetinexFormer/
├── CIDNet/
├── AIEQVM/
│
├── metrics_summary.csv
└── metrics_summary.xlsx
Image Quality Metrics
The framework computes the following objective metrics.
| Metric | Description |
|---|---|
| Variance | Image contrast |
| CII | Contrast Improvement Index |
| Entropy | Information content |
| PSNR | Peak Signal-to-Noise Ratio |
| SSIM | Structural Similarity Index |
| NIQE | Natural Image Quality Evaluator |
| BRISQUE | Blind/Referenceless Image Spatial Quality Evaluator |
| LPIPS | Learned Perceptual Image Patch Similarity |
Adding a New Enhancement Method
Create a new wrapper inside the methods/ directory.
Each enhancement method should implement
enhanced_rgb, enhanced_Y, original_Y = enhancer.enhance(image_rgb)
where
image_rgbis the RGB input imageenhanced_rgbis the enhanced RGB imageenhanced_Yis the luminance channel of the enhanced imageoriginal_Yis the luminance channel of the original image
After creating the wrapper,
- Import the class in
evaluate.py. - Instantiate the class.
- Add it to the
METHODSdictionary.
No further changes are required.
Notes
- CIDNet is loaded from the locally stored
model.safetensorsfile. - RetinexFormer uses locally stored pretrained weights.
- No internet connection is required after the pretrained models are available locally.
Citation
If you use this framework in your research, please cite the corresponding publications describing the enhancement methods and evaluation metrics.
License
This framework is intended for academic research and educational purposes.