No-reference image quality assessment method based on self-attention transformer encoder
摘要
In real-world scenarios, images captured by devices such as smartphones and cameras often contain diverse content and various types of distortions. Compared to synthetic distortions, real images may encounter more complex, non-uniform artifacts such as ghosting, overexposure, and motion blur, which pose significant challenges for quality assessment. To address the differences between real and synthetic distortions, this paper proposes a no-reference image quality assessment (NR-IQA) algorithm based on a self-attention Transformer encoder, aimed at effectively handling the complexity and diversity of distortions in real-world images. Unlike artificially synthesized distortions, real images captured by mobile phones or cameras are often affected by non-uniform artifacts like ghosting, overexposure, and motion blur, making quality evaluation more challenging. To tackle these issues, the proposed approach exclusively employs the encoder part of a multi-head self-attention mechanism Transformer architecture. Distinct from the original Transformer structure, only the encoder is used for image feature modeling, with the decoder removed to reduce model complexity and better suit the regression nature of NR-IQA tasks. The encoder employs multi-head self-attention to capture long-range dependencies between spatial features, enhancing feature representation and enabling comprehensive modeling of both local and global distortion characteristics. The entire framework consists of a simplified ResNet50 backbone (with Block4 removed to better preserve local details), a multi-head self-attention Transformer encoder, and a multi-layer perceptron for quality score prediction. Additionally, the model introduces positional embeddings and learnable additional tokens to strengthen its ability to handle various distortion types. Extensive experiments conducted on multiple real-world distortion datasets, along with data augmentation strategies, demonstrate the superior generalization performance of the proposed method across different datasets. Compared to existing state-of-the-art approaches, this algorithm exhibits higher accuracy and robustness, highlighting its practical value and broad application prospects in the field of image quality assessment.