Skip to content

kc-ml2/HDR

Repository files navigation

Attention-guided Non-Local Network (ATNLC) for High Dynamic Range Image Synthesis

Solution of HDR Challenge

by Tu Vo

Content

Getting Started

  • Clone the repository

Prerequisites

  • Tensorflow 2.7.0+
  • Tensorflow_addons
  • Python 3.7+
  • Keras 2.3.0
  • PIL
  • numpy

Running

Training

  • Preprocess

    python src/create_dataset_img.py
    
  • Train ATNLC

    python main.py
    

Testing

  • Test ATNLC

    python test.py
    
  • Submit

    python test_submit.py
    

Calculate FLOPS and run-time

python calculate_flops.py

Usage

Training

usage: main.py  [-h] [--filter FILTER] 
                [--decoder_kernel DECODER_KERNEL]
                [--attention_filter ATTENTION_FILTER] 
                [--triple_pass_filter TRIPLE_PASS_FILTER]
                [--kernel KERNEL] [--encoder_kernel ENCODER_KERNEL] 
optional arguments:
  -h, --help            show this help message and exit
  --filter FILTER
  --attention_filter ATTENTION_FILTER
  --kernel KERNEL
  --encoder_kernel ENCODER_KERNEL
  --decoder_kernel DECODER_KERNEL
  --triple_pass_filter TRIPLE_PASS_FILTER

Testing

  • Download the weight here and put it to the folder weights

See results

usage: test.py  [-h] [--filter FILTER] 
                [--decoder_kernel DECODER_KERNEL]
                [--attention_filter ATTENTION_FILTER] 
                [--triple_pass_filter TRIPLE_PASS_FILTER]
                [--kernel KERNEL] [--encoder_kernel ENCODER_KERNEL] 
optional arguments:
  -h, --help            show this help message and exit
  --test_path TEST_PATH
  --save_path SAVE_PATH
  --filter FILTER
  --gpu GPU
  --attention_filter ATTENTION_FILTER
  --kernel KERNEL
  --encoder_kernel ENCODER_KERNEL
  --decoder_kernel DECODER_KERNEL
  --triple_pass_filter TRIPLE_PASS_FILTER

Result:

Short image Medium Image Long Image Output
  • path to the full results: GGDrive

Submit:

usage: test_submit.py  [-h] [--filter FILTER] 
                [--decoder_kernel DECODER_KERNEL]
                [--triple_pass_filter TRIPLE_PASS_FILTER]
                [--kernel KERNEL] [--encoder_kernel ENCODER_KERNEL] 
                [--attention_filter ATTENTION_FILTER] [--zip_name ZIP_NAME]
optional arguments:
  -h, --help            show this help message and exit
  --test_path TEST_PATH
  --save_path SAVE_PATH
  --filter FILTER
  --gpu GPU
  --attention_filter ATTENTION_FILTER
  --kernel KERNEL
  --encoder_kernel ENCODER_KERNEL
  --decoder_kernel DECODER_KERNEL
  --triple_pass_filter TRIPLE_PASS_FILTER
  --zip_name ZIP_NAME

License

This project is licensed under the MIT License - see the LICENSE file for details

References

[1] High Dynamic Range Image Synthesis Challenge - NTIRE2022

Citation: to be updated ...

Acknowledgments

  • This work is heavily based on our previous work on Defocus Deblurred Challenge 2021.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages