Vehicle Event Recording Reference Implementation

Version: 2021.2   Published: 04/12/2021  

Last Updated: 09/16/2021

Overview

The Vehicle Event Recording Reference Implementation (RI) applies Artificial Intelligence (AI) to monitor the exterior of a vehicle and send events to the cloud dashboard. This includes event-based recording, remote view, driver coaching, and traffic violation detection features. The information is used for historical analysis, evidence support, and driver coaching by fleet management. 

The RI includes an interface for the driver to be able to review events and check camera status on demand when the vehicle is not moving. The RI also sends event notifications and video clips to Amazon Web Services* (AWS*), which can be displayed on the cloud dashboard.

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

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.02
  • 6th to 10th Generation Intel® Core™ processors with Intel® Iris® Plus graphics or Intel® HD Graphics

How It Works

Vehicle Event Recording utilizes external facing cameras to detect objects and provide event-based video recording, remote view and driver coaching, and traffic violation detection features. 

The RI is used for historical analysis, evidence support and driver coaching by fleet management. 

Vehicle Event Recording has an interface for the driver to be able to review events and check camera status on demand when the vehicle is not moving. 

The RI sends event notifications and video clips to AWS, which can be displayed on a dashboard.


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.  

Configure & Download

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. 
     
    unzip vehicle_event_recording.zip

     

  2. Go to the vehicle_event_recording/ directory.

    cd vehicle_event_recording/
  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.
     
    Figure 2: Enter Product Key

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


    NOTE: If you encounter any issues, refer to the Troubleshooting section at the end of this document.
    Installation failure logs are available at this path: /var/log/esb-cli/Vehicle_Event_Recording_2021.2/output.log
     
  7. In order to start the application, change the directory using the cd command printed at the end of the installation process:

    cd <INSTALL_PATH>/vehicle_event_recording/Vehicle_Event_Recording_2021.2/Vehicle_Event_Recording/EII-EVMSC-UseCase

 

Step 2: Run the Application

1. Run the application.

make webui

 

2. Open the Web UI and go to 127.0.0.1:9091 on your web browser.

Open the Web UI Screen
Figure 4: Web UI

 

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

Figure 5: Configure AWS Login Information

 

4. Access Video Event Recording Dashboard with the following steps

  • Go to sidebar and select Run Use Case.
    Figure 6: Select Use Case

     
  • Configure the use case. Select video sample or multiple video samples and check CPU or GPU device to run the use case on it.
Figure 7: Configure U​se Case

 

  • Click on the Browse button and search for one of the sample videos delivered with the application at the following path: <INSTALL_PATH>/vehicle_event_recording/Vehicle_Event_Recording_2021.2/Vehicle_Event_Recording/EII-EVMSC-UseCase/config/VideoIngestion/test_videos/
  • Select one of the available videos. 
  • After you configure all four videos, select the target CPU or GPU for all available options. Click on Run Use Case

Use Case Running

Depending on the number of cameras configured, the application will start the Visualizer App that will analyze the video sample or video samples selected. 

Figure 8: Use Case Analysis Results

 

At this point, you can see that the algorithm is analyzing the traffic from the video streams.


Run in Parallel with Driver Behavior Analytics Reference Implementation  

To run this task, you will need to download and install Driver Behavior Analytics Reference Implementation. 

Prerequisites  

Steps to Run the Application 

  1. Change directory to Vehicle Event Recording Use Case path on terminal 1:
    cd <INSTALL_PATH>/vehicle_event_recording/Vehicle_Event_Recording_2021.2/Vehicle_Event_Recording/EII-EVMSC-UseCase

  2.  Change directory to Driver Behavior Analytics Use Case path on terminal 2: 
    cd <INSTALL_PATH>/driver_behavior_analytics/Driver_Behavior_Analytics_2021.2/Driver_Behavior_Analytics/EII-DriverBehavior-UseCase 

  3. Run the following command on terminal 1 to start the webserver application: 
    make webui

     

  4. Run the following command on terminal 2 to start the webserver application: 
    make webui

  5. Open your browser and go to 127.0.0.1:9091. 

  6. Configure all available cameras with the desired videos and set the target for each one (CPU or GPU) and click Run Use Case. 
  7. Wait for Visualizer to run. 
  8. Open the Driver Behavior Analytics page by going to address 127.0.0.1:9092. 
  9. Configure Driver Behavior Analytics by setting the video source, the target and click on Run Use Case

    At this point, Vehicle Event Recording will close and then both use cases will start.
     

 

NOTE: If you reinstall the first reference implementation, you must also reinstall the second reference implementation. 


Summary and Next Steps 

This reference implementation successfully implements Intel® Distribution of OpenVINO™ toolkit plugins for detecting objects and provides event-based video recording. It uses Edge Insights for Fleet framework to cover historical analysis, evidence support, driver coaching, remote view, and traffic violation detection. 

As a next step, try one of the following:  

  • Use deep learning models, Edge Insights for Fleet framework and a live external video camera stream to capture evidence support, remote view, traffic violations and coach the decisions that must be made by the algorithm.  
  • 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 learning, see the following guides and software resources: 


Known Issues

Uninstall Reference Implementation

If you uninstall one of the reference implementations, you need to reinstall the other reference implementations because the Docker images will be cleared. 


Troubleshooting 

Installation Failure

If 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

Can't Connect to Docker Daemon

If you can't connect to Docker Daemon at http+docker://localhost, run the following command in your terminal: 

sudo usermod -aG docker $USER

Log out and Log in to Ubuntu.  

Check before retrying to install if group Docker is available for you by running the following command in terminal: 

groups

The output should contain Docker.

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.