dchaley / dchaley/deepcell-segmentation
Improve deep_watershed memory usage
- Dominant language
- Jupyter Notebook
- Stars
- 9
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Part of: #322
Issues we've identified:
1. Float32 → Float64 copy #377
The scikit watershed function creates a full copy of the input as type float64. We think this is because the [cython code only works on float64](https://github.com/scikit-image/scikit-image/blob/main/skimage/segmentation/_watershed_cy.pyx#L70). So, it has to do this.
DeepCell seems to use float32, so we're creating a copy just to add precision that's not there…
2. Watershed makes copy of markers (but original is unused)
The deep_watershed function passes the markers into the watershed function, which then creates another copy (the output buffer). Neither use the original copy. That means we're holding on to a full copy through watershed even though we don't need to.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.