-
Notifications
You must be signed in to change notification settings - Fork 45
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
Reduce Peak Memory Consumption #16
Comments
Instead, create the inital memory segment as a numpy array and simply return it when finished. Addressed #16
Instead, create the inital memory segment as a numpy array and simply return it when finished. Addressed #16
With regards to allowing binary images represented as |
Previously, playing around with bit packing was sure to reduce performance and not really significantly reduce memory because of the output image and union find. However, after zeroth pass was implemented bit packing can save 20% (uint32) to 40% (for uint16) on peak memory. Might be worth looking into. |
Looks like std::bitset and std::vector would be annoying to work with in different respects. Will have to write own bit accessor class that accepts a byte string with zero parsing. |
Might be able to do something with |
This package is currently several times more memory intensive than SciPy. There are a few avenues to reducing memory consumption: .
As in feat: support arbitrary labels #11, we can use std::unordered_map in union-find which for many images which would sparsely utilize the union-find array would result in large memory reductions. However, for images which densely use it, it would use more. It also supports labels larger than the maximum index of the image. However, it is also slower than the array implementation. We should allow the user to choose which implementation is right for them. (whenever I try this it's embarrassingly slow)this one would be too slowIs it possible to do this in-place? Might be restricted to data-types uint16 or bigger.(No, you need to be able to check the original labels.)vector<bool>
The text was updated successfully, but these errors were encountered: