{"id":25999828,"url":"https://github.com/fansuregrin/RAUNE-Net","last_synced_at":"2025-03-05T18:41:49.975Z","repository":{"id":174687423,"uuid":"652635083","full_name":"fansuregrin/RAUNE-Net","owner":"fansuregrin","description":"A Residual and Attention-Driven Underwater Image Enhancement (UIE) method.","archived":false,"fork":false,"pushed_at":"2024-10-17T07:25:31.000Z","size":103066,"stargazers_count":31,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-19T10:12:16.697Z","etag":null,"topics":["computer-vision","deep-learning","image-enhancement","image-processing","underwater-image-enhancement"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fansuregrin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-12T13:31:43.000Z","updated_at":"2024-10-17T07:25:35.000Z","dependencies_parsed_at":"2024-01-16T14:30:08.952Z","dependency_job_id":"5d776fa6-0a92-440c-b5d7-4f5510609d81","html_url":"https://github.com/fansuregrin/RAUNE-Net","commit_stats":null,"previous_names":["fansuregrin/rune-net","fansuregrin/raune-net"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fansuregrin%2FRAUNE-Net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fansuregrin%2FRAUNE-Net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fansuregrin%2FRAUNE-Net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fansuregrin%2FRAUNE-Net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fansuregrin","download_url":"https://codeload.github.com/fansuregrin/RAUNE-Net/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242083058,"owners_count":20069232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","deep-learning","image-enhancement","image-processing","underwater-image-enhancement"],"created_at":"2025-03-05T18:40:48.142Z","updated_at":"2025-03-05T18:41:49.965Z","avatar_url":"https://github.com/fansuregrin.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# RAUNE-Net\nThis is the official implementation of RAUNE-Net, \"RAUNE-Net: A Residual and Attention-Driven Underwater Image Enhancement Method\", Wangzhen Peng, Chenghao Zhou, Runze Hu, [Jingchao Cao](https://it.ouc.edu.cn/cjc/list.htm), [Yutao Liu](https://it.ouc.edu.cn/lyt/main.htm)*, International Forum of Digital Multimedia Communication(IFTC), 2023. Click [here](./paper_figures/poster_for_demostration.pdf) to view our poster demonstration.\n\n## 🎯Notice\n\n\n## 🤗Abstract\n\u003e Underwater image enhancement (UIE) poses challenges due to distinctive properties of the underwater environment, including low contrast, high turbidity, visual blurriness, and color distortion. In recent years, the application of deep learning has quietly revolutionized various areas of scientific research, including UIE. However, existing deep learning-based UIE methods generally suffer from issues of weak robustness and limited adaptability. In this paper, inspired by residual and attention mechanisms, we propose a more reliable and reasonable UIE network called *RAUNE-Net* ([rɔ:ni net]) by employing residual learning of high-level features at the network's bottle-neck and two aspects of attention manipulations in the down-sampling procedure. Furthermore, we have collected and created two datasets specifically designed for evaluating UIE methods, which contains different types of underwater distortions and degradations. The experimental validation demonstrate that our method obtains promising objective performance and consistent visual results across various underwater image test-sets compared to other eight UIE methods.\n\n## 🛖Datasets\nWe used 1 dataset for training and 4 full-reference datasets and 3 non-reference datasets for testing. You can download these datasets by clicking links below.\n\n### Training Datasets\n- LSUI3879\n    - 3879 pairs of images randomly selected from LSUI [13].\n    - [🔗GoogleDrive](https://drive.google.com/file/d/19UGfKpgqNiue3SD765xwy-P5dsqrAk8X/view?usp=sharing)\n\n### Test Datasets\n#### Full-reference Datasets\n- LSUI400\n    - 400 pairs of images remained in LSUI [13].\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1p_WSipuOnsW_HyKU1IZoI-iv1BPqbHN_/view?usp=sharing)\n- UIEB100\n    - 100 pairs of images randomly selected from UIEB [8].\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1QcVZbfGiNq3qCU2SrciBizQdCHm3L7ed/view?usp=sharing)\n- EUVP_Test515\n    - 515 pairs of testing images from EUVP [6].\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1Jy9AGn5MgPyyZsQgtbD1voEx7IsYlWpx/view?usp=sharing)\n- OceanEx\n    - We gathered 40 high-quality underwater images from the official website of [NOAA Ocean Exploration](https://oceanexplorer.noaa.gov/image-gallery/welcome.html). Then, we applied CycleGAN to add underwater distortions and degradation styles to these images, making them the samples to be enhanced, while keeping the original high-quality images as reference images.\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1I9u8lUvPTsk9OXOcqGTKkWu0uFfjKnQM/view?usp=sharing)\n#### Non-reference Datasets\n- U45\n    - 45 real-world images from [10].\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1AUBv8gQZGvd8YDWuEexpXq9dOWJ0jCAT/view?usp=sharing)\n- RUIE_Color90\n    - 90 real-world images from RUIE [12], which contains 3 types of color cast (i.e., greenish, blue-greenish, and bluish).\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1VX7Y7PjqVN3a32i4O8OSD1LprJrtwl71/view?usp=sharing)\n- UPoor200\n    - UPoor200 is a dataset we collected and created, which consists of 200 real-world underwater images with poor visual quality. It includes distortions such as blue-green color cast, low lighting, blurriness, noise, and other types of distortions.\n    - [🔗GoogleDrive](https://drive.google.com/file/d/1BxUMLfx0VVX2odrjfcTHJ5P-OBsyvvLf/view?usp=sharing)\n\n## 🎲Experimental Results\n\n### Experiments on Different UIE Methods\nwe compared RAUNE-Net with eight other UIE methods (i.e., UT-UIE [13], SyreaNet [17], WaterNet [8], UGAN [3], FUnIE-GAN [6], UWCNN [7], SGUIE-Net [14], Cycle-GAN [9]).\n\n#### Objective Evaluation Results\n![Table 2. Objective evaluation results of different UIE methods](./paper_figures/objective_evaluation_different_UIE.png)\n#### Subjective Evaluation Results\n![Subjective evaluation results of different methods on U45](./paper_figures/different_methods_comparison_subj_eval_U45.png)\n![Subjective evaluation results of different methods on RUIE_Color90](./paper_figures/different_methods_comparison_subj_eval_RUIE_Color90.png)\n![Subjective evaluation results of different methods on UPoor200](./paper_figures/different_methods_comparison_subj_eval_UPoor200.png)\n\n## 🕹️Test\n### Pretrained Models\nWe provide pretrained models for testing `RAUNE-Net`, `WaterNet`, `UGAN`, and `FUnIE-GAN`. Please click [🔗this link](https://drive.google.com/drive/folders/1pjEh6s6-a3p7qBtkONSlYLmKrfgD6rBk?usp=sharing) to download them. After the download is complete, please unzip and put pretrained weights into the `pretrained` folder. Please see [👉here](./pretrained/README.md) to organize the directory structure for testing.\n\n#### The highest values of objective metrics tested for **RAUNE-Net**\n\n| Epoch | Dataset | PSNR | SSIM |\n| --- | --- | --- | --- |\n| 85 | LSUI400 | 26.812 | 0.876 |\n| 90 | EUVP_Test515 | 26.331 | 0.845 |\n| 95 | UIEB100 | 22.751 | 0.879 |\n| 90 | OceanEx | 22.728 | 0.876 |\n\n#### The highest values of objective metrics tested for **WaterNet**\n\n| Epoch | Dataset | PSNR | SSIM |\n| --- | --- | --- | --- |\n| 85 | LSUI400 | 26.688 | 0.874 |\n| 90 | EUVP_Test515 | 25.285 | 0.833 |\n| 80 | UIEB100 | 22.279 | 0.868 |\n| 50 | OceanEx | 22.132 | 0.887 |\n\n#### The highest values of objective metrics tested for **UGAN**\n\n| Epoch | Dataset | PSNR | SSIM |\n| --- | --- | --- | --- |\n| 85 | LSUI400 | 25.117 | 0.846 |\n| 85 | EUVP_Test515 | 23.636 | 0.805 |\n| 90 | UIEB100 | 21.368 | 0.825 |\n| 60 | OceanEx | 22.436 | 0.822 |\n\n#### The highest values of objective metrics tested for **FUnIE_GAN**\n\n| Epoch | Dataset | PSNR | SSIM |\n| --- | --- | --- | --- |\n| 85 | LSUI400 | 23.272 | 0.818 |\n| 95 | EUVP_Test515 | 24.077 | 0.794 |\n| 85 | UIEB100 | 19.614 | 0.813 |\n| 50 | OceanEx | 20.448 | 0.855 |\n\n### Test Examples\n\n#### (1) Test of RAUNE-Net\n\nSingle Epoch Test:\n```bash\npython test_raunenet.py \\\n    --name test \\\n    --checkpoint_dir pretrained \\\n    --epoch 95 \\\n    --data_dir \u003cPATH_TO_YOUR_TEST_DATASET\u003e \\\n    --test_name \u003cYOUR_TESTSET_NAME\u003e \\\n    --num_down 2 \\\n    --num_blocks 30 \\\n    --result_dir results/raunet_test01\n```\n\nMultiple Epochs Test:\n```bash\nbash scripts/test_raunenet.sh\n# name: test\n# checkpoint_dir: pretrained\n# num_down: 2\n# num_blocks: 30\n# use_att_up: false\n```\n\nMultiple Epochs Test and Assessment:\n```bash\nbash scripts/test_assess_raunenet.sh\n# name: test\n# checkpoint_dir: pretrained\n# num_down: 2\n# num_blocks: 30\n# use_att_up: false\n```\n\n#### (2) Test of WaterNet\nSingle Epoch Test:\n```bash\npython test_waternet.py \\\n    --name test \\\n    --checkpoint_dir pretrained \\\n    --data_dir \u003cPATH_TO_YOUR_TEST_DATASET\u003e \\\n    --epoch 95 \\\n    --test_name \u003cYOUR_TESTSET_NAME\u003e \\\n    --result_dir results/waternet01\n```\n\nMultiple Epochs Test:\n```bash\nbash scripts/test_waternet.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\nMultiple Epochs Test and Assessment:\n```bash\nbash scripts/test_assess_waternet.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\n#### (3) Test of UGAN\nSingle Epoch Test:\n```bash\npython test_ugan.py \\\n    --name test \\\n    --checkpoint_dir pretrained \\\n    --data_dir \u003cPATH_TO_YOUR_TEST_DATASET\u003e \\\n    --epoch 95 \\\n    --test_name \u003cYOUR_TESTSET_NAME\u003e \\\n    --result_dir results/ugan01\n```\n\nMultiple Epochs Test:\n```bash\nbash scripts/test_ugan.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\nMultiple Epochs Test and Assessment:\n```bash\nbash scripts/test_assess_ugan.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\n#### (4) Test of FUnIE-GAN\nSingle Epoch Test:\n```bash\npython test_funiegan.py \\\n    --name test \\\n    --checkpoint_dir pretrained \\\n    --data_dir \u003cPATH_TO_YOUR_TEST_DATASET\u003e \\\n    --epoch 95 \\\n    --test_name \u003cYOUR_TESTSET_NAME\u003e \\\n    --result_dir results/funiegan01\n```\n\nMultiple Epochs Test:\n```bash\nbash scripts/test_funiegan.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\nMultiple Epochs Test and Assessment:\n```bash\nbash scripts/test_assess_funiegan.sh\n# name: test\n# checkpoint_dir: pretrained\n```\n\n### Calculate `PSNR` and `SSIM`\nWe provide a python program in command-line interface (CLI) to calculate `PSNR` and `SSIM`. You can see example below to use this simple tool.\n\n```bash\n# The input_dir may like 'results/raunet_test01/LSUI400/single/predicted/'\npython calc_psnr_ssim.py \\\n    --input_dir \u003cYOUR_ENHANCED_IMAGES_DIRECTORY\u003e \\\n    --refer_dir \u003cYOUR_REFERENCE_IMAGES_DIRECTORY\u003e \\\n    --output_dir \u003cYOUR_OUTPUT_DIRECTORY\u003e \\\n    --resize \\\n    --width 256 --height 256\n```\n\n## 🪄Training\nWe provide four programs for training with command-line interface. They are:\n- [train_raunenet.py](./train_raunenet.py)\n- [train_waternet.py](./train_waternet.py)\n- [train_ugan.py](./train_ugan.py)\n- [train_funiegan.py](./train_funiegan.py)\n\nPlease see them in details.\n\nFor example, you can train a model of RAUNE-Net like this:\n```bash\npython train_raunenet.py \\\n    --cfg_file configs/train_lsui3879.yaml \\\n    --name LSUI3879_PCONT1_SSIM1_SCONT1 \\\n    --num_epochs 100 \\\n    --batch_size 8 \\\n    --lr 0.0001 \\\n    --pcont_weight 1 \\\n    --ssim_weight 1 \\\n    --scont_weight 1 \\\n    --seed 2023 \\\n    --num_down 2 \\\n    --num_blocks 3\n```\n\n## 🤔Q\u0026A\nIf you have any question about this project, please contact `fansuregrin`(or `Wangzhen Peng`) through **wangzhenpeng@stu.ouc.edu.cn** or **pwz113436@gmail.com**! Btw, any pull request is welcome if you are interested in this project:)\n\n## 📔References\n[3] Fabbri, C., Islam, M.J., Sattar, J.: Enhancing underwater imagery using generative adversarial networks. In: 2018 IEEE International Conference on Robotics and Automation (ICRA). pp. 7159–7165. IEEE (2018)\n\n[6] Islam, M.J., Xia, Y., Sattar, J.: Fast underwater image enhancement for improved visual perception. IEEE Robotics and Automation Letters 5(2), 3227–3234 (2020)\n\n[7] Li, C., Anwar, S., Porikli, F.: Underwater scene prior inspired deep underwater image and video enhancement. Pattern Recognition 98, 107038 (2020)\n\n[8] Li, C., Guo, C., Ren, W., Cong, R., Hou, J., Kwong, S., Tao, D.: An underwater image enhancement benchmark dataset and beyond. IEEE Transactions on Image Processing 29, 4376–4389 (2019)\n\n[9] Li, C., Guo, J., Guo, C.: Emerging from water: Underwater image color correction based on weakly supervised color transfer. IEEE Signal processing letters 25(3), 323–327 (2018)\n\n[10] Li, H., Li, J., Wang, W.: A fusion adversarial underwater image enhancement network with a public test dataset. arXiv preprint arXiv:1906.06819 (2019)\n\n[12] Liu, R., Fan, X., Zhu, M., Hou, M., Luo, Z.: Real-world underwater enhancement: Challenges, benchmarks, and solutions under natural light. IEEE Transactions on Circuits and Systems for Video Technology 30(12), 4861–4875 (2020)\n\n[13] Peng, L., Zhu, C., Bian, L.: U-shape transformer for underwater image enhancement. IEEE Transactions on Image Processing (2023)\n\n[14] Qi, Q., Li, K., Zheng, H., Gao, X., Hou, G., Sun, K.: Sguie-net: Semantic attention guided underwater image enhancement with multi-scale perception. IEEE Transactions on Image Processing 31, 6816–6830 (2022)\n\n[17] Wen, J., Cui, J., Zhao, Z., Yan, R., Gao, Z., Dou, L., Chen, B.M.: Syreanet: A physically guided underwater image enhancement framework integrating synthetic and real images. arXiv preprint arXiv:2302.08269 (2023)\n\n# 📄Citation\n```bibtex\n@InProceedings{10.1007/978-981-97-3623-2_2,\n    author=\"Peng, Wangzhen\n    and Zhou, Chenghao\n    and Hu, Runze\n    and Cao, Jingchao\n    and Liu, Yutao\",\n    editor=\"Zhai, Guangtao\n    and Zhou, Jun\n    and Ye, Long\n    and Yang, Hua\n    and An, Ping\n    and Yang, Xiaokang\",\n    title=\"RAUNE-Net: A Residual and Attention-Driven Underwater Image Enhancement Method\",\n    booktitle=\"Digital Multimedia Communications\",\n    year=\"2024\",\n    publisher=\"Springer Nature Singapore\",\n    address=\"Singapore\",\n    pages=\"15--27\",\n    abstract=\"Underwater image enhancement (UIE) poses challenges due to distinctive properties of the underwater environment, including low contrast, high turbidity, visual blurriness, and color distortion. In recent years, the application of deep learning has quietly revolutionized various areas of scientific research, including UIE. However, existing deep learning-based UIE methods generally suffer from issues of weak robustness and limited adaptability. In this paper, inspired by residual and attention mechanisms, we propose a more reliable and reasonable UIE network called RAUNE-Net by employing residual learning of high-level features at the network's bottle-neck and two aspects of attention manipulations in the down-sampling procedure. Furthermore, we collect and create two datasets specifically designed for evaluating UIE methods, which contains different types of underwater distortions and degradations. The experimental validation demonstrates that our method obtains promising objective performance and consistent visual results across various real-world underwater images compared to other eight UIE methods. Our example code and datasets are publicly available at https://github.com/fansuregrin/RAUNE-Net.\",\n    isbn=\"978-981-97-3623-2\"\n}\n```\n\n# ⚖️License\nLicensed under a [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/) for Non-commercial use only. Any commercial use should get formal permission first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffansuregrin%2FRAUNE-Net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffansuregrin%2FRAUNE-Net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffansuregrin%2FRAUNE-Net/lists"}