Real-world image restoration aims to restore high-quality (HQ) images from degraded low-quality (LQ) inputs captured under uncontrolled conditions. Existing methods typically depend on ground-truth (GT) supervision, assuming that GT provides perfect reference quality. However, GT can still contain images with inconsistent perceptual fidelity, causing models to converge to the average quality level of the training data rather than achieving the highest perceptual quality attainable. To address these problems, we propose a novel framework, termed IQPIR, that introduces an Image Quality Prior (IQP)-extracted from pre-trained No-Reference Image Quality Assessment (NR-IQA) models-to guide the restoration process toward perceptually optimal outputs explicitly. Our approach synergistically integrates IQP with a learned codebook prior through three key mechanisms: (1) a quality-conditioned Transformer, where NR-IQA-derived scores serve as conditioning signals to steer the predicted representation toward maximal perceptual quality. This design provides a plug-and-play enhancement compatible with existing restoration architectures without structural modification; and (2) a dual-branch codebook structure, which disentangles common and HQ-specific features, ensuring a comprehensive representation of both generic structural information and quality-sensitive attributes; and (3) a discrete representation-based quality optimization strategy, which mitigates over-optimization effects commonly observed in continuous latent spaces. Extensive experiments on real-world image restoration demonstrate that our method not only surpasses cutting-edge methods but also serves as a generalizable quality-guided enhancement strategy for existing methods. The code is available.
Figures & tables
Figure 2: Structural comparison of different training paradigms, where both (b) and our (c) utilize IQA to guide network training.
Figure 3: Results on blind face restoration. DifFace+ is the DifFace [ 59 ] with our quality prior conditioned approach, having more details. Our IQPIR has the highest perceptual quality.
Figure 4: Overall framework of IQPIR. (a) In the codebook learning stage, a dual-codebook architecture is proposed. The HQ+ codebook is learned to quantize Zh only when the quality score of xh is higher than the threshold Sthr . (b) In the codebook lookup stage, we input the quality score S as a condition into Transformer T , which predicts two code sequences at the same time. The two codebooks are leveraged to look up the corresponding code entries. Finally, the NR-IQA model is utilized to calculate the quality loss Lquality .
Data.
Methods
TOPIQ-G ↑
Musiq-G ↑
Musiq-K ↑
Musiq-A ↑
Arniqa ↑
MDFS ↓
Q-Align ↑
CLIP-IQA ↑
LFW-Test
RestoreFormer [ 50 ]
0.793
0.807
73.70
4.65
0.711
18.64
4.22
0.741
DR2 [ 49 ]
0.720
0.753
67.13
4.67
0.700
18.43
4.23
0.658
CodeFormer [ 67 ]
0.809
0.832
75.47
4.76
0.726
18.46
4.31
0.697
DifFace [ 59 ]
0.718
0.748
69.90
4.48
0.686
18.41
3.86
0.610
DAEFR [ 46 ]
0.814
0.827
75.84
4.81
0.742
17.91
4.33
0.696
WaveFace [ 39 ]
0.786
0.799
73.55
4.69
0.689
19.18
4.43
0.788
Table 1: Results on blind face restoration. The best two results are in red and blue fonts, respectively.
LOL-v1
LOL-v2-real
LOL-v2-synthetic
Methods
Sources
PSNR ↑
SSIM ↑
FID ↓
BIQE ↓
PSNR ↑
SSIM ↑
FID ↓
BIQE ↓
PSNR ↑
SSIM ↑
FID ↓
BIQE ↓
CUE [ 65 ]
ICCV23
21.86
0.841
69.83
27.15
21.19
0.829
67.05
28.83
24.41
0.917
31.33
33.83
GSAD [ 25 ]
NIPS23
23.23
0.852
51.64
19.96
20.19
0.847
46.77
28.85
24.22
0.927
19.24
25.76
AST [ 68 ]
CVPR24
21.09
0.858
87.67
21.23
21.68
0.856
91.81
25.17
22.25
0.927
37.19
28.78
MambaIR [ 12 ]
ECCV24
22.23
0.863
63.39
20.17
21.15
0.857
56.09
24.46
25.75
0.937
19.75
20.37
Reti-Diff [ 13 ]
ICLR25
25.35
0.866
49.14
17.75
22.97
0.858
43.18
23.66
27.53
0.951
13.26
15.77
Table 2: Results on low-light image enhancement.
UIEB
Methods
Sources
PSNR ↑
SSIM ↑
UCIQE ↑
UIQM ↑
PUGAN [ 4 ]
TIP23
23.05
0.897
0.608
2.902
ADP [ 66 ]
IJCV23
22.90
0.892
0.621
3.005
NU2Net [ 11 ]
AAAI23
22.38
0.903
0.587
2.936
AST [ 68 ]
CVPR24
22.19
0.908
0.602
2.981
MambaIR [ 12 ]
ECCV24
22.60
0.916
0.617
2.991
Table 3: Results on underwater image enhancement.
Figure 5: Visualizations on low light, underwater and backlit image restoration.