Skip to content
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

Added RLE fast pass to phase1/2 #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nicholas-Schaub
Copy link

This PR implements a piece of code to quickly loop over structured (ROI label) data. While pytest does run, it should be considered WIP. Also, to run the pytest code, the pytest-benchmark plugin should be installed before running.

Most of the modifications are designed to operate with the use of a use_fastloop parameter, but function overloading was used so that no breaking changes were made.

The performance improvements on phase 1 come primarily from implementation of a fast run length encoding (RLE) algorithm that reduces the initial pass over the pixels by a factor of 5-10x. Overall, the reduction of processing time using the pytest benchmarks averages about 20%, but this is only for calculating all intensity features.

Since the RLE algorithm is fast, it might be beneficial to use RLE for calculating some of the features in Nyxus. For example, RLE effectively creates a pseudo-hull, drastically reducing the number of calculations for things like convex hull. This would be future work since some algorithms like convex hull could use RLE as a drop in replacement while other features might require retooling to take full advantage of RLE.

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