# FaceRecognizerDemo **Repository Path**: bloomf/FaceRecognizerDemo ## Basic Information - **Project Name**: FaceRecognizerDemo - **Description**: 各种人脸识别demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-29 - **Last Updated**: 2024-06-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 安装 ```shell conda create -n media python=3.8 conda activate media pip install mediapipe ``` ## 图像缩放 图像做人脸识别之前先缩放一个度,识别后在放大。 我使用的摄像头默认640*480 ## keypoint 人脸128个关键点 ## checkface 使用短程的库,只能识别近处的人脸,流畅度很好 测试了一下mediapipe,速度: **mediapipe 运行了889次,平均耗时约为3.13ms** 这个模型不能缩放,缩小哪怕一倍都识别不出来了。而且这个模型速度本来就已经最快了 ## dlibface.py 使用dlib来做人脸识别 **dlib_rec 运行了218次,平均耗时约为143.56ms** 做了缩放后(4倍): **dlib_rec 运行了178次,平均耗时约为10.37ms** 于checkface差距很大。 https://blog.csdn.net/qq_29541895/article/details/133692093 dlib也有关键点,但是不想尝试了。 ## cvface.py 使用opencv内置的函数(感觉闪烁比较厉害) **opencv_rec 运行了257次,平均耗时约为64.89ms** 缩小4倍后:**opencv_rec 运行了1010次,平均耗时约为5.54ms** 经过上面的观察,为了让视频流畅,在识别要求不高的时候,可以使用opencv(对图像做缩放),将其迁移到开发板上去,使用C语言实现一次。