🌋5. Segmentation options

What to do when segmentation in GAT doesn't work so well.

The default cell and ganglia segmentation models in GAT were designed to cover most scenarios. However, if you find yourself frequently adjusting cell or ganglia ROIs, you might want to explore alternative options listed below.

This is especially important for neurochemical markers, which can vary significantly in staining compared to Hu, a pan-neuronal marker. Keep in mind that the GAT deep learning model might not be finely tuned for every unique marker, as there are multiple neurochemical markers with varying staining patterns. The same consideration applies to ganglia analysis.

We will go through a few options below.

QuPath:

QuPath is a great option for custom segmentation approaches. I have used it for multichannel analysis, where one channel doesn't segment well in GAT.

Cell segmentation and classification

For cell segmentation and classification, we would approach it by segmenting the neurons in the Hu channel using the Cell Detection option in QuPath or the enteric neuron model via StarDist.Once the cells are detected, you can use Object classification to detect multiple neuronal subtypes. The ROIs can be exported and then imported back into the GAT analysis pipeline.

Ganglia analysis

If the ganglia analysis isn't working well in GAT, then use the Pixel classifier workflow in QuPath to generate ganglia ROIs. You can choose Hu and a few other channels taht highlight the ganglia for training the pixel classifier.

Cellpose

Cellpose is a state of the art cell and nucleus segmentation algorithm and from v2.0 they have made it easy to train it on your own data. With only a few annotations, you can finetune your own cell segmentation model and it works surprisingly well.

Check this video out to see how you can train your own cellpose model

Once you have the label masks you can convert them to ROIs in Fiji using the BIOP plugin that should already in Fiji if you've installed GAT. Plugins -> BIOP -> Image Analysis -> ROIs -> Label Image to ROIs. Once you've converted into ROIs, you can import it during GAT analysis.

Training your own StarDist model

The models trained in StarDist are the default in GAT. If you are constantly correcting your ROIs and you have a few images and ROI files, you could potentially train a model that works on your data. You can use the StarDist notebooks at ZeroCostDL4Mic or DL4MicEverywhere. From experience, t is recommended you have approx. 8 annotated or corrected images for this. For GAT, the StarDist2D notebooks from ZeroCostDL4Mic were used to generate the default models.

Last updated