machine-learning-semantic-image-segmentation.md 2.23 KB
Newer Older
Christian Tischer's avatar
Christian Tischer committed
1 2 3 4 5 6 7 8 9 10
# Semantic image segmentation using machine learning

<img src='https://g.gravizo.com/svg?
 digraph G {
    shift [fontcolor=white,color=white];
    "intensity image" -> threshold;
    threshold -> "binary image";
    "binary image" -> "background value";
    "binary image" -> "foreground value";
    "intensity image" -> "machine learning";
Christian Tischer's avatar
Christian Tischer committed
11
    "annotations" -> "machine learning";
Christian Tischer's avatar
Christian Tischer committed
12
    "machine learning" -> "pixel class image";
Christian Tischer's avatar
Christian Tischer committed
13
    "pixel class image" -> "class00 value";
Christian Tischer's avatar
Christian Tischer committed
14 15
    "pixel class image" -> "class01 value";
    "pixel class image" -> "class.. value";
Christian Tischer's avatar
Christian Tischer committed
16
    "pixel class image" -> "class C value";
Christian Tischer's avatar
Christian Tischer committed
17 18 19
 }
'/>

Christian Tischer's avatar
Christian Tischer committed
20 21 22 23 24 25 26

&nbsp;

&nbsp;

&nbsp;

Christian Tischer's avatar
Christian Tischer committed
27 28 29 30 31
## Decision tree based image segmentation

<img src='https://g.gravizo.com/svg?
 digraph G {
    shift [fontcolor=white,color=white];
Christian Tischer's avatar
Christian Tischer committed
32 33 34 35 36 37
    "Intensity image" -> "filter00 image" -> "Decision tree(s)";
    "Intensity image" -> "filter01 image" -> "Decision tree(s)";
    "Intensity image" -> "filter02 image" -> "Decision tree(s)";
    "Intensity image" -> "filter.. image" -> "Decision tree(s)";
    "Intensity image" -> "filter F image" -> "Decision tree(s)";
    "Annotations" -> "Decision trees(s)"
Christian Tischer's avatar
Christian Tischer committed
38 39 40 41
    "Decision tree(s)" -> "class00 (probability) image";
    "Decision tree(s)" -> "class01 (probability) image";
    "Decision tree(s)" -> "class.. (probability) image";
    "Decision tree(s)" -> "class C (probability) image";
Christian Tischer's avatar
Christian Tischer committed
42 43
 }
'/>
Christian Tischer's avatar
Christian Tischer committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

## Activity: Semantic image segmentation

- Open image: xy_8bit__em_fly_eye.tif
- Segment three classes: background, eye, other
	- Choose image filters
	- Draw few labels in the blurry image background => class00
	- Draw few labels on the eye => class01
	- Draw few labels on other parts of the animal => class02
	- While( not happy):
		- Train the classifier
 		- Inspect the predictions
		- Add more labels where the predictions are wrong

TODO: use multiple files to demo that a classifier can be applied on other images.

## Formative assessment

True or false? Discuss with your neighbour!

- In contrast to simple thresholding, using machine learning for pixel classification, one always has more than 2 classes.
- If one wants to learn 4 different classes one has to, at least, add 4 annotations on the training image.
- One cannot classify an image where one did not put any training annotations.