EIDOSLAB / torchstain

Stain normalization tools for histological analysis and computational pathology
MIT License
118 stars 20 forks source link

Macenko JAX backend support #36

Open andreped opened 1 year ago

andreped commented 1 year ago

This PR adds JAX backend support to Macenko.

Changes:

Note that the JAX backend runtime-wise is not as optimized as the other backends. Hence, I would perhaps say that we only have experimental JAX support as of now. Here is how JAX backend compared to the other backends:

backends numpy jax torch tf
runtime [s] 0.455 2.427 0.201 0.442

Further optimization to the JAX implementation should be done in future work, but this is outside my area of expertise. Hence, for that, it would be great if more experienced JAX developers could contribute.