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

Sep 21, 2026cs.CV

Rethinking Diffusion Segmentation: When Does It Rely on Its Noisy State, and Does Diffusion Matter?

Diffusion models are increasingly adapted from generation to conditional prediction, where a conditioning signal is combined with an evolving noisy representation of the target. In fully supervised segmentation, however, the conditioning image can already support direct target prediction, so endpoint performance alone establishes neither reliance on the added diffusion state nor a deterministic advantage over image-only prediction. For state reliance, we disrupt target-derived state content or correct image-state pairing during retraining of twelve published methods across three datasets, with ten matched seeds per setting. All 40 original-method comparisons whose evaluated-mask routes remained downstream of noised-quantity reconstruction exhibited state reliance, whereas all 30 comparisons with a segmentation-supervised bypass preserved reference performance. Rerouting five originally bypass-capable methods by forcing segmentation supervision through noise-to-mask reconstruction converted all 30 corresponding comparisons from preserved performance to state reliance. For deterministic utility, matched image-only counterparts achieved similar or better performance in 28 of 35 settings overall, including 16 of 20 whose native methods relied on both audited state properties. These results identify supervision path as a determinant of state reliance in the audited methods. Separately, matched image-only counterparts show that diffusion-specific computation often provides no deterministic endpoint advantage, including in methods that rely on the audited state properties. More generally, when conditioning already supports strong target prediction, diffusion-specific claims require additional evidence that the added state is used and that diffusion-specific computation improves the claimed capability beyond a matched condition-only counterpart.
Hengzhuo Yang, Yuming Zeng, Yuling Yang
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