A simply command-line tool for conveniently using SOTA face-recognition networks.
This package is released on PyPi and can be found here. Installation can be simply done by pip install quickmatch.
The following Python libraries are required for running inference on the face-matchers and can be installed by using pip install <library-name>. The package will automatically install them at the versions that were used to test it.
easydict
torch
tqdm
facenet-pytorch
onedrivedownloader
This library functions as a commandline tool which takes in a directory of images and the face-matcher you want to use create face-matcher embeddings that are stored in a .pt file. This .pt contains a stack of PyTorch tensors corresponding to all images. Note that the shape of the PyTorch tensor stack will be [N, D] where N is the number of images you provided in the input directory and D is the dimension that the matchers embed to (D
For example, if you want to use "ArcFace" on a folder of images called my_face_shots, run the command by specifying these inputs and the output path of the file.
python3 -m ez-face-match --matcher=ArcFace --input-folder=my_face_shots --output-path=./matcher_embeddings.ptThe main.py file automatically checks if "cuda" is enabled or not (PyTorch must be installed and compiled with CUDA). Note, however, using a purely CPU runtime for the inference of these networks may take significantly longer. Additionally, upon first time use, the script will create a folder named quickmatch_pretrained_models at your default pip cache location. Here, the model weights will be downloaded and loaded automatically.