arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2412.03458v4 [eess.IV] 24 Jan 2025

Understanding the Impact of Evaluation Metrics in Kinetic Models for Consensus-based Segmentation

R.F.Cabini Note: Euler Institute, Università della Svizzera Italiana; raffaella.fiamma.cabini@usi.ch    H. Tettamanti Note: Department of Mathematics ”F. Casorati”, University of Pavia; horacio.tettamanti01@universitadipavia.it    M. Zanella Note: Department of Mathematics ”F. Casorati”, University of Pavia; mattia.zanella@unipv.it
Abstract

In this article we extend a recently introduced kinetic model for consensus-based segmentation of images. In particular, we will interpret the set of pixels of a 2D image as an interacting particle system which evolves in time in view of a consensus-type process obtained by interactions between pixels and external noise. Thanks to a kinetic formulation of the introduced model we derive the large time solution of the model. We will show that the choice of parameters defining the segmentation task can be chosen from a plurality of loss functions characterising the evaluation metrics.

1 Introduction

The primary objective of image segmentation is to partition an image into distinct pixel regions that exhibit homogeneous characteristics, including spatial proximity, intensity values, color variations, texture patterns, brightness levels, and contrast differences, thereby enabling more effective analysis and interpretation of the visual data. The application of image segmentation methods plays an important role in clinical research by facilitating the study of anatomical structures, highlighting regions of interest, and measuring tissue volume [1, 5, 15, 36, 39, 51]. In this context, the accurate recognition of areas affected by pathologies can have great impact for more precise early diagnosis and monitoring in a great variety of disease that range from brain tumors to skin lesions.

Over the past decades, a variety of computational strategies and mathematical approaches have been developed to address image segmentation challenges. Among these, deep learning techniques and neural networks have emerged as one of the most widely used methods in contemporary image segmentation tasks [27, 28, 33, 32, 49, 56, 57, 34, 35]. Leveraging a set of examples, these techniques are capable of approximating the complex nonlinear relationship between inputs and desired outputs. While deep learning models excel in complex segmentation problems, their dependence on large annotated datasets remains a significant challenge, particularly in fields such as biomedical imaging, where data availability is limited and manual labeling can be both expensive and time-consuming. A different approach is based on clustering methods [14, 24, 30, 47, 46, 31]. These methods group pixels with similar characteristics, effectively partitioning the image into distinct regions. Clustering-based methods offer an attractive alternative to deep learning techniques, as they do not require supervised training and therefore, can be used on small, unlabeled datasets. In this direction , a kinetic approach for unsupervised clustering problems for image segmentation has been introduced in [9, 26]. In these works, microscopic consensus-type models have been connected to image segmentation tasks by considering the pixels of an image as a interacting system where each particle is characterised by its space position and a feature determining the gray level. A virtual interaction between particles will then determine the asymptotic formation a finite number of clusters. Hence, a segmentation mask is generated by assigning the mean of their gray levels to each cluster of particles and by applying a binary threshold. Among the various nonlinear compromise terms that have been proposed in the literature, we will consider the Hegselmann-Krause model described in [25, 48] where it is supposed that each agent may only interact with other agent that are sufficiently close. This type of interaction is classically known as bounded confidence interaction function. As a result, two pixel will interact based on their distance in space and their gray level. The approach developed in [9] is based on the methods of kinetic theory for consensus formation. In the last decades, after the first model developed in [17, 16, 22, 52], several approaches have been designed to investigate the emergence of patterns and collective structures for large systems of agents/particles [8, 12, 38, 23]. To this end, the flexibility of kinetic-type equations have been of paramount importance to link the microscopic scale and the macroscopic observable scale [2, 10, 20, 21, 43, 42, 54].

In order to construct a data-oriented pipeline, we calibrate the resulting model by exploiting a family of existing evaluation metrics to obtain the relevant information from a ground truth image [4, 13, 18, 29, 37, 53]. The main development of this study, compared to the one described in [7], relies in the fact that we evaluate multiple metrics to quantify segmentation error, which is crucial for the optimization of the internal model parameters. In particular, we will concentrate on the Standard Volumetric Dice Similarity Coefficient (Volumetric Dice), a volumetric measure based on the quotient between the intersection of the obtained segmented images and their total volume, the Surface Dice Similarity Coefficient, which is analogous to the Volumetric Dice but exploits the surface of the segmented images [7]. Furthermore, we test the Jaccard index, which is an alternative option to evaluate the volumetric similarity between two segmentation masks, and the FβF_{\beta}-measure, which is a performance metrics which allows a balance between precision and sensitivity. In this paper we describe these metrics in detail and we analyze how these choices of evaluation metric influence the parameter optimization process. Furthermore, we discuss the most suitable metrics for the final assessment of the produced segmentations. This expanded evaluation provides novel insights into the impact of evaluation metrics on model performance and enhances our understanding of how to efficiently optimize the introduced segmentation pipeline.

In more detail, the manuscript is organized as follows: In Section 2 we introduce an extension of the Hegselmann-Krause model in 2D and we present the structure of the emerging steady states for different values of the model parameters. Next, we present a description of the model based on a kinetic-type approach. Furthermore, we show how can this model be extended and apply for the image segmentation problem. In Section 3 we present a Direct Simulation Monte Carlo (DSMC) Method to approximate the evolution of the system and we introduce possible optimization methods to produce segmentation masks for given images. To this end, we introduce the definition of the principal optimization metrics used in the context of bio-medical images and their principal characteristics. In Section 4 we show the results for a simple case of segmenting a geometrical image with a blurry background and compare the results obtained for different choices of the diffusion function. Finally, we present the results obtained for various Brain Tumor Images and discuss how the choice of different metrics may affect the final result. We show that the FβF_{\beta}-measure does not produce consistent results for different values of β\beta. We reproduce the expected relationship between the Volumetric Dice Coefficient and Jaccard Index and show that both metrics plus the Surface Dice Coefficient yield similar results. Nevertheless, we argue that for this type of images the Surface Dice Coefficient produces more accurate loss values and its definition is more representative compare to the Volumetric Dice Coefficient and Jaccard Index.

2 Consensus modelling and applications to image segmentation

In recent years, there has been growing interest in exploring consensus formation within opinion models to gain a deeper understanding of how social forces affect nonlinear aggregation processes in multiagent systems. To this end, various models have been proposed considering different scenarios and hypothesis on how the pairwise interactions may lead to the emergence of a position. For a finite number of particles, the dynamics is usually defined in terms of first order differential equations having the general form

dxidt=1Nj=1NP(xi,xj)(xjxi),\dfrac{d\textbf{x}_{i}}{dt}=\dfrac{1}{N}\sum_{j=1}^{N}P(\textbf{x}_{i},\textbf{x}_{j})(\textbf{x}_{j}-\textbf{x}_{i}), (1)

where xi(t)d\textbf{x}_{i}(t)\in\mathbb{R}^{d}, d1d\geq 1, characterise the position of the agent i=1,,Ni=1,\dots,N at time t0t\geq 0, and P(,)0P(\cdot,\cdot)\geq 0 tunes the interaction between the agents xi,xjd\textbf{x}_{i},\textbf{x}_{j}\in\mathbb{R}^{d}, see e.g. [3, 12, 25, 38, 40].

In addition to microscopic agent-based models, in the limit of an infinite number of agents, it is possible to derive the evolution of distribution functions characterising the collective behavior of interacting systems. These approaches, typically grounded in kinetic-type partial differential equations (PDEs), are capable of bridging the gap between microscopic forces and the emerging properties of the system, see [42].

2.1 The 2D bounded confidence model

We now consider the bidimensional case, d=2d=2, and we specify the interaction function based on the so-called bounded confidence model. In more detail, we consider N2N\geq 2 agents and define their opinion variable through a vector 𝐱=(xi(t),yi(t))𝐑2\mathbf{x}=(x_{i}(t),y_{i}(t))\in\mathbf{R}^{2}, characterised by initial states {𝐱1(0),,𝐱N(0)}\{\mathbf{x}_{1}(0),\dots,\mathbf{x}_{N}(0)\}. Agents will modify their opinion as a result of the interaction with other agents only if |𝐱i𝐱j|Δ|\mathbf{x}_{i}-\mathbf{x}_{j}|\leq\Delta , where Δ0\Delta\geq 0 is a given confidence level. Hence, we can write (1) as follows

ddt𝐱i=1Nj=1NPΔ(𝐱i,𝐱j)(𝐱j𝐱i),\frac{d}{dt}\mathbf{x}_{i}=\frac{1}{N}\sum_{j=1}^{N}P_{\Delta}(\mathbf{x}_{i},\mathbf{x}_{j})(\mathbf{x}_{j}-\mathbf{x}_{i}), (2)

where PΔ(𝐱i,𝐱j)=χ(|𝐱i𝐱j|Δ):2{0,1}P_{\Delta}(\mathbf{x}_{i},\mathbf{x}_{j})=\chi(|\mathbf{x}_{i}-\mathbf{x}_{j}|\leq\Delta):\mathbb{R}^{2}\to\{0,1\}, being χ(A)\chi(A) the characteristic function of the set A2A\subseteq\mathbb{R}^{2}. We can easily observe that the mean position of the ensemble of agents is conserved in time, indeed

ddti=1Nxi=1Ni,j=1Nχ(|xixj|Δ)(xjxi)=0,\dfrac{d}{dt}\sum_{i=1}^{N}\textbf{x}_{i}=\dfrac{1}{N}\sum_{i,j=1}^{N}\chi(|\textbf{x}_{i}-\textbf{x}_{j}|\leq\Delta)(\textbf{x}_{j}-\textbf{x}_{i})=0, (3)

thanks to the symmetry of the considered bounded-confidence interaction function. The bounded confidence model converges to a steady configuration, meaning that the systems reaches consensus in finite time. The structure of the steady state depends on the value of Δ\Delta, see [43].

Refer to caption
(a)
Refer to caption
(b)
Refer to caption
(c)
Figure 1: Large time distribution of the 2D bounded confidence model for different parameters characterising the compromise propensity and the diffusion for N = 10510^{5} particles in [0,T][0,T] with T=100T=100 and Δt=0.01\Delta t=0.01. In (a) the final state converges to a number of clusters depending on the value of Δ\Delta. As we reduce the range of interaction more clusters are created. In rows (b) and (c) we can see the interplay between the tendency of particles to aggregate and the diffusion. On the first column we see that the steady state converges to a Gaussian Distribution with a standard deviation given by σ2\sigma^{2}. In the second column for (b) and (c) we see that the final states differ greatly in their structure. Finally, the last column shows the final states in the case where the diffusion surpasses considerable the aggregation tendency.

Furthermore, to account for random fluctuations given by external factors in the opinion of agents we may consider a diffusion component as follows

d𝐱i=1Nj=1NPΔ(|𝐱i𝐱j|Δ)(𝐱j𝐱i)dt+2σ2d𝐖id\mathbf{x}_{i}=\frac{1}{N}\sum_{j=1}^{N}P_{\Delta}(|\mathbf{x}_{i}-\mathbf{x}_{j}|\leq\Delta)(\mathbf{x}_{j}-\mathbf{x}_{i})dt+\sqrt{2\sigma^{2}}d\mathbf{W}_{i} (4)

where {𝐖i}i=1N\{\mathbf{W}_{i}\}_{i=1}^{N} is a set of independent Wiener processes. The impact of the diffusion is weighted by the variable σ2>0\sigma^{2}>0. To visualise the interplay between consensus forces and diffusion we depict in Figure 1 the steady configuration of the model (4) for different combinations of the model parameters. For σ2=0\sigma^{2}=0, the system forms a finite number of clusters depending on the value of Δ>0\Delta>0, as illustrated in Figure 1(a). For values of the diffusion coefficient σ2>0\sigma^{2}>0, the number of clusters of the system varies as depicted in Figure 1(b). The right panel of Figure 1(b) shows the scenario in which the diffusion effect becomes comparable to the tendency of agents to cluster. Finally, in Figure 1(c), for σ=0.05\sigma=0.05, the diffusion effect dominates the grouping tendency, resulting in a homogeneous steady-state distribution.

2.2 Kinetic models for consensus dynamics

In the limit N+N\to+\infty it can be shown that the empirical density

f(N)(x,t)=1Ni=1Nδ(xxi(t))f^{(N)}(\textbf{x},t)=\frac{1}{N}\sum_{i=1}^{N}\delta(\textbf{x}-\textbf{x}_{i}(t))

of the system of particles (4) converges to a continuous density f(x,t):2×++f(\textbf{x},t):\mathbb{R}^{2}\times\mathbb{R}_{+}\to\mathbb{R}_{+} solution to the following mean-field equation

tf(𝐱,t)=x[Ξ[f](𝐱,t)+σ2xf]f(𝐱,0)=f0(𝐱)\begin{split}\partial_{t}f(\mathbf{x},t)&=\nabla_{\textbf{x}}\cdot[\Xi[f](\mathbf{x},t)+\sigma^{2}\nabla_{\textbf{x}}f]\\ f(\mathbf{x},0)&=f_{0}(\mathbf{x})\end{split} (5)

where Ξ[f](𝐱,t)\Xi[f](\mathbf{x},t) is defined as follows

Ξ[f](𝐱,t)=𝐑2PΔ(𝐱i,𝐱j)(𝐱𝐱)f(𝐱,t)d𝐱,\Xi[f](\mathbf{x},t)=\int_{\mathbf{R}^{2}}P_{\Delta}(\mathbf{x}_{i},\mathbf{x}_{j})(\mathbf{x}-\mathbf{x}_{*})f(\mathbf{x}_{*},t)d\mathbf{x}_{*}, (6)

see e.g. [11].

We can derive (5) using a kinetic approach by writing x:=xi(t)\textbf{x}:=\textbf{x}_{i}(t) and x:=xj(t)\textbf{x}_{*}:=\textbf{x}_{j}(t) for a generic pair (i,j)(i,j) of interacting agents/particles and we approximate the time derivative in (4) in a time step ϵ=Δt>0\epsilon=\Delta t>0, through an Euler-Maryuama approach, in the same spirit as [10, 45]. Hence, we recover the binary interaction rule

𝐱=𝐱+ϵPΔ(𝐱,𝐱)(𝐱𝐱)+2σ2η𝐱=𝐱+ϵPΔ(𝐱,𝐱)(𝐱𝐱)+2σ2η,\begin{split}\mathbf{x}^{\prime}&=\mathbf{x}+\epsilon P_{\Delta}(\mathbf{x},\mathbf{x_{*}})(\mathbf{x_{*}}-\mathbf{x})+\sqrt{2\sigma^{2}}\eta\\ \mathbf{x_{*}^{\prime}}&=\mathbf{x_{*}}+\epsilon P_{\Delta}(\mathbf{x_{*}},\mathbf{x})(\mathbf{x}-\mathbf{x_{*}})+\sqrt{2\sigma^{2}}\eta_{*},\end{split} (7)

where 𝐱=𝐱i(t+ϵ)\mathbf{x}^{\prime}=\mathbf{x}_{i}(t+\epsilon), 𝐱=𝐱j(t+ϵ)\mathbf{x}_{*}^{\prime}=\mathbf{x}_{j}(t+\epsilon) and η,η\eta,\eta_{*} are two independent 2D centered Gaussian distribution random variable such that

η=η=0η2=η2=ϵ\langle\eta\rangle=\langle\eta_{*}\rangle=0\qquad\langle\eta^{2}\rangle=\langle\eta_{*}^{2}\rangle=\epsilon (8)

where \langle\cdot\rangle denotes the integration with respect to the distribution η\eta. Furthermore, in (7) we shall consider P(𝐱,𝐱)=χ(|𝐱𝐱|<Δ)P(\mathbf{x},\mathbf{x}_{*})=\chi(|\mathbf{x}-\mathbf{x_{*}}|<\Delta). We can remark that, if σ=0\sigma=0, since PΔ[0,1]P_{\Delta}\in[0,1] and ϵ(0,1)\epsilon\in(0,1) we get

𝐱+𝐱=𝐱+𝐱+Δt(PΔ(𝐱,𝐱)PΔ(𝐱,𝐱))(𝐱𝐱)==𝐱+𝐱\begin{split}\left\langle\mathbf{x^{\prime}+x^{\prime}_{*}}\right\rangle&=\mathbf{x+x_{*}}+\Delta t(P_{\Delta}(\mathbf{x,x_{*}})-P_{\Delta}(\mathbf{x_{*},x}))(\mathbf{x_{*}-x})=\\ &=\mathbf{x+x_{*}}\end{split} (9)

since the interaction function PΔP_{\Delta} is symmetric, consistently with (3). This shows that the mean position is conserved at every interaction. Finally, we have

|𝐱|𝟐+|𝐱|𝟐=|𝐱|𝟐+|𝐱|𝟐2ΔtPΔ|𝐱𝐱|𝟐+o(Δt)\begin{split}\mathbf{|\langle x^{\prime}\rangle|^{2}+|\langle x\rangle|^{2}}=\mathbf{|x^{\prime}|^{2}+|x|^{2}}-2\Delta tP_{\Delta}\mathbf{|x^{\prime}-x|^{2}}+o(\Delta t)\end{split} (10)

and the mean energy is dissipated at each interaction, since PΔ0P_{\Delta}\geq 0. Hence, we consider the distribution function f=f(𝐱,t):R2×R+R+f=f(\mathbf{x},t):R^{2}\times R_{+}\rightarrow R_{+}, such that f(𝐱,t)d𝐱f(\mathbf{x},t)d\mathbf{x} represents the fraction of agents/particles in [x1,x1+dx1)×[x2,x2+dx2][{x}_{1},{x}_{1}+d{x}_{1})\times[{x}_{2},{x}_{2}+d{x}_{2}] at time t0t\geq 0. The evolution of ff as a result of binary-interaction scheme (7) is obtained by a Boltzmann-type equation which reads in weak form

ddt2φ(𝐱)f(𝐱,t)d𝐱=4(φ(𝐱)φ(𝐱))f(𝐱,t)f(𝐱,t)d𝐱d𝐱,\begin{split}&\dfrac{d}{dt}\int_{\mathbb{R}^{2}}\varphi(\mathbf{x})f(\mathbf{x},t)d\mathbf{x}=\\ &\quad\left\langle\int_{\mathbb{R}^{4}}(\varphi(\mathbf{x}^{\prime})-\varphi(\mathbf{x}))f(\mathbf{x},t)f(\mathbf{x}_{*},t)d\mathbf{x}d\mathbf{x}_{*}\right\rangle,\end{split} (11)

being φ()\varphi(\cdot) a test function. As observed in [54], when Δt=ϵ0+\Delta t=\epsilon\to 0^{+} we can observe that the binary scheme (7) becomes quasi-invariant and we can introduce the following expansion

φ(𝐱)φ(𝐱)=𝐱𝐱𝐱φ(𝐱)+12(𝐱𝐱)TH[φ](𝐱𝐱)+Rϵ(𝐱,𝐱)\left\langle\varphi(\mathbf{x}^{\prime})-\varphi(\mathbf{x})\right\rangle=\langle\mathbf{x}^{\prime}-\mathbf{x}\rangle\cdot\nabla_{\mathbf{x}}\varphi(\mathbf{x})+\dfrac{1}{2}\left\langle(\mathbf{x}^{\prime}-\mathbf{x})^{T}H[\varphi](\mathbf{x}^{\prime}-\mathbf{x})\right\rangle+R_{\epsilon}(\mathbf{x},\mathbf{x}_{*}) (12)

being Rϵ(𝐱,𝐱)R_{\epsilon}(\mathbf{x},\mathbf{x}_{*}) a reminder term and H[φ]H[\varphi] the Hessian matrix. Hence, scaling τ=ϵt\tau=\epsilon t and the distribution fϵ(𝐱,τ)=f(𝐱,τ/ϵ)f_{\epsilon}(\mathbf{x},\tau)=f(\mathbf{x},\tau/\epsilon), we may plug (12) in (11) to get

