torchstain
torchstain copied to clipboard
Typo in rgb2lab transform
Describe the bug
In THIS LINE from rgb2lab implementation, the value 166 should be 116.
Expected behavior
The line should be changed to arr.masked_scatter_(not_mask, 7.787 * torch.masked_select(arr, not_mask) + 16 / 116) to match numpy implementation (e.g. THIS one from skimage)
Good catch, @Vlad-C-Crisan! Surprising that this has not yet been observed.
I can make a PR.
Made PR: https://github.com/EIDOSLAB/torchstain/pull/51