Why does PILImageBW invert the date?

I am using PILImageBW as input. It seems to invert the gray values, why?

I had the same issue. The data is actually fine, it’s the way the image is displayed. In particular, fastai uses matplotlib to show the images, and the default color map is inverted for some reason. You can use cmap='gray' instead (as an argument to show_batch or whatever fastai show function you are using).

1 Like