DeepFace【部署 02】轻量级人脸识别和面部属性分析框架(实时分析+API+Docker部署(3)


这个功能是通过比对`db_path`下的人脸来进行识别的。实际测试代码如下:



from deepface import DeepFace

if name == “__main__”:
DeepFace.stream(“tests/dataset”)


测试截图如下,由于使用的是项目内的图片数据集,图片比对结果看看就好:


![realtime.jpg](https://img-blog.csdnimg.cn/img_convert/1345203d5a43994967f6093693b71119.jpeg)


### 2.11 API


DeepFace serves an API as well. You can clone `[/api](https://bbs.csdn.net/topics/618540462)` folder and run the api via gunicorn server. This will get a rest service up. In this way, you can call deepface from an external system such as mobile app or web.



cd scripts
./service.sh


Linux系统使用这个命令是前台启动,实际的启动用的是shell脚本,内容如下:



#!/bin/bash
nohup python -u ./api/api.py > ./deepfacelog.out 2>&1 &


Face recognition, facial attribute analysis and vector representation functions 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值