A Sharpness Based Loss Function for Removing Out-of-Focus Blur
Uditangshu Aurangabadkar, Darren Ramsook, Anil Kokaram
TL;DR
This work addresses removing out-of-focus blur by introducing a differentiable, no-reference sharpness metric $Q$ as a loss in an encoder–decoder deblurring network. It pairs this loss with a new high-resolution dataset of real-world defocused images and a two-stage training strategy, yielding sharper restorations and improved perceptual quality (LPIPS) alongside competitive PSNR and SSIM. The method demonstrates notable gains on synthetic defocus benchmarks and real-world images, and it shows promise for guiding state-of-the-art models toward crisper outputs without sacrificing fidelity. The work provides a practical approach to integrating perceptual sharpness into training and offers a valuable dataset for evaluation in real-camera blur scenarios.
Abstract
The success of modern Deep Neural Network (DNN) approaches can be attributed to the use of complex optimization criteria beyond standard losses such as mean absolute error (MAE) or mean squared error (MSE). In this work, we propose a novel method of utilising a no-reference sharpness metric Q introduced by Zhu and Milanfar for removing out-of-focus blur from images. We also introduce a novel dataset of real-world out-of-focus images for assessing restoration models. Our fine-tuned method produces images with a 7.5 % increase in perceptual quality (LPIPS) as compared to a standard model trained only on MAE. Furthermore, we observe a 6.7 % increase in Q (reflecting sharper restorations) and 7.25 % increase in PSNR over most state-of-the-art (SOTA) methods.
