DeblurGAN-master

所属分类:图形图像处理
开发工具:Python
文件大小:3021KB
下载次数:4
上传日期:2018-06-26 14:55:31
上 传 者旧巷里的少年
说明:  条件对抗网络模型的程序,训练对抗网络模型,用来去除图像的模糊。
(Conditions against network model procedures, training against network model, used to remove image blurring.)

文件列表:
LICENSE (3565, 2018-01-24)
data (0, 2018-01-24)
data\__init__.py (0, 2018-01-24)
data\aligned_dataset.py (1869, 2018-01-24)
data\base_data_loader.py (195, 2018-01-24)
data\base_dataset.py (1600, 2018-01-24)
data\custom_dataset_data_loader.py (1285, 2018-01-24)
data\data_loader.py (229, 2018-01-24)
data\image_folder.py (1946, 2018-01-24)
data\single_dataset.py (815, 2018-01-24)
data\unaligned_dataset.py (1441, 2018-01-24)
datasets (0, 2018-01-24)
datasets\combine_A_and_B.py (2143, 2018-01-24)
datasets\helper functions (0, 2018-01-24)
datasets\helper functions\grayscale.py (1397, 2018-01-24)
images (0, 2018-01-24)
images\animation1.gif (835018, 2018-01-24)
images\animation2.gif (958430, 2018-01-24)
images\animation3.gif (299504, 2018-01-24)
images\animation4.gif (334266, 2018-01-24)
images\results.png (57964, 2018-01-24)
images\test1_blur.jpg (90365, 2018-01-24)
images\test1_restored.jpg (113146, 2018-01-24)
images\test1_sharp.jpg (120522, 2018-01-24)
images\yolo_b.jpg (71215, 2018-01-24)
images\yolo_o.jpg (97537, 2018-01-24)
images\yolo_s.jpg (107465, 2018-01-24)
models (0, 2018-01-24)
models\__init__.py (0, 2018-01-24)
models\base_model.py (1572, 2018-01-24)
models\conditional_gan_model.py (4567, 2018-01-24)
models\losses.py (5846, 2018-01-24)
models\models.py (332, 2018-01-24)
models\networks.py (12004, 2018-01-24)
models\test_model.py (1614, 2018-01-24)
motion_blur (0, 2018-01-24)
motion_blur\__init__.py (0, 2018-01-24)
motion_blur\blur_image.py (5521, 2018-01-24)
... ...

# DeblurGAN [arXiv Paper Version](https://arxiv.org/pdf/1711.070***.pdf) Pytorch implementation of the paper DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks. Our network takes blurry image as an input and procude the corresponding sharp estimate, as in the example: The model we use is Conditional Wasserstein GAN with Gradient Penalty + Perceptual loss based on VGG-19 activations. Such architecture also gives good results on other image-to-image translation problems (super resolution, colorization, inpainting, dehazing etc.) ## How to run ### Prerequisites - NVIDIA GPU + CUDA CuDNN (CPU untested, feedback appreciated) - Pytorch Download weights from [Dropbox](https://www.dropbox.com/s/5r6cy0x72s8x9yf/latest_net_G.pth?dl=0) . Note that during the inference you need to keep only Generator weights. Put the weights into ```bash /.checkpoints/experiment_name ``` To test a model put your blurry images into a folder and run: ```bash python test.py --dataroot /.path_to_your_data --model test --dataset_mode single --learn_residual ``` ## Data Download dataset for Object Detection benchmark from [Google Drive](https://drive.google.com/file/d/1CPMBmRj-jBDO2ax4CxkBs9iczIFrs8VA/view?usp=sharing) The code used to create the paper contains a bug in PSNR calculation, found by Huaijin Chen from Rice university, results recalculation are present below.
## Train If you want to train the model on your data run the following command to create image pairs: ```bash python datasets/combine_A_and_B.py --fold_A /path/to/data/A --fold_B /path/to/data/B --fold_AB /path/to/data ``` And then the following command to train the model ```bash python train.py --dataroot /.path_to_your_data --learn_residual --resize_or_crop crop --fineSize CROP_SIZE (we used 256) ``` ## Citation If you find our code helpful in your research or work please cite our paper. ``` @article{DeblurGAN, title = {DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks}, author = {Kupyn, Orest and Budzan, Volodymyr and Mykhailych, Mykola and Mishkin, Dmytro and Matas, Jiri}, journal = {ArXiv e-prints}, eprint = {1711.070***}, year = 2017 } ``` ## Acknowledgments Code borrows heavily from [pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix). The images were taken from GoPRO test dataset - [DeepDeblur](https://github.com/SeungjunNah/DeepDeblur_release)

近期下载者

相关文件


收藏者