SAM-IQA: Can Segment Anything Boost Image Quality Assessment?

Xinpeng Li, Ting Jiang, Haoqiang Fan, Shuaicheng LiuarXiv 2023 · DOI

Introduction

Image Quality Assessment (IQA) aims to computationally model human perception of image quality, a task complicated by the subjective nature of human vision and the scarcity of large-scale labeled datasets. Traditional approaches often rely on "foundation" models like ResNet, pre-trained on ImageNet, to extract features. However, these models may lack the semantic depth required for nuanced quality prediction. Furthermore, most existing IQA methods focus predominantly on spatial-domain features, potentially overlooking degradations like periodic noise or global blur that are more apparent in the frequency domain.

SAM-IQA addresses these challenges by leveraging the Segment Anything Model (SAM) as a robust feature extractor. By integrating SAM’s semantic richness with a novel Spatial-Frequency Feature Extraction Module (SFEM), the proposed framework achieves state-of-the-art performance in both full-reference (FR) and no-reference (NR) IQA tasks.

Methodology

The SAM-IQA architecture consists of three primary components designed to capture both local and global image characteristics.

Overview of the SAM-IQA architecture for both Full-Reference and No-Reference tasks.
  1. SAM Encoder: The model utilizes the heavy-duty ViT-H encoder from Meta’s Segment Anything Model. Having been trained on over 11 million images and 1 billion masks, its internal representations are exceptionally robust and generalize well across diverse distortion types.
  2. Spatial-Frequency Feature Extraction Module (SFEM): This module processes SAM-extracted features through parallel branches. The Spatial Branch uses $1 \times 1$ convolutions to capture local textural details. The Frequency Branch employs Fourier Convolutions—applying Fast Fourier Transform (FFT), frequency-domain convolutions, and Inverse FFT—to achieve a global receptive field, enabling the detection of wide-spanning noise and blur patterns.
  3. Regression Heads: For FR-IQA, the model computes the $L_1$ distance between reference and distorted image features. For NR-IQA, quality scores are predicted directly from the distorted image's features.

Experimental Evaluation

The model was benchmarked on four major IQA datasets: LIVE, CSIQ, TID2013, and the large-scale KADID-10k. Performance was measured using Spearman’s Rank Correlation Coefficient (SRCC) and Pearson’s Linear Correlation Coefficient (PLCC) to assess alignment with human Mean Opinion Scores (MOS).

Results and Discussion

SAM-IQA demonstrated superior performance across nearly all benchmarks, establishing new state-of-the-art results.

Comparison of SAM-IQA against state-of-the-art FR-IQA and NR-IQA methods across four benchmark datasets.

In FR-IQA tasks, SAM-IQA achieved an SRCC of 0.996 on the LIVE dataset, significantly outperforming established metrics like LPIPS and DISTS. In NR-IQA scenarios, the model remained highly competitive, reaching an SRCC of 0.994 on LIVE and 0.879 on TID2013.

Ablation studies confirmed the necessity of the dual-branch SFEM; removing either the spatial or frequency component led to a measurable decline in performance. This highlights the importance of multi-domain feature extraction for accurate quality assessment. Additionally, the authors found that a simple $L_1$ distance metric for feature comparison outperformed more complex alternatives like Cosine Similarity or Kullback-Leibler Divergence (KLD).

Conclusion and Future Work

SAM-IQA proves that features learned for large-scale segmentation are highly effective for quality assessment. While the model sets new performance standards, the computational intensity of the ViT-H encoder presents challenges for real-time deployment. Future research may explore fine-tuning the encoder for specific IQA tasks or evaluating its robustness against modern AI-generated artifacts.

Summary updated

Abstract

Image Quality Assessment (IQA) is a challenging task that requires training on massive datasets to achieve accurate predictions. However, due to the lack of IQA data, deep learning-based IQA methods typically rely on pre-trained networks trained on massive datasets as feature extractors to enhance their generalization ability, such as the ResNet network trained on ImageNet. In this paper, we utilize the encoder of Segment Anything, a recently proposed segmentation model trained on a massive dataset, for high-level semantic feature extraction. Most IQA methods are limited to extracting spatial-domain features, while frequency-domain features have been shown to better represent noise and blur. Therefore, we leverage both spatial-domain and frequency-domain features by applying Fourier and standard convolutions on the extracted features, respectively. Extensive experiments are conducted to demonstrate the effectiveness of all the proposed components, and results show that our approach outperforms the state-of-the-art (SOTA) in four representative datasets, both qualitatively and quantitatively. Our experiments confirm the powerful feature extraction capabilities of Segment Anything and highlight the value of combining spatial-domain and frequency-domain features in IQA tasks. Code: https://github.com/Hedlen/SAM-IQA

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
LIVEResNet50SRCC0.979Image Quality Assessment · split: test · protocol=full-reference
Source quote
L185: ResNet50~\cite{he2016deep} │ 0.979 │ 0.982 │ 0.949 │ 0.958
LIVEResNet50PLCC0.982Image Quality Assessment · split: test · protocol=full-reference
Source quote
L185: ResNet50~\cite{he2016deep} │ 0.979 │ 0.982 │ 0.949 │ 0.958
TID2013ResNet50SRCC0.949Image Quality Assessment · split: test · protocol=full-reference
Source quote
L185: ResNet50~\cite{he2016deep} │ 0.979 │ 0.982 │ 0.949 │ 0.958
TID2013ResNet50PLCC0.958Image Quality Assessment · split: test · protocol=full-reference
Source quote
L185: ResNet50~\cite{he2016deep} │ 0.979 │ 0.982 │ 0.949 │ 0.958
BibTeX
@misc{li2023sam,
  author = {Xinpeng Li and Ting Jiang and Haoqiang Fan and Shuaicheng Liu},
  title = {{SAM-IQA: Can Segment Anything Boost Image Quality Assessment?}},
  year = {2023},
  eprint = {2307.04455},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.04455},
}
Figure