StrataQuest Home › StrataQuest Glossary › Deep Learning Nuclei Detection
DNN Engine

Deep Learning Nuclei Detection

Nuclear segmentation by a trained deep learning model

View
Definition
Classical image analysis follows rules that people wrote down about brightness and shape. A deep learning model learns its own from examples. Nuclei (Deep Learning) puts such a model inside a StrataQuest layer. You give it a grayscale image with bright nuclei on a dark background, and it returns the nuclei as events in a coded imageLoading..., ready for the same measurements as the classical NucleiLoading... engine.
TQ to SQ workflow
Video · Primary
Detection - Nuclei Segmentation Classic
Video · Primary
H&EDSPTCH
Video · Primary
Guided workflow - nucl and cell measurements
Video · Primary
Supporting
Pre processing - Basic - Virtual Channel
Video · Supporting
Images and categories - create or edit Images
Video · Supporting
Measurements Mask - Cellular
Video · Supporting
Learned, not written, rules
A trained model does the segmentation
Needs Python and a GPU
TissueGnostics Python Environment, NVIDIA GPU
One model in 8.1
multi-organ nuclei 2.1
Drop-In Replacement
Same output, same downstream workflow

How It Works

Nuclei (Deep Learning) sits in a layer's Detection section, beside the classical NucleiLoading... engine. It takes a grayscale image and works only where nuclei are the bright structures on a dark background, as in a DAPI channel. A trained model performs the detection and segmentation, and the result is a set of events in a coded imageLoading.... All pixels of one nucleus share a unique ID, which keeps each nucleus's shape even where nuclei touch.

A 16-bit image is first converted to 8 bits over the 16-bit conversion range you set. The other controls stay hidden until you right-click the engine's window and enable Show Advanced Parameters. Magnification tells the engine how the images were acquired, and it is filled in automatically when that information is available. Use Merging Rules can join touching events, and Use Border Input borrows pixels from neighboring fields of viewLoading....

The engine has no confidence threshold and no area limits. To drop events by size or intensity after detection, add a Post-Processing engine such as Remove objects v2Loading....

Simplified

A trained model finds and outlines each nucleus in the nuclear image. Every nucleus gets its own number, so touching nuclei stay separate. The image must show nuclei bright on a dark background.

Science Behind It

From written rules to learned ones. In image analysis generally, classical nuclear segmentation is built from steps someone designed: a threshold, a blob or shape criterion, a way to split touching objects. Those steps work well when their assumptions hold. A deep learning model instead learns, from images with the nuclei outlined, which patterns of edges, texture and context mark a nucleus. The patterns can be hard to put into words, which is often why such models cope with crowded or unevenly stained nuclei.

Convolutional networks, in general. Many image segmentation models are convolutional neural networks. Their early layers respond to simple features such as edges, much like a Sobel filterLoading..., and deeper layers combine those into larger shapes. That is the textbook picture. The Engines Reference says only "trained deep learning model," so don't read it as a description of this engine's network.

Training data sets the limits. A model generally does best on images like the ones it learned from, and less predictably on images unlike them: an unusual stain, magnification or tissue. That is one plausible reason the engine requires the Magnification, though the reference doesn't give one. Check the output overlay on a few fields of each new sample type before you trust a batch.

Simplified

Classical detection follows rules a person wrote, such as "nuclei are brighter than the background." A deep learning model learns its own rules from outlined examples. It does best on images like the ones it learned from, so check its results on each new kind of sample.

Parameters & Settings

ParameterDescription
InputThe input image: grayscale, with nuclei bright on a dark background (fluorescence-like).
ModelThe trained deep learning model used for nuclear detection. In 8.1 the only model is "multi-organ nuclei 2.1", not compatible with older versions; projects from older versions need the model re-selected.
16-bit conversion rangeFor 16-bit input images only: the range used to convert the image to 8 bits.
Magnification (advanced)The magnification used to acquire the images. Set automatically when the information is available.
Use Merging Rules (advanced)All touching events are candidates; a combination is merged only if it meets every condition: Max Involved Area, Max Combined Area, Max Involved Compactness, Group Max and Min Resulting Compactness.
Use Border Input (advanced)Adds a border of pixels from neighboring FOVs. Border size sets its width; Border option (Copy last pixels, Fill with black, Fill with white, Wrap border) sets the artificial border where there is no neighbor.

Parameters marked advanced appear only after you enable Show Advanced Parameters from the right-click menu on the engine's window.

Source: StrataQuest 8.1 Engines Reference, ch. 25 (pp. 444–448), ch. 26 (pp. 449–452), ch. 37 (p. 504), ch. 46 (pp. 557–559); User Manual §3 (p. 15).

Simplified

There is little to set. Pick the input image, keep the one available model, and if the image is 16-bit, choose the range used to convert it to 8-bit. Merging and border settings are hidden behind Show Advanced Parameters.

When to Use Deep Learning vs. Classical

StrataQuest offers three Detection engines that turn a nuclear image into events. All three need nuclei bright on a dark background, and all three return a coded image.

  • NucleiLoading... has the most controls: a Nuclei size hint, the background threshold with Otsu's method, percentage removal of small or weak objects, fixed Remove Labels limits and a Post Processing Order. The Engines Reference lists the Python environment as a requirement only for the other two.
  • Nuclei (Deep Learning) runs TissueGnostics' trained model. You give up the threshold and removal controls, and keep merging rules and border input.
  • Nuclear Segmentation Plug-in runs third-party models, CellPose or InstanSeg, through the same Python environment. For CellPose you can set an approximate Diameter (0 runs it in auto mode) and an optional Mask image, such as a cytoplasmic marker.

The documentation doesn't compare their accuracy or speed, so the test is yours. Run two of them on the same few fields and compare the overlays where nuclei are crowded, dim or oddly shaped. Whichever you choose, you can prune the result with Remove objects v2Loading... and edit what's left with Manual CorrectionLoading....

Simplified

Use Nuclei when you want direct control over thresholds and clean-up rules. Use Nuclei (Deep Learning) when you'd rather let a trained model draw the outlines. Both need nuclei that glow on a dark background, so try both on a few fields and compare.

Connected Terms

Share This Term
Term Connections