Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intensities csv labeling objects only evens #241

Closed
megleila opened this issue Feb 5, 2024 · 4 comments
Closed

Intensities csv labeling objects only evens #241

megleila opened this issue Feb 5, 2024 · 4 comments

Comments

@megleila
Copy link

megleila commented Feb 5, 2024

Hi Bodenmiller Group,

I am using Mesmer for segmentation, not through steinbock but directly as there were some segmentation parameters I wanted to optimize for my tissue. I had an issue with Mesmer that some of my ROI dimensions were too small in one dimension for the system to run (<256 pixels). The workaround was to pad the image in photoshop (ensuring the image is flattened), run it through Mesmer to generate the mask, and then crop the mask file to the exact dimension of the ROI.

When I put the resulting masks through steinbock, the intensities csv has only even numbered objects; doing a manual count of the segmentation, it seems that the number of cells may be close to the final (largest) even number -- ie if the segmentation image truly has 200 cells, the csv file lists objects 2, 4, 6, [...], 198, 200. I have made absolutely sure the input file going into mesmer for segmentation is flattened; I can't figure out how to get around this issue.

Thanks for all your help.

Megan

@Milad4849
Copy link
Contributor

Hi @megleila
Thanks for your question. Please confirm that your files are the correct type and that your mask files contain labels as you expect (not only even, etc). It appears that steinbock is not the issue here and that you would have to look into your segmentation workflow for the source of the problem.

@megleila
Copy link
Author

megleila commented Feb 13, 2024 via email

@Milad4849
Copy link
Contributor

Hi @megleila
I do not see any attachment. You can use napari for visualizing masks, depending on your configuration, you can do that via steinbock view. Alternatively you can use napari independent of steinbock. Please check your masks and, as mentioned before, confirm that your object masks have the correct file types.

@megleila
Copy link
Author

Hey -- Thank you so much for this suggestion. Napari was very helpful - I hadn't explored it yet, and cross-checking the annotations it seems something about cropping the size back to the original size resulted in the evens only labeling error, and I was able to see these annotations in Napari. I was able to download the napari-crop plugin and crop the padded mask file and maintain the correct cell annotations in Napari. Thanks so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants