mask conversion UI dialog (uint64 to bool) - #462
Open
TeunHuijben wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
==========================================
- Coverage 87.74% 87.38% -0.37%
==========================================
Files 57 57
Lines 5493 5524 +31
==========================================
+ Hits 4820 4827 +7
- Misses 673 697 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
The geff stores our masks and bounding boxes to display the segmentation. The problem is that previously, these masks were saved as
uint64. On disc, this is fine, because zarr compression can do a lot on binary masks. However, when loading the geff into memory (like we do in motile_tracker), it makes memory explode, because the binary masks are loaded as fulluint64. Actually, funtracks uses the tracksdata functionality to load the geff, and tracksdata casts to bools upon loading, but the problem is thegeff.loadwhich goes throughuint64because that is the type it sees.Tracksdata has been updated to export the masks as
bool, so every future geff will have boolean masks (once tracksdata>funtracks>motile_tracker all use the latest releases). However, in the meantime, all previously saved geffs have the masks asuint64.This PR:
When loading a geff in which the masks are saved as
uint64, the UI pops up a window with the question to convert the masks to booleans. This will duplicate the geff with the masks as booleans and load that one. This is a tracksdata utility that motile_tracker uses, and the conversion is fast, because it works on chunks, so OOM is not a risk.For small datasets, this won't be a problem, but for larger datasets (>25k nodes) on smaller laptops, the 8-fold memory increase because of
uint64is a major problem.🔴 currently blocked until royerlab/tracksdata#319 is merged and part of the next tracksdata release