Introduction
Image restoration—the process of enhancing degraded images such as those that are underexposed, underwater, or backlit—presents a persistent challenge in computer vision. While large-scale diffusion models have set new benchmarks for quality, their high computational cost makes them impractical for real-time applications. Conversely, lightweight models often struggle with "muddy" textures or artifacts due to limited capacity.
Traditional Knowledge Distillation (KD) attempts to bridge this gap by training a compact "student" network to mimic a high-performance "teacher." However, standard KD methods often rely on static feature matching, which fails to capture the dynamic dependencies in modern Transformer architectures. This leads to a distribution mismatch that limits the student's potential. RestoRect addresses these issues by reframing distillation as a generative process using latent rectified flow.
Methodology: Distillation as a Generative Path
RestoRect introduces several key innovations to improve the efficiency and quality of lightweight restoration models.
Latent Rectified Flow Distillation
The core of RestoRect is the use of latent rectified flow. Instead of forcing the student to match a static target, the model learns a "velocity field" in the latent space. It learns to transform random noise into high-quality, teacher-level features along a straight-line trajectory. This "flow matching" approach is significantly more efficient than standard diffusion, allowing the model to achieve superior results in just 1–4 inference steps.
FLEX (Feature Layer EXtraction) Loss
To overcome the distribution mismatch between teacher and student, the authors developed the FLEX loss. This mechanism "cross-normalizes" features by using the student's own statistics to normalize the teacher's features. This ensures that the high-dimensional knowledge from the teacher is presented in a format that the student can effectively learn. Additionally, a percentile-based mask is used to filter out noisy outliers that might otherwise destabilize the training process.
Architectural Enhancements
RestoRect incorporates several structural improvements:
- Spatial Channel Layer Normalization (SCLN): Better captures global image statistics compared to standard LayerNorm.
- Query-Key (QK) Normalization: Prevents attention weights from saturating in heavily degraded regions.
- Physics-Informed Priors: The model leverages Retinex theory for light/reflectance decomposition and learnable anisotropic diffusion for edge preservation.
- Polarized HVI Color Space: By using a trigonometric (sine/cosine) representation of hue, the model avoids common "red-zone" artifacts caused by the 0/360-degree discontinuity in standard color spaces.
Experimental Evaluation
The performance of RestoRect was validated across 15 datasets spanning four major restoration tasks: Low-Light (LLIE), Underwater (UIE), Backlit (BAID), and Medical/Fundus (FIE). The model's generalization was further tested on unpaired datasets (e.g., LIME, SICE) and downstream tasks like object detection on the ExDark dataset using YOLOv3.
Key Results
RestoRect consistently outperformed state-of-the-art methods like RetiDiff and CIDNet across nearly all metrics. Notable achievements include a 4.48dB PSNR improvement and an 11.65 reduction in FID on the BAID backlit dataset.
Beyond raw quality, RestoRect demonstrates exceptional efficiency. While typical diffusion models require dozens of steps, RestoRect reaches peak performance in only 1–4 steps. Furthermore, it maintains a lower parameter count than many competing Transformer-based models, as shown in the parameter comparison chart.
Conclusion and Future Work
RestoRect demonstrates that treating distillation as a generative path—rather than a static point-to-point mapping—enables lightweight models to inherit the power of large-scale diffusion. While highly effective, the model still faces challenges with extreme degradations where pixel information is entirely lost, sometimes leading to minor hallucinations. Future research will focus on improving robustness in these "zero-information" zones and extending the framework to temporal video restoration.
Summary updated