axondeepseg / nn-axondeepseg

1-class and 2-class segmentation of axon/myelin using nnunetv2
1 stars 0 forks source link

Predictions are saved in RGB instead of grayscale #13

Closed hermancollin closed 6 months ago

hermancollin commented 6 months ago

Here:

https://github.com/axondeepseg/nn-axondeepseg/blob/f33f43b2ab4262ba50bc2f04ca27b9e5e3825800/nn_axondeepseg.py#L46-L55

The image should be read with cv2.IMREAD_GRAYSCALE. Since this is not the case, the image is cast to a 3-channel RGB image when read and saved as such, but we would like a grayscale img instead.

hermancollin commented 6 months ago

Fixed in https://github.com/axondeepseg/nn-axondeepseg/commit/746804