ddτ2φ(𝐱)fϵ(𝐱,t)d𝐱=1ϵ4𝐱𝐱𝐱φ(𝐱)fϵ(𝐱,τ)fϵ(𝐱,τ)d𝐱d𝐱+12ϵ4(𝐱𝐱)TH[φ(𝐱](𝐱𝐱)fϵ(𝐱,τ)fϵ(𝐱,τ)d𝐱d𝐱+1ϵ4Rϵ(𝐱,𝐱)fϵ(𝐱,τ)fϵ(𝐱,τ)d𝐱d𝐱\begin{split}\dfrac{d}{d\tau}\int_{\mathbb{R}^{2}}\varphi(\mathbf{x})f_{\epsilon}(\mathbf{x},t)d\mathbf{x}=&\dfrac{1}{\epsilon}\int_{\mathbb{R}^{4}}\langle\mathbf{x}^{\prime}-\mathbf{x}\rangle\cdot\nabla_{\mathbf{x}}\varphi(\mathbf{x})f_{\epsilon}(\mathbf{x},\tau)f_{\epsilon}(\mathbf{x}_{*},\tau)d\mathbf{x}d\mathbf{x}_{*}+\\ &\dfrac{1}{2\epsilon}\int_{\mathbb{R}^{4}}\langle(\mathbf{x}^{\prime}-\mathbf{x})^{T}H[\varphi(\mathbf{x}](\mathbf{x}^{\prime}-\mathbf{x})\rangle f_{\epsilon}(\mathbf{x},\tau)f_{\epsilon}(\mathbf{x}_{*},\tau)d\mathbf{x}d\mathbf{x}_{*}+\\ &\dfrac{1}{\epsilon}\int_{\mathbb{R}^{4}}R_{\epsilon}(\mathbf{x},\mathbf{x}_{*})f_{\epsilon}(\mathbf{x},\tau)f_{\epsilon}(\mathbf{x}_{*},\tau)d\mathbf{x}d\mathbf{x}_{*}\end{split}

Following [9], see also [42], we can prove that

4Rϵ(𝐱,𝐱)fϵ(𝐱,τ)fϵ(𝐱,τ)𝑑𝐱d𝐱0+,\int_{\mathbb{R}^{4}}R_{\epsilon}(\mathbf{x},\mathbf{x}_{*})f_{\epsilon}(\mathbf{x},\tau)f_{\epsilon}(\mathbf{x}_{*},\tau)d\mathbf{x}d\mathbf{x}_{*}\to 0^{+},

as ϵ0+\epsilon\to 0^{+}. Hence, integrating back by parts the first two terms we obtain (5). In more detail, we can prove that fϵf_{\epsilon} converges, up to extraction of a subsequence to a probability density f(𝐱,τ)f(\mathbf{x},\tau) that is weak solution to the nonlocal Fokker-Planck equation (5).

2.3 Application to Image Segmentation

An application of the Hegselman-Krause model for data-clustering problems has been proposed in [26]. The idea is to extend the 2D model by characterising each particle with an internal feature ci[0,1]c_{i}\in[0,1] that represents the gray color of the iith pixel. Therefore, we interpret each pixel in the image as a particle characterized by a position vector and the static feature cc as shown in Figure 2.

(xi,yi,ci)(x_{i},y_{i},c_{i})
Figure 2: A schematic representation of the proposed model where each pixel can be interpreted as a particle (xi,yi,ci)(x_{i},y_{i},c_{i}), being cic_{i} a static feature in the interval [0,1][0,1].

To address the segmentation task, we can define a dynamic feature for the system of pixels through an interaction function that accounts for alignment processes among pixels with sufficiently similar features. In particular, let us consider the following

PΔ1,Δ2(𝐱i,𝐱j,ci,cj)=χ(|𝐱i𝐱j|Δ1)χ(|cicj|Δ2).P_{\Delta_{1},\Delta_{2}}(\mathbf{x}_{i},\mathbf{x}_{j},c_{i},c_{j})=\chi(|\mathbf{x}_{i}-\mathbf{x}_{j}|\leq\Delta_{1})\chi(|c_{i}-c_{j}|\leq\Delta_{2}). (13)

Therefore, the time-continuous evolution for the system of pixels is given by

ddt𝐱i=1Nj=1NPΔ1,Δ2(𝐱i,𝐱j,ci,cj)(𝐱j𝐱i)ddtci=0\begin{split}\frac{d}{dt}\mathbf{x}_{i}&=\frac{1}{N}\sum_{j=1}^{N}P_{\Delta_{1},\Delta_{2}}(\mathbf{x}_{i},\mathbf{x}_{j},c_{i},c_{j})(\mathbf{x}_{j}-\mathbf{x}_{i})\\ \frac{d}{dt}c_{i}&=0\end{split} (14)

In this case we introduced two confidence bounds Δ10\Delta_{1}\geq 0, Δ20\Delta_{2}\geq 0 taking into account the position and the gray level of the pixels, respectively. In this way, the interactions between the pixels will generate a large time distribution which is characterized by several clusters, depending on the value of Δ1\Delta_{1} and Δ2\Delta_{2}. Hence, coherently with k-means methods, see e.g. [37], a pixel belongs to a cluster 𝒞μ={𝐱i:𝐱iμα}\mathcal{C}_{\mu}=\{\mathbf{x}_{i}:\|\mathbf{x}_{i}-\mu\|\leq\alpha\}, being α>0\alpha>0 the pixel size, if it is sufficiently close to the local quantity μ2\mu\in\mathbb{R}^{2}. We highlight how we are only interested in clustering with respect to the space variable. This dynamics is represented in Figure 3.

t1t_{1}t2t_{2}t3t_{3}t4t_{4}
Figure 3: Representation of the evolution of pixels as they tend to aggregate in different clusters.

Biomedical images are often subject to ambiguities arising from various sources of uncertainty related to clinical factors and potential bottlenecks in data acquisition processes [5, 32]. These uncertainties can be broadly categorized into aleatoric uncertainty, stemming from inherent stochastic variations in the data collection process, and epistemic uncertainty, relates to uncertainties in model parameters and can lead to deviations in the results. Aleatoric uncertainties poses significant challenges in image segmentation, as image processing models must contend with limitations in the raw acquisition data. Addressing these uncertainties is critical, and the study of uncertainty quantification in image segmentation is an expanding field aimed at developing robust segmentation algorithms capable of mitigating erroneous outcomes. To this end, in [9], it has been proposed an extension of (14) to consider segmentation of biomedical images. In particular, the particle model (15) has been integrated a nonconstant stochastic part to take into account aleatoric uncertainties arising from the data acquisition process. These uncertainties may include factors such as motion artifacts or field inhomogeneities in magnetic resonance imaging (MRI). They modified equation 14 as follows:

d𝐱i=1Nj=1NPΔ1,Δ2(𝐱i,𝐱j,ci,cj)(𝐱j𝐱i)dt+2σ2D(c)d𝐖iddtci=0\begin{split}d\mathbf{x}_{i}&=\frac{1}{N}\sum_{j=1}^{N}P_{\Delta_{1},\Delta_{2}}(\mathbf{x}_{i},\mathbf{x}_{j},c_{i},c_{j})(\mathbf{x}_{j}-\mathbf{x}_{i})dt+\sqrt{2\sigma^{2}D(c)}d\mathbf{W}_{i}\\ \frac{d}{dt}c_{i}&=0\end{split} (15)

where {𝐖i}i=1N\{\mathbf{W}_{i}\}_{i=1}^{N} is set of independent Wiener processes, PΔ1,Δ2(,,,)[0,1]P_{\Delta_{1},\Delta_{2}}(\cdot,\cdot,\cdot,\cdot)\in[0,1] is the interaction function defined in (13), and D(c)0D(c)\geq 0 quantifies the impact of diffusion related to the value of the feature c[0,1]c\in[0,1]. Since the aleatoric uncertainties are expected to appear far away from the static feature’s boundaries, only diffusion functions that are maximal at the center and satisfy D(0)=D(1)=0D(0)=D(1)=0 are considered. Similarly to (7), we may introduce the following binary interaction scheme by writing (𝐱,𝐱):=(𝐱i(t),𝐱j(t))(\mathbf{x},\mathbf{x}_{*}):=(\mathbf{x}_{i}(t),\mathbf{x}_{j}(t)) a random couple of pixels having features (c,c):=(ci(t),cj(t))(c,c_{*}):=(c_{i}(t),c_{j}(t)). We get

𝐱=𝐱+ϵPΔ1,Δ2(𝐱,𝐱,c,c)(𝐱𝐱)+2σ2D(c)η𝐱=𝐱+ϵPΔ1,Δ2(𝐱,𝐱,c,c)(𝐱𝐱)+2σ2D(c)ηc=cc=c,\begin{split}\mathbf{x^{\prime}}&=\mathbf{x}+\epsilon P_{\Delta_{1},\Delta_{2}}(\mathbf{x},\mathbf{x_{*}},c,c_{*})(\mathbf{x_{*}}-\mathbf{x})+\sqrt{2\sigma^{2}D(c)}\eta\\ \mathbf{x_{*}^{\prime}}&=\mathbf{x_{*}}+\epsilon P_{\Delta_{1},\Delta_{2}}(\mathbf{x_{*}},\mathbf{x},c_{*},c)(\mathbf{x}-\mathbf{x_{*}})+\sqrt{2\sigma^{2}D(c_{*})}\eta\\ c_{*}^{\prime}&=c_{*}\\ c^{\prime}&=c,\end{split} (16)

where (𝐱,𝐱):=(𝐱i(t+Δt),𝐱j(t+Δt))(\mathbf{x}^{\prime},\mathbf{x}_{*}^{\prime}):=(\mathbf{x}_{i}(t+\Delta t),\mathbf{x}_{j}(t+\Delta t)) and (c,c):=(ci(t+Δt),cj(t+Δt))(c^{\prime},c_{*}^{\prime}):=(c_{i}(t+\Delta t),c_{j}(t+\Delta t)). At the statistical level, as in [9], we may follows the approach described in Section 2.2. Hence, we introduce the distribution function f=f(𝐱,c,t):R2×[0,1]×R+R+f=f(\mathbf{x},c,t):R^{2}\times[0,1]\times R_{+}\rightarrow R_{+}, such that f(𝐱,t)d𝐱f(\mathbf{x},t)d\mathbf{x} represents the fraction of agents/particles in [x1,x1+dx1)×[x2,x2+dx2][x_{1},x_{1}+dx_{1})\times[x_{2},x_{2}+dx_{2}] characterized by a feature c[0,1]c\in[0,1] at time t0t\geq 0. The evolution of ff whose interaction follow the binary scheme (16) is given by the following Boltzmann-type equation

ddt012φ(𝐱,c)f(𝐱,c,t)d𝐱dc=[0,1]24(φ(𝐱,c)φ(𝐱,c))f(𝐱,c,t)f(𝐱,c,t)d𝐱d𝐱dcdc,\begin{split}&\dfrac{d}{dt}\int_{0}^{1}\int_{\mathbb{R}^{2}}\varphi(\mathbf{x},c)f(\mathbf{x},c,t)d\mathbf{x}dc=\\ &\quad\left\langle\int_{[0,1]^{2}}\int_{\mathbb{R}^{4}}(\varphi(\mathbf{x}^{\prime},c)-\varphi(\mathbf{x},c))f(\mathbf{x},c,t)f(\mathbf{x}_{*},c_{*},t)d\mathbf{x}d\mathbf{x}_{*}\,dc\,dc_{*}\right\rangle,\end{split} (17)

Hence, since the feature is not evolving in time, we can proceed as in Section 2.2 to derive in the quasi-invariant limit for ϵ0+\epsilon\to 0^{+} the corresponding Fokker-Planck-type PDE

tf(𝐱,c,t)=x[Ξ[g]Δ1,Δ2(𝐱,c,t)f(𝐱,c,t)+σ2D(c)xf(𝐱,c,t)]\begin{split}\partial_{t}f(\mathbf{x},c,t)=\nabla_{x}\cdot\Big[\Xi[g]_{\Delta_{1},\Delta_{2}}(\mathbf{x},c,t)f(\mathbf{x},c,t)+\sigma^{2}D(c)\nabla_{x}f(\mathbf{x},c,t)\Big]\end{split} (18)

where

Ξ[g]Δ1,Δ2(𝐱,c,t)=012PΔ1,Δ2(𝐱,𝐱,c,c)(𝐱𝐱)f(𝐱,c,t)d𝐱dc.\Xi[g]_{\Delta_{1},\Delta_{2}}(\mathbf{x},c,t)=\int_{0}^{1}\int_{\mathbb{R}^{2}}P_{\Delta_{1},\Delta_{2}}(\mathbf{x},\mathbf{x}_{*},c,c_{*})(\mathbf{x}-\mathbf{x}_{*})f(\mathbf{x}_{*},c_{*},t)d\mathbf{x}_{*}\,dc_{*}.

3 Evaluation metrics and parameters estimation

In this section we present classical Direct Simulation Monte Carlo (DSMC) methods to numerically approximate the evolution of (17) as quasi-invariant approximation of the Fokker-Planck equation (18). The resulting numerical algorithm is fundamental to estimate consistent parameters from MRI images. To this end, we present several loss metrics with the aim to compare the result of our model-based approach with existing methods for biomedical image segmentation. In this work we focus exclusively on binary metrics. For evaluation of segmentation with multiple labels we point the reader to [53] for a detailed presentation of various metrics.

3.1 DSMC algorithm for image segmentation

The numerical approximation of Boltzmann-type equations has been deeply investigated in the recent decades, see e.g. [19, 41]. The approximation of this class of equations is particularly challenging due to the curse of dimensionality brought up by the multidimensional integral of the collision operator, and the presence of multiple scales. Furthermore, the preservation of relevant physical quantities are essential for a correct description of the underlying physical problem [44].

In view of its computational efficiency, in the following we will adopt a DSMC approach. Indeed the computational cost of this method is O(N)O(N) where NN is the number of particles. Next, we describe the DSMC method based on a Nanbu-Bavosky scheme [41]. We begin by randomly selecting N/2N/2 pairs of particles and making them evolve following the binary scheme presented in (7). We consider a time interval [0,T][0,T] which we divide in NtN_{t} intervals of size Δt>0\Delta t>0. The DSMC approach for the introduced kinetic equation is based on a first order forward time discretization. In the following we will always consider the case Δt=ϵ>0\Delta t=\epsilon>0 such that all the particles are going to interact, see [41] for more details. We introduce the stochastic rounding of a positive real number x as:

Sround(x)={x+1with probabilityxxxwith probability1x+xSround(x)=\begin{cases}\lfloor x\rfloor+1\hskip 14.22636pt\text{with probability}\hskip 14.22636ptx-\lfloor x\rfloor\\ \lfloor x\rfloor\hskip 32.15175pt\text{with probability}\hskip 14.22636pt1-x+\lfloor x\rfloor\end{cases} (19)

where x\lfloor x\rfloor is the integer part of xx. The random variable η\eta is sampled from a 2D Gaussian Distribution centered at zero and a diagonal covariance matrix.

Algorithm 1 DSMC algorithm for Boltzmann equation
1: Given NN particles (xn0,cn0)(\textbf{x}_{n}^{0},c_{n}^{0}), with n=1,,Nn=1,\dots,N computed from the initial distribution f0(x,c)f_{0}(\textbf{x},c);
2: for t=1t=1 to NtN_{t} do
3:   set np=Sround(N/2)n_{p}=\textrm{Sround}(N/2);
4:   sample npn_{p} pairs (i,j)(i,j) uniformly without repetition among all possible pairs of particles at time step tt;
5:   for each pair (i,j)(i,j), sample η\eta,η\eta_{*}
6:   for each pair (i,j)(i,j), compute the data change:
Δ𝐱it\displaystyle\Delta\mathbf{x}_{i}^{t} =ϵPΔ1,Δ2(𝐱it,𝐱jt,ci0,cj0)(𝐱jt𝐱it)+2σ2D(ci0)𝜼\displaystyle=\epsilon P_{\Delta_{1},\Delta_{2}}(\mathbf{x}_{i}^{t},\mathbf{x}_{j}^{t},c_{i}^{0},c_{j}^{0})(\mathbf{x}_{j}^{t}-\mathbf{x}_{i}^{t})+\sqrt{2\sigma^{2}D(c_{i}^{0})}\boldsymbol{\eta} (20)
Δ𝐱jt\displaystyle\Delta\mathbf{x}_{j}^{t} =ϵPΔ1,Δ2(𝐱jt,𝐱it,cj0,ci0)(𝐱it𝐱jt)+2σ2D(cj0)𝜼\displaystyle=\epsilon P_{\Delta_{1},\Delta_{2}}(\mathbf{x}_{j}^{t},\mathbf{x}_{i}^{t},c_{j}^{0},c_{i}^{0})(\mathbf{x}_{i}^{t}-\mathbf{x}_{j}^{t})+\sqrt{2\sigma^{2}D(c_{j}^{0})}\boldsymbol{\eta}_{*}
compute
𝐱i,jt+1=𝐱i,jt+Δ𝐱i,jt\mathbf{x}_{i,j}^{t+1}=\mathbf{x}_{i,j}^{t}+\Delta\mathbf{x}_{i,j}^{t} (21)
7: end for

3.2 Generation of a model-oriented segmentation masks

In this section we present the procedure to estimate the Segmentation Mask of Brain Tumor Images. The procedure described in this section closely follows the methodology presented in [9]. For a given image, we define the feature’s values in relation to the gray level of each pixel. In more detail, for a given pixel i{1,,N}i\in\{1,\dots,N\} we define

ci=Cimini=1,,NCimaxi=1,,NCimini=1,,NCi[0,1],c_{i}=\dfrac{C_{i}-\min_{i=1,\dots,N}{C_{i}}}{\max_{i=1,\dots,N}{C_{i}}-\min_{i=1,\dots,N}{C_{i}}}\in[0,1],

being CiC_{i}, i=1,,Ni=1,\dots,N, the gray value of the original image. Therefore, the value ci=1c_{i}=1 represents a white pixel and ci=0c_{i}=0 represents black pixel. In particular, for this work we used the brain tumor dataset that consists of 3D in multi-parametric MRI of patients affected by glioblastoma or lower-grade glioma, publicly available in the context of the Brain Tumor Image Segmentation Challenge http://medicaldecathlon.com/. The acquisition sequences include T1T_{1}-weighted, post-Gadolinium contrast T1T_{1}-weighted, T2T_{2}-weighted and T2T_{2} Fluid-Attenuated Inversion Recovery volumes. Each MRI scan is accompanied by corresponding ground truth segmentation mask, which is a binary image where anatomical regions of interest are highlighted as white pixels while all other areas are represented as black pixels. These ground truth segmentation masks were manually delineated by experienced radiologists and specifically identify three structures: ”tumor core”, ”enhancing tumor” and ”whole tumor”. We evaluate the performances of the DSMC algorithm for two different segmentation tasks: the ”tumor core” and the ”whole tumor” annotations. For the first task we use a single slice in the axial plane of the post-Gadolinium contrast T1T_{1}-weighted scans while for the second task we use a single slice in the axial plane of the T2T_{2}-weighted scans. The procedure to generate the segmentation masks is as follows:

  1. 1.

    We begin by associating each pixel with a position vector (xi,yi)(x_{i},y_{i}) and with static feature cic_{i}. We scale the vector position to a domain [1,1]×[1,1][-1,1]\times[-1,1] and the static feature to [0,1][0,1].

  2. 2.

    We apply a DSMC approach as described in Algorithm 1 to numerically approximate the large-time solution of the Boltzmann-type model defined in (11). This approach enables pixels to aggregate into clusters based on their Euclidean distance and gray color level.

  3. 3.

    The segmentation masks are generated by assigning to the original position of each pixel the mean value of the clusters they belong to. In this way we generate a multi-level mask composed of a number of homogenous regions.

  4. 4.

    Finally we obtain the binary mask by defining a threshold c~\tilde{c} such that:

    ci={1ifcc~0ifc<c~c_{i}=\begin{cases}1\ if\ c\geq\tilde{c}\\ 0\ if\ c<\tilde{c}\end{cases} (22)

    For all the following experiments, c~\tilde{c} is defined as the 10th percentile of pixels in the image that belong to the region of interest. This percentile was chosen as an optimal value for brain tumor images; however, it could also be considered as a parameter to be optimized within the process outlined in Section 3.2.1.

Following this procedure, we apply two morphological refinement steps to remove small regions that have been misclassified as foreground parts and to fill small regions that have been incorrectly categorized as background pixels. We begin by labeling all the connected pixels in the foreground and reassigning them to the background those whose number of pixels is less than a certain threshold. Then we repeat the same procedure but for the pixels in the background. To this end, we use the scikit-image python library that detects distinct objects of a binary image [55]. This allows us to obtain more precise segmentation masks by reducing small imperfections. This entire process is illustrated in Figure 4.

3.2.1 Parameters optimization

In this section, we outline the procedure for optimizing the parameters Δ1>0\Delta_{1}>0, Δ2>0\Delta_{2}>0 and σ2>0\sigma^{2}>0 that best approximate the ground truth segmentation masks. The goal is to identify the parameter configuration that minimizes the discrepancy between the computed and ground truth masks, measured through a predefined loss metric. To achieve this, we solve the following minimization problem:

minΔ1,Δ2,σ2>0Loss(Sg,St)=minΔ1,Δ2,σ2>01Metric(Sg,St)\displaystyle\min_{\Delta_{1},\Delta_{2},\sigma^{2}>0}Loss(S_{g},S_{t})=\min_{\Delta_{1},\Delta_{2},\sigma^{2}>0}{1-Metric(S_{g},S_{t})} (23)

where SgS_{g} is the Ground Truth segmentation mask and StS_{t} is the segmentation mask computed by the model. The different LossLoss metrics quantify the discrepancy between the masks, with lower values indicating greater similarity. Accordingly, the MetricMetric function, detailed in Section 3.3, measures the similarity between the two masks, with higher values indicating better agreement. The relationship Loss=1MetricLoss=1-Metric is satisfied when the MetricMetric is defined to take a value of 1 for perfect agreement and 0 for complete mismatch.

To solve the optimization problem (23), we used the Hyperopt package [6]. This optimization method randomly samples the parameter configurations from predefined distributions and selects the configuration that minimizes the LossLoss metric. This sampling process is repeated for a predefined number of iterations. In this work, we sample the values of our parameters from the following distributions:

Δ1U(Δx,0.7)Δ2U(0.05,0.3)σ2log-uniform(e5,1)\begin{gathered}\Delta_{1}\sim U(\Delta x,0.7)\\ \Delta_{2}\sim U(0.05,0.3)\\ \sigma^{2}\sim\text{log-uniform}(e^{-5},1)\end{gathered} (24)

where Δx\Delta x represents the distance between the initial positions of the pixels at t=0t=0. We perform 300 iterations of the optimization process. To ensure reproducibility and correctly compare the different results obtained, the random seed for parameter sampling is fixed.

Refer to caption
Figure 4: Summary of the segmentation process. The first image shows the input image. By means of the Algorithm 1 we generate the Multi-level mask where we reassign each picture’s gray level to the mean value of the cluster they are assigned to. The binary mask is produced as result of the binarization process. And the Final mask is the result after the two morphological refinements steps have been applied.

3.3 Segmentation Metrics

Next, we introduce the principal optimization metrics used for evaluating a binary segmentation mask. We define {Sg0,Sg1,St0,St1}\{S_{g}^{0},S_{g}^{1},S_{t}^{0},S_{t}^{1}\} where Sg0S_{g}^{0} and Sg1S_{g}^{1} represent the set of pixels that belong to the background and foreground of the ground truth segmentation mask respectively. Same applies for St0,St1{S_{t}^{0},S_{t}^{1}} but for the binary mask we want to evaluate. One could also wish to asses the validity of a segmentation mask with multiple labels, we refer to [53] for an introduction to the subject. Figure 5 presents a summary of the key terms used in the definitions of metrics.

St1S_{t}^{1}Sg1S_{g}^{1}St1Sg1S_{t}^{1}\cap S_{g}^{1} (TP)
(a) Intersection area or true positive (TP).
St1S_{t}^{1}Sg1S_{g}^{1}St1Sg1S_{t}^{1}\cup S_{g}^{1}
(b) Union area.
St1S_{t}^{1}Sg1S_{g}^{1}St1Sg1S_{t}^{1}-S_{g}^{1} (FP)
(c) False positive (FP).
St1S_{t}^{1}Sg1S_{g}^{1}Sg1St1S_{g}^{1}-S_{t}^{1} (FN)
(d) False negative (FN).
St1S_{t}^{1}Sg1S_{g}^{1}Btτ=0Bgτ=0B_{t}^{\tau=0}\cap B_{g}^{\tau=0}
(e) Intersection of boundaries at τ=0\tau=0.
St1S_{t}^{1}Sg1S_{g}^{1}Btτ>0Bgτ>0B_{t}^{\tau>0}\cap B_{g}^{\tau>0}
(f) Intersection of boundaries at τ>0\tau>0.
Figure 5: Representation of the relevant areas between the predicted St1S_{t}^{1} and ground truth Sg1S_{g}^{1} segmentation masks. BtτB_{t}^{\tau} and BgτB_{g}^{\tau} represent the corresponding boundaries with a τ\tau threshold.

3.3.1 Volumetric and Surface Dice Indexes

The Volumetric Dice index, also known as the Standard Volumetric Dice Similarity Coefficient, first introduced in [18], is the most used metric when evaluating volumetric segmentations. It is defined as follows:

DICE=2|Sg1St1||Sg1|+|St1|\textrm{DICE}=\frac{2|S_{g}^{1}\cap S_{t}^{1}|}{|S_{g}^{1}|+|S_{t}^{1}|} (25)

where, |||\cdot| indicates the total number of pixels of the considered region. This metric is equal to one if there is a perfect overlap between the two segmentation masks and null if both segmentations are completely disjoint. Since the Volumetric Dice coefficient is the most commonly used metric for segmentations, especially in the biomedical field, the results are highly interpretable and can be compared with those obtained in other studies. However, when assessing surface segmentation masks, the Volumetric Dice coefficient can yield suboptimal results. This limitation arises because the Volumetric Dice coefficient evaluates the similarity between segmentation masks based on pixel overlap without considering the spatial accuracy of the boundaries. Specifically, it treats all pixel displacements equally, without considering how far a segmentation error might be from the true boundary of the object. This means that segmentations with minor errors spread across multiple areas and those with a major error in a single area might receive similar scores. To address this limitation, the Surface Dice Similarity Coefficient was presented in [39] as a metric that can assess the accuracy of segmentation masks by considering the similarity of their boundaries. We define ζ:IR2\zeta:I\rightarrow R^{2} as a parameterization of Si\partial S_{i}, the boundary of the segmentation mask SiS_{i}. The border region Bi(τ)B^{(\tau)}_{i}, which is a region around the boundary Si\partial S^{i} with tolerance τ\tau, is defined as:

Bi(τ)={xR2/yIs.t.||xζ(y)||τ}B^{(\tau)}_{i}=\Big\{x\in R^{2}/\ \exists\ y\in I\ s.t.||x-\zeta(y)||\leq\tau\Big\} (26)

where, τ\tau is a positive real number that defines the maximum allowable distance from the boundary Si\partial S^{i} for a point xx to be considered part of the border region Bi(τ)B^{(\tau)}_{i}. The Surface Dice Similarity Coefficient between StS_{t} and SgS_{g} with tolerance τ\tau is defined as:

Rg,t(τ)=2|Bg(τ)Bt(τ)||Bg(τ)|+|Bt(τ)|R^{(\tau)}_{g,t}=\frac{2\left|B_{g}^{(\tau)}\cap B_{t}^{(\tau)}\right|}{\left|B_{g}^{(\tau)}\right|+\left|B_{t}^{(\tau)}\right|}\ (27)

Rg,t(τ)R^{(\tau)}_{g,t}, ranges from 0 to 1. A score of 1 indicates a perfect overlap between the two surfaces, while a score of 0 indicates no overlap. A larger value of τ\tau results in a wider border region, making the metric more tolerant to small deviations in the boundary.

3.3.2 Jaccard Index

The Jaccard Index (JAC) [29], similar to the Volumetric Dice coefficient, measures the similarity between two segmentations by quantifying the overlap between the computed mask and the ground truth. It is defined as the ratio between the intersection and the union of the foreground’s segmentation masks

JAC=|Sg1St1||Sg1St1|.\textrm{JAC}=\frac{|S_{g}^{1}\cap S_{t}^{1}|}{|S_{g}^{1}\cup S_{t}^{1}|}. (28)

The JAC Index and the Volumetric Dice coefficient are closely related since we have

JAC=DICE2DICEDICE=2JAC1+JAC.\begin{gathered}\textrm{JAC}=\frac{\textrm{DICE}}{2-\textrm{DICE}}\qquad\textrm{DICE}=\frac{2\textrm{JAC}}{1+\textrm{JAC}}.\end{gathered} (29)

From (29) we get the relationship between the JAC index and the Volumetric Dice coefficient. While both are widely used for measuring segmentation similarity, they can produce slightly different results. To understand the implications of these differences, we can analyze how their absolute and relative errors are related.

Definition 3.1 (Absolute Approximation).

A similarity S is absolutely approximated by S~\tilde{S} with error ϵ0\epsilon\geq 0 if the following holds for all y and y~\tilde{y}:

|S(y,y~)S~(y,y~)|ϵ|S(y,\tilde{y})-\tilde{S}(y,\tilde{y})|\leq\epsilon

Definition 3.2 (Relative Approximation).

A similarity S is relatively approximated by S~\tilde{S} with error ϵ0\epsilon\geq 0 if the following holds for all y and y~\tilde{y}:

S~(y,y~)1+ϵS(y,y~)S~(y,y~)(1+ϵ).\dfrac{\tilde{S}(y,\tilde{y})}{1+\epsilon}\leq S(y,\tilde{y})\leq\tilde{S}(y,\tilde{y})\cdot(1+\epsilon).

The following result holds

Proposition 3.1.

JAC and Volumetric Dice approximate each other with a relative error of 1 and an absolute error of 3223-2\sqrt{2}.

We point the reader to [7] for a deeper comparison between the Jaccard and Volumetric Dice Index.

3.3.3 F-measure

The FβF_{\beta}-measure is commonly used as an information retrieval metric [50, 13]. To define this metric, we first introduce two terms: Positive Predicted Value (PPV) and True Positive Rate (TPR), which are also known as Precision and Sensitivity, respectively. The Precision metric quantifies the proportion of correctly predicted foreground pixels (true positives, TP) out of all pixels predicted as foreground (TP + false positives, FP). The Sensitivity measures the proportion of actual foreground pixels (TP) correctly identified by the model out of all actual foreground pixels (TP + false negatives, FN). These two metrics can be expressed as follows

 Precision=PPV=TPTP + FPSensitivity = TPR =TPTP + FN\begin{split}\textrm{ Precision}=\textrm{PPV}=\frac{\textrm{TP}}{\textrm{TP + FP}}\\ \textrm{Sensitivity = TPR }=\frac{\textrm{TP}}{\textrm{TP + FN}}\end{split} (30)

The Precision metric indicates how many of the predicted foreground pixels are actually correct. The Sensitivity, on the other hand, measures how many of the actual foreground pixels were correctly predicted by the model.

We can define the FβF_{\beta}-measure as a combination of Precision and Sensitivity, with a parameter β\beta that controls the trade-off between these two metrics. Specifically, the FβF_{\beta}-measure is given by

FMSβ=(β2+1)PPVTPRβ2PPV+TPR\textrm{FMS}_{\beta}=\frac{(\beta^{2}+1)\cdot\text{PPV}\cdot\text{TPR}}{\beta^{2}\cdot\text{PPV}+\text{TPR}} (31)

We may observe that if β=1\beta=1 we obtain the Volumetric Dice metric.

To understand the impact of β\beta in the FβF_{\beta}-measure, we can substitute the definitions of PPV and TPR into (31), which results in the following

FMSβ=(β2+1)TP2(β2+1)TP2+TP(β2FN + FP)\textrm{FMS}_{\beta}=\frac{(\beta^{2}+1)\textrm{TP}^{2}}{(\beta^{2}+1)\textrm{TP}^{2}+\textrm{TP}(\beta^{2}\textrm{FN + FP})} (32)

If β>1\beta>1 the FβF_{\beta}-measure emphasizes minimizing False Negatives (maximizing Sensitivity), which can lead to more False Positives (lower Precision). If β<1\beta<1 the FβF_{\beta}-measure focuses on minimizing False Positives (maximizing Precision), potentially increasing the number of False Negatives (lower Sensitivity).

Furthermore, it can be noticed that

limβ(β2+1)TP2(β2+1)TP2+TP(β2FN + FP)=Sensitivity=TPTP + FN\lim_{\beta\to\infty}\frac{(\beta^{2}+1)\textrm{TP}^{2}}{(\beta^{2}+1)\textrm{TP}^{2}+\textrm{TP}(\beta^{2}\textrm{FN + FP})}=\textrm{Sensitivity}=\frac{\textrm{TP}}{\textrm{TP + FN}} (33)

since for β0\beta\gg 0 we neglect the contribution of the False Positives by considering only the contribution of the False Negatives where we re-obtain the TPR metrics defined in (30).

In summary, thanks to the β{\beta} parameter, the FβF_{\beta}-measure offers a flexible way to evaluate segmentation models by allowing for a tunable balance between Precision and Sensitivity. It provides a useful metric when dealing with class imbalances, especially in the field of medical imaging, where the relative importance of false positives and false negatives can vary according to each segmentation task.

4 Numerical Results

4.1 Impact of different diffusion functions

In this section we study the impact of choosing different diffusion functions D(c)D(c) in images consisting of a blurry background and a geometric shape in the center, as shown in Figure 7. The objective is to detect the shape of the Geometric Figure and to compare how the choice of different diffusion functions affect the value of the model parameters Δ1,Δ2\Delta_{1},\Delta_{2} and σ2\sigma^{2} where the optimization process is identical to the one introduce in Section 3.2.1. To this end, we chose the following diffusion functions:

D1(c)=c(1c)\displaystyle D_{1}(c)=c(1-c) D2(c)=4c2(1c)2\displaystyle D_{2}(c)=4c^{2}(1-c)^{2} (34)
D3(c)={c2if c0.5c2(1c)if c>0.5\displaystyle D_{3}(c)=\begin{cases}\frac{c}{2}\hskip 51.21504pt\text{if c}\leq 0.5\\ \frac{c}{2}(1-c)\hskip 19.91684pt\text{if c}>0.5\end{cases} D4(c)=64c4(1c)4.\displaystyle D_{4}(c)=64c^{4}(1-c)^{4}.

We point the reader to Figure 6 for a summary of the various introduced diffusion functions in (34).

Refer to caption
Figure 6: Diffusion functions defined in (34) to assess the variability related to a given feature’s level.
Refer to caption
(a)
Refer to caption
(b)
Figure 7: Images used to test different diffusion functions. The first column displays the original images, the second column presents the expected segmentation mask, and the third column shows the resulting binary mask. Each picture consists of (256,256)(256,256) pixels. For the optimization procedure we set T=200T=200 and Δt=0.1\Delta t=0.1. We define the number of iterations at 50. Row (a) shows the image with a square on a blurry background, while row (b) displays a similar image, but with a circle. Only one resulting binary mask was reported for each of the images because all the tests described in this section obtain the same segmentation mask.

For both the square and circle images, the Surface Dice Coefficient was used to optimize the parameters with a tolerance equal to the length of 1 pixel. Both images have a shape of (256,256)(256,256) pixels. The final time was set to T=200T=200 with Δt=0.1\Delta t=0.1. The resulting binary mask was the same for all choices of diffusion functions, obtaining the same loss function value. The results are shown in Figure 7. In the case of the square Figure 7 (a) we can see from Table 1 that for D1(c)D_{1}(c) and D3(c)D_{3}(c) the values of Δ1\Delta_{1} do not differ greatly for this two diffusion functions. In the case of Δ2\Delta_{2} we obtain a slightly smaller value for D1(c)D_{1}(c) compared to the one obtained for D3(c)D_{3}(c) and a larger value of the parameter σ2>0\sigma^{2}>0 for D3(c)D_{3}(c) compared to the one obtained for D1(c)D_{1}(c). If we look at Figure 6 we notice that D1(c)D3(c)D_{1}(c)\geq D_{3}(c). Therefore, a larger value of the diffusion functions is balanced by a smaller value of σ2\sigma^{2} to obtain a similar diffusion effect. This holds also for D1(c)D_{1}(c) and D3(c)D_{3}(c) for the circle Figure 7 (b). Furthermore, comparing D2(c)D_{2}(c) and D4(c)D_{4}(c) for the square image we can see that the resulting parameters are smaller for D2(c)D_{2}(c) in contrast to the one obtained with D4(c)D_{4}(c). This is consistent because, again, we can see from Figure 6 that D2(c)D4(c)D_{2}(c)\geq D_{4}(c). If we now compare D2(c)D_{2}(c) and D4(c)D_{4}(c) for the circle image we can see that the value of σ2\sigma^{2} is similar in this case. Nevertheless, in this case the difference is given by the values of Δ1\Delta_{1} and Δ2\Delta_{2}, which are both smaller for D2(c)D_{2}(c). This indicates that, for different diffusion functions, the optimal parameters adjust to yield similar results. A very straight way is to obtain similar values of Δ1\Delta_{1} and Δ2\Delta_{2} and a lower value of σ2\sigma^{2} for the diffusion function that has a higher value as in the case of the square image. However, the example of the circle image shows that us that we can also obtain different combinations of parameters so as to counter the effect of a bigger diffusion function.

Table 1: Parameters obtained for different Diffusion Functions for the Square and Circle Images. The loss metric used to obtain these parameters was the Surface Dice Coefficient with a tolerance equal to the length of 1 pixel.
Square
Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2}
D1(c)D_{1}(c) 0.884 0.310 0.889
D2(c)D_{2}(c) 0.351 0.054 0.047
D3(c)D_{3}(c) 0.817 0.407 1.341
D4(c)D_{4}(c) 0.442 0.081 0.624
Circle
Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2}
D1(c)D_{1}(c) 0.435 0.341 1.829
D2(c)D_{2}(c) 0.013 0.160 2.717
D3(c)D_{3}(c) 0.408 0.268 2.693
D4(c)D_{4}(c) 0.154 0.228 2.572

From Table 2 we can see the parameters obtained by minimizing three different optimization metrics using as a diffusion function D1(c)D_{1}(c) for the square image. For all the cases the resulting Surface Dice was equal to one indicating a perfect overlap between the computed and the ground truth segmentation masks. The resulting binary mask obtained were the same for the three examples and are equivalent to the ones shown in Figure 7. For the Volumetric and Surface Dice Coefficient we can see that the parameters obtained where identical. Nevertheless, for the Jaccard Index, the resulting parameters differed, being smaller in this case. The loss is null in both cases, coherently with the relationship (29).

Table 2: Parameters obtained for the Square Image by minimizing the Jaccard Index and the Volumetric and Surface Dice Coefficient. For the Surface Dice Coefficient the tolerance was set to the length of 1 pixel. The loss obtained was zero for the three cases.
Square
Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2}
Vol. Dice 0.884 0.310 0.889
Surf. Dice 0.884 0.310 0.889
JAC 0.442 0.081 0.624

4.2 Determining the final time

Refer to caption
Figure 8: Evolution of 𝒯\mathcal{T} where the kinetic density is the one considered in Figure 7(a). The image consists of (256,256)(256,256) pixels. We can observe how 𝒯\mathcal{T} decreases until condition 𝒯<δ\mathcal{T}<\delta is reached with δ=0.005\delta=0.005.

In this section we specify the criterion that we implemented to determine the final time T>0T>0. As defined in Section 3.1, we approximate the solution of (18) through a DSMC approach, even though we have no analytical insight on the form of the steady state. The objective is to find the values of the final time T>0T>0 such that a numerical steady state can be defined. We stress that the time taken to reach the equilibrium state for different initial conditions is not the same so we need to determine the time parameters for all the images we want to analyze. To this end, if fn(𝐱,c)f^{n}(\mathbf{x},c) is the approximation of the density at time tn=nΔtt^{n}=n\Delta t, we define

𝒯=2×[0,1]|fn+1(𝐱,c)fn(𝐱,c)|𝑑𝐱𝑑c,\mathcal{T}=\int_{\mathbb{R}^{2}\times[0,1]}|f^{n+1}(\mathbf{x},c)-f^{n}(\mathbf{x},c)|d\mathbf{x}dc, (35)

which represents an index of variation between two successive time steps of the reconstructed kinetic density. As the solution evolves, this quantity decreases and tends to zero as the equilibrium state is reached, as illustrated in Figure 8 for the case of the Square Image with a blurry background. Hence, we may introduce a breaking criterion based on the condition 𝒯<δ\mathcal{T}<\delta, for some δ>0\delta>0. When this condition is satisfied, the reconstructed density is considered an approximation of the steady state.

The same procedure was done for all images presented in this work so as to fulfill with the condition presented in this section.

4.3 Optimization Metrics for Tumor Image Analysis

In this section we study the impact that the different optimization metrics have on the resulting binary mask for the Core and Whole Tumor. We also analyze the parameters obtained for the different optimization metrics. Both brain tumor images consist of N=(240,240)N=(240,240) pixels. For the optimization procedure we determine T=100T=100 and Δt=0.01\Delta t=0.01. For each segmentation mask generated we evaluated 300300 different combinations of parameters. Figure 9 show the Segmentation Masks obtained for both the Whole and Core Tumor by optimizing the Jaccard Index and the Volumetric Dice Coefficient. In Table 3 the resulting parameters and the loss obtained for both optimization metrics are presented, in this case the loss is equal to 1 for a perfect overlap and 0 if the images are totally disjoint. First, we can observe that the loss obtained with both metrics satisfy (29) as expected. It can be noticed that for both segmentation masks the loss obtained is greater for the Volumetric Dice Coefficient. Furthermore, the parameter Δ1\Delta_{1} obtained with both optimization metrics is similar for both the Core and Whole Tumor. Nevertheless, we can see that for the Whole Tumor the Δ2\Delta_{2} parameter obtained with the Jaccard Index is bigger than the one obtained with the Volumetric Dice Coefficient. For the case of the Core Tumor instead the Δ2\Delta_{2} parameter is bigger for the Volumetric Dice Coefficient. If we compare this to the values obtained for σ2\sigma^{2} in both cases for both metrics we can see that a bigger diffusion value is countered by a smaller value of Δ2\Delta_{2} so as to obtain similar Segmentation Masks as seen from Figure 9.

Refer to caption
(a)
Refer to caption
(b)
Figure 9: Segmentation Masks obtained by minimizing the Jaccard Index and the Volumetric Dice Coefficient. (a) shows the results for the Core Tumor and (b) shows the results for the Whole Tumor. Both images consist of 240×240240\times 240 pixels. For the optimization procedure we set T=100T=100 and Δt=0.01\Delta t=0.01. In both cases we considered 300 iterations of the optimization algorithm. In both cases the loss reported by the Jaccard Index was smaller compared to the one obtained with the Volumetric Dice Coefficient. Furthermore, it can be noticed that the losses reported satisfy relation 29 as expected. From the values of the parameters we can observe that a bigger value of the diffusion is countered by a smaller value of Δ2\Delta_{2}.

For the Surface Dice Coefficient, the tolerance τ\tau was set to the length of 1 pixel, both when used as the optimization loss and when used as the evaluation metric. In Figure 10 shows the resulting binary mask obtained with the Surface Dice Coefficient and the Volumetric Dice Coefficient for the Core and Whole Tumor. In the case of the Whole Tumor the loss obtained with Surface Dice Coefficient is smaller than the one obtained with the Jaccard Index and the Volumetric Dice Coefficient. For the Core Tumor the loss obtained with the Surface Dice Coefficient is similar to the one reported by the Jaccard Index and both are smaller than the obtained with the Volumetric Dice Coefficient. For the Whole Tumor we can see that the resulting parameters are similar for all the optimization metrics. Nevertheless, for the Core Tumor we can notice that the parameters obtained with the Surface Dice Coefficient differ compared to the ones obtained with the Jaccard Index and the Volumetric Dice Coefficient. In particular, we obtained a smaller value for σ2\sigma^{2} and slightly bigger value for Δ1\Delta_{1}. This indicates that a smaller value for the diffusion of the particles is compensated by allowing the particles to aggregate with others that are slightly more separated than in the case of the Volumetric Dice and Jaccard Index. Given that both the Volumetric Dice Coefficient and the Jaccard Index are a measure of the superposition between two volumes (in this case two surfaces) they do not represent the proximity between two surfaces making the Surface Dice Coefficient more suitable to use as a loss metric when comparing two different surfaces.

Refer to caption
(a)
Refer to caption
(b)
Figure 10: Segmentation Masks obtained by minimizing the Surface and Volumetric Dice Coefficient. (a) shows the results for the Core Tumor and (b) shows the results for the Whole Tumor. Both images consist of 240×240240\times 240 pixels. For the optimization procedure we set T=100T=100 and Δt=0.01\Delta t=0.01. In both cases we considered 300 iterations of the optimization algorithm. For the Surface Dice Coefficient we set the tolerance τ\tau equal to the length of 1 pixel. Given that both the Volumetric Dice Coefficient and the Jaccard Index are a measure of the superposition between the two surfaces and do not account for the proximity between the two surfaces at every given point the Surface Dice Coefficent represents a more suitable metric when comparing two different surfaces.
Table 3: Parameters obtained for the Whole and Core Tumor using the Volumetric Dice Coefficient, Jaccard Index and the Surface Dice Coefficient. The loss reported is 1 for perfect overlap and 0 for complete deviation.
Whole Tumor
Opt. Function Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2} Loss
Vol. Dice 0.4972 0.0888 2.6867 0.9292
JAC 0.5075 0.1187 2.3631 0.8672
Surf. Dice 0.6383 0.0579 2.6504 0.7447
Core Tumor
Opt. Function Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2} Loss
Vol. Dice 0.3795 0.1254 2.1808 0.9360
JAC 0.3823 0.1004 2.7001 0.8796
Surf. Dice 0.6841 0.0760 1.4155 0.8727

