GithubHelp home page GithubHelp logo

codeslake / dmenet Goto Github PK

View Code? Open in Web Editor NEW
117.0 5.0 24.0 33.9 MB

[CVPR 2019] Official TensorFlow Implementation for "Deep Defocus Map Estimation using Domain Adaptation"

License: GNU Affero General Public License v3.0

Python 75.56% MATLAB 23.51% Shell 0.93%
defocus-blur defocus-deblurring defocus-estimation defocus-map-estimation deep-learning cvpr2019

dmenet's People

Contributors

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

dmenet's Issues

Cannot download the dataset.

Hi,
I noticed there are two links of your dataset, the one from dropbox cannot be opened, and the one of google drive has nothing in the folder. I guess that you might have not prepared yet.

Defocused Image Generation

Thanks for your code. How are you generating the synthetic defocus images? which code is used to generate the defocus images in this repository?

what is the version of tensorlayer?

In your readme.md, the version of tensorlayer is 1.2.1, but 1.2.1 doesn't work.
Is there a update of tensorlayer? if yes, what is the newest version of tensorlayer and tensorflow?

Output of DMENet

Hi,Dr.Lee.

When I test the network,I get the file named as xxxx_2_defocus_map_out.png.

I want to know what value is saved in this file .

Thank you and look forward to your reply!

Best,
Cheng

About Pretrained weight

Hello.

Thanks for your great work.
I have questions for pretrained weight.
I already use the DMENet_BDCS weight. But actually I'd like to get the defocus map only for the synthetic scene.
Could you share the pretrained weights mentioned in the paper such as DMENet_B and DMENet_BD?
And Could you tell me how to train for DMENet_B and DMENet_BD models?

Thanks,

Ram and Memory issue

The model is taking a lot of time to evaluate images and generate maps. My ram is completely exhausted. What is the solution?

Issue with training with GPU

Can you tell me how to train with GPU?

I have specified GPU,
" os.environ["CUDA_VISIBLE_DEVICES"] = '8' "
but I failed and it still output:
"2020-05-06 16:31:04.495971: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-05-06 16:31:04.526384: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2199940000 Hz"

Looking forward to your reply.

test dataset

Hi,
Thanks for your great work.
Image names in the test dataset (SYNDOF) do not correspond and I don't know how to read these images...
The names in the "gt" file are "0000.png, 0001.png ...", but in the "image" file, they are "SYNTHIA_RAND_CITYSCAPES_image_0000017_f_85_fp_0_17_A_9_3.png, ..."

Generate Defocus Maps

Hello, thank you very much for this implementation.
I want to know how can I generate maps for my custom images. I don't have the ground truth images for them. I have created test folder in datasets and put my images there but it asks for gt images. How can I just generate the defocus maps without the ground truth values. ?

OOM issue + pytorch version request

Thanks for the great work!
When trying to train your network, I met with OOM issues, are there ways to reduce the RAM consumption during network training ( since the batch_size is already 1)? How much RAM is required to train this network?
btw, hope that the PyTorch version can be implemented soon.

Thanks again for the work!

About the data

It seems that the blur_map in the ./dataset/train/SYNDOF/blur_map is all 0. Is there some error?

Problem

Hello, when I downloaded the DataSet of DMEnet to a quarter part, it was always forbidden. Do you have any solution? Thank you

RTF dataset

Hi,

Could you please share the original RGB images in RTF dataset?

Best Regards,
pengjw98

How to set the lambda in deconvolution

Hi,

I want to use the deconvolution code and I find for different dataset, you use different lambda in line 28-37, run_DMENet_deconv.m.

Any clue how to set this? if I want to try it in my own image. Thanks.

cannot download the dataset

I can't download the dataset, it always failed to download to the end.
can you check the link and provide some new links? thank u.

Normalization

Hi Lee,
I notice here we store the estimated map after converting it into an image. This may introduce normalization.
I am wondering what is the network output range? What if the output ranges outside [0, 1]?
Thank you!

How to apply deconvolution from masks?

Hi,
In the paper it was written: "We then use non-blind image deconvolution technique leveraging hyper-Laplacian [16]; to handle spatially-varying deblur, we applied deconvolution to the decomposed layers, and compose deconvolved layer images."

While using the code, it correctly generates the masks, but didn't apply deconvolution. Is the code provided in this repository? If not, do you have any idea how to correctly apply deconvolution based on the generated masks?

ps: The code is very messy. Barelly got it working on Debian, due to old packages and conflicting dependencies. Please consider using pytorch with PEP8 style on next projects.

All-in-focus image generation

Hi,Dr.Lee.

Thanks for your wonderful work!

In this paper, you generate the all-in-focus images using DMENet with non-blind image deconvolution technique.
Could you share the code about it?

Best,
chanwental

Issue with Pretrained Weights

When I load your pretrained weights I am getting a lot of warnings from tensorlayer that tensors are not found (e.g. Warning: Tensor named main_net/defocus_net/decoder/u0/c1_1/bias:0 not found in network.). Also, the resulting defocus map is all zeros for any image I tested on. I am using all the recommended software versions (python, CUDA, etc.). Have you seen this problem before? Thanks in advance for your help.

Generate ground-truth binary blur masks

Hi,thank you very much for this implementation.
I used my own image to generate defocus map successfully.But what I need are masks.If I use my own images, how can I generate the ground truth binary blur masks.

The max_coc of datasets is not 28.

Hi,
I read a blur_map in your dataset as follows:
image = (np.float32(cv2.imread(file_name, cv2.IMREAD_UNCHANGED))/10.)[:, :, 1].
Then the maximum of image is 15. #15=(61-1)/4
It implys max_coc=61, which is not consistent with 28 in your paper.
What is the problem?

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.