Abstract
Defocus blur detection (DBD) is a classical low level vision task. It has recently attracted attention focusing on designing complex convolutional neural networks (CNN) which make full use of both low level features and high level semantic information. The heavy networks used in these methods lead to low processing speed, resulting difficulty in applying to real-time applications. In this work, we propose novel perspectives on the DBD problem and design convenient approach to build a real-time cost-effective DBD model. First, we observe that the semantic information does not always relate to and sometimes mislead the blur detection. We start from the essential characteristics of the DBD problem and propose a data augmentation method accordingly to inhibit the semantic information and enforce the model to learn image blur related features rather than the semantic features. A novel self-supervision training objective is proposed to enhance the model training consistency and stability. Second, by rethinking the relationship between defocus blur detection and salience detection, we identify two previously ignored but common scenarios, based on which we design a hard mining strategy to enhance the DBD model. By using the proposed techniques, our model that uses a slightly modified U-Net as backbone, improves the processing speed by more than 3 times and performs competitively against state of the art methods.
Introduction
Defocus Blur Detection (DBD) is the task of separating an image into "in-focus" and "out-of-focus" regions. It is a critical pre-processing step for applications like image deblurring, synthetic bokeh, and 3D reconstruction. Current deep-learning approaches often fall into two traps: semantic over-reliance and the saliency trap.
Most state-of-the-art (SOTA) models use massive networks to extract high-level semantic information. However, semantics can be misleading—two identical objects in a scene can have different blur levels depending on depth. Furthermore, models often struggle with "hard" cases where blur and saliency (what catches the eye) conflict, such as a blurry object in the foreground that is salient, or a sharp background that is non-salient.
Proposed Methodology
The researchers propose a "cost-effective" approach that focuses on the inherent characteristics of blur rather than just adding more layers.
Modified U-Net Backbone
Instead of a massive ResNet, they use a streamlined U-Net. Crucially, they feed horizontal and vertical image gradients into the network alongside the RGB image, helping the model focus on edge sharpness from the start.
Patch-Swap and Self-Supervision
To break the model's reliance on semantics, they randomly swap patches within an image. This destroys the "objectness" of the scene but preserves local blur/clarity. This forces the model to learn clarity features rather than just recognizing objects. They introduce a consistency constraint: if input patches are swapped, the output blur mask should reflect that exact same swap.
Saliency-Based Hard Mining
They use an existing saliency detection model to identify regions where blur and saliency are inconsistent. They then apply a higher weight to these "hard" regions in the loss function, forcing the model to work harder on the most difficult parts of the image.
Experimental Results
The model was evaluated on the CUHK and DUT datasets. The DUT dataset is particularly challenging due to complex scenes.
- Speed: The model achieves 58.82 FPS on a single GPU, which is 3.29x faster than the previous second-fastest method (DeFusionNet).
- Accuracy: Despite its lightweight nature, the model outperformed SOTA methods on the DUT dataset, improving the F-measure by 1.6% and reducing the Mean Absolute Error (MAE) by 2.5%.
- Efficiency: The model size is significantly smaller (approx. 26.7M parameters), making it viable for mobile or edge applications.
Key Insights
Blur detection is fundamentally a low-level vision task. While semantics can help, relying on them too much makes models slow and prone to errors in complex depth-of-field scenarios. By intentionally "breaking" objects through patch-swapping, the authors ensure the model detects blur based purely on texture and gradients.
Conclusion
This work demonstrates that real-time DBD is achievable by rethinking the problem's core characteristics. Future work could extend the "transition-invariant" self-supervision logic to other low-level tasks like image denoising or reflection removal. While the current model focuses on defocus blur, adapting it for motion blur remains an open area for exploration.
Summary updated