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.
6405 Discussions

Can't run object_detection_demo.py on CPU/GPU

anuragrawal
Beginner
763 Views

Hi,

 

I am following this tutorial to run object detection: https://docs.openvino.ai/2024/omz_demos_object_detection_demo_python.html

 

I am not sure what's wrong but I get an error if I run this on CPU or GPU.

openvino version: 2024.0.0

Getting this error for CPU:

python3 object_detection_demo.py -d CPU -i input_video.mp4 -m /home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/public/retinaface-resnet50-pytorch/FP32/retinaface-resnet50-pytorch.xml -at retinaface-pytorch
[ INFO ] OpenVINO Runtime
[ INFO ] build: 2024.0.0-14509-34caeefd078-releases/2024/0
[ INFO ] Reading model /home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/public/retinaface-resnet50-pytorch/FP32/retinaface-resnet50-pytorch.xml
[ WARNING ] The parameter "input_size" not found in RetinaFace-PyTorch wrapper, will be omitted
[ WARNING ] The parameter "num_classes" not found in RetinaFace-PyTorch wrapper, will be omitted
[ INFO ] Input layer: data, shape: [1, 3, 640, 640], precision: f32, layout: NCHW
[ INFO ] Output layer: face_rpn_bbox_pred, shape: [1, 16800, 4], precision: f32, layout:
[ INFO ] Output layer: face_rpn_cls_prob, shape: [1, 16800, 2], precision: f32, layout:
[ INFO ] Output layer: face_rpn_landmark_pred, shape: [1, 16800, 10], precision: f32, layout:
Traceback (most recent call last):
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py", line 305, in
sys.exit(main() or 0)
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py", line 190, in main
detector_pipeline = AsyncPipeline(model)
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/pipelines/async_pipeline.py", line 86, in init
self.model.load()
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/models/model.py", line 263, in load
self.model_adapter.load_model()
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/adapters/openvino_adapter.py", line 65, in load_model
self.compiled_model = self.core.compile_model(self.model, self.device, self.plugin_config)
File "/home/anurag/Work/FaceRedaction/openvino_test/openvino_env/lib/python3.10/site-packages/openvino/runtime/ie_api.py", line 515, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src/inference/src/cpp/core.cpp:106:
Exception from src/inference/src/dev/plugin.cpp:54:
Exception from src/plugins/intel_cpu/src/config.cpp:361:
NotFound: Unsupported property CPU_BIND_THREAD by CPU plugin.

Getting this error for GPU:

python3 object_detection_demo.py -d GPU -i input_video.mp4 -m /home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/public/retinaface-resnet50-pytorch/FP32/retinaface-resnet50-pytorch.xml -at retinaface-pytorch
[ INFO ] OpenVINO Runtime
[ INFO ] build: 2024.0.0-14509-34caeefd078-releases/2024/0
[ INFO ] Reading model /home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/public/retinaface-resnet50-pytorch/FP32/retinaface-resnet50-pytorch.xml
[ WARNING ] The parameter "input_size" not found in RetinaFace-PyTorch wrapper, will be omitted
[ WARNING ] The parameter "num_classes" not found in RetinaFace-PyTorch wrapper, will be omitted
[ INFO ] Input layer: data, shape: [1, 3, 640, 640], precision: f32, layout: NCHW
[ INFO ] Output layer: face_rpn_bbox_pred, shape: [1, 16800, 4], precision: f32, layout:
[ INFO ] Output layer: face_rpn_cls_prob, shape: [1, 16800, 2], precision: f32, layout:
[ INFO ] Output layer: face_rpn_landmark_pred, shape: [1, 16800, 10], precision: f32, layout:
Traceback (most recent call last):
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py", line 305, in
sys.exit(main() or 0)
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py", line 190, in main
detector_pipeline = AsyncPipeline(model)
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/pipelines/async_pipeline.py", line 86, in init
self.model.load()
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/models/model.py", line 263, in load
self.model_adapter.load_model()
File "/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/adapters/openvino_adapter.py", line 65, in load_model
self.compiled_model = self.core.compile_model(self.model, self.device, self.plugin_config)
File "/home/anurag/Work/FaceRedaction/openvino_test/openvino_env/lib/python3.10/site-packages/openvino/runtime/ie_api.py", line 515, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src/inference/src/cpp/core.cpp:106:
Exception from src/inference/src/dev/plugin.cpp:54:
Check 'supported' failed at src/plugins/intel_gpu/src/runtime/execution_config.cpp:110:
[GPU] Attempt to set user property GPU_THROUGHPUT_STREAMS (GPU_THROUGHPUT_AUTO) which was not registered or internal!

 

I have tried multiple models but I want to run retinaface-resnet50-pytorch. Can someone help me?

Labels (3)
0 Kudos
5 Replies
Hairul_Intel
Moderator
731 Views

Hi anuragrawal,

Thank you for reaching out to us.

 

We've replicated the issue and faced similar error message when using both CPU and GPU device. The current workaround for this issue is to run the demo with -d AUTO parameter.

 

I've escalated this issue to the relevant teams for further investigation and will update you as soon as possible.

 

 

Regards,

Hairul


0 Kudos
anuragrawal
Beginner
722 Views

Thanks @Hairul_Intel ! Workaround worked for me. Please let me know when you have the fix.

0 Kudos
anuragrawal
Beginner
624 Views

@Hairul_Intel, do you have an update for me?

0 Kudos
Peh_Intel
Moderator
430 Views

Hi anuragrawal,

 

We found that the async_pipeline.py script may miss explicit device/AUTO selection, which may confuse API.

 

I attached a zip file which contains the modified async_pipeline.py script here. 

 

Download the async_pipeline.py script and replace it in the directory below and re-run the Object Detection demo.

/home/anurag/Work/FaceRedaction/openvino_test/open_model_zoo/demos/common/python/model_zoo/model_api/pipelines

 

 

Regards,

Peh

0 Kudos
Peh_Intel
Moderator
263 Views

Hi anuragrawal,

 

This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question. 

 

 

Regards,

Peh

0 Kudos
Reply