Git Product home page Git Product logo

aodnet-by-pytorch's Introduction

AOD-Net by Pytorch

This project implements the AOD-Net : All-in-One Network for Dehazing for image dehazing using Python and PyTorch. The model is capable of removing haze, smoke, and water impurities from images."

The repository includes:

  • Source code of AOD-Net
  • Building code for synthesized hazy images based on NYU Depth V2
  • Training code for our hazy dataset
  • Pre-trained model for AOD-Net

Requirements

Python 3.6, Pytorch 0.4.0 and other common packages

NYU Depth V2

To build synthetic hazy dataset, you'll also need:

Training Part

Dateset Setup

  1. Clone this repository
  2. Create dataset from the repository root directory
    $ cd make_dataset
    $ python create_train.py --nyu {Your NYU Depth V2 path} --dataset {Your trainset path}
  3. Random pick 3,169 pictures as validation set
    $ python random_select.py --traindir {Your trainset path} --valdir {Your valset path}

Start to training

  1. training AOD-Net
    $ python train.py --dataroot {Your trainset path} --valDataroot {Your valset path} --cuda

Testing Part

  1. test hazy image on AOD-Net
    $ python test.py --input_image /test/canyon1.jpg  --model /model_pretrained/AOD_net_epoch_relu_10.pth --output_filename /result/canyon1_dehaze.jpg --cuda

aodnet-by-pytorch's People

Contributors

weberwcwei 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  avatar

aodnet-by-pytorch's Issues

training

Hi,

I tried to implement exact same thin you have done, I downloaded the data set of NYU called bathrooms_part1.zip and nyu_depth_v2_labeled.mat, then gave both data to the make_dataset.py and I have lots of hazy and gt images in h5 format. I chose 160 of them as training and 40 as val data and tried to train the network. the loss is around 0.005, but when I am taking the 10th epoch and test an image with it, I get yellow images!! do you have any idea what is the reason??

thanks
Mojgan

An confusing error in your code

In train.py, line 110 :
varIn, varTar = varTar.float(), varIn.float()

I think the location of varIn and varTar should be exchanged.

results

Hi,
I was wondering if the dehazed results which are in the folder results, are dehazed by AOD_net_epoch_relu_10.pth or as said in the paper by 40th epoch?

Thanks
Mojgan

License

What license is this code under?

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.