Facebox-在docker中运行人脸识别
操作步骤
- 安装docker
- 获得
MB_KEY
- 启动
machinebox/facebox
- 在facebox的web界面中传入标准照并进行识别操作
- 在HA中配置与使用facebox
参考
- Linux下docker的安装
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
- Windows下docker的安装
https://docs.docker.com/docker-for-windows/install/
- facebox网站
https://machinebox.io/docs/facebox
MB_KEY
获得
- docker运行facebox
docker run -d --name=facebox --restart=always -p 9999:8080 -e "MB_KEY=$MB_KEY" machinebox/facebox
- 测试照片URL
- HA中facebox配置样例(
example_9_6_1.yaml
)
```yaml # example_9_6_1.yaml image_processing: - platform: facebox scan_interval: 1000000 ip_address: 192.168.3.156 port: 9999 confidence: 10 source: - entity_id: camera.cam_input name: facebox_identify
script: ms_face_identify_script: alias: facebox人脸识别 sequence: - service: image_processing.scan data: entity_id: image_processing.facebox_identify
automation: - alias: Clinton Identify trigger: platform: event event_type: image_processing.detect_face event_data: entity_id: image_processing.facebox_identify name: 'Clinton' action: service: persistent_notification.create data_template: title: '人脸认证' message: '克林顿出现在摄像头中,可信度{{ trigger.event.data.confidence }}%' ```