智能相册
1. 简介
智能相册,将相册中的相片按照人员进行分类,相片中包含同一人的生成一个类别。
demo
GitHub:https://github.com/chenwr727/IntelligentGalleryAlbum
- 基于insightface实现人脸检测和人脸特征值生成;
- 人脸聚类,scikit-learn的KNN算法;
2. 安装
2.1 代码
|-- InsightFace-Face-Cluster
|-- modules
| |-- __init__.py
| |-- crud.py
| |-- database.py
| |-- models.py
| |-- schemas.py
|-- utils
| |-- __init__.py
| |-- msyh.ttc
| |-- tools.py
|-- main.py
2.2 依赖
pip3 install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple
3. 示例
python3 -m streamlit run main.py
3.1 新建相册
影响聚类效果参数设置:
- det_threshold:insightface人脸检测得分
- rec_threshold:人脸间相似度,余弦
- pitch_threshold:insightface人脸角度,俯仰
- yaw_threshold:insightface人脸角度,航向
- roll_threshold:insightface人脸角度,横滚
3.2 上传图片
3.3 查看分类
4. 下一步
- 向量搜索引擎: milvus