Attention-Based Transformers for Instance Segmentation of Cells in Microstructures

Tim Prangemeier, Christoph Reich, Heinz KoepplBIBM 2020

Abstract

Quantitative single-cell analysis in microfluidic environments is often hindered by the computational complexity of instance segmentation. We present Cell-DETR, an adaptation of the DEtection TRansformer (DETR) architecture designed for fast, end-to-end segmentation of individual cells within microfluidic traps. By streamlining the transformer architecture, Cell-DETR achieves state-of-the-art accuracy with significantly fewer parameters, enabling real-time monitoring for closed-loop experimental control in synthetic biology.

Introduction: The Data Bottleneck in Single-Cell Analysis

Modern biology relies heavily on quantitative single-cell analysis, particularly through time-lapse fluorescence microscopy (TLFM). This technique generates vast amounts of data, requiring the precise identification and tracking of individual cells—a task known as instance segmentation. In microfluidic studies, this is complicated by the need to distinguish cells from each other and from the geometric constraints of the microstructures, such as traps, used to house them.

Microfluidic experimental setup showing the chip, trap arrays, and single-cell fluorescence monitoring.

Existing solutions typically fall into two categories: semantic segmenters like U-Net, which often fail to separate touching cells without complex post-processing, and proposal-based instance segmenters like Mask R-CNN, which are computationally intensive due to their reliance on hand-designed components like region proposals and non-maximum suppression (NMS).

Methodology: Cell-DETR

Cell-DETR addresses these challenges by treating segmentation as a direct "set prediction" problem. Based on the DETR architecture, it utilizes an attention mechanism to reason about the entire image globally, allowing it to effectively differentiate between cells and trap structures.

The Cell-DETR pipeline: an end-to-end approach for direct instance segmentation from raw microscopy images.

To optimize for microscopy applications, the authors introduced several key technical adaptations:

  • Architecture Downsizing: The model was reduced to ~5 million parameters—roughly 10x smaller than the original DETR—by decreasing the number of transformer blocks and hidden features.
  • Variants: Two versions were developed: Cell-DETR A (standard convolutions) and Cell-DETR B (incorporating deformable convolutions and Padé activation units for better shape capture).
  • Direct Prediction: The model uses 20 fixed "object queries" to predict class, bounding box, and mask in a single pass, eliminating the need for NMS and simplifying the pipeline.

Dataset and Training

The models were trained on a specialized dataset of 419 annotated images of Saccharomyces cerevisiae (yeast) within microfluidic traps. The dataset includes various scenarios: empty traps, single cells with daughter buds, and crowded traps with multiple cells. Annotations provided per-instance masks for both cells and the microstructures. The data was split into training (76%), validation (12%), and testing (12%) sets.

Results and Discussion

Cell-DETR B achieved a cell-class Jaccard index ($J_c$) of 0.84, matching the performance of Mask R-CNN while being significantly more efficient.

Qualitatively, the model excels at segmenting "mother-daughter" cell pairs and crowded environments without the merging errors typical of semantic segmentation. The global attention mechanism allows the network to learn a hierarchical representation: first mastering classification, then localization, and finally pixel-wise mask refinement. Inference times for Cell-DETR A and B were recorded at 9.0 ms and 21.2 ms respectively, making them suitable for real-time applications.

Conclusion and Future Outlook

Cell-DETR provides a fast, accurate, and streamlined solution for cell instance segmentation. Its efficiency makes it ideal for "in-the-loop" experiments where real-time analysis can drive automated experimental adjustments. Future work may involve exploring fully transformer-based backbones, such as axial-attention modules, and expanding the dataset to include a wider variety of organisms and trap geometries.

Summary updated

BibTeX
@inproceedings{prangemeier2020attention,
  author = {Tim Prangemeier and Christoph Reich and Heinz Koeppl},
  title = {{Attention-Based Transformers for Instance Segmentation of Cells in Microstructures}},
  booktitle = {BIBM},
  year = {2020},
  doi = {10.1109/bibm49941.2020.9313305},
}
Figure