UDnet: underwater image enhancement
Pretrained weights for UDnet, from Adaptive deep learning framework for robust unsupervised underwater image enhancement (Saleh et al., Expert Systems with Applications, 2025).
- Code: https://github.com/alzayats/UDnet
- Paper: https://www.sciencedirect.com/science/article/pii/S0957417424031816
- Gallery: https://alzayats.github.io/UDnet/
UDnet corrects colour casts and improves contrast in underwater photos and keeps the input resolution.
| Model | Status | File | Notes |
|---|---|---|---|
| UDnet V1 | Released | UDnet.pth (5.6 MB) |
The paper model. Fully unsupervised: trained without any reference images. 1.4 M parameters, runs on a CPU. |
| UDnet V2 | Preview | UDnet_v2.pth (59 MB) |
Trained on paired images (UIEB and LSUI training splits) for stronger colour and haze correction. 29 M parameters, best on a GPU. |
Usage
git clone https://github.com/alzayats/UDnet.git && cd UDnet
pip install -r requirements.txt
python Inference.py --input path/to/images --output results/ # V1
python Inference.py --input path/to/images --output results/ --model v2 # V2 (preview)
python Inference.py --input path/to/images --output results/ --model v2 --ai x2 # V2 + AI detail, 2x upscaled
The weights are downloaded from this repository automatically on first use. --ai adds a
Real-ESRGAN pass that sharpens and upscales; it can invent
fine texture, so use it for viewing, not measurement.
Files
| File | Description |
|---|---|
UDnet.pth |
V1 inference weights (PyTorch state_dict, 1.4 M parameters) |
UDnet_v2.pth |
V2 inference weights ({'state_dict', 'config'}, float16, 29 M parameters) |
V2 is a preview and is intended for research use.
Citation
@article{SALEH2025126314,
title = {Adaptive deep learning framework for robust unsupervised underwater image enhancement},
journal = {Expert Systems with Applications},
volume = {268},
pages = {126314},
year = {2025},
doi = {https://doi.org/10.1016/j.eswa.2024.126314},
author = {Alzayat Saleh and Marcus Sheaves and Dean Jerry and Mostafa {Rahimi Azghadi}},
}