cs.CVApr 23, 2026

Pre-process for segmentation task with nonlinear diffusion filters

Authors: Javier SanguinoCarlos PlateroOlga Velasco

Abstract

This paper deals with the case of using nonlinear diffusion filters to obtain piecewise constant images as a previous process for segmentation techniques. We first show an intrinsic formulation for the nonlinear diffusion equation to provide some design conditions on the diffusion filters. According to this theoretical framework, we propose a new family of diffusivities; they are obtained from nonlinear diffusion techniques and are related with backward diffusion. Their goal is to split the image in closed contours with a homogenized grey intensity inside and with no blurred edges. We also prove that our filters satisfy the well-posedness semi-discrete and full discrete scale-space requirements. This shows that by using semi-implicit schemes, a forward nonlinear diffusion equation is solved, instead of a backward nonlinear diffusion equation, connecting with an edge-preserving process. Under the conditions established for the diffusivity and using a stopping criterion for the diffusion time, we get piecewise constant images with a low computational effort. Finally, we test our filter with real images and we illustrate the effects of our diffusivity function as a method to get piecewise constant images. The code is available at https://github.com/cplatero/NonlinearDiffusion.

Explore similar work

May 12, 2026cs.CV

Stable and Near-Reversible Diffusion ODE Solvers for Image Editing

The inversion of diffusion models plays a central role in image editing. Algebraically reversible ODE solvers provide an appealing approach to diffusion inversion for text-guided image editing, by eliminating the inversion error inherent in DDIM-based editing pipelines. However, empirical results indicate that reversibility alone is insufficient. As edits require larger semantic or visual changes, reversible diffusion solvers often exhibit instabilities and suffer sharp drops in output quality. In this paper, we show that the trade-off between exact reversibility and numerical stability manifests empirically as a trade-off between background preservation and prompt alignment in image editing. We then investigate the use of near-reversible Runge-Kutta methods as a more stable alternative to exactly reversible diffusion schemes. When combined with a vector-field smoothing strategy, the resulting approach improves edit fidelity, remains stable under large edits, and largely retains the background-preservation benefits of reversible solvers.
Barbora Barancikova, Daniil Shmelev, Cristopher Salvi
Mar 5, 2026cs.CV

LAW & ORDER: Adaptive Spatial Weighting for Medical Diffusion and Segmentation

Medical image analysis depends on accurate segmentation and controllable synthesis, but both tasks face severe spatial imbalance: lesions occupy small regions against large backgrounds. We study adaptive spatial weighting as a task-level design principle and instantiate it in two adapters. LAW learns per-pixel loss weights for mask-conditioned diffusion by modulating a ratio prior with a feature-dependent delta map, with normalization, clamping, and Dice regularization for stability. ORDER improves lightweight segmentation by adding selective bidirectional skip attention with stage-wise confidence gating. On held-out diffusion test sets, LAW lowers FID from 158.13±\pm0.15 to 108.43±\pm0.71 on Polyps, from 144.13±\pm0.31 to 89.51±\pm0.96 on KiTS19, and from 139.22±\pm0.38 to 112.58±\pm0.68 on BRISC, while improving held-out mask-recovery Dice from 0.681±\pm0.013 to 0.825±\pm0.003 on Polyps. When the resulting images are added to nnUNet training, downstream Polyps mDice rises from 71.7±\pm0.4 to 74.1±\pm0.8. On the cleaned Polyps segmentation protocol, the reported ORDER configuration reaches 76.3±\pm1.9 mDice and 67.2±\pm2.0 mIoU at 42K parameters and 0.11 GFLOPs, versus 70.3±\pm1.5 mDice and 59.9±\pm1.7 mIoU for matched MK-UNet. On BRISC under the same training recipe, ORDER reaches 77.4±\pm0.8 mDice and 68.1±\pm0.7 mIoU. These results position adaptive spatial weighting as a practical design idea for both medical diffusion and efficient segmentation.
Anugunj Naman, Ayushman Singh, Gaibo Zhang +1
Dec 3, 2024cs.CV

Filterless Snapshot Hyperspectral Imaging using Guided Patch Diffusion

We consider the problem of reconstructing a HxWx31 hyperspectral image from a H×WH\times W grayscale snapshot measurement that is captured using only a single diffractive lens and a filterless panchromatic photosensor. This problem is severely ill-posed, but we present a model that produces high-quality results in simulation and experiment. We make efficient use of limited training data by creating a conditional denoising diffusion model that operates on small patches in a shift-invariant manner. During inference, we synchronize per-patch hyperspectral predictions using guidance by physical consistency with the system's optical point spread function. Our experiments reveal that the patch size can be as small as the point spread function, with local optical cues being the main source of information about complete spectra. Also, by drawing multiple samples, our model provides per-pixel uncertainty estimates that strongly correlate with reconstruction error.
Dean Hazineh, Luca Sacchi, Davide Cassara +2