This is a codebase for evaluating Image Denoising and Enhancement tasks, supporting both reference-based and no-reference metrics.
- Reference-based: PSNR, SSIM, LPIPS, FID
- No-reference: UIQM, UCIQE (Underwater Image Quality/Colorfulness Measures)
Install dependencies using:
pip install -r requirements.txtKey dependencies: torch, numpy, scipy, opencv-python, scikit-image, tqdm, lpips, pytorch_fid, threadpoolctl.
Use main.py to evaluate multiple methods across multiple datasets at once using a configuration file.
python main.py --config config.jsonThe configuration file allows you to define global settings and dataset-specific paths:
device:cudaorcpu.all_metrics: Iftrue, computes UIQM and UCIQE even if Ground Truth is available.output_path: Directory where CSV results and logs will be saved.datasets: A dictionary where each key is a dataset name, containing:parentFolder: Root path for the dataset.gt_dir: Subfolder containing ground truth images.fid_gt_cache: (Optional) Path to a.npzfile containing precomputed FID statistics for the GT.pred_dir: A dictionary mapping Method Names to their respective result subfolders.
Use compute.py for a quick comparison between two specific folders (Predicted vs. Ground Truth).
python compute.py -p /path/to/predicted_images -g /path/to/ground_truth_imagesFeatures:
- Auto-device detection: Automatically uses CUDA if available.
- Resource protection: Limits BLAS threads during FID calculation to prevent system hangs.
- Speed: GPU-accelerated LPIPS and FID feature extraction.
Use unref.py to calculate UIQM and UCIQE for a single folder of images without requiring ground truth.
python unref.py --folder /path/to/images --output results.txt| Script | Parameter | Description |
|---|---|---|
main.py |
--config, -c |
Path to the JSON configuration file. |
compute.py |
--pred_dir, -p |
Directory of predicted images. |
compute.py |
--gt_dir, -g |
Directory of ground truth images. |
compute.py |
--device |
Device to use (auto/cpu/cuda). |
compute.py |
--strict_check, -s |
Ensure filenames match exactly between folders. |
unref.py |
--folder, -f |
Directory of images to evaluate. |
unref.py |
--output, -o |
File path to save the per-image and average results. |