项目作者: VPanjeta

项目描述 :
PyTorch network to remove fog/smog/haze from pictures.
高级语言: Python
项目地址: git://github.com/VPanjeta/Image-Unfogging.git
创建时间: 2019-01-28T06:49:05Z
项目社区:https://github.com/VPanjeta/Image-Unfogging

开源协议:

下载


Image Unfogging

A neural network writen in PyTorch to unfog an image or stbilize the colour balance by unhazing.

Architecture

AOD-Net:

The Project tries to replicate the architecture outlined in the project AOD-Net.

AOD-Net stands for All in One Dehazing Network which is a lightweight image dehazing network that is fast to train and using for inference.

Training

Preparation:

  1. Create folder “data”.
  2. Create 2 subfolders, “images” and “data” with original images and foggy images respectively.
  3. Install the requirements of the project by typing sudo pip3 install -r requirements.txt

Training:

  1. To traning the model run:
    1. python3 train.py
  2. Open train.py file for details of the parameters and parser arguments.

  3. Random validation samples will be saved to “samples” directory after every epoch and the model will be saved as “net.pth” in the “snapshots” directory. A pretrained model has been provided in the snapshots directory.

Testing/Running the pretrained model:

  1. Copy the images to be unfogged in the “test_images” directory and run
    1. python3 main.py


    The net will save the unfogged images in the “results” directory.

Results:

The models performs well in removing the fog and haziness in the foreground of the input images. for removing complete fog it would require some sort of Generative nets to replace the foggy patches where nothing is seen.

Some of the results are:

result
result
result
result
result
result