Newbie here, my apologies if the question was asked in other words before.
Here is my transfroms function applied on the whole image of a person
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.RandomHorizontalFlip(),
transforms.RandomRotation(20),
transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
I want to apply the CNN only on the face of the person. I have a function that takes image and returns a cropped subimage of the face. How to use this function in my transforms composer ?