BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
83 stars 35 forks source link

v3 #87

Closed jwindhager closed 2 years ago

jwindhager commented 2 years ago

See #85

nilseling commented 2 years ago

image

Just to keep track of this. I have now compared the effect of downscaling the probabilities before segmentation. For this I have compared the segmentation masks that were generated (i) after downscaling of the probabilities and (ii) before downscaling and resizing of objects. Most cells (90%) show an overlap of 80%. 30 out of 45000 cells were lost due to first downscaling. So I think this is fine and can be integrated into the pipeline. @jwindhager is there an easy way to speed up the writing of PNG files in the preprocessing steps?

nilseling commented 2 years ago

I have now reduced the compression level when writing png files using imageio. This results in reasonably well compressed PNGs (~40mb per panorama) and speeds things up from around 6-7 minutes per MCD to a few seconds. @jwindhager if that's alright for you I think we can release v3.

jwindhager commented 2 years ago

I have now reduced the compression level when writing png files using imageio. This results in reasonably well compressed PNGs (~40mb per panorama) and speeds things up from around 6-7 minutes per MCD to a few seconds. @jwindhager if that's alright for you I think we can release v3.

Thanks! Any reason you didn't disable compression at all (i.e., 0)?

nilseling commented 2 years ago

Thanks! Any reason you didn't disable compression at all (i.e., 0)?

Yes, no compression (0) would mean a file size of 250mb instead of 40mb (compression level 1). Increasing the compression level further has little effect on the file size

jwindhager commented 2 years ago

Great, happy to release!

nilseling commented 2 years ago

Perfect! I'll do it tomorrow to directly check if everything is usable and to upload the new results to zenodo