人脸识别自动化【多人识别】【模版For循环】
本帖最后由 lidicn 于 2018-1-20 15:15 编辑识别一个人并TTS名字【userinfo】
automation:
- alias: face_indentify
trigger:
platform: numeric_state
entity_id: image_processing.dlib_face_identify
above: 0
action:
- service: tts.baidu_say
data_template:
message: >
{% if states.image_processing.dlib_face_identify.attributes.faces %}
{{ states.image_processing.dlib_face_identify.attributes.faces['name'] }} ,是你呀!
{% else %}
你好,陌生人!
{% endif %}
判断有几个人,多个人的话以执行for循环读取faces列表里面的name字段
**** Hidden Message *****
骚年你最棒 学习一下 感謝L大分享! 挺实际的用法 楼主 借鉴的要注明出处: https://www.hachina.io/1221.html:lol:lol:lol 顶一个!啊啊啊啊 厉害了我的哥 谢谢分享!
谢谢分享!