Start OpenVINO* Python Application at Boot Time using System Service on Raspbian*


Install & Setup




This guide provides users with steps for creating a system service to initialize OpenVINO™ toolkit environment variables and run the Python application for Raspbian*. This process may apply to other Linux* distributions but this guide was written to work for Raspbian*.

The steps below assume you have OpenVINO™ toolkit installed and that your installation has been verified. If you have not yet done so, please visit the following links:

System Requirements

  • Raspbian* Buster, 32-bit
  • Raspbian* Stretch, 32-bit

Steps to Create System Service File

  1. Install tools for and download necessary files:

    sudo pip install progress
    cd ~/
    wget --no-check-certificate
    wget --no-check-certificate

  2. Create bash script to initialize OpenVINO environment variables and execute python script:

    vi ~/openvino-benchmark-app-script

    source /opt/intel/openvino/bin/
    /usr/bin/python3 /opt/intel/openvino/deployment_tools/inference_engine/samples/python_samples/benchmark_app/ -i /home/pi/human-740259_640.jpg -m /home/pi/face-detection-adas-0001.xml -d MYRIAD

  3. Change bash script file permissions and ownership:

    chmod u+x ~/openvino-benchmark-app-script

  4. Create service file under /etc/systemd/system with contents as shown below:

    sudo vi /etc/systemd/system/openvino-benchmark-app.service

    Description=Init OpenVINO env and run python benchmark_app



  5. Enable system service to start at boot and start system service:

    sudo systemctl enable openvino-benchmark-app.service
    sudo systemctl start openvino-benchmark-app.service

  6. To check system service status:

    sudo systemctl status openvino-benchmark-app.service

  7. Or to disable service during boot time, first stop service and then disable service:

    sudo systemctl stop openvino-benchmark-app.service
    sudo systemctl disable openvino-benchmark-app.service

For more information about system service for Linux*, please take a look at the manual page for systemd.

man systemd