Axial Position-Embedded Autofocus Learning Network with Multi-scale Feature-Enhancement
摘要
Due to axial defocus ambiguity, single-image-based autofocus methods face inherent challenges in precision and reliability. To overcome this, we propose an axial position-embedded autofocus learning method, framing the autofocus task as an ordinal regression problem. This involves predicting the best-focus position index of the input image in a focal stack by computing defocus cues. Based on a monocular depth estimation network, we design a novel multi-layer perceptron ordinal regression framework that uniquely uses two-frame input and incorporates axial focus position features to reduce axial defocus ambiguity. Additionally, to enhance multi-scale focus feature extraction and fusion, we implement a channel attention mechanism that adaptively selects feature scales, significantly boosting the precision and efficiency of best-focus position prediction. Experiments on a light field focal stack dataset show that our method achieves a Root Mean Square Error (RMSE) of 0.347 in focus localization, surpassing state-of-the-art autofocus methods while maintaining high computational efficiency. Ablation studies confirm the effectiveness of the axial position-embedded and attention modules.