torchstain icon indicating copy to clipboard operation
torchstain copied to clipboard

Typo in rgb2lab transform

Open Vlad-C-Crisan opened this issue 10 months 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