Running a TensorFlow Object Detection model using OpenVINO on I-Pi SMA – I-Pi SMARC

Running a TensorFlow Object Detection model using OpenVINO on I-Pi SMARC Elkhart Lake

Prerequisites

This guide requires Ubuntu 22.04 LTS (Intel IoT Version) installed on the module.

Steps

  1. Ensure your packages are up to date by running
    sudo apt-get update
    followed by
    sudo apt-get upgrade
  2. Install the required packages using
    sudo apt-get install python3.10-venv build-essential git-all libgl1-mesa-dev ffmpeg
  3. Run the following commands to install OpenVINO (can be referenced on the OpenVINO download page)
    1. Create a virtual environment
      python -m venv openvino_env
    2. Activate the virtual environment
      source openvino_env/bin/activate
    3. Upgrade pip to the latest version
      python -m pip install --upgrade pip
    4. Download and install the package
      pip install openvino==2023.3.0

Note: If at any time during the execution process, you close your terminal, you can reactivate the virtual environment by running

source openvino_env/bin/activate

 

  1. While in the virtual environment, run
    git clone --depth=1 https://github.com/openvinotoolkit/openvino_notebooks.git
    then enter the newly-created directory with
    cd openvino_notebooks
  2. To install pip dependencies, run
    pip install wheel setuptools
    followed by
    pip install -r requirements.txt
  3. We will use the tensorflow-object-detection To start this, run
    jupyter lab notebooks
  4. On the left side, navigate to /tensorflow-object-detection-to-openvino and open tensorflow-object-detection-to-openvino.ipynb.

 

You will be greeted by the following title page:

  1. Use the indicated “play” button to run through the instructions. Some instructions may take a while to complete, so patience is a must.
  2. After a few steps, an image will be downloaded. You can change this image URL to another image.

  1. Once all instructions have finished processing, you will be presented with an image similar to the following

Added for comparison

Error

Maximum of Three products are allowed for comparision

-->