Git Product home page Git Product logo

facetracking-ncs-rpi3's Introduction

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 video is shown [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:

Servo number    GPIO number   Pin in P1 header   Pan-Tilt Motor
      0               4             P1-7           Pan-Motor
      1              17             P1-11          Tilt-Motor
      2              18             P1-12
      3             21/27           P1-13
      4              22             P1-15
      5              23             P1-16
      6              24             P1-18
      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:

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:

[setupvars.sh] OpenVINO environment initialized

Getting Started:

Install and start multiple servos:

git clone [email protected]:yehengchen/FaceTracking-RPI3-NCS.git
cd FaceTracking-RPI3-NCS/ServoBlaster/user
sudo ./servod

Multiple servos testing:

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

Picamera testing:

raspistill -o image.jpg

Run face tracking:

python3 pi_NCS_face_traking.py

Reference:

PiBits-ServoBlaster

facetracking-ncs-rpi3's People

Contributors

yehengchen avatar cclljj avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.