Professional Documents
Culture Documents
TSIM - Clustering
TSIM - Clustering
TSIM - Clustering
• Outline
– Segmentation of medical images
– Classical methods
– Morphological methods
– 1st exercise, image segmentation
– Active contours
– Graph-based methods
– Active shape models (ASM)
– Machine learning: Clustering
– 2nd exercise, clustering segmentation
Supervised learning
– There is a set of labeled training data used as a reference
– Fixed number of classes
• Classification
Identifying to which of a set of classes a new observation belongs
• Regression
Predicts continuous dependent variable from a number of
independent variables
Unsupervised learning
– Does not exist any labeled training set
– Number of classes can be fixed or automatically chosen by the
algorithm
In machine learning, clustering is a type of unsupervised learning
(Supervised clustering = Classification + regression)
• Clustering:
– The process of grouping a set into clusters of similar
objects
• Objects within a cluster should be similar
• Objects from different clusters should be dissimilar
• Partitional clustering
Find all the clusters simultaneously as a partition of the data and do not
impose a hierarchical structure.
• Hierarchical clustering
Is a set of nested clusters that are organized as a tree
• Gene analysis
DOI: 10.1098/rstb.2012.0474
TSIM (2022-2023) - Segmentation of medical images 8
Partitional Clustering
• Clusters of pixels
• Clusters of atomic regions (superpixels)
From a previous over-segmentation
Watershed T.
Xu, R., & Wunsch, D. C. (2010). Clustering algorithms in biomedical research: a review.
IEEE Reviews in Biomedical Engineering, 3, 120-154.
Scatter plot:
Schematic representation of the vectors of parameters
• 3D vectors of parameters
• Clustering algorithms:
– K-Nearest Neighbor (K-NN)
– K-means
– Fuzzy C-Means (FCM)
– Mean shift
– Expectation-Maximization (EM)
– Spectral clustering
– ISODATA
• The effect of K
– Larger K produces smoother boundaries and reduces the class label
noise
– But when k is too large, always predict the majority class/cluster
Steenwijk MD et al. , Accurate white matter lesion segmentation by k nearest neighbor classification with
tissue type priors, Neuroimage: Clinical. (2013):462:469.
K=1
K=45
Vrooman HA, et al. Multi-spectral brain tissue segmentation using automatically trained k-Nearest-
Neighbor classification. Neuroimage 2007, 37(1):71-81.
• K-means clustering
– Unsupervised algorithm
– Minimize the within-cluster sum of squares of distances
– Separates data into Voronoi-cells, assumes equal-sized K
clusters
K 2
argmin xi − uk
C k = 0 iC k
• K clusters
• uk mean value of cluster Ck
• K-means:
– NP-hard (non-deterministic polynomial-time)
– Common approach: Search for local minima
– Heuristic solution: Lloyd's algorithm (k-means iterative algorithm)
• K-means
K 2 • K clusters
argmin xi − uk
C k =1 iC k • uk mean value of cluster Ck
K
N m 2
K
argmin wik xi − uk , 1 m w ik = 1 i 1,..., N
C k =1 i =1 k =1
• Fuzzy C-means N
w m
x
ik i
K
N
2
uk = i =1
argmin wikm xi − uk , 1 m
N
C k =1 i =1 ik
w m
i =1
1
Fuzzy C-means iterative algorithm: wik = 2
1. Initialize the weighted matrix W(n)=[wik] K xi − uk m −1
• segmentation into grey matter and white matter, using a fuzzy C‐means
method
K-means result
• Parametric models
– Data are a mixture of probability distributions
– Each cluster is a model of a probability distribution, characterized by
a set of parameters
– Task: estimate the parameters, fitting the parametric model
• Parametric models
– Model parameters of statistical distributions
• Density estimator (in contrast to centroid estimators, i.e., k-means, fuzzy
C-means)
– Example: Gaussian Mixture Models (GMM)
• 1-dimensional case: mean and variance parameters
K
p ( x ) = k p ( x |k )
k =1
1 1 2
p ( x |uk , k ) = exp − 2 ( x − k )
k 2 2 k
2-dimensional Gaussian
bN ( μ b , b )
a N ( μ a , a )
P ( xi |C k ) P ( C k )
Bayes Theorem: P ( C k | xi ) =
P ( xi )
i j j j j
p
j =1
x |C , u (t )
, (t )
(t )
p (C | x , ) x p (C ) ( x − u )( x − u ) p (C )
T
( t +1 ) ( t +1 )
k i
(t )
k i k | xi , (t)
k i k i k k | xi , i(t )
uk (t +1)
= i
k (t +1)
= i
(t +1)
= i
p (C | x , ) p (C | x , )
(t ) (t) k
k i k k i k
N
i i
K ( x − u )
i
i
( n)
Fukunaga and Hostetler, "The Estimation of the Gradient of a Density Function, with Applications
in Pattern Recognition", IEEE Transactions on Information Theory, vol. 21 , pp 32-40 ,1975
• Mean shift
(1) (2)
(3)
A. Mayer and H. Greenspan, "An adaptive mean-shift framework for MRI brain
segmentation," IEEE Trans. on Medical Imaging, vol. 28, (8), pp. 1238-50, 2009.
• ISODATA
– Iterative Self-Organizing Data Analysis Technique
– Like the k-means algorithm but allows for different number of clusters
while the k-means assumes that the number of clusters is known a
priori.
– 1) Perform k-means clustering
– 2) Split any clusters whose samples are sufficiently dissimilar
– 3) Merge any two clusters sufficiently close
– 4) Go to step #1
• Spectral clustering
– The goal is to cluster data that is connected but not necessarily
compact or clustered within convex boundaries
– Uses the spectrum (eigenvalues) of the affinity matrix to perform
dimensionality reduction before clustering in fewer dimensions
Related with
graph-cuts!