kevinjohncutler / omnipose

Omnipose: a high-precision solution for morphology-independent cell segmentation
https://omnipose.readthedocs.io
Other
96 stars 29 forks source link

Omnipose Segmentation Issue: Merging Distinct Regions as a Single Object #76

Closed Ati-74 closed 5 months ago

Ati-74 commented 7 months ago

I'm using Omnipose version 1.0.6 to segment bacteria in both CellProfiler and SuperSegger. To run Omnipose, my command is:

python -m omnipose --dir raw_img --save_png --dir_above --in_folders --omni --pretrained_model bact_phase_omni --cluster --mask_threshold 1 --flow_threshold 0 --diameter 30

Additionally, I make sure to set the same parameter values in the Runomnipose plugin of CellProfiler.

However, I've noticed sometimes Omnipose segments two distinct regions (often one region is near the borders, sometimes touching the borders and sometimes not, while the other is in a different part of the frame) as a single object.

Here's an example of this issue: there are no common pixels between the regions (region pixels are shown in yellow), yet Omnipose classifies both of them as one object.

photo_2024-02-08_15-00-27

Would you mind explaining why this happening, and how can I resolve this issue?

The segmentation output file in npy format + raw image file has been attached.

omnipose.zip

kevinjohncutler commented 5 months ago

Hey Ati, I am not able to replicate this on your image. Maybe a bug in an older version! Please reopen if you still see it.