Quiz: mixtures on images

Short questions to test your understanding. Try each on paper first, then open the answer.


Q1. Why can EM for a grey-level mixture run on the 256 histogram bins instead of on the 1 000 000 pixels of a large image, and give exactly the same result?

What do two pixels with the same grey value have in common in the E-step?

Pixels with the same grey value have the same responsibilities, and they enter the M-step sums identically. So each bin can be treated as one point with weight equal to its count: every sum over pixels becomes a sum over bins times counts.


Q2. A histogram mixture with K = 3 assigns each pixel its most probable class. Why is the resulting label image the same as thresholding with two thresholds?

On what does the label of a pixel depend?

The label depends only on the grey value; the most probable class changes at a few grey values (the Bayes boundaries). Between two boundaries the label is constant, so the label image is a multi-level threshold at those boundaries (with equal or similar variances, two boundaries for three classes ordered by their means).


Q3. What does a probability map (posterior of one class) show that the label image does not?

Think of pixels near the boundary grey value.

How sure the model is: values near 1 or 0 are clear, values near 0.5 mark pixels whose grey value fits two classes equally well (edges, blurred regions, overlapping classes). The label image hides this uncertainty.


Q4. You fit a two-class mixture to a noisy micrograph; the label image is full of isolated wrong pixels. Will more EM iterations or more components help? What would?

What information does the histogram not contain?

No: the problem is not the fit but the model. The histogram ignores where pixels are, so a noisy pixel whose value falls on the wrong side of the boundary is labelled wrongly whatever its neighbours are. Use the mixture as a data term and add a smoothness term between neighbours (graph cuts, or a Markov random field prior), or denoise first.


Q5. A red object lies half in shadow. In RGB its pixels form a long line towards black. Why does k-means with $K = $ (number of objects) tend to fail, while a mixture with full covariances does not?

What shape does each method assume for a group?

k-means assumes round groups of similar size; covering a long line with round groups needs two of them, so it splits the object and merges two other colours to stay at K groups. A full-covariance component can be a long, thin ellipse along the shadow line and keeps the object whole.


Q6. A mixture fitted to the integrated DNA intensity of 2000 nuclei has weights 0.58 (G1 peak), 0.14 (S plateau) and 0.28 (G2 peak). How many cells are in G2? What should the ratio of the two peak means be?

G2 cells have doubled their DNA.

About 0.28 \times 2000 = 560 cells. The G2 mean should be twice the G1 mean (4N versus 2N); a fitted ratio far from 2 suggests a measurement problem (saturation, background, segmentation errors) or a poor fit.


Q7. How would you use a fitted mixture to flag debris in a field of normal cells, and what number do you have to choose?

What do normal cells have that debris does not?

Fit the mixture to features of (mostly) normal cells. Flag an object when its density is below a threshold, or when its Mahalanobis distance to every component exceeds a threshold such as 3. That threshold sets the trade-off between missed debris and normal cells flagged by chance.


Q8. In GrabCut, what plays the role of the E-step and what of the M-step?

One step finds labels, the other refits the colour models.

The graph cut finds a labelling given the colour models (like the E-step, but hard and with a smoothness term); refitting the object and background mixtures to the new labels is the M-step. Alternating them lowers the energy until the labelling settles.


Q9. (math) Write the M-step for \mu_k of a histogram mixture with counts h_j at grey values g_j.

Replace the sum over pixels by a sum over bins.

\mu_k = \sum_j h_j r_{jk} g_j \big/ \sum_j h_j r_{jk}, with r_{jk} = \pi_k\mathcal N(g_j \mid \mu_k, \sigma_k^2)/\sum_l\pi_l\mathcal N(g_j \mid \mu_l, \sigma_l^2).