-
Notifications
You must be signed in to change notification settings - Fork 402
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
Add option not to fill masks. Compression to TIFF files. #884
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
==========================================
+ Coverage 56.26% 56.27% +0.01%
==========================================
Files 16 16
Lines 3784 3785 +1
==========================================
+ Hits 2129 2130 +1
Misses 1655 1655 ☔ View full report in Codecov by Sentry. |
@hey2homie Can you post some example image/masks to demonstrate this issue? |
Dramatically speeds up the saving masks outlines compared to already existing methods.
Added missing arguments, more consistent documentation/type-hints, little refactoring of the function for making polygons.
@mrariden, I've also added options to fill in holes that are less than certain threshold. I've also added in the same PR option to save masks with/without holes in I'll add tomorrow some tests and time measurements. |
Is the |
thanks @hey2homie ! these json masks, are they loadable in imageJ directly? I think this is all great but I think I would make the polygon computation optional, only computed if the user requests to save to json (I can do that though) |
Often with the glial cells Cellpose fills in masks where the hole between processes is present. This affects the downstream morphological analysis and intensities computations. Added an option to disable this behaviour when calling
eval
.Also, noticed that saved masks in
.tif
or.tiff
format are quite large in size, so added compression which significantly reduced the size of the file.