EnsIR: An Ensemble Algorithm for Image Restoration via Gaussian Mixture Models

Shangquan Sun, Wenqi Ren, Zikun Liu, Hyunhee Park, Rui Wang, Xiaochun Cao

Introduction

Image restoration—the process of recovering high-quality images from degraded versions (e.g., blurry, noisy, or low-resolution inputs)—is a fundamental yet "ill-posed" problem in computer vision. While deep learning architectures such as CNNs, Transformers, and Mambas have significantly advanced the state-of-the-art, individual models often exhibit specific prediction deviations or artifacts.

To mitigate these issues, researchers frequently turn to ensemble learning, which combines the outputs of multiple models to achieve a superior result. However, current ensemble strategies face a trilemma of flexibility, accuracy, and efficiency. Training-stage ensembles are inflexible, simple averaging is often inaccurate as it treats all models equally, and regression-based ensembles are computationally expensive. EnsIR (Ensemble Image Restoration) addresses these challenges by providing a training-free, "plug-and-play" post-training ensemble algorithm that is both more accurate than averaging and significantly faster than regression-based methods.

Methodology: GMM-Based Statistical Estimation

EnsIR treats the ensemble problem as a statistical estimation task using Gaussian Mixture Models (GMMs). The core methodology relies on three primary components:

  1. The Gaussian Prior: The algorithm assumes that the prediction error of any given restoration model follows a Gaussian distribution.
  2. Range-wise Binning: To handle the complexity of multivariate mathematics in image data, EnsIR partitions pixel values into discrete "bins" (e.g., 0-32, 32-64). This discretization converts the problem into several solvable univariate GMMs.
  3. Expectation-Maximization (EM) & LUT: The algorithm uses the EM algorithm on a small reference dataset to estimate optimal weights ($\alpha$) for each model within specific pixel ranges. These weights represent the "trustworthiness" of a model for specific intensities or textures. These learned weights are stored in a Lookup Table (LUT), allowing the actual fusion of images during inference to be extremely fast and entirely training-free.

Experimental Setup

The researchers evaluated EnsIR across 14 benchmarks covering three major restoration tasks:

  • Super-Resolution: Evaluated on Set5, Set14, BSDS100, Urban100, and Manga109.
  • Image Deblurring: Tested using GoPro, HIDE, RealBlur-J, and RealBlur-R.
  • Image Deraining: Benchmarked on Rain100H, Rain100L, Test100, Test1200, and Test2800.

Small samples from DIV2K, GoPro, and Rain13K were used as reference sets to calculate the initial GMM weights, demonstrating that the method requires very little data to calibrate effectively.

Key Insights and Results

EnsIR offers several advantages over traditional ensemble techniques:

Model-Agnostic Flexibility

EnsIR is entirely training-free. It can fuse outputs from disparate state-of-the-art models without knowledge of their internal architectures. This allows practitioners to combine the strengths of different labs' models (e.g., a Transformer-based model and a CNN-based model) instantly.

Per-Value Expert Selection

Unlike simple averaging, EnsIR recognizes performance biases. If one model is superior at reconstructing sharp edges while another excels at smooth gradients, the GMM weights naturally shift to favor the "expert" for those specific pixel ranges. This results in higher visual fidelity and the removal of "hallucinated" artifacts that individual models might produce.

Performance and Efficiency

In quantitative evaluations, EnsIR consistently outperformed simple averaging and complex regression methods (like AdaBoost or Random Forests) in terms of Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM).

Crucially, EnsIR maintains high efficiency. While slightly slower than simple averaging, it is orders of magnitude faster than regression-based methods. For instance, on the Rain100H benchmark, EnsIR was approximately 6x faster than Bagging and 50x faster than Random Forest ensembles.

Limitations and Future Work

While EnsIR represents a significant step forward, it is bound by the "Garbage In, Garbage Out" principle; if all base models fail to reconstruct a specific feature, the ensemble cannot create it from scratch. Additionally, there is a minor trade-off between bin width and accuracy, where smaller bins provide higher precision at the cost of processing time.

Future research directions include exploring GPU vectorization for the EM solver to achieve true real-time performance and integrating generative priors to handle cases where all base models are sub-optimal.

Summary updated

BibTeX
@inproceedings{sun2024ensir,
  author = {Shangquan Sun and Wenqi Ren and Zikun Liu and Hyunhee Park and Rui Wang and Xiaochun Cao},
  title = {{EnsIR: An Ensemble Algorithm for Image Restoration via Gaussian Mixture Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=s1MoH2pACa},
}
Figure