For the FβF_{\beta}-measure we can see in Figure 11 the binary masks obtained for different values of β\beta for the Core and Whole Tumor. For the case of the Core Tumor we can observe that for β=0.25\beta=0.25 we obtain areas of misclassified pixels in the tumor region. This can also be seen from Table 4 where the number of False Negatives is bigger and the number of False Positives is smaller compared to the results obtained for bigger values of β\beta. If we recall (31) we can see that for low values of β\beta the False Negatives are multiplied by a factor of β2\beta^{2} thus having a smaller weight compared to the False Positives. As we increase the value of β\beta we can notice from both Table 4 and Figure 11 that modifying the value of β\beta has no impact on the resulting binary mask. This also holds true for the Whole Tumor as no difference can be noticed in the results obtained for different values of β\beta. Finally in Figure 12 we see the loss reported for different values of β\beta where the loss equal to 11 represents a perfect overlap. First, it can be noticed that we obtain the higher value of the loss for β=0.25\beta=0.25, meaning that this should be the most accurate result, which is anyway balanced by the fact that we obtain the larger number of False Negatives. Again, we saw that this can be obtained from (31), where low values of β\beta reduce the impact of a large number of False Negatives on the resulting loss. Secondly, we observe that the loss decreases for larger values of β\beta. This behavior arises because the loss is inversely proportional to β\beta, while the resulting segmentation masks remain unchanged, as shown in Table 4. This shows that the FβF_{\beta}-measure may not be a reliable metric for these types of segmentation masks and this segmentation method, and that modifying the value of β\beta provides no advantage.

