GithubHelp home page GithubHelp logo

dehaze's Introduction

Single Image Haze Removal

by Yilin Yang & Shiyu Dong

DarkChannel

He K, Sun J, Tang X. Single image haze removal using dark channel prior[J]. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 2011, 33(12): 2341-2353.

Run "run.m" to remove haze on example images
Use function dehaze(I) in "dehaze.m" for any input image
The parameters are defined in "dehaze.m"

DehazeNet

Cai B, Xu X, Jia K, et al. DehazeNet: An End-to-End System for Single Image Haze Removal[J]. arXiv preprint arXiv:1601.07661, 2016.

Run "Dehaze.sh" or "dehaze.py", "dehaze.m" to remove haze on example images
The training and test patches are in folder "patches"
The training and test labels are in "TrainLabels.txt" and "TestLabels.txt"
Run "train.sh" to train DehazeNet
Run "test.py" to calculate MSE on synthesized test data

Data

Some images for haze removal

Results

The results of example images using Dark Channel and DehazeNet

dehaze's People

Contributors

allenyangyl avatar shiyudong 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

Watchers

 avatar  avatar  avatar  avatar  avatar

dehaze's Issues

convert dataset into lmdb

Hello, I am a beginner and I notice in your code you didn't convert your dataset from jpg to lmdb. Is it OK to do so? Can caffe understand jpg images?

Understanding training input

What is the meaning of Real numbers after image file name in text files?

For example:
108001.jpg 0.37418165
108002.jpg 0.33880577
108003.jpg 0.87094953
108004.jpg 0.47039831

train_val.prototxt 倒数第二个layer type类型是BReLu,运行报错

layer {
name: "brelu3"
type: "BReLU" #这里会报错的
bottom: "bn3"
top: "bn3"
}

out文档会显示:
I0511 20:55:49.838958 4063212480 layer_factory.hpp:77] Creating layer brelu3
F0511 20:55:49.838977 4063212480 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: BReLU (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***

是不是应该改成ReLu ?

Image is dark after dehaze

I dehaze image use 300000_iter_modal , but image is dark after dehaze. if i train the modal reach to 500,000. Maybe will better?

暗通道matlab存在一些问题

AtmosphericLight.m程序
论文里的意思大致说:挑选在暗通道里,前0.1%最亮的像素点。这些像素点(原彩色雾图)经常是大部分不透明的雾(如图7b黄色线所圈涂)。在这些像素点中,在输入图像I(雾图)最亮像素点选作为大气光A。

一、在程序里有这样一段:
% sort pixel values 存在问题
[~, index] = sort(dark_channel(:)); %(:)所有元素按列排序,sort 为升序,fliplr()为降序,此处应改为降序
select_ind = find(index<=numOfSamples);% 暗通道的0.1%像素点
[select_row, select_col] = ind2sub(size(dark_channel),select_ind);%返回像素的坐标
1.sort():是升序排序,在find()里选择前0.1%,其实是最小值。这里应该采用降序排序。
2.find()查找的索引是sort重新排序的索引号,已经不是dark_channel(暗通道图)的像素点索引号。之后的find得到索引号在去dark_channel得到的坐标位置是不对的。

二、
mask = zeros(size(dark_channel));

for i = 1:length(select_row) %有问题
mask(select_row(i),select_col(i)) = 1;
end

您想得到A的掩码图,这里select_row是得到那些像素点的行坐标,length求一下行坐标的总数,mask()中的行和列都是同一个i变量赋值1。这样得到也不是实际那些亮点实际所在的掩码图。

三、请教一下大气成分A到底是一块矩形局域像素点矩阵,还是一个暗通道最亮像素点对应雾图的像素点值?论文这款说的有些模糊。

四、程序中最好用导引图滤波比之前的软抠图算法要快和好。
非常感谢的您的帮助!

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.