def resize(image): """Resize a face image to the proper size for training and detection. """ return cv2.resize(image, (config.FACE_WIDTH, config.FACE_HEIGHT), interpolation=cv2.INTER_LANCZOS4)