Refer to caption
(a)
Refer to caption
(b)
Figure 11: Segmentation masks obtained for the FβF_{\beta}-Loss metric. (a) Shows the segmentation masks obtained for β=0.25,0.5,0.75,1.5\beta=0.25,0.5,0.75,1.5 for the Core tumor and (b) Shows the segmentation masks obtained using the same values of β\beta for the Whole Tumor. Both images consist of 240×240240\times 240 pixels. For the optimization procedure we set T=300T=300 and Δt=0.01\Delta t=0.01. In both cases we considered 300 iterations of the optimization algorithm. In (a) we can observe that for β=0.25\beta=0.25 the resulting segmentation masks display areas of misclassified pixels while for bigger values of β\beta the resulting segmentation mask does not differ. In (b) no zoomed area is shown as the segmentation masks display no visible differences for the different values of β\beta. This can be seen also from Table 4 by observing the number of False Positives (FP), False Negatives (FN) and True Positives (TP) obtained for both images.
Refer to caption
Figure 12: Relationship between the Fβ{}_{\beta}- loss value and the β\beta value for both the Core and Whole Tumor Images. As β\beta increases, the Fβ{}_{\beta}- loss decreases showing that for lower values of β\beta we should obtain a more precise segmentation mask as the loss indicated in this Figure is 1 for perfect overlap. Nevertheless, the resulting binary mask is less accurate for lower values of β\beta showing that this is not an appropriate metric for optimizing the consensus-based model.
Table 4: Parameters obtained for the FβF_{\beta}-measure for different values of β\beta. The loss reported is 1 for perfect overlap and 0 for complete deviation. The number of False Positives (FP), False Negatives (FN) and True Positives (TP) are presented for the resulting segmentation mask for each value of β\beta.
Whole Tumor
Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2} FP FN TP Loss
β=0.25\beta=0.25 0.6873 0.1707 2.2395 134 347 3170 0.9559
β=0.5\beta=0.5 0.3351 0.1080 2.7051 134 350 3167 0.9470
β=0.75\beta=0.75 0.5939 0.2304 2.6718 134 350 3167 0.9373
β=1.5\beta=1.5 0.5316 0.1092 2.7105 136 349 3168 0.9179
β=5.0\beta=5.0 0.5662 0.1225 2.7043 136 349 3168 0.9032
β=10.0\beta=10.0 0.6061 0.2835 2.1243 136 349 3168 0.9013
Core Tumor
Δ1\Delta_{1} Δ2\Delta_{2} σ2\sigma^{2} FP FN TP Loss
β=0.25\beta=0.25 0.6575 0.2725 0.0257 9 206 849 0.9763
β=0.5\beta=0.5 0.3989 0.0637 1.8094 25 107 948 0.9582
β=0.75\beta=0.75 0.4073 0.0942 1.6972 25 105 950 0.9460
β=1.5\beta=1.5 0.5444 0.2077 2.3545 25 105 950 0.9220
β=5.0\beta=5.0 0.5587 0.1742 2.6864 25 105 950 0.9032
β=10.0\beta=10.0 0.6137 0.2425 1.9757 25 105 950 0.9012

