Giter Club home page Giter Club logo

nighttime_dehaze's Introduction

nighttime_dehaze (ACMMM'2023)

Introduction

Enhancing Visibility in Nighttime Haze Images Using Guided APSF and Gradient Adaptive Convolution
ACM International Conference on Multimedia (ACMMM2023)
Yeying Jin*, Beibei Lin*, Wending Yan, Yuan Yuan, Wei Ye, and Robby T. Tan

arXiv

Prerequisites

git clone https://github.com/jinyeying/nighttime_dehaze.git
cd nighttime_dehaze/
conda create -n dehaze python=3.7
conda activate dehaze
conda install pytorch=1.10.2 torchvision torchaudio cudatoolkit=11.3 -c pytorch
python3 -m pip install scipy==1.7.3
python3 -m pip install opencv-python==4.4.0.46

Nighttime Haze Data

Data Dropbox BaiduPan Number & Type
RealNightHaze Dropbox BaiduPan code:r5mi 443, Haze
Internet_night_clean1 Dropbox BaiduPan code:m7k1 411, Clean Reference
Internet_night_clean2 Dropbox BaiduPan code:8f13 50, Clean Reference
GTA5 nighttime fog Dropbox BaiduPan code:67ml Train:787,Test:77, Synthetic

Synthetic Nighttime Haze and Clean Ground Truth

Nighttime Dehazing Results Dropbox | BaiduPan code:oovt

Model Dropbox BaiduPan Model Put in Path Results Dropbox Results BaiduPan
dehaze.pt dehaze.pt dehaze.pt code:n3t8 results/dehaze/model RealNightHaze RealNightHaze code:i43f
GTA5.pt GTA5.pt GTA5.pt code:fk29 results/GTA5/model GTA5 GTA5 code:ufen
NHR.pt NHR.pt NHR.pt code:dnhf results/NHR/model NHR NHR code:0nma
NHM.pt NHM.pt NHM.pt code:d7oj results/NHM/model NHM NHM code:4gt0
NHC.pt NHC.pt NHC.pt code:yryp results/NHC/model NHC NHC code:njf9

We provide the visualization results in 0_ACMMM23_RESULTS/NHR/index.html,
inside the directory 0_ACMMM23_RESULTS/NHR/img_0/ are hazy inputs, img_1 are ground truths, img_2 are our results.
For results corresponding to GTA5, NHM or NHC, please refer to the respective directories.

  • For the RealNightHaze Dataset
  1. Set the datasetpath to RealNightHaze,
  2. Download the checkpoint dehaze.pt, put in results/dehaze/model,
  3. Run the Python code, results are in results/dehaze/output.
CUDA_VISIBLE_DEVICES=1 python main_test.py --dataset dehaze --datasetpath /diskc/yeying/night_dehaze/dataset/Internet_night_fog/

  • For the Synthetic Dataset
  1. Set Line18 --have_gt to True, set the datasetpath to GTA5 or NHR or NHM or NHC,
  2. Download the checkpoint GTA5.pt, put in results/GTA5/model. Similarly, for NHR.pt, NHM.pt, NHC.pt,
  3. Run the Python code,
CUDA_VISIBLE_DEVICES=1 python main_test.py --dataset NHM --datasetpath /diskc/yeying/night_dehaze/dataset/middlebury/testA/ 
CUDA_VISIBLE_DEVICES=1 python main_test.py --dataset NHC --datasetpath /diskc/yeying/night_dehaze/dataset/Cityscape/testA/ 
CUDA_VISIBLE_DEVICES=1 python main_test.py --dataset NHR --datasetpath /diskc/yeying/night_dehaze/dataset/NHR/testA/ 
CUDA_VISIBLE_DEVICES=1 python main_test.py --dataset GTA5 --datasetpath /diskc/yeying/night_dehaze/GTA5/testA/
  • Evaluation: Set the dataset_name GTA5 or NHR or NHM or NHC, and run the Python code:
python calculate_psnr_ssim_NH_GTA5.py
Dataset PSNR SSIM
GTA5 30.383 0.9042
NHR 26.56 0.89
NHM 33.76 0.92
NHC 38.86 0.97

APSF-Guided Nighttime Glow Rendering

Run the Matlab code to obtain the clean and glow pairs:

APSF_GLOW_RENDER_CODE/synthetic_glow_pairs.m

Change the datapath nighttime_dehaze/paired_data/clean_data/,
the paired clean and glow results are saved in nighttime_dehaze/paired_data/clean/ and nighttime_dehaze/paired_data/glow/,
the visualization of light source maps are in nighttime_dehaze/paired_data/glow_render_visual/light_source/.

Run the Matlab code to visualize the Fig.3 in the main paper:

APSF_GLOW_RENDER_CODE/synthetic_glow_fig3_visualization.m

APSF and Alpha Matting are the implementations of the papers:

  • CVPR03 Shedding Light on the Weather [Paper]
  • CVPR06 A Closed-Form Solution to Natural Image Matting [Paper]

License

The code and models in this repository are licensed under the MIT License for academic and other non-commercial uses.
For commercial use of the code and models, separate commercial licensing is available. Please contact:

Citation

If this work or the Internet data is useful for your research, please cite our paper.

@inproceedings{jin2023enhancing,
  title={Enhancing visibility in nighttime haze images using guided apsf and gradient adaptive convolution},
  author={Jin, Yeying and Lin, Beibei and Yan, Wending and Yuan, Yuan and Ye, Wei and Tan, Robby T},
  booktitle={Proceedings of the 31st ACM International Conference on Multimedia},
  pages={2446--2457},
  year={2023}
}

@inproceedings{jin2022unsupervised,
  title={Unsupervised night image enhancement: When layer decomposition meets light-effects suppression},
  author={Jin, Yeying and Yang, Wenhan and Tan, Robby T},
  booktitle={European Conference on Computer Vision},
  pages={404--421},
  year={2022},
  organization={Springer}
}

nighttime_dehaze's People

Contributors

jinyeying avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nighttime_dehaze's Issues

Test Result

1702610376861
The visual effect deviation obtained from the test weight you provided is significant. Is the weight file you provided the final weight file used in your paper?

light Source matting

Hello, the light source mask in your article uses alpha matting. Do you manually add scribbles to each light source mask?

about the training way

Hello, may I know if your network was trained using an unpaired or paired approach? In your paper, you mentioned that your network was trained based on a CycleGAN-based network (an unpaired training method). However, in the experimental section, you stated that a paired GTA5 dataset was used for training.

Training Code

Hello! Thank you for your work!⭐⭐⭐

Very Good!👍👍👍

I want to learn this network and retrain in other directions.
Is the training code convenient for public access?

Thank you very much!🌸🌸🌸
Looking forward for your reply!💖💖💖

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.