meerqat.image.face_recognition module#

Usage: face_recognition.py <dataset> [<config> –disable_caching]

Options: –disable_caching Disables Dataset caching (useless when using save_to_disk), see datasets.set_caching_enabled()

meerqat.image.face_recognition.similarity_transform(image, landmarks, src, tform, image_size=112)[source]#

Adapted from deepinsight/insightface

meerqat.image.face_recognition.from_pretrained(model_name='r50', fp16=True, train=False)[source]#
meerqat.image.face_recognition.get_pil_preprocessor()[source]#

Use to preprocess PIL image of shape (H x W x C) loaded using Image.open(image_path).convert(‘RGB’)

meerqat.image.face_recognition.compute_face_embedding(batch, model, preprocessor, tform, max_n_faces=1, image_key='image')[source]#
meerqat.image.face_recognition.dataset_compute_face_embedding(dataset_path, map_kwargs={}, pretrained_kwargs={}, fn_kwargs={})[source]#