跳转至

DLib配置与pip安装

操作步骤

  1. apt安装一些基础软件
  2. 配置DLib人脸探测,尝试启动
  3. 手工安装face_recognition

    • 查看HA中dlib_face_detect.py源程序
    • pip安装的程序包选择次序
    • pip安装中的USERBASE
    • pip安装中的本地wheel包

参考

  • Dlib人脸探测配置说明文档

    https://www.home-assistant.io/integrations/dlib_face_detect

  • apt-get安装命令

    sudo apt-get install libatlas-base-dev cmake

  • Dlib人脸探测配置(example_9_1_1.yaml

    image_processing:
      - platform: dlib_face_detect
        scan_interval: 1000000
        source:
          - entity_id: camera.cam7
    
  • 手工安装face_recognition

    export PYTHONUSERBASE=/home/pi/.homeassistant/deps

    pip3 install face_recognition==1.0.0 --upgrade --user

    如果要指定从piwheels下载安装,在pip3命令中增加

    -i https://www.piwheels.org/simple

返回课程目录↩