Hamidreza Farhadi Toliea · Jinchang Rena · Eyad Elyanb
a National Subsea Centre, Robert Gordon University, UK
b School of Computing, Robert Gordon University, UK
This repository contains the PyTorch implementation of the DICAM underwater image enhancement method provided by the authors. The manuscript is available here.
📢 News:
- 2023/03/26 We're excited to announce the deployment of an online demo showcasing the DICAM model on Hugging Face 🤗, running on CPU!
- 2023/03/25 We have made our source codes with the pre-trained model on the UIEB dataset online 😊
In underwater environments, imaging devices suffer from water turbidity, attenuation of lights, scattering, and particles, leading to low quality, poor contrast, and biased color images. This has led to great challenges for underwater condition monitoring and inspection using conventional vision techniques. In recent years, underwater image enhancement has attracted increasing attention due to its critical role in improving the performance of current computer vision tasks in underwater object detection and segmentation. As existing methods, built mainly from natural scenes, have performance limitations in improving the color richness and distributions we propose a novel deep learning-based approach namely Deep Inception and Channel-wise Attention Modules (DICAM) to enhance the quality, contrast, and color cast of the hazy underwater images. The proposed DICAM model enhances the quality of underwater images, considering both the proportional degradations and non-uniform color cast. Extensive experiments on two publicly available underwater image enhancement datasets have verified the superiority of our proposed model compared with several state-of-the-art conventional and deep learning-based methods in terms of full-reference and reference-free image quality assessment metrics.
To install DICAM, follow these steps:
-
Clone the repository:
git clone https://github.com/hfarhaditolie/DICAM
-
Navigate to the project directory:
cd DICAM
-
Install dependencies:
pip3 install -r requirements.txt
To utilize the DICAM method for training, please follow these steps:
-
Download the UIEB and EUVP datasets from their respective sources.
- For UIEB dataset, refer to the instructions provided in UIEB dataset README.
- For EUVP dataset, refer to the instructions provided in EUVP dataset README.
-
Place the downloaded datasets in the 'Data/' directory of the DICAM repository, following the descriptions provided in each dataset's README.
-
Navigate to the 'UIEB/' directory for UIEB dataset or 'EUVP/' directory for EUVP dataset.
-
Run the train_uieb.py script for UIEB dataset or train_euvp.py script for EUVP dataset.
python3 UIEB/train_uieb.py
python3 EUVP/train_euvp.py
To utilize the DICAM method for testing, please follow these steps:
-
After downloading the datasets, navigate to the 'UIEB/' directory for UIEB dataset or 'EUVP/' directory for EUVP dataset.
-
Run the test_uieb.py script for UIEB dataset or test_euvp.py script for EUVP dataset.
python3 UIEB/test_uieb.py
python3 EUVP/test_euvp.py
To get the histogram evaluation, you need to run the hist_distance.m script and specify the path for the generated enhanced images and their corresponding ground-truth ones.
@article{TOLIE2024127585,
title = {DICAM: Deep Inception and Channel-wise Attention Modules for underwater image enhancement},
journal = {Neurocomputing},
volume = {584},
pages = {127585},
year = {2024},
issn = {0925-2312},
doi = {https://doi.org/10.1016/j.neucom.2024.127585},
url = {https://www.sciencedirect.com/science/article/pii/S0925231224003564},
author = {Hamidreza Farhadi Tolie and Jinchang Ren and Eyad Elyan},
keywords = {Underwater image enhancement, Deep learning, Inception module, Channel-wise attention module},
}
If you have any enquires or feedback, please do not hesitate to contact us via @(h.farhadi-tolie@rgu.ac.uk, h.farhaditolie@gmail.com)
We extend our gratitude to the creators of WaveNet for generously sharing their source code, which can be accessed here. This has greatly simplified the process of loading images from individual datasets.
This project is licensed under the MIT License.