Conclusions

In this paper we presented a consensus-based kinetic method and show how can this model can be applied for the problem of image segmentation. The pixel in a 2D image is interpreted as a particle that interacts with the rest through a consensus-type process, which allows us to identify different clusters and generate an image segmentation. We developed a procedure that allows us to approximate the Ground Truth Segmentation Mask of different Brain Tumor Images. Furthermore, we presented and evaluated different optimization metrics and study the impact on the results obtained. In particular we found that the Jaccard Index and the Volumetric and Surface Dice Coefficient are appropriate metric to optimize our model. Nevertheless, given that the Surface Dice Coefficient is measure of discrepancy between the boundaries of two surfaces it is a better representation compared to the Jaccard Index and the Volumetric Dice Coefficient as they account only for absolute differences and do not attain to point wise differences. Furthermore, we assessed the use of the FβF_{\beta}-Loss as a potential optimization metric. We found that both the loss values and the corresponding results were difficult to interpret, as low loss values often corresponded to low accuracy, making this metric challenging to apply effectively for optimization in this context. Future researches will focus on the case of multidimensional features and potential training methods for the introduced model.

Acknowledgments

M.Z. is member of GNFM (Gruppo Nazionale di Fisica Matematica) of INdAM, Italy and acknowledges support of PRIN2022PNRR project No.P2022Z7ZAJ, European Union - NextGeneration EU. M.Z. acknowledges partial support by ICSC – Centro Nazionale di Ricerca in High Performance Computing, Big Data and Quantum Computing, funded by European Union – NextGenerationEU

