The class is loaded once, so this is not the problem.
Face detector is quiet a heavy operation itself.
It takes long to detect faces.
If I wanted to do this kind of augmentation, I wound probably run face detector on the whole data set before training. And used the saved face detection results.