Coder Social home page Coder Social logo

jkhu29 / deblurring-by-realistic-blurring Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 2.0 2.88 MB

A PyTorch implementation of the "Deblurring by Realistic Blurring", unofficially

Home Page: https://arxiv.org/abs/2004.01860

License: MIT License

Python 98.75% Shell 1.25%
deblur wgan

deblurring-by-realistic-blurring's Introduction

Hi there 👋

I'm JiaKui Hu, a Ph.D Student in PKU, MILab.

🔭 I’m currently working on

  • Medical Image Processing, like SIM
  • Spike Neural Network

🌱 I’m currently interested in

  • Super Resolution imaging
  • Network architecture design
  • AI System

I have another account dedicated to the work of the open source community, like TVM, OneFlow, ... --> hhhfccz

stats

code

deblurring-by-realistic-blurring's People

Contributors

hhhfccz avatar jkhu29 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

deblurring-by-realistic-blurring's Issues

Question!

Hi. I have a question
There is no dataset_make.py file in the dataset make folder, only tfrecord_make.py, I wonder how to use it.

Questions please!

Hi, thanks for your contribution.
I have several questions:

  1. Has the project achieved the accuracy of the paper? You use a cyclegan to produce the blur data, but the paper not use the cyclegan.
  2. What datasets are used for training? The training script implies that the train dataset has a length of 44185.
  3. The architechture of vgg19 used by the discriminator seems not right in the codes. And the last layer feature of vgg16 is not used in perceptual loss, which is a bit difference from other projects. Why?

I am looking forward to your reply.

Hello. I ask you something about value error

I performed training after converting tfrecord type data, and a problem occurred in the process of checking the deblur effect of a single image through "demo.py".

I used the "model.png" image in the existing folder ./imge as the input image, and the following value error occurred. Can you give me some advice on how to solve it?

Traceback (most recent call last):
  File "./demo.py", line 26, in <module>
    img_yiq[..., 0] = g
ValueError: could not broadcast input array from shape (398,886) into shape (397,885)

The code I used is below.

import cv2
import torch
from skimage.color import rgb2yiq, yiq2rgb
import utils
from model import *

bgan = BlurGAN_G().cuda() 
bgan_state_dict = torch.load("./bgan_pretrain.pth")
bgan.load_state_dict(bgan_state_dict)
bgan.eval()

img = cv2.imread("img/model.png")
img_yiq = rgb2yiq(img)
img = torch.from_numpy(img.transpose(2, 0, 1)).unsqueeze(0).float().to("cuda")
n, c, h, w = img.shape
img_noise = utils.concat_noise(img, (4, h, w), img.size()[0])
img_bgan = bgan(img_noise)[0].detach().cpu().numpy()
g = utils.lum(img_bgan)
img_yiq[..., 0] = g
img_blur = yiq2rgb(img_yiq)

cv2.imwrite("img/model_blur.png", img_blur)

About Dataset

Thank you very much for opening the train code of this article. I have a set of clear and blur data of unpaired. How can I make a tf.record file that the code needs?

复现精度

请问同学复现到了论文提到的精度吗?

代码环境搭建问题

同学你好,我也最近看了这篇paper,可我不知道官方的代码怎么才能运行……能否告知下环境搭建的要求与代码运行的步骤啊?万分感谢了。

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.