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
- Ensure your packages are up to date by running
followed by
sudo apt-get update
sudo apt-get upgrade
- Install the required packages using
sudo apt-get install python3.10-venv build-essential git-all libgl1-mesa-dev ffmpeg
- Run the following commands to install OpenVINO (can be referenced on the OpenVINO download page)
- Create a virtual environment
python -m venv openvino_env
- Activate the virtual environment
source openvino_env/bin/activate
- Upgrade
pip
to the latest versionpython -m pip install --upgrade pip
- Download and install the package
pip install openvino==2023.3.0
- Create a virtual environment
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
- While in the virtual environment, run
then enter the newly-created directory with
git clone --depth=1 https://github.com/openvinotoolkit/openvino_notebooks.git
cd openvino_notebooks
- To install pip dependencies, run
followed by
pip install wheel setuptools
pip install -r requirements.txt
- We will use the tensorflow-object-detection To start this, run
jupyter lab notebooks
- On the left side, navigate to
/tensorflow-object-detection-to-openvino
and opentensorflow-object-detection-to-openvino.ipynb
.
You will be greeted by the following title page:
- Use the indicated “play” button to run through the instructions. Some instructions may take a while to complete, so patience is a must.
- After a few steps, an image will be downloaded. You can change this image URL to another image.
- Once all instructions have finished processing, you will be presented with an image similar to the following