Skip to content

MONAI framework is very slow while computing stain normalisation #5943

Answered by drbeh
VinayMushunuri asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @VinayMushunuri,

You are right, this implementation is based on numpy but we do have a cupy implementation that is way faster than numpy.
For you to use the cupy-based version, there are two options:

  1. We have implemented a cupy based in #3505 a while ago but we decided no to have the cupy version in MONAI! So you can checkout the PR and use it if you want.
  2. The other option, which is the preferred one, is to use what we have implemented in cuCIM.
    You can use them directly or use it in MONAI via CuCIM or CuCIMd wrapper.
from tranforms import CuCIM
normalizer = CuCIM(
    name="normalize_colors_pca",
    source_intensity=240.0,
    alpha=1.0,
    beta=0.345,
    ref_stain_coeff=((0.5626, 0…

Replies: 5 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@zhanghaoyue
Comment options

Answer selected by drbeh
Comment options

You must be logged in to vote
8 replies
@gigony
Comment options

gigony Feb 7, 2023
Collaborator

@VinayMushunuri
Comment options

@VinayMushunuri
Comment options

@drbeh
Comment options

drbeh Feb 7, 2023
Collaborator

@VinayMushunuri
Comment options

Comment options

You must be logged in to vote
3 replies
@gigony
Comment options

gigony Feb 7, 2023
Collaborator

@drbeh
Comment options

drbeh Feb 7, 2023
Collaborator

@grlee77
Comment options

Comment options

You must be logged in to vote
1 reply
@VinayMushunuri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #5925 on February 06, 2023 14:50.