Learning a Single Model With a Wide Range of Quality Factors for JPEG Image Artifacts Removal

Jianwei Li, Yongtao Wang, Haihua Xie, Kai-Kuang Ma

Abstract

JPEG compression often introduces undesirable artifacts like blocking and ringing, especially at low quality factors (QF). Traditional deep learning approaches typically require separate models for different QFs, which is impractical for real-world deployment. This paper presents QGCN (Quantization-table-based Global-branch Convolutional Network), a single model capable of handling a wide range of QFs (1–60). By incorporating the JPEG quantization tables as input and utilizing a dual-branch architecture to capture both local details and global context, QGCN achieves state-of-the-art performance in artifact removal and visual restoration.

Introduction

JPEG compression is ubiquitous due to its efficiency, but it achieves high compression ratios by discarding high-frequency information. This process leads to visible degradations: "blocking" artifacts at 8x8 grid boundaries, "ringing" around sharp edges, and "layering" in smooth gradients. While Convolutional Neural Networks (CNNs) have shown promise in mitigating these effects, most models are specialized for a specific QF. A model trained on QF 10 often fails or introduces new artifacts when applied to a QF 30 image. There is a critical need for a robust, "blind" restoration model that adapts to varying compression levels without retraining.

Original image showing the smooth sky region where JPEG artifacts are most noticeable.

Methodology: The QGCN Architecture

The proposed QGCN model addresses the specialization problem through two primary innovations:

1. Quantization-Table-Based Input

Rather than relying on a single QF value, QGCN takes the actual $8 \times 8$ JPEG quantization table as input. These tables are tiled to match the image dimensions and concatenated as additional channels. This provides the network with precise information about the frequency-domain suppression that occurred during compression, allowing it to mathematically adapt its restoration strategy to the specific degradation.

2. Dual-Branch Design

To handle artifacts at different scales, QGCN employs two parallel branches:

  • Restoration Branch: A deep residual network focused on local features. It excels at fixing pixel-level issues like ringing and mosquito noise.
  • Global Branch: This branch processes a downsampled version of the entire image ($112 \times 112$) to extract global context. This is essential for identifying large-scale structures and preventing "layering artifacts" in smooth areas like skies, where local-only filters might fail to see the broader gradient.

The model is trained using an "Easy-Hard" transfer learning strategy, starting with small patches for local restoration and fine-tuning on larger patches to optimize the global branch's contextual understanding.

Experimental Results

The model was trained on the DIV2K dataset with random QFs ranging from 1 to 60 and evaluated on standard benchmarks including LIVE1 and BSDS500.

Quantitative Performance

QGCN consistently outperforms previous state-of-the-art methods like AR-CNN and DnCNN. On the LIVE1 dataset at QF=10, QGCN reached a PSNR of 27.84 dB, a significant improvement over the standard JPEG (25.60 dB). Crucially, the model maintains high performance across the entire QF 1–60 range, demonstrating its robustness compared to specialized models.

Qualitative Visual Quality

Visually, QGCN is highly effective at removing false contours in smooth gradients and restoring sharp text. The global branch successfully prevents the "patchy" look often seen in other restoration methods.

Comparison between a compressed JPEG image (left) and the restoration result from QGCN (right), highlighting the removal of blocking artifacts in the sky.

Conclusion

QGCN represents a significant step toward universal JPEG artifact removal. By leveraging quantization tables and a dual-branch architecture, it eliminates the need for multiple specialized models. Future work may extend this approach to higher quality factors (QF > 60) and other lossy compression formats like WebP or HEVC.

Summary updated

Abstract

Lossy compression brings artifacts into the compressed image and degrades the visual quality. In recent years, many compression artifacts removal methods based on convolutional neural network (CNN) have been developed with great success. However, these methods usually train a model based on one specific value or a small range of quality factors. Obviously, if the test images quality factor does not match to the assumed value range, then degraded performance will be resulted. With this motivation and further consideration of practical usage, a highly robust compression artifacts removal network is proposed in this article. Our proposed network is a single model approach that can be trained for handling a wide range of quality factors while consistently delivering superior or comparable image artifacts removal performance. To demonstrate, we focus on the JPEG compression with quality factors, ranging from 1 to 60. Note that a turnkey success of our proposed network lies in the novel utilization of the quantization tables as part of the training data. Furthermore, it has two branches in parallel-i.e., the restoration branch and the global branch. The former effectively removes the local artifacts, such as ringing artifacts removal. On the other hand, the latter extracts the global features of the entire image that provides highly instrumental image quality improvement, especially effective on dealing with the global artifacts, such as blocking, color shifting. Extensive experimental results performed on color and grayscale images have clearly demonstrated the effectiveness and efficacy of our proposed single-model approach on the removal of compression artifacts from the decoded image.
BibTeX
@article{li2020learning,
  author = {Jianwei Li and Yongtao Wang and Haihua Xie and Kai-Kuang Ma},
  title = {{Learning a Single Model With a Wide Range of Quality Factors for JPEG Image Artifacts Removal}},
  journal = {IEEE Trans. Image Process.},
  year = {2020},
  url = {https://openreview.net/forum?id=Ko5tGTVPIPD},
}
Figure