def resize_and_crop_batch(frames, dim):
    """
    Center crop + resize to (dim x dim)
    inputs:
        - frames: list of images (numpy arrays)
        - dim: output dimension size
    """
    smframes = []
    xshift, yshift = 0, 0
    for i in range(len(frames)):
        smframe, (xshift, yshift) = resize_and_crop_image(frames[i], dim)
        smframes.append(smframe)
    smframes = np.stack(smframes)
    return smframes, (xshift, yshift)

    Center crop + resize to (dim x dim)
    inputs:
        - frames: list of images (numpy arrays)
        - dim: output dimension size
    
face_alignment/detection/blazeface/utils.py