Skip to content

Phase-based Attention Mechanism for Underwater Image Restoration and Beyond

Notifications You must be signed in to change notification settings

Mdraqibkhan/Phaseformer

Repository files navigation

Phaseformer : Phase-based Attention Mechanism for Underwater Image Restoration and Beyond

Md Raqib Khan · Anshul Negi · Asuhtosh Kulkarni · Shruti S. Phutke · Santosh Kumar Vipparthi · Subrahmanyam Murala

WACV-2025

Phaseformer : Phase-based Attention Mechanism for Underwater Image Restoration and Beyond

Phaseformer : Phase-based Attention Mechanism for Underwater Image Restoration and Beyond

t-SNE Visualization

t-SNE Visualization of the Amplitude and Phase of Clean and Degraded Images

The separate clusters for clean and degraded amplitude show that there is more effect of degradation on amplitude content compared to phase content, which has overlapping clusters for clean and noisy images.

Evaluation

To evaluate the model on different datasets using the provided checkpoints and sample degraded images.

Dataset and Checkpoint Structure

  • Sample degraded images for testing: Available in dataset/dataset_name/.
  • Checkpoints for evaluation: Provided in checkpoints/dataset-name/.
  • Results storage: After successful execution, the results will be saved in the results/dataset-name/ folder.

Folder Overview

├── dataset
│   ├── UIEB
│   ├── U-45
│   ├── SQUID
│   ├── UCCS
│   ├── UFO-120
│   ├── Low_light
├── checkpoints
│   ├── UIEB
│   ├── UFO-120
│   ├── Low_light
├── results
│   ├── UIEB
│   ├── U-45
│   ├── SQUID
│   ├── UCCS
│   ├── UFO-120
│   ├── Low_light

Running the Evaluation

To evaluate the model on different datasets, follow the instructions below for each specific dataset:

UIEB Dataset Evaluation

Run the following command to evaluate the model on the UIEB dataset:

python test.py --dataset datasets/UIEB/  --checkpoints_path /checkpoints/UIEB/ --save_path Results/UIEB 

U-45 Dataset Evaluation

Run the following command to evaluate the model on the U-45 dataset:

python test.py --dataset dataset/U-45/ --checkpoints_path /checkpoints/UIEB/ --save_path Results/U-45

SQUID Dataset Evaluation

Run the following command to evaluate the model on the SQUID dataset:

python test.py --dataset dataset/SQUID/ --checkpoints_path /checkpoints/UIEB/ --save_path Results/SQUID

UCCS Dataset Evaluation

Run the following command to evaluate the model on the UCCS dataset:

python test.py --dataset dataset/UCCS/ --checkpoints_path /checkpoints/UIEB/ --save_path Results/UCCS

UFO-120 Dataset Evaluation

Run the following command to evaluate the model on the UCCS dataset:

python test.py --dataset dataset/UFO-120/ --checkpoints_path /checkpoints/UFO-120/ --save_path Results/UFO-120

Low-light Dataset Evaluation

Run the following command to evaluate the model on the UCCS dataset:

python test.py --dataset dataset/UCCS/ --checkpoints_path /checkpoints/Low_light/ --save_path Results/Low_light

Traing

  1. Structure of data for training should be like
uw_data/   # here uw_data can be any underwater datsets folder like UIEB,UFO-120 etc.
   ├── train/
   │   ├── a/  # Input images
   │   └── b/  # Reference (ground truth) images
   └── test/
       ├── a/  # Input images
       └── b/  # Reference (ground truth) images
  1. run
  pyhthon train.py

Citation

If you find this work helpful, please reference it as follows:

 @article{khan2024phaseformer,
  title={Phaseformer: Phase-based Attention Mechanism for Underwater Image Restoration and Beyond},
  author={Khan, MD and Negi, Anshul and Kulkarni, Ashutosh and Phutke, Shruti S and Vipparthi, Santosh Kumar and Murala, Subrahmanyam},
  journal={arXiv preprint arXiv:2412.01456},
  year={2024}
}

Acknowledgements

Special thanks to the awesome repositories UIPTA and Spectroformer, which made this project possible.

About

Phase-based Attention Mechanism for Underwater Image Restoration and Beyond

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages