Last modified by puchades on 2022/09/30 16:01

From version 12.1
edited by tomazvieira
on 2022/01/25 17:17
Change comment: Uploaded new attachment "image-20220125171715-5.png", version {1}
To version 15.2
edited by tomazvieira
on 2022/01/25 17:22
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -31,7 +31,6 @@
31 31  
32 32  [[image:image-20220125164557-4.png]]
33 33  
34 -(% class="wikigeneratedid" %)
35 35  == ==
36 36  
37 37  == Training the Pixel Classifier ==
... ... @@ -41,47 +41,54 @@
41 41  
42 42  Pixel Classification uses different characteristics ("features") of your image to determine which class each pixel should belong to. These take into account, for example, color and texture of each pixel as well as that of the neighboring pixels. Each one of this characteristics requires some computational power, which is why you can select only the ones that are sensible for your particular dataset.
43 43  
43 +Use the checkboxes in the applet "Select Image Features" applet to select some image features and their corresponding sigma (which determines the radius around the pixel that will be considered when computing that feature).
44 44  
45 +You can read more about image features in [[ilastik's documentation.>>https://www.ilastik.org/documentation/pixelclassification/pixelclassification\]]
46 +
47 +
48 +The following is an arbitrary selection of image features. Notice that the checkboxes marked in orange haven't been commited yet; Click Ok to send your feature selections (or deselections) to the server.
49 +
50 +[[image:image-20220125171850-7.png]]
51 +
45 45  === Labeling the image ===
46 46  
47 -In order to classify the pixels of an image into different classes (e.g.: "foreground and background") ilastik needs you to provide it with samples of each class. To do so, click the brush tool ([[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-122322_28x27_scrot.png?width=28&height=27&rev=1.1||alt="2020-03-31-122322_28x27_scrot.png" height="27" width="28"]]) in the toolbox in Annotations panel, on the right-hand side of the screen. You can select any color for your brush strokes by clicking the color-picker tool, which defaults to a bright yellow([[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-122531_50x28_scrot.png?width=50&height=28&rev=1.1||alt="2020-03-31-122531_50x28_scrot.png" height="28" width="50"]]).
48 48  
49 -With the brush tool activated and a suitable color selected, you can start labeling the dataset. For now, the controls for adding annotations to a dataset are the same as for adding any other type of annotation in vanilla Neuroglancer:
55 +In order to classify the pixels of an image into different classes (e.g.: 'foreground' and 'background') ilastik needs you to provide it with samples of each class.
50 50  
51 -1. Hold Ctrl and click to start a brush stroke;
52 -1. Move the mouse around to draw;
53 -1. While still holding Ctrl, click again to finish the stroke;
57 +To do so, first select a particular resolution of your dataset (your viewer might interpolate between multiple scales of the dataset, but ilastik operates on a single resolution):
54 54  
55 -Here's an example of a sample dataset with a few brush strokes marking the darker spots in the dataset:
59 +[[image:image-20220125165642-1.png]]
56 56  
57 -[[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-124011_1276x586_scrot.png?rev=1.2||alt="2020-03-31-124011_1276x586_scrot.png"]]
61 +Once you've selected a resolution to train on, you should see a new "training" tab at the top of the viewer:
58 58  
59 -Like in vanilla Neuroglancer, you can snap the navigation back to your annotations by clicking on them in the list of annotations. Note also that the text representing the annotations is colored the same as the color of the brush stroke, and clicking any of the annotations will also set the color picker back to the annotation's color, so that you don't have to remember their hex code. If you're not happy with how one annotation came up, you can delete it by selecting it from the list of annotations and then clicking the trash bin icon([[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-124347_26x21_scrot.png?width=26&height=21&rev=1.1||alt="2020-03-31-124347_26x21_scrot.png" height="21" width="26"]]).
63 +[[image:image-20220125165832-2.png]]
60 60  
61 -You must have annotations of at least two different colors in order to have meaningful predictions.
62 62  
63 -=== Selecting Features ===
66 +You must have the "training" tab as the frontmost visible tab in order to start adding brush strokes (in neuroglancer you can click the name of the raw data tab to hide it, for example):
64 64  
65 -ilastik's pixel classifier uses the annotations from the last session as markers of the relevant areas of your image, but it still needs to know which characteristics of those areas are important for deciding which class (i.e. annotation color) a pixel should belong to. Those characteristics are things like the color of the pixel, the color of their neighbors, texture in the neighborhood, etc, and you can learn more about them in the [[relevant ilastik documentation>>url:https://www.ilastik.org/documentation/pixelclassification/pixelclassification#selecting-good-features]].
68 +[[image:image-20220125170609-3.png]]
66 66  
67 -To select which features you want to be used when doing predictions, click the "Features" button ([[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-130413_69x30_scrot.png?width=69&height=30&rev=1.1||alt="2020-03-31-130413_69x30_scrot.png" height="30" width="69"]]) in the toolbox. This will display a window within the annotations side-pannel where you can select features to be calculated, as well as their scales, much like in the native version of ilastik:
68 68  
69 -[[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-131023_308x237_scrot.png?width=308&height=237&rev=1.1||alt="2020-03-31-131023_308x237_scrot.png" height="237" width="308"]]
71 +The status display in this applet will show "training on [datasource url]" when you're in training mode.
70 70  
71 -Select features appropriate to your image and the objects you've annotated and click "Ok". Once you have any annotations and at least one feature selected, ilastik will automatically start calculating predictions on your image. Keep in mind, though, that the bigger the region of the image being visualized at any time and the more features you've selected, the longer it will take for the predictions to be calculated.
73 +Now you can start adding brush strokes. Select a color from the color picker, check the "Enable Brushing" checkbox to enable brushing (and disable navigation), and click and drag over the image to add brush strokes. Ilastik will map each used color to a "class", and will try to figure out a class for every pixel in the image based on the examples provided by the brush strokes. By painting, you provide ilastik with samples of what a pixel in that particular class should look like. The following image shows an example with 2 classes: teal, representing the "foreground" or the "cell class", and magenta, representing the "background" class.
72 72  
73 -The next image shows a prediction on the sample data. Notice that the colors match those of your annotations, and are brighter the more confident ilastik is on the class to which they belong.
75 +[[image:image-20220125171324-4.png]]
74 74  
75 -[[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-131806_1273x584_scrot.png?rev=1.1||alt="2020-03-31-131806_1273x584_scrot.png"]]
77 +Once you have some image features selected and at least one brush annotation, ilastik will automatically use your examples to predict what classes the rest of your dataset should be, displaying the results in a "predictions" tab.
76 76  
79 +[[image:image-20220125171715-5.png]]
80 +
81 +
82 +
77 77  You can adjust the display settings of the overlay predictions layer as you would in vanilla neuroglancer:
78 78  
79 -1. right-click the "ilastik predictions" tab to reveal the "rendering" options
80 -1. Adjust the layer opacity to be better view the predictions or underlying raw data;
85 +1. right-click the predictions Neuroglancer tab to reveal the "rendering" options
86 +1. Adjust the layer opacity to better view the predictions or underlying raw data;
81 81  1. Advanced users: edit the shader to render the predictions in any arbitrary way;
82 82  
83 -The image below shows the "ilastik predictions" tab with an opacity set to 0.68 using the steps described above:
89 +The image below shows the "predictions" tab with an opacity set to 0.68 using the steps described above:
84 84  
85 -[[image:https://wiki.ebrains.eu/bin/download/Collabs/ilastik/ilastik%20online%20classifier%20training/WebHome/2020-03-31-132745_1274x583_scrot.png?rev=1.1||alt="2020-03-31-132745_1274x583_scrot.png"]]
91 +[[image:image-20220125172238-8.png]]
86 86  
87 87  You can keep adding or removing features to your model, as well as adding and removing annotations, which will automatically update the predictions tab.
image-20220125171803-6.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.tomazvieira
Size
... ... @@ -1,0 +1,1 @@
1 +32.7 KB
Content
image-20220125171850-7.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.tomazvieira
Size
... ... @@ -1,0 +1,1 @@
1 +32.8 KB
Content
image-20220125172238-8.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.tomazvieira
Size
... ... @@ -1,0 +1,1 @@
1 +102.9 KB
Content