3. Spot detection
To detect the centers of the spots, SpotMAX will start from the semantic segmentation mask from previous step (see Spot prediction) and will run one of these two strategies:
Local peaks detection
Connected-component labeling
For the “Local peak detection”, SpotMAX will use the function from the Scikit-image library skimage.feature.peak_local_max.
For the “Connected-component labeling”, SpotMAX will use the function from the Scikit-image library skimage.measure.label. The center of the spots will then be calculated as the centroid of the connected objects.