Install the OpenVINO™ Toolkit for Raspbian* OS from a Docker* Image


Install & Setup



The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. The toolkit extends computer vision (CV) workloads across Intel® hardware based on Convolutional Neural Networks (CNN), which maximizes performance. The Intel® Distribution of OpenVINO™ toolkit also includes the Intel® Deep Learning Deployment Toolkit.

This guide provides users with steps for creating a Docker* image to install the OpenVINO™ toolkit for Raspbian* OS.

System requirements

Target operating system

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

Host operating systems

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


  • Raspberry Pi* board with ARM* ARMv7-A CPU architecture. Check that uname -m returns armv7l.
    • Raspberry Pi* 3 Model B+
    • Raspberry Pi* 4 Model B
  • One of Intel® Movidius™ Visual Processing Units (VPU):
    • Intel® Movidius™ Neural Compute Stick
    • Intel® Neural Compute Stick 2



Use the automated convenience scripts to install Docker*, as this is currently the only way to install this toolkit for Raspbian*. Find more information.

Building a Docker* image for Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2

Build image

To build a Docker* image, you'll need to create a Dockerfile that contains the defined variables and commands required to create an OpenVINO™ toolkit installation image.

Create your Dockerfile using the following example as a template.

  1. Create or go to a directory where you will create your Docker* image. This document creates a ~/docker directory.

    mkdir ~/docker && cd ~/docker

  2. Download the Dockerfile template (ZIP) from this guide or create your own Dockerfile using the contents of the template below.

    vi Dockerfile

    FROM balenalib/rpi-raspbian:latest

    ARG INSTALL_DIR=/opt/intel/openvino 

    RUN apt-get update && apt-get install -y --no-install-recommends \
       apt-utils \
       automake \
       cmake \
       cpio \
       gcc \
       g++ \
       libatlas-base-dev \
       libstdc++6 \
       libtool \
       libusb-1.0.0-dev \
       lsb-release \
       make \
       python3-pip \
       python3-numpy \
       python3-scipy \
       libgtk-3-0 \
       pkg-config \
       libavcodec-dev \
       libavformat-dev \
       libswscale-dev \
       sudo \
       udev \
       unzip \
       vim \
       wget && \
    rm -rf /var/lib/apt/lists/*
    RUN mkdir -p $INSTALL_DIR && cd $INSTALL_DIR && \
       wget -c $DOWNLOAD_LINK && \
       tar xf l_openvino_toolkit_runtime_raspbian_p*.tgz --strip 1 -C $INSTALL_DIR
    # add USB rules
    RUN sudo usermod -a -G users "$(whoami)" && \
       /bin/bash -c "source $INSTALL_DIR/bin/ && \
       sh $INSTALL_DIR/install_dependencies/"
    # build Object Detection sample
    RUN echo "source /opt/intel/openvino/bin/" >> ~/.bashrc && \
       mkdir /root/Downloads && \
       cd $INSTALL_DIR/deployment_tools/inference_engine/samples/c/ && \
       /bin/bash -c "source $INSTALL_DIR/bin/ && \
       ./ && \
       wget --no-check-certificate $BIN_FILE -O /root/Downloads/person-vehicle-bike-detection-crossroad-0078.bin && \
       wget --no-check-certificate $WEIGHTS_FILE -O /root/Downloads/person-vehicle-bike-detection-crossroad-0078.xml && \
       wget --no-check-certificate $IMAGE_FILE -O /root/Downloads/walk.jpg "
    RUN echo "import cv2 as cv\n\
    # Load the model.\n\
    net = cv.dnn.readNet('person-vehicle-bike-detection-crossroad-0078.xml',\
    # Specify target device.\n\
    # Read an image.\n\
    frame = cv.imread('walk.jpg')\n\
    if frame is None:\n\
       raise Exception('Image not found!')\n\
    # Prepare input blob and perform an inference.\n\
    blob = cv.dnn.blobFromImage(frame, size=(1024, 1024), ddepth=cv.CV_8U)\n\
    out = net.forward()\n\
    # Draw detected faces on the frame.\n\
    for detection in out.reshape(-1, 7):\n\
       confidence = float(detection[2])\n\
       xmin = int(detection[3] * frame.shape[1])\n\
       ymin = int(detection[4] * frame.shape[0])\n\
       xmax = int(detection[5] * frame.shape[1])\n\
       ymax = int(detection[6] * frame.shape[0])\n\
       if confidence > 0.5:\n\
          cv.rectangle(frame, (xmin, ymin), (xmax, ymax), color=(0, 255, 0))\n\
    # Save the frame to an image file.\n\
    cv.imwrite('out.png', frame)\n\
    print('Detection results in out.png')" >> /root/Downloads/


    You will need to replace the direct link to the OpenVINO™ toolkit package in the DOWNLOAD_LINK variable in the template above with that of the latest version. You can copy the link of the OpenVINO toolkit for Raspbian* OS package from the Intel® Open Source Technology Center. Select the latest version available, right-click the URL, and press Copy link address.

  3. To build a Docker* image for Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2, run the following command:

    docker build . -t <image_name>

    (for example, docker build . -t openvino-rpi)

Running and testing a Docker* image

Known limitations:

  • The Intel® Movidius™ Neural Compute Stick device changes its VendorID and DeviceID during execution and each time looks for a host system as a brand new device. This means it cannot be mounted as usual.
  • UDEV events aren't forwarded to the container by default, and so it isn't aware of device reconnection.
  • Only one device is supported per host.

Running Object Detection sample

The application outputs an image (out_0.bmp) with any detected person enclosed in rectangles.

  1. Use the following option to run the image on an Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2. To run this container in interactive and privileged mode, enable Docker network configuration as host, and then mount all devices to the container:

    docker run -it --privileged -v /dev:/dev --network=host <image_name>

    (for example, docker run -it --privileged -v /dev:/dev --network=host openvino-rpi)

  2. Use the following commands to run Object Detection Sample. Go to the build samples directory:

    cd /root/inference_engine_c_samples_build/armv7l/Release/

  3. Run the sample with specifications for the model and a path to the input image:

    ./object_detection_sample_ssd_c -m ~/Downloads/person-vehicle-bike-detection-crossroad-0078.xml -i ~/Downloads/walk.jpg -d MYRIAD

Running inference of Face Detection Model using OpenCV* API

  1. Navigate to the directory where the script is located:

    cd /root/Downloads

  2. Run the script:


In this script, OpenCV* loads the person-vehicle-bike detection model from the Intermediate Representation (IR) format and an image. Then it runs the inference and saves the image with the detection results as out.png.

This completes the installation procedure for the OpenVINO™ toolkit for Raspbian* from a Docker* image.

Related topics