Skip to content

gsnsg/Image-Dehazing-using-GMAN

Repository files navigation

Image-Dehazing-using-GMAN

PyTorch implementation of Single Image Dehazing with a Generic Model-Agnostic Convolutional Neural Network

Training

  1. Used 224x224 randomly cropped images as suggested in the paper
  2. Used Mean Squared Loss to train the model

Note:

The model currently works with only 224x224 images. Will look into this issue later 😔

Validation Images

Steps to use the trained model

  1. Download the state_dict_model.pt
  2. Copy the code for model from the notebook
  3. Create a model object and load the model from the downloaded weights

Code

import torch

class ResidualBlock(nn.Module):
    model code...

class GMAN(nn.Module):
    model code...
    


PATH_TO_MODEL = '../../state_dict_model.pt'
    
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

gman_net = GMAN().to(device)
if torch.cuda.is_available():
    gman_net.load_state_dict(torch.load(PATH_TO_MODEL))
 else:
    gman_net.load_state_dict(torch.load(PATH_TO_MODEL, map_location='cpu'))

Citation

@article{liu2019single,
  title={Single Image Dehazing with a Generic Model-Agnostic Convolutional Neural Network},
  author={Liu, Zheng and Xiao, Botao and Alrabeiah, Muhammad and Wang, Keyan and Chen, Jun},
  journal={IEEE Signal Processing Letters},
  volume={26},
  number={6},
  pages={833--837},
  year={2019},
  publisher={IEEE}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published