说明书
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# 简单的人脸识别
|
||||
|
||||
## 玩法
|
||||
|
||||
### 配置环境
|
||||
|
||||
#### 1.安装requirements.txt
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
#### 2.下载dlib模型
|
||||
|
||||
只需执行我的自动下载脚本即可,需`魔法上网`
|
||||
|
||||
```bash
|
||||
./init_enviorment.sh
|
||||
```
|
||||
|
||||
```powershell
|
||||
.\init_enviorment.ps1
|
||||
```
|
||||
|
||||
### 替换数据集
|
||||
|
||||
- 替换`cache\dataset.mp4`
|
||||
|
||||
- 录一段你想要识别为True的人脸的视频
|
||||
|
||||
- 然后训练
|
||||
|
||||
### 测试图片路径
|
||||
|
||||
测试图片在`cache`文件夹内,一个`positive.jpg`,一个`negative.jpg`,分别是正负样本
|
||||
@@ -0,0 +1,10 @@
|
||||
mkdir models
|
||||
mkdir cache
|
||||
wget https://github.com/davisking/dlib-models/raw/refs/heads/master/shape_predictor_68_face_landmarks_GTX.dat.bz2
|
||||
wget https://github.com/davisking/dlib-models/raw/refs/heads/master/dlib_face_recognition_resnet_model_v1.dat.bz2
|
||||
Move-Item dlib_face_recognition_resnet_model_v1.dat.bz2 models/
|
||||
Move-Item shape_predictor_68_face_landmarks_GTX.dat.bz2 models/
|
||||
Set-Location models
|
||||
7z x dlib_face_recognition_resnet_model_v1.dat.bz2
|
||||
7z x shape_predictor_68_face_landmarks_GTX.dat.bz2
|
||||
Write-Output initialized enviorment!
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
wget https://github.com/davisking/dlib-models/raw/refs/heads/master/shape_predictor_68_face_landmarks_GTX.dat.bz2
|
||||
wget https://github.com/davisking/dlib-models/raw/refs/heads/master/dlib_face_recognition_resnet_model_v1.dat.bz2
|
||||
mkdir cache
|
||||
mkdir models
|
||||
mv dlib_face_recognition_resnet_model_v1.dat.bz2 models/
|
||||
mv shape_predictor_68_face_landmarks_GTX.dat.bz2 models/
|
||||
cd models
|
||||
bzip2 -d dlib_face_recognition_resnet_model_v1.dat.bz2
|
||||
bzip2 -d shape_predictor_68_face_landmarks_GTX.dat.bz2
|
||||
echo initialized enviorment!
|
||||
Reference in New Issue
Block a user