Solved by CarlosHernandezP in post #4 
              
              
                Thanks to @ptrblck link I could figure out how to implement my transform. I had to make a few tweaks to transform from PIL image to numpy back and forth but so far it isn’t throwing errors anymore. In case this proves useful for anyone on the future (I know I’d have been that way for me) I will leav…