项目作者: pminhtam

项目描述 :
Pytorch implement "Attention Mechanism Enhanced Kernel Prediction Networks (AME-KPNs)"
高级语言: Python
项目地址: git://github.com/pminhtam/KPN_attention.git
创建时间: 2020-11-13T09:03:26Z
项目社区:https://github.com/pminhtam/KPN_attention

开源协议:

下载


Attention Mechanism Enhanced Kernel Prediction Networks (AME-KPNs)

Offical in Attention-Mechanism-Enhanced-KPN

The unofficial implementation of AME-KPNs in PyTorch, and paper is accepted by ICASSP 2020 (oral), it is available at http://arxiv.org/abs/1910.08313.

Data

Use SIDD dataset to train.

Have two folder : noisy image and ground true image

Input folder have struct :

  1. /
  2. /noise
  3. /[scene_instance]
  4. /[image].PNG
  5. /gt
  6. /[scene_instance]
  7. /[image].PNG

Train

This repo. supports training on multiple GPUs.

Train

  1. CUDA_VISIBLE_DEVICES=0,1 python train_eval_syn.py --noise_dir ../image/noise/ --gt_dir ../image/gt/ --image_size 512 --batch_size 1 --save_every 100 --loss_every 10 -nw 4 -c -m -ckpt att_kpn --model_type attKPN --restart
  1. If no `--restart`, the train process would be resumed.
  2. Train Deep Guide Filter

CUDA_VISIBLE_DEVICES=0,1 python train_eval_syn_DGF.py —noise_dir ../image/noise/ —gt_dir ../image/gt/ —image_size 512 —batch_size 1 —burst_length 16 —save_every 100 —loss_every 10 -nw 4 -c -m -ckpt att_kpn —model_type attKPN —restart```

  1. ## Eval
  2. Eval

CUDA_VISIBLE_DEVICES=0,1 python test.py —noise_dir ../image/noise/ —gt_dir ../image/gt/ —image_size 512 -nw 4 -c -m -ckpt att_kpn —model_type attKPN```

  1. Eval with custome data : data have two folder image : *noise* and *gt*.
  2. Image will save in folder *-s* after predicted.

CUDA_VISIBLE_DEVICES=1 python test_custom_DGF.py -n ../FullTest/noisy/ -g ../FullTest/clean/ -b 4 -c -ckpt att_kpn_dgf_4_new -m attKPN -s img/att_kpn_dgf_4_new

  1. ### News
  2. - Support KPN (Kernel Prediction Networks), MKPN (Multi-Kernel Prediction Networks)
  3. - The current version supports training on color images.
  4. - Add Deep Guide Filter
  5. - Add noise estimate model to end-to-end denoising model
  6. - Add KPN_Wave : replace **polling** layer by **Wavelet pooling**, **Upsampling** by **inverse wavelet pooling**. (*Att_KPN_Wavelet_DGF*)
  7. - Add NonKPN model
  8. - Add synthetic data loader
  9. ## Name
  10. *_custom : load image from unstruct folder, print or save image for report
  11. *_split : load one image and split image into burst image.
  12. *_DGF : model with Deep Guide Filter
  13. *_noise : model with noise estimate
  14. ### Requirements

pip install -r requirments.txt

  1. ### Citation

https://github.com/z-bingo/Attention-Mechanism-Enhanced-KPN

@article{zhang2019attention,
title={Attention Mechanism Enhanced Kernel Prediction Networks for Denoising of Burst Images},
author={Bin Zhang and Shenyao Jin and Yili Xia and Yongming Huang and Zixiang Xiong},
year={2019},
journal={arXiv preprint arXiv:1910.08313}
}
```