Driver Behavior Analytics Reference Implementation

Published:05/05/2021

Edge Software Hub   /   Driver Behavior Analytics  /  Documentation

Overview

The Driver Behavior Analytics Reference Implementation uses video injection and analytics, rule engine, and event recording services to monitor driver behavior. Develop the solution that provides alerts and stored video clips to drivers and fleet managers with this reference implementation.

Select Configure & Download to download the reference implementation and the software listed below.  

Configure & Download

Time to Complete

Programming
Language

Available Software

Approximately 60 minutes

C++, Python*


Intel® Distribution of OpenVINO™
toolkit 2020 Release

Recommended Hardware
The below hardware is recommended for use with this reference implementation. See the Recommended Hardware page for other suggestions. 

Target System Requirements

  • Ubuntu* 18.04.3 LTS
  • 6th to 10th Generation Intel® Core™ processors with Intel® Iris® Plus graphics or Intel® HD Graphics

 

How It Works

The application uses the inference engine included in the Intel® Distribution of OpenVINO™ toolkit and is designed to detect and track driver behavior and driver actions to ensure safe driving.  

Using deep learning models, video streams, and analytics running on in-vehicle computers, it detects driver’s drowsiness states and distraction behaviors, and provides real time alerts to driver, and analytics per driver, truck and route over time.

 

Get Started

Step 1: Install the Reference Implementation

Select Configure & Download to download the reference implementation and then follow the steps below to install it.  

 

NOTE: If the host system already has Docker* images and containers, you might encounter errors while building the reference implementation packages. If you do encounter errors, refer to the Troubleshooting section at the end of this document before starting the reference implementation installation.

1. Open a new terminal, go to the downloaded folder and unzip the downloaded RI package.

driver_behavior_analytics.zip

 

​2. Go to the driver_behavior_analytics/ directory.

cd driver_behavior_analytics /

 

​3. Change permission of the executable edgesoftware file.

chmod 755 edgesoftware

 

4. Run the command below to install the Reference Implementation.

./edgesoftware install

 

5. During the installation, you will be prompted for the Product Key. The Product Key is contained in the email you received from Intel confirming your download.

6. When the installation is complete, you see the message “Installation of package complete” and the installation status for each module.

 

NOTE: If you encounter any issues, please refer to the Troubleshooting section at the end of this document. Installation failure logs will be available at path - /var/log/esb-cli/Driver_Behavior_Analytics_//install.log

7. Execute these commands at the end of the installation to go to the working directory: 

export EIS=<PATH> 
cd <PATH> 

 

Step 2: Run the Application

1. Run the application:

make webui EIS_BUILD=$EIS

2. Open the Web UI: Go to 127.0.0.1:9092 on your web browser.


3. Load AWS* Settings by selecting Configuration from the sidebar and set your AWS Access Key ID and AWS Secret Access Key.

4. Access Driver’s Behavior Analytics Dashboard with the following steps. 

  • Go to sidebar and select Run Use Case.
  • Configure the use case. Select video sample and the CPU or GPU device to run on it. 
  • Click on the Browse button and search for one of the sample videos delivered with the application at the following path:
    Driver_Management_/ Driver_Management/EII-Driver-Behaviour-Use-Case/config/VideoIngestion/test_videos/ and select one of the two available. 

  • After selecting the video sample, select the target CPU or GPU and click on Run Use Case. 
  • The application will start the Visualizer App that will detect yawns, blinks, drowsiness and distraction status as in the following image:

 

Summary and Next Steps

This application successfully implements Intel® Distribution of OpenVINO™ toolkit plugins for detecting and tracking driver behavior. It can be extended further to provide support for feed from network stream (RTSP camera), and the algorithm can be optimized for better performance.

As a next step, try the following: 

Use deep learning models and driver facing camera video streams to detect driver’s drowsiness, distraction state and behaviors to provide real time alerts to driver. This reference implementation uses Intel® Distribution of OpenVINO™ toolkit Open Model Zoo pre-trained models and 3rd party models, but you can extend it to use your own models.

Learn More

To continue your learning, see the following guides and software resources:

Troubleshooting

Installation Failure

If the host system already has Docker images and its containers running, you will have issues during the RI installation. You must stop/force stop existing containers and images.

  • To remove all stopped containers, dangling images, and unused networks: 

    sudo docker system prune --volumes
  • To stop Docker containers: 

    sudo docker stop $(sudo docker ps -aq)
  • To remove Docker containers:

    sudo docker rm $(sudo docker ps -aq)
  • To remove all Docker images:

    sudo docker rmi -f $(sudo docker images -aq)

Docker Image Build Failure

If Docker image build on corporate network fails, follow the steps below.

  1. Get DNS server using the command: 
    nmcli dev show | grep 'IP4.DNS'
  2. Configure Docker to use the server. Paste the line below in the  /etc/docker/daemon.json file:
    {
        "dns": ["<dns-server-from-above-command>"]
    }
    
  3. Restart Docker: 
    sudo systemctl daemon-reload && sudo systemctl restart docker

Installation Failure Due to Ubuntu Timezone Setting 

While building the reference implementation, if you see  /etc/timezone && apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/${HOST_TIME_ZONE} /etc/localtime && dpkg-reconfigure -f noninteractive tzdata' returned a non-zero code: 1 make: *** [config] Error 1 

Run the following command in your terminal: 

sudo timedatectl set-local-rtc 0

Installation Encoding Issue 

While building the reference implementation, if you see ERROR: 'latin-1' codec can't encode character '\u2615' in position 3: ordinal not in range(256) 

Run the following command in your terminal: 

export LANG=en_US.UTF-8

Support Forum 

 

If you're unable to resolve your issues, contact the Support Forum.  

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.