Thanks for reply @IdoAmit198 . I will try this too. Actually my code worked. I found out that the transformer version (4.32.1) I was using, was not supporting some preprocessing on gray scale images. Now it is working on version=4.24.0.
1 Like