Skip to content

High FPS live stream Raspberry Pi cam with object detection by Google Coral EdgeTPU

License

Notifications You must be signed in to change notification settings

redlogo/RPi-Stream

Repository files navigation

Fast Raspberry Pi Stream Object Detection - Multi Platform

Introduction

Live camera stream: from Raspberry Pi to your local computer host.
Live object detection: with Coral EdgeTPU on host side.
High FPS: 35-45, depending mostly on network condition.
Multiple platform: ready for Ubuntu, MacOS, Windows.
Application scenario: AI-powered surveillance camera.

Video Tutorial

Preparation and Environment

  • Raspberry Pi, latest RPi4 is recommended.
  • Latest Raspbian is recommended for RPi.
  • A camera for RPi, such as RPi camera module V2.
  • A local computer host with usb 3.0 port:
    • Ubuntu, MacOS, Windows are supported.
  • Coral EdgeTPU. USB version is recommended.
  • Python virtual env is recommended:
  • IDE such as PyCharm is recommended for host.

Installation

Clone this repository on both RPi and computer host sides:

git clone https://github.com/redlogo/RPi-Stream.git

Install libs needed for Raspberry Pi:

bash RPi-requirements.sh

Install libs required for local computer with EdgeTPU unplugged:

# Ubuntu
bash computer-hose-requirements-linux.sh
# MacOS
bash computer-host-requirements-macos.sh
# Windows
check out computer-host-requirements-windows.txt

Plug USB EdgeTPU into the host usb 3.0 port.

Usage

Edit on RPi side, change sender_stream.py:

# line 20, change it to your local computer host ip
target_ip = '192.168.7.33'  

Firstly execute script on RPi side:

python3 sender_stream.py

Secondly execute script on local computer host side:

python3 receiver_stream_object_detection.py
(Windows: try 'python' w/o '3' or use IDE instead of Windows CMD)

To exit, firstly terminate RPi side, then host side.

Coding Style

General Python 3 Coding style.

Version

1.0 - April 2020.

Author

redlogo

References and Acknowledgements

License

MIT

Copyright

Copyright © 2020 redlogo

About

High FPS live stream Raspberry Pi cam with object detection by Google Coral EdgeTPU

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published