Q-Refine: A Perceptual Quality Refiner for AI-Generated Image

Chunyi Li, Haoning Wu, Zicheng Zhang, Hongkun Hao, Kaiwei Zhang, Lei Bai, Xiaohong Liu, Xiongkuo Min, Weisi Lin, Guangtao Zhai

Abstract

AI-generated images (AIGIs) often exhibit inconsistent quality across different regions, where high-fidelity details coexist with significant artifacts. Traditional image refiners typically apply uniform enhancements, which can fail to fix severe local defects or, conversely, degrade already high-quality areas—a phenomenon known as "negative optimization." We present Q-Refine, a quality-aware framework that utilizes an Image Quality Assessment (IQA) map to guide a multi-stage refinement process. By applying adaptive strategies—including noise injection for low-quality regions and masked inpainting for medium-quality areas—Q-Refine effectively enhances image fidelity and aesthetics without harming well-rendered regions. Experimental results show that Q-Refine achieves state-of-the-art performance across multiple benchmarks and various generative models.

Introduction

The rise of Text-to-Image (T2I) models like Stable Diffusion and MidJourney has transformed digital content creation. However, these models frequently produce outputs with uneven quality; for instance, a photorealistic face might be paired with a distorted limb. Existing refinement techniques often struggle with two primary issues:

  1. Uniformity: Applying the same enhancement globally often fails to rectify "Low-Quality" (LQ) regions that are trapped in local optima.
  2. Negative Optimization: Refining "High-Quality" (HQ) regions can introduce unwanted artifacts, reducing a superior image to a mediocre "Medium-Quality" (MQ) level.
Comparison of Q-Refine against traditional refiners, highlighting the avoidance of negative optimization.

Q-Refine addresses these challenges by being "quality-aware," identifying specific regions that require intensive correction versus those that should remain untouched.

Methods

The Q-Refine framework employs a three-stage adaptive pipeline guided by a localized quality map.

The Q-Refine architecture, showing the IQA module and the three-stage refinement pipeline.

IQA Module and Quality Mapping

The process begins with an IQA module using a Faster-RCNN backbone to generate a patch-based quality map. To ensure seamless transitions during refinement and avoid "blocky" artifacts, the system applies Bi-Cubic interpolation to create a "flattened" (smooth) quality map.

Three-Stage Adaptive Pipeline

  1. Stage 1: Gaussian Noise Injection: For the lowest-quality regions, the system injects Gaussian noise. This acts as a "reset," providing the diffusion model with the variance needed to escape low-quality local optima and find better global solutions during subsequent denoising.
  2. Stage 2: Masked Inpainting: Guided by the quality map, the system masks LQ and MQ regions. A diffusion-based inpainting process then redraws these areas while strictly preserving HQ regions.
  3. Stage 3: Global Enhancement: The final stage involves a fine-tuning pass. Depending on the overall quality score, the system selects either a Blind Enhancer for low-level fidelity issues or a Prompt-Guided Enhancer for high-level aesthetic polishing.

Experimental Evaluation

Q-Refine was validated on three major AIGI quality databases: AGIQA-3K, AGIQA-1K, and AIGCIQA. The test set included images from a diverse range of models, including GLIDE, SDXL, DALLE2, and Stable Diffusion 1.5.

Key Results

  • State-of-the-Art Performance: Q-Refine outperformed existing methods on 16 out of 18 quality indexes across the evaluated datasets.
  • Robustness: Unlike traditional refiners (e.g., DASR or SDXL-refiner), Q-Refine consistently avoided negative optimization. Refined images were either significantly improved or maintained their original high quality.
  • Fidelity and Aesthetics: For lower-quality models like GLIDE, Q-Refine drastically improved fidelity (e.g., reducing Brisque error from 71.33 to 31.72). On high-end models like SDXL, it boosted aesthetic scores (from 0.617 to 0.664) by refining low-level attributes without altering core content.

Conclusion

Q-Refine demonstrates that quality-aware processing is essential for effective AIGI refinement. By selectively applying noise injection and masked inpainting based on localized quality assessments, the framework avoids the pitfalls of global refinement. Future work may involve integrating this quality-aware logic directly into the iterative sampling process of T2I models to improve efficiency and performance further.

Summary updated

BibTeX
@inproceedings{li2024q,
  author = {Chunyi Li and Haoning Wu and Zicheng Zhang and Hongkun Hao and Kaiwei Zhang and Lei Bai and Xiaohong Liu and Xiongkuo Min and Weisi Lin and Guangtao Zhai},
  title = {{Q-Refine: A Perceptual Quality Refiner for AI-Generated Image}},
  booktitle = {ICME},
  year = {2024},
  url = {https://openreview.net/forum?id=cNmIJE4bh4},
}
Figure