项目作者: rjean

项目描述 :
Real-Time Tracking Turret project using the Coral Edge TPU and mobile-net SSD.
高级语言: Python
项目地址: git://github.com/rjean/tracker.git
创建时间: 2020-05-15T09:27:40Z
项目社区:https://github.com/rjean/tracker

开源协议:

下载


Tracker

Small hobby project for an autonomous embedded device that can track things using a pan tilt system using the RaspberryPI.

The idea behind that is to be able to build a unofficial “Portal Sentry Turret: https://theportalwiki.com/wiki/Sentry_Turret“.

Tracking GIF

There is a little bit of information in my blog about this project

Setup.

Install the required packages:

  1. pip3 install -r requirements.txt

Make sure the gpio daemon is started when the raspberry pi boots:

  1. sudo systemctl enable pigpiod

Architecture

Communication

A custom built “rtcom” library is used for communication.

It works by broadcasting endpoints on the network over UDP.

User Interface

The UI is handle by the video_reader.py file. It should be run on a PC, not on the raspberry pi.

As of now, it diplays the feed from the follower.

  1. python video_reader.py

Camera

Make sure the camera is enabled:

  1. sudo raspi-config
  2. interfacing options->camera->enable the camera

AI

The controller requires a Coral USB Accelerator for embedded inference. https://coral.ai/docs/accelerator/get-started/.

curl -OL “https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite

Run at startup

See https://www.tomshardware.com/how-to/run-script-at-boot-raspberry-pi

Edit crontab for the user:

  1. pi@turret:~ $ crontab -e

And add that line:

  1. @reboot bash /home/pi/follower/start.sh > /home/pi/follower/start.log 2>&1

Starting the controller.

On the raspberry pi, run

  1. python3 controller.py