torchstain icon indicating copy to clipboard operation
torchstain copied to clipboard

Typo in rgb2lab transform

Open Vlad-C-Crisan opened this issue 2 years ago • 2 comments

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)

Vlad-C-Crisan avatar Aug 11 '23 11:08 Vlad-C-Crisan

Good catch, @Vlad-C-Crisan! Surprising that this has not yet been observed.

I can make a PR.

andreped avatar Aug 11 '23 11:08 andreped

Made PR: https://github.com/EIDOSLAB/torchstain/pull/51

andreped avatar Aug 11 '23 11:08 andreped