TL;DR
Diff-SSR introduces a novel way to bake fine-grained structural knowledge into diffusion-based image super-resolution without any extra cost at inference time. By modulating the mean of the noise during the training's forward diffusion process using Segment Anything Model (SAM) masks, the model learns to recover complex textures and sharp boundaries while remaining as fast as a standard diffusion model.
What Problem Does This Paper Address?
Diffusion models have become a powerhouse for image super-resolution (SR), but they have a subtle flaw: they typically treat every pixel the same during the noise-injection process. In standard diffusion, we add independent and identically distributed (i.i.d.) Gaussian noise across the entire image.
However, real-world images are semantically diverse—a bird’s feather has a vastly different texture and data distribution than its beak. Treating these regions identically can lead to "texture confusion," where the model generates blurry structures or unpleasant artifacts because it hasn't learned the distinct local correlations of different semantic regions. While some researchers have tried using segmentation models like SAM to guide the process, doing so usually requires running those heavy models during inference, which drastically slows down the super-resolution process.
Methods
The authors propose a "structure-modulated" framework that moves the heavy lifting to the training phase.
- Structural Position Encoding (SPE): During training, the high-resolution (HR) image is passed through SAM to generate fine-grained masks. To make these masks useful, the SPE module assigns a unique value to each segmented region using Rotary Position Embedding (RoPE). This creates a "positioned" mask ($E_{SAM}$) where each semantic area is numerically distinct.
- Forward Noise Modulation: Instead of adding zero-mean Gaussian noise to the image, the authors modulate the noise mean using the SPE mask. In the forward process, the noise is shifted so that each segmented region has its own distribution mean.
- Training the Denoising U-Net: The diffusion model (a U-Net) is trained to estimate this modulated noise. By learning to remove noise that is "structured" by semantic regions, the model implicitly learns the high-level structural priors of the image.
- Zero-Cost Inference: This is the "aha" moment. Because the structural information was injected into the noise during training, the reverse diffusion process (inference) remains standard. The model has already "acquired" the ability to distinguish textures during training, so it can restore images without needing SAM or the SPE module at test time.
Datasets
The model was trained on standard high-quality datasets:
- DIV2K and Flickr2K for training.
- Evaluation was conducted on a wide battery of benchmarks: Set14, Urban100, BSDS100, Manga109, and General100, along with the DIV2K validation set.
Key Insights and Ideas
- SAM as a Silent Teacher: The paper treats SAM as an "oracle" that provides high-quality structural labels only during training. This bypasses the computational bottleneck of using large foundation models in production.
- Modulating the Mean: Most diffusion research focuses on the reverse process. By changing the forward process (Equation 2 in the paper), the authors force the model to become aware of semantic boundaries to successfully denoise the image.
- Artifact Suppression: A major finding is that this structural awareness significantly reduces common diffusion artifacts—those weird, chaotic textures that sometimes appear when a model doesn't know where one object ends and another begins.
Key Results
- Efficiency: Diff-SSR maintains an inference time of ~37 seconds per image (on a V100), identical to the baseline SRDiff, while a version that directly integrates SAM (SAM+SRDiff) takes nearly twice as long (~65 seconds).
- Quality: On the DIV2K dataset, Diff-SSR achieved a PSNR of 29.34, significantly higher than the baseline SRDiff (28.6) and nearly matching the much heavier SAM+SRDiff (29.41).
- Perceptual Performance: The model consistently showed the lowest "Artifact" scores across multiple datasets, indicating cleaner, more realistic reconstructions compared to GAN-based and other diffusion-based methods.
Limitations and Future Work
- Retraining Requirement: Because the method modifies the fundamental forward diffusion process, it cannot be applied as a simple "plug-in" or fine-tuned via LoRA on existing models; it requires retraining from scratch.
- Dependency on Training Masks: The model's performance is capped by the quality of the masks used during training. The authors noted that using "High" quality masks (from the original SAM on HR images) yielded better results than "Low" quality masks (from MobileSAM on LR images).
- Generalization to Other Tasks: While focused on SR, the authors suggest this framework could be extended to other low-level tasks like inpainting or deblurring, though this remains to be tested.
- Future Segmentation: The authors anticipate that using even more advanced models like SAM2 for training could further push the boundaries of structural fidelity.
Summary updated