Skip to content

Conversation

@Nicholas-Schaub
Copy link

@Nicholas-Schaub Nicholas-Schaub commented Nov 12, 2022

This PR is a proof of concept approach that demonstrates the performance improvements that may be gained by using RLE to calculate metrics. It is an extension of what was implemented in #66. In particular, modifications were made to the way the convex hull, basic morphology, and contour calculations were made. Each of these modifications improves the performance of Nyxus by reducing run time, and in the case of calculating the contour, also reducing memory overhead (since the aux image and padding doesn't need to be calculated).

As reported in issue #69, It appears as though the contour is incorrectly calculated. Assuming the calculation is correct, the performance improvements of *ALL_MORPHOLOGIES* improves by a factor of 3-4x overall when using RLE. If the assumed bug is fixed from #69, then the improvements are 40%-50% when using RLE. The reason why fixing the presumed bug makes the non-RLE version run more quickly is likely due to the number of neighbors calculation.

This PR is intended to only be a proof of concept, as with #66. It is possible there are bugs or additional considerations may need to be made for larger images and accounting for tile boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant