- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I successfully ran the "Object Detection Python Demo", on a video I took running an IR model I also created (based on YoloV4-tiny model) on Windows 11, through Visual Studio 2022 Community, after:
- Installing Python 3.9.x
- Installing OpenVINO Developer toolkit through PIP
- Git clone https://github.com/openvinotoolkit/open_model_zoo.git
- Created a Python project and imported the libraries in "\open_model_zoo\demos\common\python"
However, I don't know how to run the "Object Detection C++ Demo". This is the link I am referring to: Object Detection C++ Demo — OpenVINO™ documentation — Version(2021.4)
I setup OpenCV in my Windows 11 machine, edited the windows "path" variable in "Environment Variables" and, setup the project properties, under "Configuration Properties\C/C++\General" and "Configuration Properties\Linker\General" and "Configuration Properties\Linker\Input. I notice Visual Studio 2022 no longer flags the lines of code (in the "main.cpp" file) that refer to the object variable named "cv::". But I notice I still need to resolve the following issues:
- #include <gflags/gflags.h>
Issue: Cannot open source file "gflags/gflags.h" - DEFINE_INPUT_FLAGS
DEFINE_OUTPUT_FLAGS - DEFINE_bool(..., DEFINE_string(..., DEFINE_double(...
- conf << ...
Issue: this declaration has no storage class or type specifier - cv::putText(outputImg...
Issue: Input image is stored inside metadata...
Issue: Identifier "outputImg" is undefined - std::unique_ptr<ModelBase>
- ... and so on ...
Are there some setup steps I need to run before running the "Object Detection C++ Demo" main.cpp program? What am I missing?
Thank you and will be waiting for your reply,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello RGVGreatCoder,
Thank you for reaching out to us.
Before running the Object Detection C++ demo in the Intel® Distribution of OpenVINO™ toolkit, the demo needs to be compiled. There is an automated script to compile all the demos.
If you are using OpenVINO 2022.1 version, here are the steps to compile the demos:
1. Clone the Open Model Zoo GitHub repository.
- git clone https://github.com/openvinotoolkit/open_model_zoo.git
- cd open_model_zoo
- git submodule update --init --recursive
2. To build the demo applications for Windows, go to the directory with the build_demos_msvc.bat batch file and run it:
- cd \<download_directory>\open_model_zoo\demos
- build_demos_msvc.bat
If you are using OpenVINO 2021.4 version, here are the steps to compile the demos:
1. Clone the Open Model Zoo GitHub repository.
- git clone -b 2021.4.2 https://github.com/openvinotoolkit/open_model_zoo.git
2. To build the demo applications for Windows, go to the directory with the build_demos_msvc.bat batch file and run it:
- cd \<download_directory>\open_model_zoo\demos
- build_demos_msvc.bat
The demo applications binaries are in the C:\Users\<username>\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release directory.
You can visit Build the Demos Applications on Microsoft Windows OS for more information on Open Model Zoo demos.
Sincerely,
Zulkifli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran the steps for OpenVINO 2022.1 (that is the version I have) encountering an error, as follows:
C:\Users\manue\source\repos\AI-Machine-Learning>cd open_model_zoo
C:\Users\manue\source\repos\AI-Machine-Learning\open_model_zoo>git submodule update --init --recursive
C:\Users\manue\source\repos\AI-Machine-Learning\open_model_zoo>cd demos
C:\Users\manue\source\repos\AI-Machine-Learning\open_model_zoo\demos>build_demos_msvc.bat
Failed to set the environment variables automatically
To fix, run the following command: <INSTALL_DIR>\bin\setupvars.bat
where INSTALL_DIR is the OpenVINO installation directory.
Error
I don't know where the <INSTALL_DIR> (installed directory) of OpenVINO is located since I installed it using PIP.
Please let me know what to do next.
Thank you and will be waiting for your reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello RGVGreatCoder,
Installing Openvino via pip is targeted at Python developers. The build_demos_msvc.bat file compiles the CPP demos and it requires installation using the offline/online runtime installer.
To build the demos, you need to source OpenVINO™ and OpenCV environment. You can install the OpenVINO™ toolkit using the installation package for Intel® Distribution of OpenVINO™ toolkit or build the open-source version available in the OpenVINO GitHub repository using the build instructions. For the Intel® Distribution of OpenVINO™ toolkit installed to the <INSTALL_DIR> directory on your machine, run the following commands to download prebuilt OpenCV and set environment variables before building the demos.
For more info, please refer to Build the Demo Applications.
Sincerely,
Zulkifli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello RGVGreatCoder,
Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.
Sincerely,
Zulkifli
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page