A simple face recognition library built on YuNet and ArcFace.
$ dotnet add package Clearly.ML.FacesSimple-to-use face recognition library with a focus on:
using var faceRecognizer = FaceRecognizer.Create();
var faces = faceRecognizer.DetectAndRecognize("your.jpg");
//List of faces with embeddings
FaceRecognizer.Annotate(faces, "your.jpg", "your_annotated.jpg");
Use ONNX session options on the .Create() call to bring your own acceleration.
See MIT license note in https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet https://github.com/opencv/opencv_zoo/blob/a45b893a79cf975f43f77ddee69495472be76e14/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
Original project has additional citation information: https://github.com/ShiqiYu/libfacedetection
Source - EfficientV2S from https://github.com/leondgarse/Keras_insightface/tree/master https://objects.githubusercontent.com/github-production-release-asset-2e65be/229437028/16b1dfb0-029f-418f-be2d-d5958e97d1db?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240219%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240219T025148Z&X-Amz-Expires=300&X-Amz-Signature=c60cdcb51c82dc05acc8782351360c2523d730f58d17be13d1ba830d204ade68&X-Amz-SignedHeaders=host&actor_id=55339824&key_id=0&repo_id=229437028&response-content-disposition=attachment%3B%20filename%3DTT_effv2_s_strides1_pw512_F_dr02_drc02_lr_01_wd5e4_arc_emb512_sgd_bs512_ms1m_randaug_bnm09_bne1e5_cos16_float16_E50_arc_sgd_LA_basic_agedb_30_epoch_14_batch_8000_0.986167.h5&response-content-type=application%2Foctet-stream
Convert to ONNX:
python -m tf2onnx.convert --keras TT_effv2_s_strides1_pw512_F_dr02_drc02_lr_01_wd5e4_arc_emb512_sgd_bs512_ms1m_randaug_bnm09_bne1e5_cos16_float16_E50_arc_sgd_LA_basic_agedb_30_epoch_14_batch_8000_0.986167.h5 --output arcface_full.onnx
Citation information:
@misc{leondgarse,
author = {Leondgarse},
title = {Keras Insightface},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
doi = {10.5281/zenodo.6506949},
howpublished = {\url{https://github.com/leondgarse/Keras_insightface}}
}