BlockCNN: A Deep Network for Artifact Removal and Image Compression

Danial Maleki, Soheila Nadalian, Mohammad Mahdi Derakhshani, Mohammad Amin Sadeghi

TL;DR

BlockCNN introduces a unified convolutional architecture designed to both clean up existing JPEG artifacts and power a new compression scheme. By coupling deep block-level predictive modeling with legacy JPEG routines, it significantly outperforms traditional JPEG, JPEG 2000, and early deep learning baselines at low bitrates while remaining lightweight.

What Problem Does This Paper Address?

Standard JPEG compresses images by splitting them into $8 \times 8$ pixel blocks and quantizing their discrete cosine transform (DCT) coefficients independently. While computationally efficient and ubiquitous, this approach introduces noticeable artifacts at low bitrates—namely blockiness, ringing around edges, and chromatic distortions.

Modern deep-learning approaches often replace compression pipelines entirely with complex end-to-end autoencoders and learned entropy models. BlockCNN takes a pragmatic middle ground: how can we leverage the spatial inductive bias of JPEG's $8 \times 8$ grid and reuse existing JPEG infrastructure, while using deep networks to dramatically improve visual quality and compression efficiency?

Methods

The authors propose BlockCNN, a residual convolutional neural network structured around $8 \times 8$ image blocks:

  • Core Architecture: The network takes a $24 \times 24$ patch (an $8 \times 8$ target block surrounded by its immediate neighbors) and outputs an enhanced or predicted $8 \times 8$ block. It comprises initial convolutional layers followed by 9 residual blocks (each containing $1\times 1$ and $3\times 3$ convolutions, batch normalization, and LeakyReLU activations). Training uses Mean Squared Error (MSE) loss and the Adam optimizer in the Lab color space to treat luminance and chrominance artifacts effectively.
  • Task 1: Artifact Removal: Given a compressed central block and all 8 surrounding blocks (full context), the model predicts the uncompressed block by learning the artifact residual.
  • Task 2: Image Compression: Operating on the principle that "anything that can be predicted does not need to be stored," the encoder scans blocks sequentially (row-wise):
  • Predict: BlockCNN predicts the current $8 \times 8$ block using the four previously decoded neighbors (three above, one to the left).
  • Residual: It computes the residual difference between the original and predicted block.
  • Legacy Encode: This residual is compressed using standard JPEG routines, allowing quality tuning via the JPEG quality factor.
  • Decompress & Clean: During decompression, each block is reconstructed deterministically from previous decompressed blocks plus the decoded residual. Finally, the Artifact Removal network is applied to polish the result.
Compression Pipeline:
[Previously Decoded Blocks] ──> [BlockCNN Predictor] ──> Predicted Block
                                                               │
[Original Block] ──────────────────────────────────────── ( - )
                                                               │
                                                               ▼
                                                     Residual Block
                                                               │
                                                               ▼
                                                     [Standard JPEG Enc.]

Datasets

  • Training: PASCAL VOC 2007, yielding approximately 6 million $8 \times 8$ / $24 \times 24$ block pairs.
  • Evaluation (Artifact Removal): The LIVE image quality assessment dataset, benchmarked against AR-CNN.
  • Evaluation (Compression): The standard Kodak photographic image dataset, benchmarked against standard JPEG, JPEG 2000, CAE (Theis et al.), and Toderici et al.'s RNN-based compression.
  • No new benchmarks or datasets were introduced.

Key Insights and Ideas

  • Spatial Non-Uniformity of Artifacts: The authors observe that compression error is not uniformly distributed: pixel error is significantly higher along block edges than at the center. Operating directly on $8 \times 8$ block coordinates gives the network a strong spatial prior to target boundary artifacts.
  • Closed-Loop Sequential Prediction: When compressing, the predictor must feed on previously compressed/decompressed blocks rather than raw ground-truth blocks. This prevents reconstruction noise from compounding across the image.
  • Infrastructure Reuse: Instead of requiring specialized hardware or new decoders for entropy coding, the framework leverages off-the-shelf JPEG routines to compress residual signals, retaining backward compatibility concepts and simple rate control.

Key Results

  • Artifact Reduction: BlockCNN produces visibly cleaner reconstructions than AR-CNN, noticeably reducing grid boundaries and high-frequency ringing artifacts.
  • Compression Efficiency: On the Kodak dataset, BlockCNN achieves superior PSNR and SSIM curves compared to baseline JPEG, JPEG 2000, and deep learning baselines (CAE, Toderici et al.) at low bitrates ($< 0.5$ bits per pixel).
  • Detail Preservation: At roughly $0.25$ bpp and $0.36$ bpp, qualitative visual comparisons demonstrate sharper edges and better-preserved textures compared to severely blurred or blocky baseline outputs.

Limitations and Future Work

  • Strictly Sequential Decoding: Raster-order autoregressive prediction across blocks prevents full parallelization during image decoding.
  • Limited Context Window: The network uses only immediately adjacent blocks ($24 \times 24$ window). While expanding context could improve predictive performance, the paper restricts it to single-block boundaries for simplicity.
  • Reliance on Legacy Quantization: Although reusing JPEG simplifies the pipeline, compressing residuals with standard DCT quantization is inherently suboptimal compared to modern learned, fully end-to-end entropy models, particularly at medium-to-high bitrates.

Summary updated

BibTeX
@inproceedings{maleki2018blockcnn,
  author = {Danial Maleki and Soheila Nadalian and Mohammad Mahdi Derakhshani and Mohammad Amin Sadeghi},
  title = {{BlockCNN: A Deep Network for Artifact Removal and Image Compression}},
  booktitle = {Workshops @ CVPR},
  year = {2018},
  url = {https://openreview.net/forum?id=SyVnbAbuZr},
}

Loading related content...

Figure