Skip to content

Repository files navigation

RAG-IQA: Retrieval-Augmented No-Reference Image Quality Assessment

A non-parametric, explainable pipeline for no-reference image quality assessment. Frozen pretrained encoders are fused into a unified L2-normalised feature space; quality scores are predicted by retrieving the K nearest neighbours of a query image and fitting a closed-form local regressor on them.

Image
  │
  ├─ ARNIQA (256d) ──┐
  ├─ CONTRIQUE (512d) ├─ L2-norm each ─► weighted concat ─► L2-norm ─► unified feature
  ├─ DINOv2 (1024d)  │                                            │
  ├─ CLIP (768d)     │                                            │
  └─ MAE (1024d) ────┘                                            │
                                                                    ▼
                                                   cosine similarity retrieval
                                                                    │
                                                                    ▼
                                              top-K neighbours ─► local regressor
                                                                    │
                                                                    ▼
                                                          predicted quality score

Pipeline

extraction/           →  Phase 1                →  Phase 2                    →  Phase 3
Extract 5 encoder      Select the best           Optimise fusion weights +      Sobol indices, PDP, ICE,
features for all       regression method          hyperparameters for the        H-statistics, robustness,
6 datasets              per dataset                winning regressor              encoder importance heatmap
                        (500-pt LHS, 6              (500-pt LHS, successive
                        candidates, successive       halving 500x10→100x50→20x100,
                        halving)                     100-rep final numbers)

Each phase has its own folder with the exact script used and a README explaining what it does and why.

Why these 5 encoders

ARNIQA and CONTRIQUE are IQA-specific encoders pretrained explicitly on distortion manifolds; DINOv2, CLIP, and MAE are general-purpose vision encoders that have never seen quality labels. Combining distortion-aware and semantic/content-aware representations tests whether general-purpose features add information that IQA-specific encoders miss.

Why these 6 datasets

KADID-10k, CSIQ, and TID2013 cover synthetic distortions; KonIQ-10k, LIVEC, and SPAQ cover authentic in-the-wild distortions. Covering both regimes is necessary to claim the method generalises across the two dominant paradigms in IQA benchmarking.

Why these 6 regressors

Linear KRR, RBF KRR, Nadaraya-Watson, LWLR, RKS-KRR, and GPR are all closed-form or near-closed-form retrieval-conditioned regressors, chosen to span the space from simple (linear, no kernel bandwidth) to expressive (RBF, LWLR) while remaining non-parametric and requiring no gradient-based training.

Results

Final Phase 2 numbers (100-rep median, 60/20/20 reference-disjoint protocol, 5-encoder fusion):

Dataset Regressor SROCC PLCC
KADID-10k LWLR 0.9388 -
CSIQ RBF KRR 0.9656 0.9730
TID2013 LWLR 0.9153 -
KonIQ-10k RBF KRR 0.8900 -
LIVEC Linear KRR 0.8449 0.8624
SPAQ Linear KRR 0.9085 -

Phase 1 (2-encoder ARNIQA+CONTRIQUE baseline, 20-rep median) results:

Dataset Winning regressor SROCC
KADID-10k LWLR 0.9415
CSIQ RBF KRR 0.9646
TID2013 LWLR 0.9151
KonIQ-10k RBF KRR 0.8829
LIVEC Linear KRR 0.8397
SPAQ Linear KRR 0.9072

Phase 3 surrogate validation (5-fold repeated CV R² on the Stage-1 500-point landscape, per dataset):

Dataset Surrogate R²
KADID-10k 0.886
CSIQ 0.950
TID2013 0.915
KonIQ-10k 0.987
LIVEC 0.884
SPAQ 0.879

Sobol total-effect encoder importance, synthetic vs authentic mean:

Encoder Synthetic mean Authentic mean Diff
CONTRIQUE 0.072 0.071 -0.000
DINOv2 0.005 0.105 +0.101
CLIP 0.009 0.129 +0.120
MAE 0.002 0.005 +0.004

Robustness (mean |ΔSROCC| when optimal encoder weights are perturbed ±20%):

Dataset Mean Δ SROCC
KADID-10k 0.0009
CSIQ 0.0002
TID2013 0.1142
KonIQ-10k 0.0020
LIVEC 0.0008
SPAQ 0.0003

Repository structure

RAG-IQA/
├── README.md                              (this file)
├── extraction/                            5 feature-extraction scripts + README
├── phase1_model_selection/                Phase 1 script + README
├── phase2_hyperparameter_optimization/     Phase 2 script + README
├── phase3_scientific_analysis/            Phase 3 script + README
└── figures/                               (rendered plots, populate manually)

About

Retrieval-augmented NR-IQA: 5-encoder fusion + closed-form regression, AutoML model selection across 6 IQA benchmarks

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages