Ellipse-Shaped Training Labels for Cell Detectors That Transfer Across Cell Lines

Cell detectors trained on images of one cancer cell line often fail on the next one. The Cell Tracking Challenge calls this a "generalizability wall": its top methods degrade badly on unseen cell types unless they are fine-tuned on the target data (The Cell Tracking Challenge: 10 years of objective benchmarking). This note proposes a cheap intervention that is easy to test. It does not change the network, the annotations, or the inference procedure. It only changes which pixels the detector is told count as "cell" during training. Standard detectors label every location inside a cell's bounding box as a positive example. A box drawn around an elongated, rotated cell has corners full of empty slide and neighbouring cells, and the band just inside the cell boundary is filled with thin cytoplasmic spread whose appearance is specific to the cell line. We propose labelling positives with an oriented ellipse that has a confident core and an ignored rim, so that the classifier learns from the cell's nucleus and body, the part whose appearance varies least from one line to another.

The claim is about domain shift, not in-domain accuracy. Center-weighted labels should shrink the drop in accuracy when a detector moves to an unseen cell line, and they should do so more than they raise accuracy on the line it was trained on. A second, related claim follows from the same mechanism. The out-of-domain gains that Are nuclear masks all you need for improved out-of-domain generalisation? obtains from full nuclear segmentation masks should largely survive when each mask is replaced by a moment-matched elliptical Gaussian. If so, the expensive per-pixel mask stream is mostly acting as a "look at the cell center" signal.

Core Claim and What Is New

Center-weighted label assignment means giving each training location a target confidence that peaks at the object's center and decays or is ignored toward its edges. It is established for aerial and tracking targets. EARL adapts an elliptical mask to each object's aspect ratio and angle (EARL). FCOSR samples positives from a shrinking 2D Gaussian inside rotated boxes (FCOSR). SFTransT and SiamBAN use elliptical center masks so that trackers ignore clutter at the edge of the target (Learning Spatial-Frequency Transformer for Visual Object Tracking, Siamese Box Adaptive Network for Visual Tracking). Concentric-ellipse zoning splits each object into a positive core, an ignored ring and a negative outside (Dynamic Selection of Optional Feature for Object Detection). These papers supply our method. Every one of them is evaluated in-distribution on non-biological targets, and none asks whether the assignment rule changes robustness to a shift in object appearance.

On the cell side, the Oriented Cell Dataset shows that oriented ellipses overlap true cell masks 37.7% better than horizontal boxes, measured by intersection-over-union. It then benchmarks 14 oriented detectors, each with its own default assignment rule, on a single in-distribution split (Oriented Cell Dataset). That paper motivates the geometry, but it leaves both label assignment and cross-line transfer untested. DLA-Count is the closest cell-specific use of anisotropic Gaussians. It builds learnable Gaussian convolution kernels and adaptive matching for counting, and it is also evaluated within each dataset only (DLA-Count). Our proposal differs from all of these in one way. We treat the shape of the positive region as the experimental variable and measure the out-of-domain gap as the outcome.

Concretely, consider a cell annotated with an oriented ellipse that has center $\mu$, semi-axes $a$ and $b$, and angle $\theta$. Let $\Sigma$ be the covariance matrix whose principal axes are $a$ and $b$, rotated by $\theta$. Each feature-map location $p$ then receives a normalized elliptical radius $r(p)$:

$$ r(p)^2 = (p-\mu)^\top \Sigma^{-1} (p-\mu). $$

The tri-zone rule marks $p$ as positive when $r < r_{in}$, ignores it when $r_{in} \le r < r_{out}$, and marks it negative when $r \ge r_{out}$. The smooth variant uses the classification target $\exp(-r^2/2\kappa^2)$ with a width parameter $\kappa$. Box or ellipse regression is left untouched, so localization still learns from the whole cell. Only the classification signal is reshaped.

Research Program

The work has three parts.

The first part builds a cross-cell-line benchmark, since the file shows that none exists. Kirsten et al. already fit oriented boxes and ellipses to Cell Tracking Challenge segmentation masks. We will do the same with the challenge's gold and algorithm-fused "silver" reference masks, which cover about 99.1% of instances (The Cell Tracking Challenge). This gives oriented-ellipse labels for every 2D dataset in the challenge. Its datasets span several cell types and microscopy modalities. We will then define leave-one-cell-type-out splits, grouped by modality where possible, so that cell-line shift can be separated from optics shift. The Oriented Cell Dataset will serve as an additional in-domain anchor and as the source of human-agreement thresholds. Its five-annotator study supports evaluating at an IoU of 0.55, the overlap level at which a prediction counts as a match. We will also use LiveCellMiner HeLa sequences as a within-line morphology shift: models are trained on interphase frames and tested on rounded mitotic frames (Weakly-supervised Temporal Segmentation of Cell-cycle Stages with Center-cell Focus).

The second part runs a controlled comparison of assignment rules inside one rotated anchor-free detector, a rotated FCOS-style model in the spirit of FCOSR. Backbone, augmentation, schedule and tuning budget are fixed, and the label rule is the only thing that changes. We will also apply the tri-zone rule to Oriented RepPoints, the best published detector on the Oriented Cell Dataset, to check that the effect is not tied to one architecture.

The third part is a mechanism analysis. For each trained model, we occlude the core region ($r<r_{in}$) or the rim region ($r_{in}\le r<r_{out}$) of test cells and measure how much the classification confidence drops. Call the ratio of rim sensitivity to core sensitivity the model's "rim reliance". The mechanism predicts that rim reliance measured on the source line correlates with the cross-line drop in average precision, across all trained models and splits. If that correlation is absent, any gains are not happening for the reason we claim.

Baselines

The naive reference point is the default rule of a rotated anchor-free detector. Every feature location inside the oriented box is a positive, with no center weighting. It is trained with exactly the same data, augmentation, schedule and seeds as our variants. The proposal must beat this reference on the cross-line drop and not merely on source-domain accuracy.

The closest simple competitor is FCOS-style "centerness". This is a separate output branch that predicts how close each location sits to its box center, and it is multiplied into the score at test time. It already embodies center weighting. However, it keeps uniform positives during training and is defined on a box rather than an ellipse. We run it inside the same detector at the same tuning budget, sweeping its loss weight over as many grid points as we sweep $r_{in}$, $r_{out}$ and $\kappa$.

The strongest existing method is Oriented RepPoints. It reports 86.28% class-aware and 78.98% class-agnostic average precision on the Oriented Cell Dataset (Oriented Cell Dataset). We will first reproduce that number in-domain, to confirm our training pipeline is faithful, and then run it source-only on our cross-line splits. There is no reported result on Lacuna for cross-cell-line oriented cell detection, so every cross-line figure will be produced under our protocol.

As a strong photometric baseline, we train the default detector with heavy color, blur and illumination randomization. This stands in for style-harmonization methods at matched compute. As an upper bound, we fine-tune the default detector on a small labelled subset of the target line.

The ablations that isolate the key ingredient compare four positive regions: a binary ellipse, a smooth Gaussian, the tri-zone rule, and a tri-zone rule built on the axis-aligned box instead of the ellipse. Together they separate the effect of ignoring the rim from the effect of using oriented geometry.

The proposal "beats" these baselines if three conditions hold. The tri-zone or Gaussian rule must close at least a third of the gap between the naive source-only detector and the target-fine-tuned upper bound. It must do so on a majority of held-out cell types, with bootstrap confidence intervals over five seeds that exclude zero. And its in-domain average precision must stay within one point of the naive rule.

Why not just…?

Why not just use the centerness branch that anchor-free detectors already have? This is the most serious threat, because centerness is a form of center weighting. The difference is that centerness re-scores detections after the fact, while the classifier is still trained to call rim and corner pixels "cell". Our hypothesis is that the training signal itself is what produces rim reliance. The occlusion analysis tests this directly: if models trained with centerness show rim reliance and cross-line drops as low as tri-zone models, centerness is sufficient, and we will report that as the finding.

Why not just train a segmentation network, or align to nuclear masks as Sahasrabudhe et al. do? The Cell Tracking Challenge reports that detection-first pipelines beat direct segmentation in dense clusters, where segmentation fuses touching cells. Mask alignment needs a frozen HoVer-Net pass over every training image. We test the mask route head-on by reproducing the breast-to-OCELOT protocol of Are nuclear masks all you need?, which reports 70.6% accuracy against 54.5% for plain empirical risk minimization. We then replace each nuclear mask with an elliptical Gaussian matched to the mask's centroid and second moments. If the Gaussian version recovers most of the 16-point gain, the mask's fine shape detail is not what drives the robustness. If it does not, pixel-level shape matters, and that limits our claim.

Why not just treat cell lines as a style shift and harmonize images, as Interventional Style Transfer does? Interventional Style Transfer nearly triples F1 on unseen experimental series, from about 0.12 to 0.3673 (Out of Distribution Generalization via Interventional Style Transfer). However, its authors note that it needs class labels to train the generator and that it assumes morphology is separable from style. Different cell lines differ in geometry, not just appearance, so that assumption fails here. Our photometric-randomization baseline captures the cheap end of this approach. If it matches our rule on the splits that share a modality, cell-line shift there was mostly photometric, and we will say so.

Proposed Experiments and Decisive Checks

The primary experiment trains every assignment rule on each leave-one-cell-type-out split of the oriented challenge data. We report source average precision, target average precision at IoU 0.55, and the drop between them, along with confluence error and polarity distance as downstream measures, following Kirsten et al. Two secondary experiments follow. One applies the HeLa interphase-to-mitosis shift. The other is the mask-versus-Gaussian substitution on the breast-to-OCELOT classification protocol.

Three checks decide the outcome. First, the out-of-domain drop must shrink more than in-domain accuracy rises. A uniform improvement in both would mean the labels simply produce a better detector, not a more transferable one. Second, rim reliance must predict the cross-line drop across models. Third, the elliptical tri-zone rule must beat its box-based counterpart, which shows that orientation-aware geometry, and not just ignoring some pixels, does the work.

A clean negative result would also be useful. If none of the rules move the cross-line drop, the generalizability wall is not caused by what the classifier learns at cell boundaries. Effort would then belong with target adaptation rather than label design.