项目作者: yehengchen

项目描述 :
Face Traking Eyes using the RPI3 + NCS1/2(Intel Movidius Neural Compute Stick) based on OpenVINO Toolkit
高级语言: Python
项目地址: git://github.com/yehengchen/FaceTracking-NCS-RPI3.git
创建时间: 2019-05-03T06:28:08Z
项目社区:https://github.com/yehengchen/FaceTracking-NCS-RPI3

开源协议:

下载


Pan/tilt face tracking with a Raspberry Pi + NCS

This project using the NCS with openvino and ServoBlaster to drive
multiple servos via the GPIO pins
to face tracking

Demo [YouTube] [Bilibili]

Installation Python Libraries:

  • Python 3.5
  • Picamera
  • OpenVINO
  • Numpy
  • OpenCV

Things needed:

  • A raspberry pi 3B
  • A Intel® Neural Compute Stick - (NCS1/2)
  • A pan/tilt bracket - (3D printer)
  • Two Servos - (SG90)
  • A GPIO expansion board
  • Pi Camera or USB Webcam

Pan/Tilt bracket

Pan-and-tilt bracket - (3D printer)

[GPIO 4 -> PanMotor] [GPIO 17 -> TiltMotor]

The code defaults to driving 8 servos, the control signals of which should be
connected to P1 header pins as follows:

  1. Servo number GPIO number Pin in P1 header Pan-Tilt Motor
  2. 0 4 P1-7 Pan-Motor
  3. 1 17 P1-11 Tilt-Motor
  4. 2 18 P1-12
  5. 3 21/27 P1-13
  6. 4 22 P1-15
  7. 5 23 P1-16
  8. 6 24 P1-18
  9. 7 25 P1-22

Install the OpenVINO™ Toolkit for Raspbian* OS Package

FaceDetection model (IR) ./models:

  • Network - face-detection-retail-0004.bin
  • Weights - face-detection-retail-0004.xml

Face detector based on SqueezeNet light (half-channels) as a backbone with a single SSD for indoor/outdoor scenes shot by a front-facing camera.

METHOD 1:

  • Run this script ./Install_openvino.sh

    This script provides all instructions on install the OpenVINO™ toolkit package for Raspbian OS*

    METHOD 2:

  • The following steps will be covered: [Guide]

    This guide provides step-by-step instructions on how to install the OpenVINO™ toolkit for Raspbian OS*

To test your OpenVINO, open a new terminal. You will see the following:

  1. [setupvars.sh] OpenVINO environment initialized

Getting Started:

Install and start multiple servos:

  1. git clone git@github.com:yehengchen/FaceTracking-RPI3-NCS.git
  2. cd FaceTracking-RPI3-NCS/ServoBlaster/user
  3. sudo ./servod

Multiple servos testing:

  1. echo 0=+10 > /dev/servoblaster
  2. echo 1=+10 > /dev/servoblaster

Picamera testing:

  1. raspistill -o image.jpg

Run face tracking:

  1. python3 pi_NCS_face_traking.py

Reference:

PiBits-ServoBlaster