-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to prepare train data and how to train DeblurGAN? #18
Comments
There are few options and few choices of dataset (Aligned, Single etc.) To create aligned dataset you would need to run combine_A_and_B script to create image pairs, otherwise, you need to change the type of the dataset, I would update to instructions soon |
Can you provide more information about it? @KupynOrest |
when I generated blured images using the code blur_image.py. I found a lot of picture become Black block. It seems that all the pixel value become zero. how I solve the problem? @hrbspider @KupynOrest |
@YangShuguang Use scipy.misc.imsave() to save the generated blurry image instead of cv2.imwrite() |
@YangShuguang You should use either OpenCV or Scipy while reading and writing images; use one to read images and another to write images would cause black block output. |
@pengjingg. are you sure? I'll try your way. now my solution is to modify the "self.max_len / (self.iters - 1))" to "self.max_len / float(self.iters - 1))" (generate_trajectory.py 80 lines). and modify "self.fraction = [1 / 100, 1 / 10, 1 / 2, 1]'' to ''self.fraction = [1/float(100), 1/float(10), 1/float(2), 1]'' (generate_PSF.py 19 lines ). it seems to work |
@YangShuguang You are right. My way just solved problems for some images but won't work out for others(strange). Thanks a lot |
I tried to train DeblurGAN but failed. I dont know how to prepare train data and val data and the meaning of some options,such as 'AtoB'.
I generated blured images using the code blur_image.py.
The train command:
python train.py --dataroot ../../deblurPwLine/ --continue_train
dataroot is organized as this:
-deblurPwLine
--train "stores some sharp images"
--val "stores some sharp images"
The text was updated successfully, but these errors were encountered: