Table of Contents
Fetching ...

DeFloMat: Detection with Flow Matching for Stable and Efficient Generative Object Localization

Hansang Lee, Chaelin Lee, Nieun Seo, Joon Seok Lim, Helen Hong

TL;DR

DeFloMat rethinks generative object detection by replacing slow stochastic diffusion with a deterministic flow learned through Conditional Flow Matching, enabling few-step inference via an ODE solver. Trained on a Crohn's disease MRE dataset, it demonstrates state-of-the-art localization accuracy with AP$_{10:50}$ of 43.32% in just 3 inference steps, a 1.4x gain over DiffusionDet at its peak. The method hinges on a Rectified Flow path between noisy proposals and ground-truth boxes, guided by a Flow Matching loss that enforces alignment between the predicted velocity field and the optimal transport path. Empirically, DeFloMat delivers higher Recall and more stable localization in the few-step regime, reduces latency dramatically, and provides robust performance across varying numbers of initial proposals. This work establishes a new standard for fast, stable, generative localization in clinically relevant scenarios and highlights the practical potential of flow-based generative detectors in medical imaging.

Abstract

We propose DeFloMat (Detection with Flow Matching), a novel generative object detection framework that addresses the critical latency bottleneck of diffusion-based detectors, such as DiffusionDet, by integrating Conditional Flow Matching (CFM). Diffusion models achieve high accuracy by formulating detection as a multi-step stochastic denoising process, but their reliance on numerous sampling steps ($T \gg 60$) makes them impractical for time-sensitive clinical applications like Crohn's Disease detection in Magnetic Resonance Enterography (MRE). DeFloMat replaces this slow stochastic path with a highly direct, deterministic flow field derived from Conditional Optimal Transport (OT) theory, specifically approximating the Rectified Flow. This shift enables fast inference via a simple Ordinary Differential Equation (ODE) solver. We demonstrate the superiority of DeFloMat on a challenging MRE clinical dataset. Crucially, DeFloMat achieves state-of-the-art accuracy ($43.32\% \text{ } AP_{10:50}$) in only $3$ inference steps, which represents a $1.4\times$ performance improvement over DiffusionDet's maximum converged performance ($31.03\% \text{ } AP_{10:50}$ at $4$ steps). Furthermore, our deterministic flow significantly enhances localization characteristics, yielding superior Recall and stability in the few-step regime. DeFloMat resolves the trade-off between generative accuracy and clinical efficiency, setting a new standard for stable and rapid object localization.

DeFloMat: Detection with Flow Matching for Stable and Efficient Generative Object Localization

TL;DR

DeFloMat rethinks generative object detection by replacing slow stochastic diffusion with a deterministic flow learned through Conditional Flow Matching, enabling few-step inference via an ODE solver. Trained on a Crohn's disease MRE dataset, it demonstrates state-of-the-art localization accuracy with AP of 43.32% in just 3 inference steps, a 1.4x gain over DiffusionDet at its peak. The method hinges on a Rectified Flow path between noisy proposals and ground-truth boxes, guided by a Flow Matching loss that enforces alignment between the predicted velocity field and the optimal transport path. Empirically, DeFloMat delivers higher Recall and more stable localization in the few-step regime, reduces latency dramatically, and provides robust performance across varying numbers of initial proposals. This work establishes a new standard for fast, stable, generative localization in clinically relevant scenarios and highlights the practical potential of flow-based generative detectors in medical imaging.

Abstract

We propose DeFloMat (Detection with Flow Matching), a novel generative object detection framework that addresses the critical latency bottleneck of diffusion-based detectors, such as DiffusionDet, by integrating Conditional Flow Matching (CFM). Diffusion models achieve high accuracy by formulating detection as a multi-step stochastic denoising process, but their reliance on numerous sampling steps () makes them impractical for time-sensitive clinical applications like Crohn's Disease detection in Magnetic Resonance Enterography (MRE). DeFloMat replaces this slow stochastic path with a highly direct, deterministic flow field derived from Conditional Optimal Transport (OT) theory, specifically approximating the Rectified Flow. This shift enables fast inference via a simple Ordinary Differential Equation (ODE) solver. We demonstrate the superiority of DeFloMat on a challenging MRE clinical dataset. Crucially, DeFloMat achieves state-of-the-art accuracy () in only inference steps, which represents a performance improvement over DiffusionDet's maximum converged performance ( at steps). Furthermore, our deterministic flow significantly enhances localization characteristics, yielding superior Recall and stability in the few-step regime. DeFloMat resolves the trade-off between generative accuracy and clinical efficiency, setting a new standard for stable and rapid object localization.
Paper Structure (26 sections, 5 equations, 4 figures, 3 tables, 2 algorithms)

This paper contains 26 sections, 5 equations, 4 figures, 3 tables, 2 algorithms.

Figures (4)

  • Figure 1: Comparison of generative localization dynamics between DiffusionDet and DeFloMat. (a) DiffusionDet requires many stochastic denoising stages to stabilize bounding boxes, often producing highly scattered proposals in early steps. (b) Our DeFloMat rapidly converges to anatomically plausible inflammation regions within only a few deterministic ODE steps, yielding sharper and more stable localization. (c) Diffusion vs. Flow Matching. Diffusion performs iterative stochastic reverse transitions ($p_\theta(x_{t-1}\mid x_t)$), whereas DeFloMat learns a direct optimal-transport vector field ($v_t(x_t\mid x_0)$) that enables fast, stable integration from noise to final boxes.
  • Figure 2: The Overall Architecture of DeFloMat. The DeFloMat pipeline consists of an Image Encoder (ResNet50), a Detection Decoder, and a novel Flow Matching Module. During training, the decoder is conditioned on MRE features ($F$) and time ($t$) to predict the deterministic velocity vector field ($\mathbf{v}_{pred}$) that transports the noisy box proposals ($\mathbf{x}_t$) directly towards the ground truth ($\mathbf{x}_1$) along a straight Optimal Transport path ($\mathbf{x}_t = (1-t) \cdot \mathbf{x}_0 + t \cdot \mathbf{x}_1$). The network is supervised by a specialized flow matching loss$\mathcal{L}_{\text{flow}}$. Crucially, during inference, the deterministic flow enables us to replace the slow stochastic diffusion sampling with a single ODE Solver (e.g., Euler update) integrated within the refinement stages (Stage 2-6), dramatically accelerating object localization with minimal steps ($S \le 4$). The final results are obtained after Non-Maximum Suppression (NMS).
  • Figure 3: Qualitative Comparison on Crohn's Disease MRE Test Set. The figure compares detection results from (a) Mask R-CNN, (b) DiffusionDet ($S=3$), and (c) DeFloMat (Ours, $S=3$) on challenging MRE slices. Green boxes indicate True Positives (TP, IoU $\ge 0.1$), Red boxes indicate False Positives (FP), and Purple boxes indicate False Negatives (FN). DeFloMat consistently demonstrates superior localization quality and sensitivity: it successfully detects subtle inflammation regions (TP) that are often missed (FN, Purple boxes) by the Mask R-CNN baseline (Row 2, 4). Furthermore, DeFloMat provides tighter bounding box localization compared to DiffusionDet, confirming the benefit of learning the direct, deterministic flow field. The results show DeFloMat's robustness in capturing varying sizes and numbers of inflammatory lesions.
  • Figure 4: Efficiency and Stability Analysis of DeFloMat vs. DiffusionDet (a) Number of Proposal Boxes ($N_{prop}$) vs. $AP_{10:50}$: DeFloMat (Ours, orange) achieves consistently higher $AP_{10:50}$ than DiffusionDet (blue) and maintains stable performance across increasing $N_{prop}$, demonstrating robustness even in the low-step regime ($S \le 4$). (b) Sampling Steps ($S$) vs. $AP_{10:50}$: DeFloMat exhibits superior convergence efficiency, saturating at $S=3$ steps with an accuracy $\mathbf{1.4\times}$ higher than DiffusionDet's peak performance. This validates the deterministic flow path's efficacy in achieving high accuracy with minimal computational cost.