References

  • [1] Agosti, A., Shaqiri, E., Paoletti, M., Solazzo, F., Bergsland, N., Colelli, G., Savini, G., Muzic, S., Santini, F., Deligianni, X. & Others Deep learning for automatic segmentation of thigh and leg muscles. Magn. Reson. Mater. Phys. Biol. Med.. 35 pp. 467-483 (2021).
  • [2] Albi, G., Pareschi, L., Toscani, G., & Zanella, M. Recent advances in opinion modeling: control and social influence. In Active Particles Volume 1, Advances in Theory, Models, and Applications, Eds. N. Bellomo, P. Degond, and E. Tadmor, Birkhäuser-Springer (2017).
  • [3] Albi, G., Pareschi, L., & Zanella, M. On the optimal control of opinion dynamics on evolving networks. In System Modeling and Optimization. CSMO 2015. IFIP Advances in Information and Communication Technology. Eds. Bociu L., Désidéri JA., Habbal A. Eds., vol 494. Springer, Cham.
  • [4] Auricchio, G., Codegoni, A., Gualandi, S., Toscani, G., Veneroni, M. On the equivalence between Fourier-based and Wasserstein metrics. Rend. Lincei Mat. Appl.. 31: 627–649 (2020)
  • [5] Barbano, R., Arridge, S., Jin, B. & Tanno, R. Uncertainty quantification in medical image synthesis. Biomedical Image Synthesis And Simulation: Methods And Applications. pp. 601-641 (2022).
  • [6] Bergstra, J., Komer, B., Eliasmith, C., Yamins, D. & Cox, D. Hyperopt: a Python library for model selection and hyperparameter optimization. Comput. Sci. Discov.. 8, 014008 (2015).
  • [7] Bertels, J., Eelbode, T., Berman, M., Vandermeulen, D., Maes, F., Bisschops, R. & Blaschko, M. Optimizing the Dice Score and Jaccard Index for Medical Image Segmentation: Theory & Practice. CoRR. abs/1911.01685 (2019).
  • [8] Borra, D. & Lorenzi, T. Asymptotic analysis of continuous opinion models under bounded confidence. Commun. Pure Appl. Anal. 12, 1487-1499 (2013).
  • [9] Cabini, R., Pichiecchio, A., Lascialfari, A., Figini, S. & Zanella, M. A kinetic approach to consensus-based segmentation of biomedical images. Kinet. Relat. Models,18(2), 286-311 (2025).
  • [10] Carrillo, J. A., Fornasier, M., Rosado, J. & Toscani, G. Asymptotic flocking dynamics for the kinetic Cucker-Smale model. SIAM J. Math. Anal.. 42, 218-236 (2010).
  • [11] Carrillo, J. A., Fornasier, M., Toscani, G., and Vecil, F. Particle, kinetic, and hydrodynamic models of swarming. In In: Naldi, G., Pareschi, L., Toscani, G. (eds) Mathematical Modeling of Collective Behavior in Socio-Economic and Life Sciences, Modeling and Simulation in Science, Engineering and Technology. Birkhäuser Boston.
  • [12] Castellano, C., Fortunato, S. & Loreto, V. Statistical physics of social dynamics. Rev. Modern Phys.. 81 pp. 591-646 (2009).
  • [13] Chinchor, N. MUC-4 evaluation metrics. (1992).
  • [14] Cordier, N., Delingette, H. & Ayache, N. A patch-based approach for the segmentation of pathologies: application to glioma labelling. IEEE Trans. Med. Imaging. 35, 1066-1076 (2015).
  • [15] Coupé, P., Manjón, J., Fonov, V., Pruessner, J., Robles, M. & Collins, D. Patch-based segmentation using expert priors: Application to hippocampus and ventricle segmentation. NeuroImage. 54, 940-954 (2011).
  • [16] Deffuant, G., Neau, D., Amblard, F. & Weisbuch, G. Mixing beliefs among interacting agents. Adv. Complex Syst.. 3, 87-98 (2000).
  • [17] DeGroot, M. Reaching a consensus. J. Am. Stat. Assoc.. 69, 118-121 (1974).
  • [18] Dice, L. Measures of the Amount of Ecologic Association Between Species. Ecology. 26 pp. 297-302 (1945).
  • [19] Dimarco, G. & Pareschi, L. Numerical methods for kinetic equations. Acta Numerica. 23 pp. 369-520 (2014).
  • [20] Düring, B., & Wolfram, M.-T. Opinion dynamics: inhomogeneous Boltzmann-type equations modelling opinion leadership and political segregation. Proc. R. Soc. Lond. A. 471 (2015).
  • [21] Fagioli, S., & Radici, E. Opinion formation systems via deterministic particles approximation. Kinet. Relat. Mod. 14, 45–76 (2021).
  • [22] French Jr, J. A formal theory of social power. Psychol. Rev.. 63, 181-194 (1956).
  • [23] Fagioli S, Favre G. Opinion formation on evolving network: the DPA method applied to a nonlocal cross-diffusion PDE-ODE system. European Journal of Applied Mathematics. 35, 748-775 (2024).
  • [24] Frigui, H. & Krishnapuram, R. A robust competitive clustering algorithm with applications in computer vision. IEEE Trans. Pattern Anal. Mach. Intell. 21, 450-465 (1999).
  • [25] Hegselmann, R., & Krause, U. Opinion dynamics and bounded confidence models, analysis, and simulation. J. Artif. Soc. Soc. Simul.. 5 Nr.3 (2002).
  • [26] Herty, M., Pareschi, L. & Visconti, G. Mean field models for large data–clustering problems. Netw. Heterog. Media. 15, 463 (2020).
  • [27] Hesamian, M., Jia, W., He, X., & Kennedy, P. Deep learning techniques for medical image segmentation: achievements and challenges. J. Digit. Imaging. 32, 582-596 (2019).
  • [28] Isensee, F., Jaeger, P., Kohl, S., Petersen, J., & Maier-Hein, K. nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods. 18, 203-211 (2021).
  • [29] Jaccard, P. The distribution of the flora in the alpine zone.1. New Phytologist. 11, 37-50 (1912).
  • [30] Jain, A., Murty, M., & Flynn, P. Data clustering: a review. ACM Comput. Surv.. 31, 264-323 (1999).
  • [31] Kayal, S. Unsupervised image segmentation using the Deffuant-Weisbuch model from social dynamics. Signal Image Video Process.. 11 pp. 1405-1410 (2017).
  • [32] Kwon, Y., Won, J., Kim, B., & Paik, M. Uncertainty quantification using Bayesian neural networks in classification: application to biomedical image segmentation. Comput. Stat. Data Anal. 142 pp. 106816 (2020).
  • [33] Liu, X., Song, L., Liu, S., & Zhang, Y. A review of deep-learning-based medical image segmentation methods. Sustainability. 13, 1224 (2021).
  • [34] Lizzi F., Agosti A., Brero F., Cabini R.F., Fantacci M.E., Figini S., Lascialfari A., Laruina F., Oliva P., Piffer S., Postuma I., Rinaldi L., Talamonti C., & Retico A. Quantification of pulmonary involvement in COVID-19 pneumonia by means of a cascade of two U-nets: training and assessment on multiple datasets using different annotation criteria. Int. J. Comput. Assist. Radiol. Surg. 17, 229-237 (2022).
  • [35] Lizzi F., Postuma I., Brero F., Cabini R.F., Fantacci M.E., Lascialfari A., Oliva P., Rinaldi L., & Retico A. Quantification of pulmonary involvement in COVID-19 pneumonia: an upgrade of the LungQuant software for lung CT segmentation. Eur. Phys. J. Plus. 138, 326 (2023).
  • [36] Medaglia, A., Colelli, G., Farina, L., Bacila, A., Bini, P., Marchioni, E., Figini, S., Pichiecchio, A., & Zanella, M. Uncertainty quantification and control of kinetic models of tumour growth under clinical uncertainties. Int. J. Non-Linear Mech.. 141 pp. 103933 (2022).
  • [37] Mittal, H., Pandey, A., Saraswat, M., Kumar, S., Pal, R., & Modwel, G. A comprehensive survey of image segmentation: clustering methods, performance parameters, and benchmark datasets. Multimed. Tools. Appl.. pp. 1-26 (2021).
  • [38] Motsch, S., & Tadmor, E. Heterophilious dynamics enhances consensus. SIAM Rev.. 56, 577-621 (2014).
  • [39] Nikolov, S., Blackwell, S., Mendes, R., Fauw, J., Meyer, C., Hughes, C., Askham, H., Romera-Paredes, B., Karthikesalingam, A., Chu, C., Carnell, D., Boon, C., D’Souza, D., Moinuddin, S., Sullivan, K., Consortium, D., Montgomery, H., Rees, G., Sharma, R., Suleyman, M., Back, T., Ledsam, J., & Ronneberger, O. Deep learning to achieve clinically applicable segmentation of head and neck anatomy for radiotherapy. CoRR. abs/1809.04430 (2018).
  • [40] Nugent, A., Gomes, S. N., & Wolfram, M.-T. Steering opinion dynamics through control of social networks. Preprint arXiv:2404.09849 (2024).
  • [41] Pareschi, L., & Russo, G. An Introduction to Monte Carlo Methods for the Boltzmann Equation. 10 pp. 35-76 (1999,1).
  • [42] Pareschi, L., & Toscani, G. Interacting multiagent systems: kinetic equations and Monte Carlo msethods. (OUP Oxford,2013).
  • [43] Pareschi, L., Tosin, A., Toscani, G., & Zanella, M. Hydrodynamic models of preference formation in multi-agent societies. J. Nonlin. Sci.. 29, 2761-2796 (2019).
  • [44] Pareschi, L. & Zanella, M. Structure preserving schemes for nonlinear Fokker-Planck equations and applications. J. Sci. Comput.. 74, 1575-1600 (2018).
  • [45] Piccoli, B., and Tosin, A., & Zanella, M. Model-based assessment of the impact of driver-assist vehicles using kinetic theory. Z. Angew. Math. Phys., 71:152 (2020).
  • [46] Pizzagalli, D., Gonzalez, S., & Krause, R. A trainable clustering algorithm based on shortest paths from density peaks. Science Advances. 5, eaax3770 (2019).
  • [47] Quetti F.M., Figini S., & Ballante E. A Bayesian Approach to Clustering via the Proper Bayesian Bootstrap: the Bayesian Bagged Clustering (BBC) algorithm. Preprint arXiv:2409.08954, 2024.
  • [48] Rainer, H., & Krause, U. Opinion Dynamics and Bounded Confidence: Models, Analysis and Simulation. Journal Of Artificial Societies And Social Simulation. 5 (2002).
  • [49] Ronneberger, O., Fischer, P., & Brox, T. U-net: Convolutional networks for biomedical image segmentation. International Conference On Medical Image Computing And Computer-Assisted Intervention. pp. 234-241 (2015).
  • [50] Sasaki Y. The truth of the f-measure. Teach Tutor Mater. 1:1–5 (2007).
  • [51] Sharma, N. & Aggarwal, L. Automated medical image segmentation techniques. J. Med. Phys.. 35, 3 (2010).
  • [52] Sznajd-Weron, K. & Sznajd, J. Opinion evolution in closed communities. Int. J. Mod. Phys. C. 11, 1157-1165 (2000).
  • [53] Taha, A. & Hanbury, A. Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool. BMC Medical Imaging. 15, 1-28 (2015).
  • [54] Toscani, G. Kinetic models of opinion formation. Commun. Math. Sci.. 4, 481-496 (2006).
  • [55] Van Der Walt, S., Schönberger, J., Nunez-Iglesias, J., Boulogne, F., Warner, J., Yager, N., Gouillart, E. & Yu, T. Scikit-image: Image processing in python. PeerJ. 2:e453 (2014).
  • [56] Yu, Z., Au, O., Zou, R., Yu, W. & Tian, J. An adaptive unsupervised approach toward pixel clustering and color image segmentation. Pattern Recognition. 43, 1889-1906 (2010).
  • [57] Zhou, Z., Rahman Siddiquee, M., Tajbakhsh, N. & Liang, J. Unet++: A nested u-net architecture for medical image segmentation. Deep Learning In Medical Image Analysis And Multimodal Learning For Clinical Decision Support. pp. 3-11 (2018).