Code Monkey home page Code Monkey logo

fohis's Introduction

Towards Simulating Foggy and Hazy Images and Evaluating their Authenticity

Ning Zhang, Lin Zhang*, and Zaixi Cheng

License:

This code is made publicly for research use only. 
It may be modified and redistributed under the terms of the GNU General Public License.
Please cite the paper and source code if you use it in your work.

@inproceedings{zhang2017towards,
title={Towards simulating foggy and hazy images and evaluating their authenticity},
author={Zhang, Ning and Zhang, Lin and Cheng, Zaixi},
booktitle={International Conference on Neural Information Processing},
pages={405--415},
year={2017},
organization={Springer}
}

Instructions:

This code has been tested in Windows10-64bit with Python3.4 installed.  
1. clone this project and put all the files in the same folder
2. folder structure:

      FoHIS/const.py  # define const
            fog.py  # main
            parameter.py # all parameters used in simulating fog/haze are defined here.
            tool_kit.py # some useful functions
            
      AuthESI/compute_aggd.py
              compute_authenticity.py  # main
              guided_filter.py  # some functions
              prisparam_16_hazeandfog.mat  # pre-trained model
              
      img/img.jpg  # RGB image
          imgd.jpg  # depth image
          result.jpg  # simulation
          
3. To simulate fog/haze effects:
    run python FoHIS/fog.py, the output 'result.jpg' will be saved in ../img/
      
4. To evaluate the authenticity:
    run python compute_authenticity.py to evaluate 'result.jpg' in ../img/

Dataset:

image

Source Image Maximum Depth Effect Homogeneous Particular Elevation
(a) 150 m Haze Yes No
(b) 400 m Haze Yes No
(c) 800 m Haze Yes No
(d) 30 m Fog Yes No
(e) 150 m Fog No Yes
(f) 30 m Fog+Haze No No
(g) 600 m Haze Yes No
(h) 400 m Haze Yes No
(i) 200 m Haze Yes No
(j) 100 m Haze Yes No
(k) 100 m Haze Yes No
(l) 800 m Fog+Haze No Yes
(m) 300 m Haze Yes No
(n) 60 m Haze Yes No
(o) 300 m Haze Yes No
(p) 1000 m Haze Yes No
(q) 400 m Haze Yes No
(r) 300 m Haze Yes No

fohis's People

Contributors

noahzn 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

Watchers

 avatar  avatar  avatar

fohis's Issues

I can't train new pictures

Hi, thank you for your contribution. Now I have a question to ask: I want to add simulation to the new image, but I found that there is an IMgd.jpg in the sample image, how to generate the IMgd.jpg? Hope to answer my doubts, thank you very much!

About the data

Hello,thank you for your work.
And i want to ask you that how can i get the depth images? Is that can generate from rgb images?

Image Depth

Hey I'm having issue with the image depth as I'm using an RGB image and generated a depth with code I found and ran into this error:

Traceback (most recent call last): File "fog.py", line 28, in <module> const.CAMERA_ALTITUDE) File "C:\Users\hashi\FYELabs\DND\FoHIS\FoHIS\tool_kit.py", line 30, in elevation_and_distance_estimation File "C:\Users\hashi\FYELabs\DND\FoHIS\FoHIS\tool_kit.py", line 75, in get_image_info KeyError: 'dpi'

This is the image I am using:

img

If you can provide your method for depth that would be great

compute_authenticity.py issues

I used the code you provided to calculate the image authenticity index for my graph, but the result is sometimes one and sometimes not in the range 1-5. I want to ask which hyperparameter I need to adjust to calculate the correct data. Thank you for your work

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.