Giter Club home page Giter Club logo

dmphn-cvpr19-master's Introduction

Deep Stacked Multi-patch Hierarchical Network for Image Deblurring

Pytorch Implementation of CVPR19 "Deep Stacked Multi-patch Hierarchical Network for Image Deblurring"

Pipeline of DMPHN

Please download GoPro dataset into './datas'.
https://drive.google.com/file/d/1H0PIXvJH4c40pk7ou6nAwoxuR4Qh_Sa2/view

GoPro Pretrained models are stored in './checkpoints'.

Requires.

pytorch-0.4.1
numpy
scipy
scikit-image

For model training, run following commands.

python xxx.py -b 6

For model testing, copy test samples into './test_samples', then run following commands.

python xxx_test.py

Citation

If you think this work is useful for your research, please cite the following papers.

Conference Version:

@InProceedings{Zhang_2019_CVPR,
    author = {Zhang, Hongguang and Dai, Yuchao and Li, Hongdong and Koniusz, Piotr},
    title = {Deep Stacked Hierarchical Multi-Patch Network for Image Deblurring},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2019}
}

Journal Version:

@article{zhang2022event,
    title={Event-guided Multi-patch Network with Self-supervision for Non-uniform Motion Deblurring},
    author={Zhang, Hongguang and Zhang, Limeng and Dai, Yuchao and Li, Hongdong and Koniusz, Piotr},
    journal={International Journal of Computer Vision},
    pages={1--18},
    year={2022},
    publisher={Springer}}

dmphn-cvpr19-master's People

Contributors

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

dmphn-cvpr19-master's Issues

Normalization layer ( Instance or Batch Normalization)

Hello,
I am confused about why you did not use Batch Normalization or Instance Normalization for your architecture?
I do some experiment about the Normalization layer, I add Instance Normalization layer for all encoder and decoder, where each normalization layers was put between convolution layer and ReLU function, but the performance got worse after I put the normalization layers compared to the initial DMPHN architecture, the performance would get worse started from the first epoch.

Did you test this before and why did this happen? Thank You!

人生迷茫,为什么要分patch(life issues:why need multi-patch)

谁能告诉我,为什么要分多个patch,卷积操作难道输入输出不一样么?而且多patch,你算loss时候也要平均,也没有多训练数据的意思吧?
how can tell me the reason for multi-patch, the CNN is not non-local, there is no difference for multi-patch and whole image.??? besides, it updates loss once per images(batch), so, in my understanding, multi-patch can not lead to more training data.

OMG,Epoch:4000

Does it really need such a long time for reproduction ?OMG,this is the first time I've seen so much epochs.

setting of VideoDeblurring testing set

Could you give some details of your setting of VideoDeblurring testing set?
I found that I can get the same PSNR results on GOPRO dataset, but get a lower PSNR results on VideoDeblurring dataset when I run your codes as the checkpoint you provided

The time it took to train 3000 epochs

Hi, author, thank you for providing the code, could you tell me how long it takes to train a complete code?It takes me about two weeks to train for the model DMPHN_1_2_4 on 2080Ti. Is this normal?

will you open source the event version code?

Thank you for your awesome code!

Recently,i have read your paper Event-guided Multi-patch Network with Self-supervision for Non-uniform Motion Deblurring,i'm really interested in it,could you open source the code about the event version? thank you!

running time

I run the code and tested images. Averagely it cost 200ms to test one image in size of 1280x960, which is far slowly than the paper said. I tested GTX1080TI, GTX TITAN X, GTX2080TI. How could you get so fast inference speed as your paper stated?

Log Files from Training

Thank you for your awesome code!

I am hoping you might open-source the log files you have from training. Maybe the training and validation loss as a function of epoch
(and/or batch) with an estimate of the runtime?

How to test a 800x450 image ?

hello, thanks for your great work, I want to test my 800x450 image, but some error raises up:
RuntimeError: The size of tensor a (225) must match the size of tensor b (228) at non-singleton dimension 2
Could you tell me how to address this problem? Thanks a lot!

Why F-Norm for calculating MSE, I believe it must be L2-Norm

In this paper, F-Norm is used to find the loss between Ground Truth
and output of level-1.

I am curious to know why F-Norm instead of L2-Norm. Is there any
specific reason for using the same? Why not L2-Norm?.

Usually F-Norm is used for matrix and L2-Norm is widely used to find Loss.

It would be great help for me if you could clear my doubts

Size miss-match

I have got this error when testing on pretrained model.

File "SDNet4_test.py", line 128, in main
feature[s]['lv2_1'] = encoder[s]['lv2'](images['lv2_1'] + residual[s]['lv3_top']) + feature[s]['lv3_top']
RuntimeError: The size of tensor a (499) must match the size of tensor b (504) at non-singleton dimension 3

Test time

In the test stage,I found the average time to process a 720P image is about 0.91.But the dissertation says 30ms in the 1-2-4-8 model.Wonder why?

about dataset

dear author:
I have a question that training on gopro, have 2 blur folder, that blur and blur_gamma, I want to know you used is blur or blur_gamma? thankyou

操作过程

我的数据可能不是按照您这个模型来配置的,请问有完整的说明书参考一下么?

测试

您好,有个问题想问您。我在GoPro数据集的测试集上测试DMPHN时,使用了您官方github给的checkpoint;
在论文中SDNet4.py和DMPHN_1_2_4_8.py应该对应的是Stack(4)-DMPHN和DMPHN(1-2-4-8),论文中的给的score分别是31.20和30.25
但是我自己跑的score两个都只有27点几,和论文中给score差很多
我想问的是:您给的checkpoint是最优的checkpoint的吗?还是只是没训练完整的checkpoint?
希望能尽快得到您的回复,真心感谢!

Testing of unpaired datasets

DMPHN-v2_1_2_4_8网络在测试时,是否可以只输入blur信息,如果可以怎么样修改测试代码

PSNR and SSIM test code

Can you provide PSNR and SSIM code ?
I never knew which function to use to calculate SSIM and PSNR. This problem has troubled me for a long time.
THX a lot.

some minor errors

In DMPHN_1_2_4.py line190:
print("epoch:", epoch, "iteration:", iteration+1, "loss:%.4f"%loss.item()), 'time:%.4f'%(stop-start))

you got an extra ')', it should be
print("epoch:", epoch, "iteration:", iteration+1, "loss:%.4f"%loss.item(), 'time:%.4f'%(stop-start))

so does the error in DMPHN_1_2_4_8.py.

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.