Gamified image segmentation quality estimation
Project description
The segmentation game - for napari
Gamified image segmentation quality estimation
Usage
The Segmentation Game allows to quantitatively compare segmentation results to a given ground truth annotation. This allows fine-tuning parameters of image processing workflows to get optimal segmentation quality. It also allows comparing different segmentation algorithms and identify which algorithm performs best objectively.
The game can be found in napari's Tools > Games > The Segmentation Game
menu.
Ground Truth Annotation
Before you can start playing the game, some annotated cells/nuclei are necessary to later compute segmentation quality from.
Depending on the used metric, it might be sufficient to annotate a hand full of objects.
Use napari's annotation tools as shown below.
Use the +
and -
keys on your keyboard to increase and decrease the label number that is currently drawn.
Parameter tuning
If you work with one of napari's segmentation plugins that produce labels layers, you can tune their parameters and see how this influences segmentation quality.
Segmentation algorithm comparison
If you aim at comparing different segmentation algorithms, you can collect their results in label layers in the napari viewer. You can then select the segmentation result from the corresponding pulldown and save quantitative comparison results in the Highscore table.
Metrics
Currently, these metrics are implemented:
- Jaccard Index (sparse): The Jaccard Index is a measure of overlap. It lies between 0 (no overlap) and 1 (perfect overlap). For each annotated ground truth label, the maximum overlap of any segmented label is determined. The mean overlap of all annotated labels serves as metric result.
- Jaccard Index (binary): The annotated ground truth labels and the segmentation result are first binarized considering all annotated pixels as positive and all other labels as negative. Afterwards, the overlap between the two binary images is computed. This allows comparing binary segmentation algorithms, such as thresholding techniques.
- Jaccard Index (binary, sparse): The annotated ground truth image can contain values 1 (negative, false) and 2 (positive, true) and the segmentation result image will be binarized (0: False, otherwise: True). This allows comparing object/no-object annotations with label images.
Related plugins
If you aim at automatically optimizing segmentation quality, there are also napari plugins available with this capability:
Installation
You can install the-segmentation-game
via pip:
pip install the-segmentation-game
Contributing
Contributions - especially new image segmentation quality metrics - are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "the-segmentation-game" is free and open source software
Issues
If you encounter any problems, please open a thread on image.sc along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for the-segmentation-game-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e039db9335b6e2718e8cb7610c4c3ce26ec7d1d2bb290355ad3fdbe2becfda6e |
|
MD5 | 6cbd142aff8060d4f586842e053e3c74 |
|
BLAKE2b-256 | 6556f2f146b07e859eafc01d8ddf14a4d9656b3fa222fe51e5d490e8dad33e0d |
Hashes for the_segmentation_game-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87211f659cd744235f29ee3b9f8161d54bc1a087fc018981abf0defa7ce7d04e |
|
MD5 | 3c3ab414205b3a66d297483a23abcae0 |
|
BLAKE2b-256 | a459adfbeac78b1300bcb23f6129a1525701712b9cf534c014393f850270023c |