DeepDetect and LiveDetect to process local video streams with deep learning

Deepdetect

DeepDetect is free software developed by JoliBrain, whose mission is to make the latest innovations accessible and usable in deep learning (deep learning) are accessible as well as allow the integration of applications.

Deepdetect consists of two free programs: one of them is a server written in C ++ 11 with a REST API, which allows access to the underlying Caffe, Caffe2, Tensorflow, Dlib, NCNN, etc. libraries. The other one is a web platform to train, organize and use your models as little code snippets.

Automatic event detection from signals time series has wide applications. Traditional detection methodss detect events primarily through the use of similarity and correlation in the data.

Those methods can be inefficient and produce low precision. In recent years, machine learning techniques have revolutionized many science and engineering domains.

In particular, the performance of object detection in 2-D image data has been significantly improved due to deep neural networks.

About the DeepDetect platform

Deepdetect implements support for supervised and unsupervised deep learning of images, text and other data, with a focus on simplicity and ease of use, testing and connection to existing applications.

It supports classification, object detection, segmentation, regression, autoencoders, and many more.

Among its main characteristics are

  • High-level API for machine learning and deep learning
  • support for Caffe, Tensorflow, XGBoost and T-SNE
  • Classification, regression, autoencoders, object detection, segmentation.
  • JSON communication format
  • remote python client library
  • Dedicated server with support for asynchronous training calls.
  • High performance, benefit from multi-core CPU and GPU
  • built-in similarity search via neural embeds
  • Connector to handle CSV files with preprocessing capabilities
  • Connector to handle text files, sentences and character-based models.
  • Connector to handle the SVM file format for sparse data
  • without dependency and synchronization of the database, all information and parameters of the model organized and available from the file system
  • Flexible template output format to simplify connection to external applications
  • Support for sparse calculations and functions on both GPU and CPU.

About LiveDetect

LiveDetect is a tool designed to easily process local video streams with deep learning models. The code reads live images from a camera and processes each frame with DeepDetect.

Real-world use cases of DeepDetect clients with LiveDetect:

  • Safety on site and site surveillance.
  • OCR car registration in parking lots.
  • Detection of defects in manufactured precision parts.

How to install DeepDetect on Raspberry pi?

DeepDetect can be installed on different platforms (both servers, computers, laptops and even a Raspberry Pi).

From the official website of DeepDetect we can find installation instructions for each supported platform.

In this case, We will install DeepDetect on our Raspberry Pi, with an NCNN back-end and LiveDetect, a tool derived from the DeepDetect ecosystem for processing video sequences. This allows us to detect objects in real time and visualize them.

Pre-trained Deep Learning models are available for desktop and embedded systems like the Raspberry Pi.

To install the DeepDetect server on the Raspberry Pi, We will use Docker for simplicity and good performance.

Docker
Related article:
How to install Docker on Raspberry pi with Raspbian?

The first thing we are going to do is create a folder for DeepDetect Docker Container, we do this by opening a terminal and executing in it:

mkdir $HOME/models
docker pull jolibrain/deepdetect_ncnn_pi3
docker run -d -p 8080:8080 -v $HOME/models:/opt/models jolibrain/deepdetect_ncnn_pi3
sudo apt-get install libjpeg-dev

Now we are going to download LiveDetect and install:
wget https://github.com/jolibrain/livedetect/releases/download/1.0.1/livedetect-rpi3
./livedetect-rpi3 \
--port 8080 \
--host 127.0.0.1 \
--mllib ncnn \
--width 300 --height 300 \
--detection \
--create --repository /opt/models/voc/ \
--init "https://www.deepdetect.com/models/init/ncnn/squeezenet_ssd_voc_ncnn_300x300.tar.gz" \
--confidence 0.3 \
-v INFO \
-P "0.0.0.0:8888" \
--service voc \
--nclasses 21

Rendering is available at http: // localhost: 8888 between two and three frames of video per second (FPS).

If you want to implement LiveDetect on your desktop computer, you can find the commands as well as more information and samples with LiveDetect available on GitHub.

The link is this.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.