Changes for page 5. How to segment your objects with Webilastik
Last modified by puchades on 2022/09/30 16:01
From version 41.1
edited by tomazvieira
on 2022/09/11 12:43
on 2022/09/11 12:43
Change comment:
There is no comment for this version
To version 15.2
edited by tomazvieira
on 2022/01/25 17:22
on 2022/01/25 17:22
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 13 removed)
- image-20220125185730-1.png
- image-20220125190311-2.png
- image-20220125191847-3.png
- image-20220128142757-1.png
- image-20220222151117-1.png
- image-20220222151750-2.png
- image-20220222153044-3.png
- image-20220222153157-4.png
- image-20220222153610-5.png
- image-20220222161022-1.png
- webilastik_click_and_drag.png
- webilastik_click_plus_sign_in_neuroglancer.png
- webilastik_click_recenter_button.png
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -4. How to use Webilastik1 +4. How to use webilastik - Content
-
... ... @@ -1,109 +1,41 @@ 1 -== What is Webilastik? ==1 +== What is webilastik? == 2 2 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 + 6 6 [[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. 7 7 8 -== How to use Webilastik ==9 +== How to use IlastikWeb == 9 9 10 -(% class="wikigeneratedid" %) 11 -Webilastik is a web application that can be accessed on [[https:~~/~~/app.ilastik.org>>https://app.ilastik.org]]. We suggest using it via the Chrome (or Chromium) web browser for now, since most of the testing has been done in this browser and subtle differences between browsers might cause unexpected behavior in the application. 11 +=== Opening a sample Dataset === 12 12 13 -(% class="wikigeneratedid" %) 14 -You can find the webilastik application at [[https:~~/~~/app.ilastik.org/>>url:https://app.ilastik.org/]]. You can also go directly to the [[application page>>https://app.ilastik.org/public/nehuba/index.html#!%7B%22layout%22:%22xy%22%7D]]. 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: 15 15 16 -Webilastik is an overlay on top of other data viewers. In particular, this implementation uses [[Neuroglancer>>https://github.com/google/neuroglancer]] as an underlying data viewer, so if you're familiar with its controls you can still use them when using webilastik. 17 17 18 -=== Moving the controls window === 19 - 20 -You can move the webilastik controls around the screen by clicking and dragging on the header: 21 - 22 -[[image:webilastik_click_and_drag.png]] 23 - 24 - 25 -=== Opening a Dataset === 26 - 27 -Like in vanilla Neuroglancer, you add datasets to the viewer by clicking the "+" button at the top of the viewer: 28 - 29 -[[image:webilastik_click_plus_sign_in_neuroglancer.png||height="200"]] 30 - 31 - 32 -You should be presented with a popup prompt where you can type in the URL of a dataset you want to view, in the format typically used by Neuroglancer. There are a few sample datasets hosted in webilastik: 33 - 34 -precomputed:~/~/https:~/~/app.ilastik.org/public/images/mouse1.precomputed 35 - 36 -precomputed:~/~/https:~/~/app.ilastik.org/public/images/mouse2.precomputed 37 - 38 -precomputed:~/~/https:~/~/app.ilastik.org/public/images/mouse3.precomputed 39 - 40 40 precomputed:~/~/https:~/~/app.ilastik.org/public/images/c_cells_2.precomputed 41 41 42 -precomputed:~/~/https:~/~/app.ilastik.org/public/images/c_cells_3.precomputed 43 43 44 - 45 -After you type or paste the URL into the "Source" field, neuroglancer should recognize the shape and number of channels in the image. You can the click "Add Layer" to open the dataset in the viewer. 46 - 47 47 [[image:image-20220125164204-2.png]] 48 48 49 49 50 - ===OpeningaDatasetfromthe data-proxy===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: 51 51 52 -You can also load Neuroglancer Precomputed Chunks data from the data-proxy; The URLs for this kind of data follow the following scheme: 53 -\\##precomputed:~/~/https:~/~/data-proxy.ebrains.eu/api/buckets/(% style="background-color:#3498db; color:#ffffff" %)my-bucket-name(% style="background-color:#9b59b6; color:#ffffff" %)/path/inside/your/bucket(%%)## 54 54 55 -So, for example, to load the sample data inside the (% style="background-color:#3498db; color:#ffffff" %)quint-demo(%%) bucket, under the path (% style="background-color:#9b59b6; color:#ffffff" %)tg-ArcSwe_mice_precomputed/hbp-00138_122_381_423_s001.precomputed(% style="color:#000000" %) (%%) like in the example below: 56 - 57 - 58 -[[image:image-20220128142757-1.png]] 59 - 60 -=== === 61 - 62 -you would type a URL like this: 63 - 64 - 65 -##precomputed:~/~/https:~/~/data-proxy.ebrains.eu/api/buckets/(% style="background-color:#3498db; color:#ffffff" %)quint-demo(%%)/(% style="background-color:#9b59b6; color:#ffffff" %)tg-ArcSwe_mice_precomputed/hbp-00138_122_381_423_s001.precomputed(%%)## 66 - 67 -this scheme is the same whether you're loading data into the Neuroglancer viewer or specifying an input URL in the export applet. 68 - 69 -=== Viewing 2D Data === 70 - 71 -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 a single, 2D viewport: 72 - 73 73 [[image:image-20220125164416-3.png]] 74 74 27 +== == 28 + 75 75 which will change the view to something like this: 76 76 31 + 77 77 [[image:image-20220125164557-4.png]] 78 78 79 - Youcanalsoclick the34 +== == 80 80 81 -==== A Note on Neuroglancer and 2D data ==== 82 - 83 - 84 -Neuroglancer interprets all data as 3D, and visualizing a 2D image is interpreted as a single flat slice of data in 3D space. Scrolling in Neuroglancer can make the viewer go past this single slice of data, effectively hiding it from view. You can see the current viewer position in the top-left corner of the viewport, and you can edit those coordinates to reset the viewer to a position where your data is present and therefore visible (usually z=0 for 2D data): 85 - 86 - 87 -[[image:image-20220222161022-1.png]] 88 - 89 -(% class="wikigeneratedid" %) 90 -Alternatively, once you have a compute session running you can also click the "Reset" button in the lower-right corner of the viewer to move the viewer back to the center of your datasets: 91 - 92 -(% class="wikigeneratedid" %) 93 -[[image:webilastik_click_recenter_button.png]] 94 - 95 -(% class="wikigeneratedid" %) 96 -== Allocating a Compute Session == 97 - 98 -Normal ilastik operation can be computationally intensive, requiring dedicated compute resources to be allocated to every user working with it. 99 - 100 - 101 -The "Session Management" widget allows you to request a compute session where webilastik will run; Select a session duration and click 'Create' to create a new compute session. Eventually the compute session will be allocated, opening up the other workflow widgets. 102 - 103 - 104 - 105 105 == Training the Pixel Classifier == 106 106 38 + 107 107 === Selecting Image Features === 108 108 109 109 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. ... ... @@ -112,6 +112,7 @@ 112 112 113 113 You can read more about image features in [[ilastik's documentation.>>https://www.ilastik.org/documentation/pixelclassification/pixelclassification\]] 114 114 47 + 115 115 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. 116 116 117 117 [[image:image-20220125171850-7.png]] ... ... @@ -118,6 +118,7 @@ 118 118 119 119 === Labeling the image === 120 120 54 + 121 121 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. 122 122 123 123 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): ... ... @@ -128,9 +128,10 @@ 128 128 129 129 [[image:image-20220125165832-2.png]] 130 130 65 + 131 131 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): 132 132 133 -[[image:image-20220 222151117-1.png]]68 +[[image:image-20220125170609-3.png]] 134 134 135 135 136 136 The status display in this applet will show "training on [datasource url]" when you're in training mode. ... ... @@ -137,15 +137,14 @@ 137 137 138 138 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. 139 139 140 -[[image:image-20220 222153157-4.png]]75 +[[image:image-20220125171324-4.png]] 141 141 142 -Once you have some image features selected and so me brush annotationof at least 2 colors,you can check "Live Update" and ilastik will automatically use your examples to predict what classes the rest of your dataset should be, displaying the results in a "predictions" tab.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. 143 143 144 -[[image:image-20220 222153610-5.png]]79 +[[image:image-20220125171715-5.png]] 145 145 81 + 146 146 147 -You can keep adding or removing brush strokes to improve your predictions. 148 - 149 149 You can adjust the display settings of the overlay predictions layer as you would in vanilla neuroglancer: 150 150 151 151 1. right-click the predictions Neuroglancer tab to reveal the "rendering" options ... ... @@ -157,21 +157,3 @@ 157 157 [[image:image-20220125172238-8.png]] 158 158 159 159 You can keep adding or removing features to your model, as well as adding and removing annotations, which will automatically update the predictions tab. 160 - 161 -=== Exporting Results and Running Jobs === 162 - 163 -Once you trained your pixel classifier with the previous applets, you can apply it to other datasets or even the same dataset that was used to do the training on. 164 - 165 -To do so, select a data source by typing in the URL of the data source in the Data Source Url field and select a scale from the data source as they appear beneath the URL field. 166 - 167 -Then, configure a Data Sink, i.e., a destination that will receive the results of the pixel classification. For now, webilastik will only export to ebrains' data-proxy buckets; Fill in the name of the bucket and then the prefix (i.e.: path within the bucket) where the results in Neuroglancer's precomputed chunks format should be written to. 168 - 169 -[[image:image-20220125190311-2.png]] 170 - 171 -Finally, click export button and eventually a new job shall be created if all the parameters were filled in correctly. 172 - 173 -You'll be able to find your results in the data-proxy GUI, in a url that looks something like this: 174 - 175 -https:~/~/data-proxy.ebrains.eu/your-bucket-name?prefix=your/selected/prefix 176 - 177 -[[image:image-20220125191847-3.png]]
- image-20220125185730-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -43.7 KB - Content
- image-20220125190311-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -61.0 KB - Content
- image-20220125191847-3.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -74.6 KB - Content
- image-20220128142757-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -53.7 KB - Content
- image-20220222151117-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -225.3 KB - Content
- image-20220222151750-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -143.4 KB - Content
- image-20220222153044-3.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -135.2 KB - Content
- image-20220222153157-4.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -146.3 KB - Content
- image-20220222153610-5.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -171.1 KB - Content
- image-20220222161022-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -85.9 KB - Content
- webilastik_click_and_drag.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -311.6 KB - Content
- webilastik_click_plus_sign_in_neuroglancer.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -662.8 KB - Content
- webilastik_click_recenter_button.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.tomazvieira - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.6 MB - Content