Basic idea is, I trained my MNIST dataset (Devnagri Script) (based on lesson 2). It doesn’t work well when testing with images having black text having white background.
So my objective is:
- I want to convert my FastAI Image into a black and white/greyscale
- Invert the colors (b/w)
I have looked for every forum and yet to figure out a solution.
I tried the convert_mod = ‘L’, however it doesn’t convert it to black and white.
Attaching the images before and after conversion
Lastly, I want the final file in the Fast AI Image format, and not PIL image or open CV, since I am not able to use those while deployong app on render.
Any and all help will be deeply appreciated.