Hi, Compose does nothing but running the list of transforms over the image sequentially.
You just have to define a class and code your face cropper inside
class custom(object):
    def __call__(self,img):
        return  apply your cropper

then pass an instance of that class to the compose
transforms.Compose([…,custom()])
and that’s all.
It’s important to highlight that call method can only has img as input. If you need to define other parameters you can initilize the class