Skip to content

Repository files navigation

Improving Cell Segmentation in Imaging Flow Cytometry Using Semi-Supervised Active Learning

Bernard HohmannLicense

This Program for Instance Segmentation using Semi-Supervised Active Learning (PISA) is the official implementation of my master's thesis "Improving Cell Segmentation in Imaging Flow Cytometry Using Semi-Supervised Active Learning".

Introduction

Cell Instance Segmentation (CIS) requires pixel-level annotations and is therefore costly to scale to large datasets. This is particularly relevant for Imaging Flow Cytometry (IFC), where many cell images are available but instance-level annotations are limited. This thesis investigates annotation-efficient training strategies for CIS under limited labeled dataset size. A shared iterative framework is proposed that combines Supervised Learning, Active Learning (AL), Semi-Supervised Learning (SSL), and a combined AL+SSL setting. The framework is evaluated with a UNet-based segmentation model and watershed post-processing. The main experiments are conducted on a fully annotated dataset, while SSL is additionally evaluated on an IFC dataset as a proof of concept. The results show that dataset-specific supervised training outperforms a generalist zero-shot baseline once the labeled dataset size reaches 10%. In the AL experiments, variance-based selection strategies achieve the strongest results of all evaluated methods when only few labeled samples are available. For larger labeled dataset sizes, distribution-aware strategies reach a similar performance level to variance-based strategies. In the SSL experiments, performance increases with larger initial labeled dataset sizes. This effect is most evident between 1% and 20% labeled data, while further increases lead to only small additional gains. Overall, the results show that annotation-efficient CIS depends on the labeled dataset size available during training rather than on one universally best strategy.

PISALoopGraph

The above figure illustrates the iterative label acquisition framework used in this thesis. The dataset is divided into a labeled subset and an unlabeled subset. In each iteration, the model is trained from scratch on the labeled data and predicts labels for the unlabeled data in the CIS pipeline. The resulting model outputs are used for uncertainty scoring. Based on these scores, AL selects informative samples for manual annotation by the human labeler, while SSL selects low-uncertainty samples for automatic pseudo-labeling. The newly labeled samples are then used to update the dataset for the next training iteration

ModelArchitectureGraph

We pass each cell-image into a dual-decoder UNet architecture with Marker Based Watershed (MBW) post-processing. During training, the upper decoder branch predicts the Cell Proximity Maps and the lower predicts the Background Distance Maps. During label prediction, these outputs are processed to obtain the marker maps (upper branch) and topology maps (lower branch). We obtain the marker maps by filtering the pixel values with a high threshold and the topology maps by filtering with a low threshold. Both maps are used in MBW to derive the final colorful CIS mask.

Development Setup

  1. Download program from GitHub and go to the root of this program. You will need at least Python 3.8.
  2. Follow the instructions below.
    python3 -m venv venv
    source venv/bin/activate
    pip install Requirements
  3. Install cupy==13.6.0 that fits to your cuda-version.
  4. Install torch == 2.6.0, torchaudio == 2.6.0, torchvision == 0.21.0 that fits to your system.
  5. Go to ./DatasetComponent/Datasets/CellBinDB/CellBinDBPreprocessor.py and follow the instructions given in CellBinDBPreprocessor.__init__.
  6. Go to ./DatasetComponent/Datasets/IFCDataset/IFCDatasetPreprocessor.py and follow the instructions given in IFCDatasetPreprocessor.__init__.
  7. Execute all commands in ./Scripts/DatasetScripts.sh.
  8. Execute any full experiment-block in ./Scripts/MainScriptsSeed#.sh.
  9. To visualize the progress, execute the command in ./Scripts/TensorboardScripts.sh corresponding to your experiment-block.

Citation

Please cite my master's thesis if you find this repo useful!

@misc{Hohmann2023MastersThesisKIT,
  author    = {Bernard Hohmann},
  title     = {Improving Cell Segmentation in Imaging Flow Cytometry Using Semi-Supervised Active Learning},
  year      = {2023},
  url       = {https://github.com/bernihoh/Cell-Segmentation-with-Semi-Supervised-Active-Learning}
}

Related projects that this paper is developed upon:

@article{scherr2020cell,
  title={Cell segmentation and tracking using CNN-based distance predictions and a graph-based matching strategy},
  author={Scherr, Tim and L{\"o}ffler, Katharina and B{\"o}hland, Moritz and Mikut, Ralf},
  journal={PLoS One},
  volume={15},
  number={12},
  pages={e0243219},
  year={2020},
  publisher={Public Library of Science San Francisco, CA USA}
}

About

Official implementation of my master's thesis [Improving Cell Segmentation in Imaging Flow Cytometry Using Semi-Supervised Active Learning]

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages