Skip to content

ViTDeblur: A Hierarchical Model for Defocus Deblurring (IEEE TCI 2024)

Notifications You must be signed in to change notification settings

erfect2020/ContextualDeblur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ViTDeblur: A Hierarchical Model for Defocus Deblurring

Pengwei Liang, Junjun Jiang, Xianming Liu, and Jiayi Ma

Harbin Institute of Technology, Harbin 150001, China. Electronic Information School, Wuhan University, Wuhan 430072, China.

Defocus deblurring, especially when facing spatially varying blur due to scene depth, remains a challenging problem. A more comprehensive understanding of the scene can lead to spatially adaptive deblurring techniques. While recent advancements in network architectures have predominantly addressed high-frequency details, the importance of scene understanding remains paramount. A crucial aspect of this understanding is contextual information. Contextual information captures vital high-level semantic cues essential for grasping the context and meaning of the input image. Beyond just providing cues, contextual information relates to object outlines and helps identify blurred regions in the image. Recognizing and effectively capitalizing on these cues can lead to substantial improvements in image recovery. With this foundation, we propose a novel method that integrates spatial details and contextual information, offering significant advancements in defocus deblurring. Consequently, we introduce a novel hierarchical model, built upon the capabilities of the Vision Transformer (ViT). This model seamlessly encodes both spatial details and contextual information, yielding a robust solution. In particular, our approach decouples the complex deblurring task into two distinct subtasks. The first is handled by a primary feature encoder that transforms blurred images into detailed representations. The second involves a contextual encoder that produces abstract and sharp representations from the primary ones. The combined outputs from these encoders are then merged by a decoder to reproduce the sharp target image. Our evaluation across multiple defocus deblurring datasets demonstrates that the proposed method achieves compelling performance.

📚Framework

image

Given a blurred image $x \in \mathbb{R}^{C\times H \times W}$, we first tokenize the image into $h \in \mathbb{R}^{N\times D}$. The primary feature encoder takes the tokenized ${h}$ as input and learns primary representations ${h_{b0}} \in \mathbb{R}^{N\times D}$ that preserve as much detail as possible from ${h}$. Subsequently, the contextual encoder employs the ${h_{b0}}$ to learn the sharp and abstract representations ${h_{s}}$, which eliminate the irrelevant blurry features. The decoder then combines the primary and abstract representations ${h_{b0}}$ and ${h_{s}}$ as inputs to reconstruct the deblurred image ${\hat{x}} \in \mathbb{R}^{C\times H \times W}$.

📊Results

RealDOF

image

LFDOF

image

Quantitative Results

Defocus deblurring comparisons on the DPDD test dataset, RealDOF dataset, and LFDOF dataset. Best and second best results are highlighted and italics.
Method DPDD RealDOF LFDOF
PSNRSSIMLPIPSMUSIQFSIMCKDN PSNRSSIMLPIPSMUSIQFSIMCKDN PSNRSSIMLPIPSMUSIQFSIMCKDN
Input 23.8900.7250.34955.3530.8720.492 22.3330.6330.52423.6420.8430.413 25.8740.7770.31649.6690.9150.524
DPDNet[1] 24.3480.7470.29156.5460.9010.524 22.8700.6700.43326.0960.8810.501 30.2180.8830.14461.2840.9750.617
AIFNet[2] 24.2130.7420.44746.7640.8640.502 23.0930.6800.55722.5020.8600.461 29.6770.8840.20261.4810.9760.624
MDP[3] 25.3470.7630.27557.3220.9080.528 23.5000.6810.40729.0230.8920.527 28.0690.8340.18561.3880.9750.618
KPAC[4] 25.2210.7740.22558.5080.9140.528 23.9750.7620.35529.6110.9030.533 28.9420.8570.17460.4350.9730.613
IFANet[5] 25.3660.7890.33152.2080.8920.515 24.7120.7480.46420.8870.8780.472 29.7870.8720.15658.8920.9690.610
GKMNet[6] 25.4680.7890.30655.8450.9100.531 24.2570.7290.46426.9380.9040.508 29.0810.8670.17159.0380.9690.605
DRBNet[7] 25.7250.7910.24058.8510.9180.546 24.4630.7510.34932.4830.9110.559 30.2530.8830.14762.6480.9780.622
Restormer[9] 25.9800.8110.23658.8260.9220.552 24.2840.7320.34631.0590.9210.528 30.0260.8830.14562.0290.9730.615
NRKNet[8] 26.1090.8100.23659.1180.9250.546 25.1480.7680.36130.2370.9210.561 30.4810.8840.14761.7380.9760.620
Ours 26.1140.8140.20160.768 0.9340.557 25.1410.7690.29534.866 0.9320.577 30.5080.8920.14462.164 0.9770.625

Evaluation

python disttest.py -opt options/test/Unify_DDPD_Test.yaml

Results

The full evaluation results, including DPDD, ReadDOF, and LFDOF, are available on Google Drive.

Bib

If this repo help you, please cite us:

@article{liang2024vitdeblur,
  title={Decoupling Image Deblurring Into Twofold: A Hierarchical Model for Defocus Deblurring},
  author={Liang, Pengwei and Jiang, Junjun and Liu, Xianming and Ma, Jiayi},
  journal={IEEE Transactions on Computational Imaging},
  year={2024},
  pages={1207-1220},
  volume={10},
  publisher={IEEE}
}

Reference

[1] A. Abuolaim and M. S. Brown, “Defocus deblurring using dual-pixel data,” in Proceedings of the European Conference on Computer Vision, 2020. [code,paper]
[2] L. Ruan, B. Chen, J. Li, and M.-L. Lam, “Aifnet: All-in-focus image restoration network using a light field-based dataset,” IEEE Transactions on Computational Imaging, vol. 7, pp. 675–688, 2021.[code,paper]
[3] A. Abuolaim, M. Afifi, and M. S. Brown, “Improving single-image defocus deblurring: How dual-pixel images help through multi-task learning,” in Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 2022, pp. 1231–1239.[code,paper]
[4] H. Son, J. Lee, S. Cho, and S. Lee, “Single image defocus deblurring using kernel-sharing parallel atrous convolutions,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021, pp.2642–2650.[code,paper]
[5] J. Lee, H. Son, J. Rim, S. Cho, and S. Lee, “Iterative filter adaptive network for single image defocus deblurring,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 2034–2042.[code,paper]
[6] Y. Quan, Z. Wu, and H. Ji, “Gaussian kernel mixture network for single image defocus deblurring,” Advances in Neural Information Processing Systems, vol. 34, pp. 20 812–20 824, 2021.[code,paper]
[7] L. Ruan, B. Chen, J. Li, and M. Lam, “Learning to deblur using light field generated and real defocus images,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022, pp. 16 304–16 313.[code,paper]
[8] Y. Quan, Z. Wu, and H. Ji, “Neumann network with recursive kernels for single image defocus deblurring,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023, pp. 5754–5763.[code,paper]
[9] Zamir, S. W., Arora, A., Khan, S., Hayat, M., Khan, F. S., & Yang, M. H., “Restormer: Efficient Transformer for High-Resolution Image Restoration,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022, pp. 5728-5739.[code,paper]

About

ViTDeblur: A Hierarchical Model for Defocus Deblurring (IEEE TCI 2024)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages