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

Add colocalization measures #488

Merged
merged 10 commits into from
Feb 2, 2023

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jan 25, 2023

This MR impelements four colocaliziation measures being introduced for scikit-image 0.20. The implementation of each is fairly simple. For reference, see a related gallery example.

Benchmark results vs. scikit-image 0.20dev

Benchmark results show speedup in all cases below aside from intersection_coeff on small images.

function shape dtype acceleration
manders_coloc_coeff (512, 512) float32 1.72
manders_coloc_coeff (512, 512) uint8 2.93
manders_coloc_coeff (3840, 2160) float32 39.3
manders_coloc_coeff (3840, 2160) uint8 49.9
manders_coloc_coeff (192,192,192) float32 38.1
manders_coloc_coeff (192,192,192) uint8 47.4
function shape dtype acceleration
manders_overlap_coeff (512, 512) float32 1.41
manders_overlap_coeff (512, 512) uint8 1.48
manders_overlap_coeff (3840, 2160) float32 2.33
manders_overlap_coeff (3840, 2160) uint8 2.93
manders_overlap_coeff (192,192,192) float32 2.31
manders_overlap_coeff (192,192,192) uint8 2.80
function shape dtype acceleration
pearson_corr_coeff (512, 512) float32 6.96
pearson_corr_coeff (512, 512) uint8 8.10
pearson_corr_coeff (3840, 2160) float32 49.5
pearson_corr_coeff (3840, 2160) uint8 53.4
pearson_corr_coeff (192,192,192) float32 51.6
pearson_corr_coeff (192,192,192) uint8 52.5
function shape dtype acceleration
intersection_coeff (512, 512) bool 0.278
intersection_coeff (3840, 2160) bool 13.1
intersection_coeff (192,192,192) bool 11.1

@grlee77 grlee77 added feature request New feature or request non-breaking Introduces a non-breaking change labels Jan 25, 2023
@grlee77 grlee77 requested a review from a team as a code owner January 25, 2023 22:20
@grlee77 grlee77 added this to the v23.02.00 milestone Feb 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2023

Codecov Report

Base: 92.95% // Head: 92.88% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (1fa1633) compared to base (a8d9690).
Patch coverage: 88.74% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-23.02     #488      +/-   ##
================================================
- Coverage         92.95%   92.88%   -0.07%     
================================================
  Files               130      131       +1     
  Lines              9775     9890     +115     
================================================
+ Hits               9086     9186     +100     
- Misses              689      704      +15     
Impacted Files Coverage Δ
python/cucim/src/cucim/skimage/color/colorconv.py 97.97% <ø> (ø)
...on/cucim/src/cucim/skimage/filters/_median_hist.py 81.31% <81.81%> (-0.31%) ⬇️
...cucim/src/cucim/skimage/measure/_colocalization.py 86.20% <86.20%> (ø)
...m/skimage/registration/_phase_cross_correlation.py 94.82% <91.48%> (-1.69%) ⬇️
python/cucim/src/cucim/skimage/filters/_median.py 81.96% <91.66%> (+0.48%) ⬆️
python/cucim/src/cucim/skimage/_shared/utils.py 77.40% <100.00%> (+0.58%) ⬆️
python/cucim/src/cucim/skimage/measure/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gigony
Copy link
Contributor

gigony commented Feb 2, 2023

intersection_coeff (512, 512) bool 0.278

I wonder if this result is okay and if you have an idea on what caused the performance degradation.

Copy link
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @grlee77 ! It looks good to me! (with a minor typo that can be addressed later).

python/cucim/src/cucim/skimage/measure/_colocalization.py Outdated Show resolved Hide resolved
@grlee77
Copy link
Contributor Author

grlee77 commented Feb 2, 2023

/merge

@rapids-bot rapids-bot bot merged commit 4b19225 into rapidsai:branch-23.02 Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants