Changes for page 5. How to segment your objects with Webilastik
Last modified by puchades on 2022/09/30 16:01
From version 13.1
edited by tomazvieira
on 2022/01/25 17:18
on 2022/01/25 17:18
Change comment:
Uploaded new attachment "image-20220125171803-6.png", version {1}
To version 15.3
edited by tomazvieira
on 2022/01/25 17:23
on 2022/01/25 17:23
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -3,85 +3,74 @@ 3 3 4 4 Classic [[ilastik>>https://www.ilastik.org/]] is a simple, user-friendly desktop tool for **interactive image classification, segmentation and analysis**. It is built as a modular software framework, which currently has workflows for automated (supervised) pixel- and object-level classification, automated and semi-automated object tracking, semi-automated segmentation and object counting without detection. Most analysis operations are performed **lazily**, which enables targeted interactive processing of data subvolumes, followed by complete volume analysis in offline batch mode. Using it requires no experience in image processing. 5 5 6 - 7 7 [[webilastik>>https://app.ilastik.org/]] is a web version of ilastik's Pixel Classification Workflow, integrated with the ebrains ecosystem. It can access the data-proxy buckets for reading and writing (though reading is still suffering from latency issues). It uses Neuroglancer as a 3D viewer as well as compute sessions allocated from the CSCS infrastructure. 8 8 9 -== How to use IlastikWeb==8 +== How to use webilastik == 10 10 11 11 === Opening a sample Dataset === 12 12 13 13 Go to [[app.ilastik.org/>>app.ilastik.org/]] and load a [[Neuroglancer Precomputed Chunks dataset>>https://github.com/google/neuroglancer/tree/master/src/neuroglancer/datasource/precomputed]]. You can e.g. use a sample data set that is already in the server by pasting the following URL into Neuroglancer's prompt: 14 14 15 - 16 16 precomputed:~/~/https:~/~/app.ilastik.org/public/images/c_cells_2.precomputed 17 17 18 - 19 19 [[image:image-20220125164204-2.png]] 20 20 21 - 22 22 If your dataset is 2D like in the example, you can click the "switch to xy layout" button at the top-right corner of the top-left quadrant of the viewport to use asingle, 2D viewport: 23 23 24 - 25 25 [[image:image-20220125164416-3.png]] 26 26 27 -== == 28 - 29 29 which will change the view to something like this: 30 30 31 - 32 32 [[image:image-20220125164557-4.png]] 33 33 34 -(% class="wikigeneratedid" %) 35 -== == 36 - 37 37 == Training the Pixel Classifier == 38 38 39 - 40 40 === Selecting Image Features === 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 32 +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 - ===Labeling the image===34 +You can read more about image features in [[ilastik's documentation.>>https://www.ilastik.org/documentation/pixelclassification/pixelclassification\]] 46 46 47 - In ordertoclassifythe pixelsofanimageinto different classes (e.g.: "foreground and background") ilastikneedsyouto provide it with samplesofch class. To do so, clickthe 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 thetoolboxin Annotationspanel,ontheright-hand sideof thescreen.You can select anycolor for your brush strokesbyclickingthe color-pickertool,which defaultsto abrightyellow([[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"]]).36 +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. 48 48 49 - With the brush toolactivated and a suitable color selected, you can start labelingthedataset. For now, the controls for adding annotations to a dataset are the sameas for addingany other type of annotation in vanilla Neuroglancer:38 +[[image:image-20220125171850-7.png]] 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; 40 +=== Labeling the image === 54 54 55 - Here'sanexample of asampledatasetwitha fewbrushstrokesmarkingthedarkerspotsinthedataset:42 +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. 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"]]44 +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): 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"]]).46 +[[image:image-20220125165642-1.png]] 60 60 61 - Youmusthave annotationsofatleast two differentcolors in ordertohavemeaningfulpredictions.48 +Once you've selected a resolution to train on, you should see a new "training" tab at the top of the viewer: 62 62 63 - === SelectingFeatures ===50 +[[image:image-20220125165832-2.png]] 64 64 65 - ilastik'spixel classifierusestheannotations from the last session asmarkersofthe relevantareas of your image, but itstill needstoknowwhich characteristicsofthosearease importantfordecidingwhichclass (i.e.annotationolor)a pixel shouldbelong to. Thosecharacteristics are thingslikethecolor of thepixel, the color of theirneighbors,texture in the neighborhood, etc,andyou can learn more aboutthemin the[[relevantilastikdocumentation>>url:https://www.ilastik.org/documentation/pixelclassification/pixelclassification#selecting-good-features]].52 +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): 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:54 +[[image:image-20220125170609-3.png]] 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"]]56 +The status display in this applet will show "training on [datasource url]" when you're in training mode. 70 70 71 - Selectfeaturesappropriate toyourimageandthe objectsyou'veannotatedandclick"Ok".Onceyouaveanyannotationsand atleastonefeatureselected,ilastik will automaticallystartcalculatingpredictionsonyourimage.Keep in mind,though,thatthebiggerthe region ofthe image beingvisualizedat anytimeandthemore featuresyou'veselected,the longeritwilltake for the predictionsto becalculated.58 +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 nextimageshows 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.60 +[[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"]]62 +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 64 +[[image:image-20220125171715-5.png]] 65 + 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 "ilastikpredictions"tab to reveal the "rendering" options80 -1. Adjust the layer opacity to be better view the predictions or underlying raw data;68 +1. right-click the predictions Neuroglancer tab to reveal the "rendering" options 69 +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 " ilastikpredictions" tab with an opacity set to 0.68 using the steps described above:72 +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"]]74 +[[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-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