Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 8.85 KB

File metadata and controls

79 lines (65 loc) · 8.85 KB

Deep Learning Streamer (DL Streamer) Samples

Samples are simple applications that demonstrate how to use the Intel® DL Streamer. The samples are available in the /opt/intel/dlstreamer/samples directory.

Samples separated into several categories

  1. gst_launch command-line samples (samples construct GStreamer pipeline via gst-launch-1.0 command-line utility)
  2. C++ samples
  3. Python samples
    • Hello DL Streamer Sample - constructs an object detection pipeline, add logic to analyze metadata and count objects and visualize results along with object count summary in a local window
    • Draw Face Attributes Python Sample - constructs pipeline and sets Python callback to access frame metadata and visualize inference results
    • Open Close Valve Sample - constructs pipeline with two sinks. One of them has GStreamer valve element, which is managed based object detection result and opened/closed by callback.
    • ONVIF Camera Discovery Sample - demonstrates automatic discovery of ONVIF-compatible cameras on the network and launches corresponding DL Streamer pipelines for video analysis.
  4. Benchmark
    • Benchmark Sample - measures overall performance of single-channel or multi-channel video analytics pipelines
  5. Concurrent use of DL Streamer and DeepStream

How To Build And Run

Samples with C/C++ code provide build_and_run.sh shell script to build application via cmake before execution.

Other samples (without C/C++ code) provide .sh script for constructing and executing gst-launch or Python command line.

DL Models

DL Streamer samples use pre-trained models from OpenVINO™ Toolkit Open Model Zoo

Before running samples, run script download_omz_models.sh once to download all models required for samples. The script located in samples top folder.

NOTE: To install all necessary requirements for download_omz_models.sh script run this command:

python3 -m pip install --upgrade pip
python3 -m pip install openvino-dev[onnx]

NOTE: To install all available frameworks run this command:

python3 -m pip install openvino-dev[caffe,onnx,tensorflow2,pytorch,mxnet]

Input video

First command-line parameter in DL Streamer samples specifies input video and supports

  • local video file
  • web camera device (ex. /dev/video0)
  • RTSP camera (URL starting with rtsp://) or other streaming source (ex URL starting with http://)

If command-line parameter not specified, most samples by default stream video example from predefined HTTPS link, so require internet connection.

NOTE: Most samples set property sync=false in video sink element to disable real-time synchronization and run pipeline as fast as possible. Change to sync=true to run pipeline with real-time speed.

Running on remote machine

In order to run samples on remote machine over SSH with X Forwarding you should force usage of ximagesink as video sink first:

source ./force_ximagesink.sh