Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
6057 Discussions

Run Live Object Detection with OpenVINO in WSL2 Ubuntu 20.04

RGVGreatCoder
Novice
359 Views

I come to realize that the OpenVINO demos run in a software (I just learned) called Jupyter Notebook. Sorry for learning this a bit too late.

However, I need to run the "Live Object Detection with OpenVINO": (https://docs.openvino.ai/latest/notebooks/401-object-detection-with-output.html) in my WSL2 Ubuntu 20.04 machine. I will also need to try this demo in a Raspberry Pi 4 device where I will not be able to install (nor run) Jupyter Notebook in it...

To begin trying to run the demo in my WSL2 Ubuntu 20.04 machine, I first downloaded the content in this github: (https://github.com/openvinotoolkit/openvino_notebooks) and then ran requirements as follows:

python -m pip install --upgrade pip
pip install -r requirements.txt

All requirements installed, except it displayed the following errors:

ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
ERROR: tensorflow 2.4.4 has requirement absl-py~=0.10, but you'll have absl-py 1.0.0 which is incompatible.
ERROR: tensorflow 2.4.4 has requirement gast==0.3.3, but you'll have gast 0.4.0 which is incompatible.
ERROR: tensorflow 2.4.4 has requirement h5py~=2.10.0, but you'll have h5py 3.6.0 which is incompatible.
ERROR: tensorflow 2.4.4 has requirement six~=1.15.0, but you'll have six 1.14.0 which is incompatible.
ERROR: tensorflow 2.4.4 has requirement typing-extensions~=3.7.4, but you'll have typing-extensions 4.0.1 which is incompatible.
ERROR: paddle2onnx 0.9.0 has requirement onnx<=1.9.0, but you'll have onnx 1.10.2 which is incompatible.
ERROR: flask 2.0.2 has requirement Jinja2>=3.0, but you'll have jinja2 2.10.1 which is incompatible.
ERROR: transformers 4.15.0 has requirement tokenizers<0.11,>=0.10.1, but you'll have tokenizers 0.11.4 which is incompatible.
ERROR: pytorch-lightning 1.5.9 has requirement setuptools==59.5.0, but you'll have setuptools 60.5.0 which is incompatible.

I then started creating a Python program in my WSL2 Ubuntu machine (using Visual Studio Code) and I notice it points to an error on the following line of code that imports the notebook_utils:

import notebook_utils as utils
>> ERROR: Import "notebook_utils" could not be resolvedPylancereportMissingImports

I notice later in the program, the "utils" alias library is used in the following line of code:

player = utils.VideoPlayer(source=source, flip=flip, fps=30)

Later in the program, the "player" object is used in the following lines of code:

player.start()
...
frame = player.next()
...
player.stop()

Questions:

  1. Can the OpenVINO Notebook demos (like the "Live Object Detection with OpenVINO") run outside Jupyter Notebook as a regular python program?
  2. Can you please suggest me another library like notebook_utils that I can try in my program outside of Jupyter Notebook?

Thank you in advance for your support and will be waiting for your reply.

0 Kudos
1 Solution
Hairul_Intel
Moderator
335 Views

Hi RGVGreatCoder,

Thank you for reaching out to us.

 

I was able to install Jupyter Notebook and ran the Live Object Detection with OpenVINO using WSL2 Ubuntu 20.04 without error:

Inkedterminal_LI.jpgnotebook_output.png

 

Please ensure that you have followed the OpenVINO Notebook Ubuntu guide correctly especially concerning your Python virtual environment for the Jupyter Notebook installation.

 

Regarding your questions:

  1. The Jupyter Notebook App is a server-client application that allows editing and running notebook documents via a web browser. Thus, the notebook documents such as the "Live Object Detection with OpenVINO" can only be run inside of the Jupyter Notebook App and cannot be performed as a regular python program.
  2. The notebook_utils is used only inside of Jupyter Notebook app thus, there are no similar library available outside of the app.

 

I would recommend you to use the Object Detection demo from Open Model Zoo which is available in C++ and Python versions. The demos can be obtained from the Open Model Zoo GitHub repository in the open_model_zoo/demos/object_detection_demo/ directory.

 

For your information, Open Model Zoo demos doesn’t require Jupyter Notebook to run. You can follow this Getting Started with Demo script guide to give you a starting point for learning the OpenVINO™ workflow.

 

 

Regards,

Hairul

 

View solution in original post

2 Replies
Hairul_Intel
Moderator
336 Views

Hi RGVGreatCoder,

Thank you for reaching out to us.

 

I was able to install Jupyter Notebook and ran the Live Object Detection with OpenVINO using WSL2 Ubuntu 20.04 without error:

Inkedterminal_LI.jpgnotebook_output.png

 

Please ensure that you have followed the OpenVINO Notebook Ubuntu guide correctly especially concerning your Python virtual environment for the Jupyter Notebook installation.

 

Regarding your questions:

  1. The Jupyter Notebook App is a server-client application that allows editing and running notebook documents via a web browser. Thus, the notebook documents such as the "Live Object Detection with OpenVINO" can only be run inside of the Jupyter Notebook App and cannot be performed as a regular python program.
  2. The notebook_utils is used only inside of Jupyter Notebook app thus, there are no similar library available outside of the app.

 

I would recommend you to use the Object Detection demo from Open Model Zoo which is available in C++ and Python versions. The demos can be obtained from the Open Model Zoo GitHub repository in the open_model_zoo/demos/object_detection_demo/ directory.

 

For your information, Open Model Zoo demos doesn’t require Jupyter Notebook to run. You can follow this Getting Started with Demo script guide to give you a starting point for learning the OpenVINO™ workflow.

 

 

Regards,

Hairul

 

Hairul_Intel
Moderator
308 Views

Hi RGVGreatCoder,

This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Hairul


Reply