All Projects → DT42 → Berrynet

DT42 / Berrynet

Licence: gpl-3.0
Deep learning gateway on Raspberry Pi and other edge devices

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Berrynet

Smarthome
Device integration platform for your smart home
Stars: ✭ 92 (-93.98%)
Mutual labels:  raspberry-pi, mqtt, iot
Mainflux
Industrial IoT Messaging and Device Management Platform
Stars: ✭ 1,341 (-12.3%)
Mutual labels:  mqtt, iot, edge-computing
intruder-detector-python
Build an application that alerts you when someone enters a restricted area. Learn how to use models for multiclass object detection.
Stars: ✭ 16 (-98.95%)
Mutual labels:  edge-computing, openvino, edge-ai
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+71.03%)
Mutual labels:  raspberry-pi, mqtt, iot
Kubeedge
Kubernetes Native Edge Computing Framework (project under CNCF)
Stars: ✭ 4,582 (+199.67%)
Mutual labels:  mqtt, iot, edge-computing
object-flaw-detector-cpp
Detect various irregularities of a product as it moves along a conveyor belt.
Stars: ✭ 19 (-98.76%)
Mutual labels:  edge-computing, openvino, edge-ai
motor-defect-detector-python
Predict performance issues with manufacturing equipment motors. Perform local or cloud analytics of the issues found, and then display the data on a user interface to determine when failures might arise.
Stars: ✭ 24 (-98.43%)
Mutual labels:  edge-computing, openvino, edge-ai
Home Assistant
Home-Assistant-Config
Stars: ✭ 182 (-88.1%)
Mutual labels:  raspberry-pi, mqtt, iot
object-flaw-detector-python
Detect various irregularities of a product as it moves along a conveyor belt.
Stars: ✭ 17 (-98.89%)
Mutual labels:  edge-computing, openvino, edge-ai
concurrent-video-analytic-pipeline-optimization-sample-l
Create a concurrent video analysis pipeline featuring multistream face and human pose detection, vehicle attribute detection, and the ability to encode multiple videos to local storage in a single stream.
Stars: ✭ 39 (-97.45%)
Mutual labels:  edge-computing, openvino, edge-ai
Platypush
A versatile and extensible platform for home and life automation with hundreds of supported integrations
Stars: ✭ 192 (-87.44%)
Mutual labels:  raspberry-pi, mqtt, iot
Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (-48.46%)
Mutual labels:  raspberry-pi, mqtt, iot
Deviceplane
Open source device management for embedded systems and edge computing
Stars: ✭ 917 (-40.03%)
Mutual labels:  raspberry-pi, iot, edge-computing
Rpieasy
Easy MultiSensor device based on Raspberry PI
Stars: ✭ 85 (-94.44%)
Mutual labels:  raspberry-pi, mqtt, iot
Blynk Server
Blynk is an Internet of Things Platform aimed to simplify building mobile and web applications for the Internet of Things. Easily connect 400+ hardware models like Arduino, ESP8266, ESP32, Raspberry Pi and similar MCUs and drag-n-drop IOT mobile apps for iOS and Android in 5 minutes
Stars: ✭ 8 (-99.48%)
Mutual labels:  raspberry-pi, mqtt, iot
object-size-detector-python
Monitor mechanical bolts as they move down a conveyor belt. When a bolt of an irregular size is detected, this solution emits an alert.
Stars: ✭ 26 (-98.3%)
Mutual labels:  edge-computing, openvino, edge-ai
Baetyl
Extend cloud computing, data and service seamlessly to edge devices.
Stars: ✭ 1,655 (+8.24%)
Mutual labels:  mqtt, iot, edge-computing
Blinker Doc
blinker中文文档
Stars: ✭ 139 (-90.91%)
Mutual labels:  raspberry-pi, mqtt, iot
safety-gear-detector-python
Observe workers as they pass in front of a camera to determine if they have adequate safety protection.
Stars: ✭ 54 (-96.47%)
Mutual labels:  edge-computing, openvino, edge-ai
Hassio Zigbee2mqtt
Hass.io add-on for zigbee2mqtt
Stars: ✭ 547 (-64.22%)
Mutual labels:  raspberry-pi, mqtt, iot

BerryNet Logo

Deep Learning Gateway on Raspberry Pi And Other Edge Devices

Docker Image CI

Supporting BerryNet

Introduction

This project turns edge devices such as Raspberry Pi into an intelligent gateway with deep learning running on it. No internet connection is required, everything is done locally on the edge device itself. Further, multiple edge devices can create a distributed AIoT network.

At DT42, we believe that bringing deep learning to edge devices is the trend towards the future. It not only saves costs of data transmission and storage but also makes devices able to respond according to the events shown in the images or videos without connecting to the cloud.

Figure 1

Figure 1: BerryNet architecture

Figure 1 shows the software architecture of the project, we use Node.js/Python, MQTT and an AI engine to analyze images or video frames with deep learning. So far, there are two default types of AI engines, the classification engine (with Inception v3 [1] model) and the object detection engine (with TinyYOLO [2] model or MobileNet SSD [3] model). Figure 2 shows the differences between classification and object detection.

