Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6402 Discussions

Failed to run Object Detection C++ Demo on Windows 10 & VS2019

RGVGreatCoder
Novice
1,785 Views

I want to run the Object Detection C++ Demo (https://docs.openvino.ai/2021.4/omz_demos_object_detection_demo_cpp.html) on a Windows 10 with VS2019 machine. I went through the steps but failed when executing "CMake" to build the demos, with an error that read:

"The source directory C:/Users/devel/source/repos/AIML/open_model_zoo/demos/thirdparty/gflagsdoes not contain a CMakeLists.txt file."

I opened the [...thirdparty/gflags] folder and it is empty. I cloned the open-model-zoo running "git clone -b 2022.1.0 https://github.com/openvinotoolkit/open_model_zoo.git

" and also downloading the "zipped" file from github and on both, that folder is empty. 

Following are the steps I performed:

C:\Users\devel\source\repos\AIML>python
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.5.5'
>>> quit()

C:\Users\devel\source\repos\AIML>git clone -b 2022.1.0 https://github.com/openvinotoolkit/open_model_zoo.git
Cloning into 'open_model_zoo'...
remote: Enumerating objects: 96248, done.
remote: Total 96248 (delta 0), reused 0 (delta 0), pack-reused 96248 eceiving objects: 100% (96248/96248), 280.90 MiB | Receiving objects: 100% (96248/96248), 281.37 MiB | 34.87 MiB/s, done.

Resolving deltas: 100% (65409/65409), done.
Note: switching to 'cf9003a95ddb742aabea341aa1573c3fa25ebbe1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (2576/2576), done.

C:\Users\devel\source\repos\AIML>md omzoo_odcpp_demo
C:\Users\devel\source\repos\AIML>cd omzoo_odcpp_demo

C:\Users\devel\source\repos\AIML\omzoo_odcpp_demo>"C:\Program Files (x86)\Intel\openvino_2022.1.0.643\setupvars.bat"
Python 3.9.7
[setupvars.bat] OpenVINO environment initialized

C:\Users\devel\source\repos\AIML\omzoo_odcpp_demo>cmake -A x64 c:\users\devel\source\repos\aiml\open_model_zoo\demos
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.29.30145.0
-- The CXX compiler identification is MSVC 19.29.30145.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7 (found suitable exact version "11.7")
-- Found OpenCV: C:/Users/devel/source/repos/AIML/opencv_cuda/opencv_455/build (found version "4.5.5") found components: core highgui videoio imgproc imgcodecs gapi
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:143 (add_subdirectory):
  The source directory

    C:/Users/devel/source/repos/AIML/open_model_zoo/demos/thirdparty/gflags

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "C:/Users/devel/source/repos/AIML/omzoo_odcpp_demo/CMakeFiles/CMakeOutput.log".
See also "C:/Users/devel/source/repos/AIML/omzoo_odcpp_demo/CMakeFiles/CMakeError.log".

Please let me know how to fix this issue.

Thank you and will be waiting for your reply.

PS. I have another case where I am also trying to run Object Detection Demo C++ but with Windows 11 and VS2022. I thought it would be better to create this separate case as I am using Windows 10 and VS2019.

0 Kudos
11 Replies
Wan_Intel
Moderator
1,739 Views

Hi RGVGreatCoder,

Thanks for reaching out to us.

For your information, you have to use the following command after git clone open model zoo:

git clone https://github.com/openvinotoolkit/open_model_zoo.git

cd open_model_zoo

git submodule update --init –recursive


After that, you can proceed to build the demo application. You may refer to here for more information.

 

 

Regards,

Wan


0 Kudos
RGVGreatCoder
Novice
1,718 Views

I performed those steps you mentioned above and I was able to run "CMake" with no issues. Then I was able to build the "Release" object_detection_demo with "CMake" as well and saw no errors as well. However, when I doubled clicked "object_detection_demo.exe" inside [C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release] folder, I got a System Error that read:

"The code execution cannot proceed because openvino.dll was not found. Reinstalling the program may fix this problem."

Following are the steps I performed:

C:\Users\devel\source\repos\AIML\omzoo_demos>"C:\Program Files (x86)\Intel\openvino_2022.1.0.643\setupvars.bat"
Python 3.9.7
[setupvars.bat] OpenVINO environment initialized

C:\Users\devel\source\repos\AIML\omzoo_demos>cmake -A x64 c:\users\devel\source\repos\aiml\open_model_zoo\demos
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.29.30145.0
-- The CXX compiler identification is MSVC 19.29.30145.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7 (found suitable exact version "11.7")
-- Found OpenCV: C:/Users/devel/source/repos/AIML/opencv_cuda/opencv_455/build (found version "4.5.5") found components: core highgui videoio imgproc imgcodecs gapi
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Found Threads: TRUE
-- Check size of __int32
-- Check size of __int32 - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/devel/source/repos/AIML/omzoo_demos

C:\Users\devel\source\repos\AIML\omzoo_demos>cmake --build . --config Release --target object_detection_demo
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/thirdparty/gflags/CMakeLists.txt
  gflags.cc
  gflags_reporting.cc
  gflags_completions.cc
  windows_port.cc
  Generating Code...
  gflags_nothreads_static.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\gflags_nothreads_stat
  ic.lib
  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/common/cpp/utils/CMakeLists.txt
  args_helper.cpp
  config_factory.cpp
  image_utils.cpp
  images_capture.cpp
  kuhn_munkres.cpp
  performance_metrics.cpp
  Generating Code...
  utils.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\utils.lib
  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/common/cpp/models/CMakeLists.txt
  associative_embedding_decoder.cpp
  classification_model.cpp
  deblurring_model.cpp
  detection_model.cpp
  detection_model_centernet.cpp
  detection_model_faceboxes.cpp
  detection_model_retinaface.cpp
  detection_model_retinaface_pt.cpp
  detection_model_ssd.cpp
  detection_model_yolo.cpp
  hpe_model_associative_embedding.cpp
  hpe_model_openpose.cpp
  image_model.cpp
  jpeg_restoration.cpp
  model_base.cpp
  openpose_decoder.cpp
  segmentation_model.cpp
  style_transfer_model.cpp
  super_resolution_model.cpp
  Generating Code...
  models.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\models.lib
  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/common/cpp/monitors/CMakeLists.txt
  cpu_monitor.cpp
  memory_monitor.cpp
  presenter.cpp
  query_wrapper.cpp
  Generating Code...
  monitors.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\monitors.lib
  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/common/cpp/pipelines/CMakeLists.txt
  async_pipeline.cpp
  requests_pool.cpp
  Generating Code...
  pipelines.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\pipelines.lib
  Building Custom Rule C:/Users/devel/source/repos/AIML/open_model_zoo/demos/object_detection_demo/cpp/CMakeLists.txt
  main.cpp
  object_detection_demo.vcxproj -> C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release\object_detection_demo.e
  xe

 These are the generated files in that folder:

Directory of C:\Users\devel\source\repos\AIML\omzoo_demos\intel64\Release

06/29/2022  11:40 PM    <DIR>          .
06/29/2022  11:40 PM    <DIR>          ..
06/29/2022  08:37 PM           665,492 gflags_nothreads_static.lib
06/29/2022  08:38 PM         4,440,490 models.lib
06/29/2022  08:38 PM           431,966 monitors.lib
06/29/2022  08:38 PM           449,536 object_detection_demo.exe
06/29/2022  08:38 PM           340,724 pipelines.lib
06/29/2022  08:37 PM         1,000,216 utils.lib
               6 File(s)      7,328,424 bytes
               2 Dir(s)  290,398,011,392 bytes free

And this is the popup System Error message:

RGVGreatCoder_0-1656564170379.png

Questions:

  1. Why am I getting this System Error message if I installed OpenVINO 2022.1.0 runtime/offline installer?
  2. How can I run (debug) the "object_detection_demo c++" project in Visual Studio 2019 in such a way I can set breakpoints in the source code to learn how it works (I will really appreciate detailed steps)? 

Thank you and will be waiting for your reply,

Manuel Hernandez

0 Kudos
Wan_Intel
Moderator
1,677 Views

Hi RGVGreatCoder,

Are you using a virtual environment on your machine? I recommend you use a virtual environment and see if the issue was able to resolve. Steps to create a Python virtual environment are available here.

 

 

Regards,

Wan

 

0 Kudos
RGVGreatCoder
Novice
1,663 Views

Please notice that I am trying to run the Object Detection C++ Demo program. I do not want anything to do with Python. So I am not sure creating a Python environment like you suggest is the solution.

 

So I tried applying steps in the following paragraph (from this page: Open Model Zoo Demos — OpenVINO™ documentation — Version(2022.1)

To debug or run the demos on Windows in Microsoft Visual Studio, make sure you have properly configured Debugging environment settings for the Debug and Release configurations. Set correct paths to the OpenCV libraries, and debug and release versions of the OpenVINO™ libraries. For example, for the Debug configuration, go to the project’s Configuration Properties to the Debugging category and set the PATH variable in the Environment field to the following:

PATH=<INSTALL_DIR>\runtime\bin\intel64\Debug;<INSTALL_DIR>\extras\opencv\bin;%PATH%

And after running debug of the "object_detection_demo" program within Visual Studio 2019, I now get the following error:

"The code execution cannot proceed because tbb_debug.dll was not found. Reinstalling the program may fix this problem."

 

So what I did is, I added to the "Path" system variable this value:
"C:\Program Files (x86)\Intel\openvino_2022.1.0.643\runtime\bin\intel64\Debug" and reboot the PC.

Then, I opened the "C:\Users\devel\source\repos\AIML\omzoo_demos\Demos.sln" with Visual Studio 2019 and then opened "object_detection\main.cpp" program.

I noticed the project configuration properties is already set as follows:

RGVGreatCoder_0-1656960206329.png

 

RGVGreatCoder_1-1656960259559.png

 

RGVGreatCoder_2-1656960322933.png

 

I hit F5 (Debug) and I get this error message now:

RGVGreatCoder_3-1656961027451.png

 

What configuration could I be missing?

 

Thank you and will be waiting for you reply,

 

 

 

0 Kudos
Wan_Intel
Moderator
1,646 Views

Hi RGVGreatCoder,

For your information, I was able to build and run Debug and Release application as shown as follows:

<path>\Desktop\open_model_zoo\demos>"<path>\openvino_2022\setupvars.bat"

Python 3.7.9

[setupvars.bat] OpenVINO environment initialized

 

<path>\Desktop\open_model_zoo\demos>cmake -A x64 "<path>\Desktop\open_model_zoo\demos"

-- Building for: Visual Studio 16 2019

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.

-- The C compiler identification is MSVC 19.29.30137.0

-- The CXX compiler identification is MSVC 19.29.30137.0

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found OpenCV: C:/Program Files (x86)/Intel/openvino_2022/extras/opencv (found version "4.5.5") found components: core highgui videoio imgproc imgcodecs gapi

-- Looking for pthread.h

-- Looking for pthread.h - not found

-- Found Threads: TRUE

-- Check size of __int32

-- Check size of __int32 - done

-- Configuring done

-- Generating done

-- Build files have been written to: <path>/Desktop/open_model_zoo/demos

 

<path>\Desktop\open_model_zoo\demos>cmake --build . --config Debug --target object_detection_

demo

Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

 

 Checking Build System

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/thirdparty/gflags/CMakeLists.txt

 gflags.cc

 gflags_reporting.cc

 gflags_completions.cc

 windows_port.cc

 Generating Code...

 gflags_nothreads_static.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\gflag

 s_nothreads_static_debug.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/utils/CMakeLists.txt

 args_helper.cpp

 config_factory.cpp

 image_utils.cpp

 images_capture.cpp

 kuhn_munkres.cpp

 performance_metrics.cpp

 Generating Code...

 utils.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\utils.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/models/CMakeLists.txt

 associative_embedding_decoder.cpp

 classification_model.cpp

 deblurring_model.cpp

 detection_model.cpp

 detection_model_centernet.cpp

 detection_model_faceboxes.cpp

 detection_model_retinaface.cpp

 detection_model_retinaface_pt.cpp

 detection_model_ssd.cpp

 detection_model_yolo.cpp

 hpe_model_associative_embedding.cpp

 hpe_model_openpose.cpp

 image_model.cpp

 jpeg_restoration.cpp

 model_base.cpp

 openpose_decoder.cpp

 segmentation_model.cpp

 style_transfer_model.cpp

 super_resolution_model.cpp

 Generating Code...

 models.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\models.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/monitors/CMakeLists.tx

 t

 cpu_monitor.cpp

 memory_monitor.cpp

 presenter.cpp

 query_wrapper.cpp

 Generating Code...

 monitors.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\monitors.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/pipelines/CMakeLists.t

 xt

 async_pipeline.cpp

 requests_pool.cpp

 Generating Code...

 pipelines.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\pipelines.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/object_detection_demo/cpp/CMakeLi

 sts.txt

 main.cpp

 object_detection_demo.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Debug\object_

 detection_demo.exe

 

<path>\Desktop\open_model_zoo\demos>cmake --build . --config Release --target object_detection_demo

Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

 

 Checking Build System

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/thirdparty/gflags/CMakeLists.txt

 gflags.cc

 gflags_reporting.cc

 gflags_completions.cc

 windows_port.cc

 Generating Code...

 gflags_nothreads_static.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\gfl

 ags_nothreads_static.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/utils/CMakeLists.txt

 args_helper.cpp

 config_factory.cpp

 image_utils.cpp

 images_capture.cpp

 kuhn_munkres.cpp

 performance_metrics.cpp

 Generating Code...

 utils.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\utils.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/models/CMakeLists.txt

 associative_embedding_decoder.cpp

 classification_model.cpp

 deblurring_model.cpp

 detection_model.cpp

 detection_model_centernet.cpp

 detection_model_faceboxes.cpp

 detection_model_retinaface.cpp

 detection_model_retinaface_pt.cpp

 detection_model_ssd.cpp

 detection_model_yolo.cpp

 hpe_model_associative_embedding.cpp

 hpe_model_openpose.cpp

 image_model.cpp

 jpeg_restoration.cpp

 model_base.cpp

 openpose_decoder.cpp

 segmentation_model.cpp

 style_transfer_model.cpp

 super_resolution_model.cpp

 Generating Code...

 models.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\models.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/monitors/CMakeLists.tx

 t

 cpu_monitor.cpp

 memory_monitor.cpp

 presenter.cpp

 query_wrapper.cpp

 Generating Code...

 monitors.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\monitors.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/common/cpp/pipelines/CMakeLists.t

 xt

 async_pipeline.cpp

 requests_pool.cpp

 Generating Code...

 pipelines.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\pipelines.lib

 Building Custom Rule <path>/Desktop/open_model_zoo/demos/object_detection_demo/cpp/CMakeLi

 sts.txt

 main.cpp

 object_detection_demo.vcxproj -> <path>\Desktop\open_model_zoo\demos\intel64\Release\objec

 t_detection_demo.exe

 

<path>\Desktop\open_model_zoo\demos>.\intel64\Debug\object_detection_demo.exe -h

 

object_detection_demo [OPTION]

Options:

 

   -h                       Print a usage message.

   -at "<type>"             Required. Architecture type: centernet, faceboxes, retinaface, retinaface-pytorch, ssd or yolo

   -i                       Required. An input to process. The input must be a single image, a folder of images, video file or camera id.

   -m "<path>"              Required. Path to an .xml file with a trained model.

   -o "<path>"              Optional. Name of the output file(s) to save.

   -limit "<num>"           Optional. Number of frames to store in output. If 0 is set, all frames are stored.

   -d "<device>"            Optional. Specify the target device to infer on (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. The demo will look for a suitable plugin for a specified device.

   -labels "<path>"         Optional. Path to a file with labels mapping.

   -layout "<string>"       Optional. Specify inputs layouts. Ex. NCHW or input0:NCHW,input1:NC in case of more than one input.

   -r                       Optional. Inference results as raw values.

   -t                       Optional. Probability threshold for detections.

   -iou_t                   Optional. Filtering intersection over union threshold for overlapping boxes.

   -auto_resize             Optional. Enables resizable input with support of ROI crop & auto resize.

   -nireq "<integer>"       Optional. Number of infer requests. If this option is omitted, number of infer requests is determined automatically.

   -nthreads "<integer>"    Optional. Number of threads.

   -nstreams                Optional. Number of streams to use for inference on the CPU or/and GPU in throughput mode (for HETERO and MULTI device cases use format <device1>:<nstreams1>,<device2>:<nstreams2> or just <nstreams>)

   -loop                    Optional. Enable reading the input in a loop.

   -no_show                 Optional. Don't show output.

   -output_resolution       Optional. Specify the maximum output window resolution in (width x height) format. Example: 1280x720. Input frame size used by default.

   -u                       Optional. List of monitors to show initially.

   -yolo_af                 Optional. Use advanced postprocessing/filtering algorithm for YOLO.

   -anchors                 Optional. A comma separated list of anchors. By default used default anchors for model. Only for YOLOV4 architecture type.

   -masks                   Optional. A comma separated list of mask for anchors. By default used default masks for model. Only for YOLOV4 architecture type.

   -reverse_input_channels  Optional. Switch the input channels order from BGR to RGB.

   -mean_values             Optional. Normalize input by subtracting the mean values per channel. Example: "255.0 255.0 255.0"

   -scale_values            Optional. Divide input by scale values per channel. Division is applied after mean values subtraction. Example: "255.0 255.0 255.0"

[E:] [BSL] found 0 ioexpander device

Available devices: CPU GNA GPU

 

<path>\Desktop\open_model_zoo\demos>.\intel64\Release\object_detection_demo.exe -h

 

object_detection_demo [OPTION]

Options:

 

   -h                       Print a usage message.

   -at "<type>"             Required. Architecture type: centernet, faceboxes, retinaface, retinaface-pytorch, ssd or yolo

   -i                       Required. An input to process. The input must be a single image, a folder of images, video file or camera id.

   -m "<path>"              Required. Path to an .xml file with a trained model.

   -o "<path>"              Optional. Name of the output file(s) to save.

   -limit "<num>"           Optional. Number of frames to store in output. If 0 is set, all frames are stored.

   -d "<device>"            Optional. Specify the target device to infer on (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. The demo will look for a suitable plugin for a specified device.

   -labels "<path>"         Optional. Path to a file with labels mapping.

   -layout "<string>"       Optional. Specify inputs layouts. Ex. NCHW or input0:NCHW,input1:NC in case of more than one input.

   -r                       Optional. Inference results as raw values.

   -t                       Optional. Probability threshold for detections.

   -iou_t                   Optional. Filtering intersection over union threshold for overlapping boxes.

   -auto_resize             Optional. Enables resizable input with support of ROI crop & auto resize.

   -nireq "<integer>"       Optional. Number of infer requests. If this option is omitted, number of infer requests is determined automatically.

   -nthreads "<integer>"    Optional. Number of threads.

   -nstreams                Optional. Number of streams to use for inference on the CPU or/and GPU in throughput mode (for HETERO and MULTI device cases use format <device1>:<nstreams1>,<device2>:<nstreams2> or just <nstreams>)

   -loop                    Optional. Enable reading the input in a loop.

   -no_show                 Optional. Don't show output.

   -output_resolution       Optional. Specify the maximum output window resolution in (width x height) format. Example: 1280x720. Input frame size used by default.

   -u                       Optional. List of monitors to show initially.

   -yolo_af                 Optional. Use advanced postprocessing/filtering algorithm for YOLO.

   -anchors                 Optional. A comma separated list of anchors. By default used default anchors for model. Only for YOLOV4 architecture type.

   -masks                   Optional. A comma separated list of mask for anchors. By default used default masks for model. Only for YOLOV4 architecture type.

   -reverse_input_channels  Optional. Switch the input channels order from BGR to RGB.

   -mean_values             Optional. Normalize input by subtracting the mean values per channel. Example: "255.0 255.0 255.0"

   -scale_values            Optional. Divide input by scale values per channel. Division is applied after mean values subtraction. Example: "255.0 255.0 255.0"

[E:] [BSL] found 0 ioexpander device

Available devices: CPU GNA GPU

 

 

I recommend you uninstalling the Intel® Distribution of OpenVINO™ Toolkit and Install the Intel® Distribution of OpenVINO™ toolkit Core Components again.

 

Next, please refer to Use breakpoints in the Visual Studio debugger to set breakpoint in source code.

 

 

Regards,

Wan

 

0 Kudos
RGVGreatCoder
Novice
1,623 Views

I followed your steps above and it worked when I ran "object_detection_demo -h" for both, "Debug" and "Release" from the command prompt. For either version it displayed the options list. Awesome!!

However, when I double click "object_detection_demo.exe" from Windows File Explorer for "Debug" version, I get a popup error message that reads:
"The code execution cannot proceed because tbb_debug.dll was not found. Reinstalling the program may fix this problem.
Below is the screenshot:

RGVGreatCoder_0-1657063405777.png

And, when I double click "object_detection_demo.exe" from Windows File Explorer for "Release" version, I get a popup error message that reads:

"The code execution cannot proceed because openvino.dll was not found. Reinstalling the program may fix this problem."
Below is the screenshot:

RGVGreatCoder_1-1657064031706.png

Interesting enough, when I close the command prompt and, I do not run "C:\Program Files (x86)\Intel\openvino_2022.1.0.643\setupvars.bat" (from the command prompt) before running "object_detection_demo -h", I get the same popup error messages. 

Do you have any hints on how to prevent these error messages?

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

 

0 Kudos
Wan_Intel
Moderator
1,611 Views

Hi RGVGreatCoder,

You must update environment variables before you can run OpenVINO™ applications. Therefore, you must set environment variables with the following command in command prompt:

"<INSTALL_DIR>\setupvars.bat"

 

For more information, please refer to Step 2: Configure the Environment in Install and Configure Intel® Distribution of OpenVINO™ toolkit for Windows 10.

 

 

Regards,

Wan


0 Kudos
RGVGreatCoder
Novice
1,600 Views

I know it works when I run "<INSTALL_DIR>\setupvars.bat" before running "<INSTALLED PATH>\intel64\Debug\object_detection_demo.exe -h" through the command prompt.

However, when I hit F5 (or click [Local Windows Debugger]) for "...\demos\object_detection_demo\main.cpp" in Visual Studio 2019, I get the following error:

"The code execution cannot proceed because tbb_debug.dll was not found. Reinstalling the program may fix this problem.
Below is the screenshot:

RGVGreatCoder_0-1657133229475.png

 

Questions:

  1. When I hit F5 (or click [Local Windows Debugger]) for "...\demos\object_detection_demo\main.cpp" in Visual Studio 2019, shouldn't it open a console window displaying "[ERROR] Parameter -i is not set", since I am not providing any parameter value?
  2. Any idea on how to run "<INSTALL_DIR>\setupvars.bat" when debugging this demo in Visual Studio 2019?
  3. What is the suggested approach to run/debug this demo in Visual Studio 2019 (detailed steps are appreciated)?


Thank you and will be waiting for your reply,

0 Kudos
RGVGreatCoder
Novice
1,562 Views

Please, please, please, support!

Can I get answers to my three questions above? 

0 Kudos
Wan_Intel
Moderator
1,516 Views

Hi RGVGreatCoder,

Referring to Step 2: Configure the Environment in Install and Configure Intel® Distribution of OpenVINO™ toolkit for Windows 10. You must update environment variables before you can run OpenVINO™ applications. Therefore, you must set environment variables with the following command in command prompt:

"<INSTALL_DIR>\setupvars.bat"

 

On another note, you may refer to Automate the setvars.bat Script with Microsoft Visual Studio to run the setupvars.bat script when Microsoft Visual Studio is started. To learn how to run or debug an application in Visual Studio 2019, I recommend you refer to Learn to code in Visual Studio and you can ask related question here.

 

 

Regards,

Wan


0 Kudos
Wan_Intel
Moderator
1,490 Views

Hi RGVGreatCoder,

Thanks for your question.

This thread will no longer be monitored since we have provided suggestions. 

If you need any additional information from Intel, please submit a new question.

 

 

Best regards,

Wan


0 Kudos
Reply