Skip to content
/ sddn Public

Distillation of Efficient Dehazing Networks via Soft Knowledge

License

Notifications You must be signed in to change notification settings

tranleanh/sddn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDDN: Soft Knowledge-based Distilled Dehazing Networks

Models Paper

The official implementation of the paper "Soft Knowledge-based Distilled Dehazing Networks".

Authors: Le-Anh Tran, Dong-Chul Park

Updates

The completion of this project is currently in progress, please stay tuned for updates!

  • Results on benchmarks (I-HAZE, O-HAZE, Dense-HAZE, NH-HAZE, SOTS-Outdoor, HSTS)
  • Pre-trained weights (Hugging Face)
  • Inference
  • Training

Introduction

Framework diagram

Test

  • Create environment & install required packages
  • Download pre-trained weights from Hugging Face
  • Prepare a folder containing test images

Command

python test_dehaze.py --model_path {weight_path} \
                      --image_path {input_folder_path} \
                      --output_path {output_folder_path} \
                      --ch_mul {channel_multiplier} \
                      --image_size {input_size}

Example

python test_dehaze.py --model_path weights/sddn_ihaze_180_11.h5 \
                      --image_path ihaze \
                      --output_path ihaze_dehazed \
                      --ch_mul 0.25 \
                      --image_size 512

Quick test with default configurations (input size: 512x512, channel multiplier: 0.25)

python test_dehaze.py --model_path weights/sddn_ihaze_180_11.h5 --image_path ihaze --output_path ihaze_dehazed

Train

  • Create environment & install required packages
  • Prepare dataset folder (a parent directory containing two sub-folders 'A' and 'B' like below):
.../path/to/data
            | A (containing hazy images)
            | B (containing clean images)
*** Note: a pair of hazy-clean images must have the same name
  • Configure training parameters in train.py, the default settings are as below:
    # Train Parameters:
    n_images = 4
    batch_size = 1
    epoch_num = 200
    critic_updates = 5
    learning_rate = 1E-4
    loss_balance_weights = [10, 5, 5, 1]
    teacher_weight_path = 'path_to_pretrained_teacher_model'
    dataset_path = 'path_to_dataset'

Command

python train.py

Results

Quantitative results

Qualitative results

Citation

Please cite our work if you use the data in this repo.

@article{tran2024soft,
  title={Soft Knowledge-based Distilled Dehazing Networks},
  author={Tran, Le-Anh and Park, Dong-Chul},
  journal={Authorea Preprints},
  year={2024},
  publisher={Authorea}
}

LA Tran