napari-imagegrains Processing Segmentation Performance#
This widget tab allows you to compute segmentation performance upon image segmentation. You can open it via Plugins -> ImageGrains -> ImageGrain Processing Widget
and then switch to Performance
.
Compute performance on individual image#
In order to compute the segmentation performance, two items are required: a reference segmentation mask
(that can be generated manually) and a prediction mask
generated by the segmentation algorithm. The demodata contains reference masks. If you want to use these, click on Select image folder
and navigate to your home directory (C:/User/Username/) and then to the imagegrains -> demo_data -> FH -> train
folder. Here, the demo images (.jpgs) and their corresponding reference masks (.tifs) are stored.
Select the first jpeg
image, make sure the Save prediction(s)
checkbox is checked and click on Run segmentation on selected image
. This operation is required for the next step. It generates a prediction mask and saves it in your export folder.
Click on the Performance
tab at the top of the widget to switch the view. For the Pick predictions folder
field, select the directory in which the prediction mask you just generated is stored. For the Pick mask folder
field, select the image folder with the reference masks. Click on Compute performance single image
to generate the precision plot for the image that has been just segmented.
If you want to compute the segmentation performance on multiple pairs of reference and prediction masks, you first need to switch to the Segmentation
tab view, click on Run segmentation on image folder
and save the prediction masks in your export folder (by having the Save prediction(s)
checkbox checked).
When this is done, switch back to the Performance
tab view. Now click on Compute performance folder
to obtain a more complex plot. This plot displays individual performance information as well as statistical information about the overall segmentation performance.
Options#
In the options section you can customize recognition strings in the file name(s) of your reference and prediction mask(s). By default, reference masks file names contain the string _mask
whereas the predicted masks file names contain the string _pred
. Change these strings according to your requirements.
Save computed parameters#
By clicking on Save average precision
or Save performance plot
you can save the computation results in your export folder.