Figure 2

Figure 2: Classification vs detection

One of the application of this intelligent gateway is to use the camera to monitor the place you care about. For example, Figure 3 shows the analyzed results from the camera hosted in the DT42 office. The frames were captured by the IP camera and they were submitted into the AI engine. The output from the AI engine will be shown in the dashboard. We are working on the Email and IM notification so you can get a notification when there is a dog coming into the meeting area with the next release.

Figure 3

Figure 3: Object detection result example

To bring easy and flexible edge AI experience to user, we keep expending support of the AI engines and the reference HWs.

Figure 4

Figure 4: Reference hardwares

Installation

You can install BerryNet by using pre-built image or from source. Please refer to the installation guide for the details.

We are pushing BerryNet into Debian repository, so you will be able to install by only typing one command in the future.

Here is the quick steps to install from source:

$ git clone https://github.com/DT42/BerryNet.git
$ cd BerryNet
$ ./configure

Start and Stop BerryNet

BerryNet performs an AIoT application by connecting independent components together. Component types include but not limited to AI engine, I/O processor, data processor (algorithm), or data collector.

We recommend to manage BerryNet componetns by supervisor, but you can also run BerryNet components manually. You can manage BerryNet via supervisorctl:

```
# Check status of BerryNet components
$ sudo supervisorctl status all

# Stop Camera client
$ sudo supervisorctl stop camera

# Restart all components
$ sudo supervisorctl restart all

# Show last stderr logs of camera client
$ sudo supervisorctl tail camera stderr
```

For more possibilities of supervisorctl, please refer to the official tutorial.

The default application has three components:

  • Camera client to provide input images
  • Object detection engine to find type and position of the detected objects in an image
  • Dashboard to display the detection results

You will learn how to configure or change the components in the Configuration section.

Dashboard: Freeboard

Open Freeboard on RPi (with touch screen)

Freeboard is a web-based dashboard. Here are the steps to show the detection result iamge and text on Freeboard:

  • 1: Enter http://127.0.0.1:8080 in browser's URL bar, and press enter
  • 2: Download the Freeboard configuration for default application, dashboard-tflitedetector.json
  • 2: Click LOAD FREEBOARD, and select the newly downloaded dashboard-tflitedetector.json
  • 3: Wait for seconds, you should see the inference result image and text on Freeboard

Open Freeboard on another computer

Assuming that you have two devices:

  • Device A with IP 192.168.1.42, BerryNet default application runs on it
  • Device B with IP 192.168.1.43, you want to open Freeboard and see the detection result on it

Here are the steps:

  • 1: Enter http://192.168.1.42:8080 in browser's URL bar, and press enter
  • 2: Download the Freeboard configuration for default application, dashboard-tflitedetector.json
  • 3: Replace all the localhost to 192.168.1.42 in dashboard-tflitedetector.json
  • 2: Click LOAD FREEBOARD, and select the newly downloaded dashboard-tflitedetector.json
  • 3: Wait for seconds, you should see the inference result image and text on Freeboard

For more details about dashboard configuration (e.g. how to add widgets), please refer to Freeboard project.

Enable Data Collector

You might want to store the snapshot and inference results for data analysis.

To run BerryNet data collector manually, you can run the command below:

$ bn_data_collector --topic-config <topic-config-filepath> --data-dirpath <result-dirpath>

The topic config indicates what MQTT topic the data collector will listen, and what handler will be triggered. Here is a topic config exmaple:

{
    "berrynet/engine/tflitedetector/result": "self.update"
}

The inference result image and text will be saved into the indicated result directory.

Configuration

The default supervisor config is at /etc/supervisor/conf.d/berrynet-tflite.conf. To write your own supervisor config, you can refer to here for more example supervisor configs of BerryNet

Camera Client

BerryNet camera client can run in two modes: stream or file. In stream mode, local camera (e.g. USB camera and RPi camera) and IP camera can be supported, and input frame rate (FPS) can be changed on demand (default is 1). In file mode, user can indicate filepath as input source.

To run camera client in stream mode:

$ bn_camera --fps 5

To run camera client in file mode:

$ bn_camera --mode file --filepath <image-filepath>

Use Your Data To Train

The original instruction of retraining YOLOv2 model see github repository of darknet

In the current of BerryNet, TinyYolo is used instead of YOLOv2. The major differences are:

  1. Create file yolo-obj.cfg with the same content as in tiny-yolo.cfg
  2. Download pre-trained weights of darknet reference model, darknet.weights.12, for the convolutional layers (6.1MB) https://drive.google.com/drive/folders/0B-oZJEwmkAObMzAtc2QzZDhyVGM?usp=sharing

The rest parts are the same as retraining YOLO.

If you use LabelMe to annotate data, utils/xmlTotxt.py can help convert the xml format to the text format that darknet uses.

Discussion

Please refer to the Slack or Telegram Group for questions, suggestions, or any idea discussion.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].