Closed Harishrelysys closed 4 years ago
Hi @Harishrelysys,
Can you provide more information about the system you're running on? Are you running OpenVINO inside a docker container?
I'm sorry I don't have a MYRIAD at hand but tried running on GPU and CPU and I don't get that error. Tomorrow I'll have a MYRIAD with me and I will try to reproduce the error.
Remember that OpenVINO only runs on intel hw. The other models are being loaded by default on the CPU, even though they may not be in use. Probably that's breaking things for you. Quick fix would be going to custom_flags.hpp and replace every "CPU" with "MYRIAD".
Please let us know how things go so we can further help you.
Cheers!
Hi @HernanG234, I made the changes what you told and compiled the application.I am getting the below error
/// \brief target device for face detection <br>
DEFINE_string(d, "MYRIAD", target_device_message);
/// \brief target device for AgeGender net <br>
DEFINE_string(d_ag, "MYRIAD", target_device_message_ag);
/// \brief target device for HeadPose net <br>
DEFINE_string(d_hp, "MYRIAD", target_device_message_hp);
/// \brief target device for Emotions net <br>
DEFINE_string(d_em, "MYRIAD", target_device_message_em);
/// \brief target device for Facial Landmarks net <br>
DEFINE_string(d_lm, "MYRIAD", target_device_message_lm);
/// \brief target device for Facial Landmarks net <br>
DEFINE_string(d_reid, "MYRIAD", target_device_message_lm);
./driver_behavior -m ~/models/face-detection-adas-0001/face-detection-adas-0001-fp16.xml -d MYRIAD -i ../../../data/video1.mp4
InferenceEngine:
API version ............ 2.0
Build .................. custom_2019_ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf
Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Reading input
[ INFO ] Loading plugin MYRIAD
/home/root/models/FP32/face-reidentification-retail-0095-fp16.xml
Warning: face reid gallery is empty!
[ INFO ] Loading network files for Face Detection
[ INFO ] Batch size is set to 1
[ INFO ] Checking Face Detection inputs
[ INFO ] Checking Face Detection outputs
[ INFO ] Loading Face Detection model to the MYRIAD plugin
[ INFO ] Head Pose DISABLED
[ INFO ] Start inference
Press any key to stop
terminate called after throwing an instance of 'InferenceEngine::details::InferenceEngineException'
what(): Dynamic batch is not supported
Aborted
Thank you,
Hi @HernanG234, I am not seeing this error when i am giving input as image
./driver_behavior -m ~/models/face-detection-adas-0001/face-detection-adas-0001-fp16.xml -d MYRIAD -i ../../../data/img_1.jpg
InferenceEngine: API version ............ 2.0 Build .................. custom_2019_ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf Description ....... API [ INFO ] Parsing input parameters [ INFO ] Reading input [ INFO ] Loading plugin MYRIAD /home/root/models/FP32/face-reidentification-retail-0095-fp16.xml Warning: face reid gallery is empty! [ INFO ] Loading network files for Face Detection [ INFO ] Batch size is set to 1 [ INFO ] Checking Face Detection inputs [ INFO ] Checking Face Detection outputs [ INFO ] Loading Face Detection model to the MYRIAD plugin [ INFO ] Start inference Press any key to stop [ INFO ] Head Pose DISABLED [ INFO ] Number of processed frames: 1 [ INFO ] Total image throughput: 4901.96 fps [ INFO ] Execution successful
But when I give input as video or my camera I am getting this error
InferenceEngine: API version ............ 2.0 Build .................. custom_2019_ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf Description ....... API [ INFO ] Parsing input parameters [ INFO ] Reading input [ INFO ] Loading plugin MYRIAD /home/root/models/FP32/face-reidentification-retail-0095-fp16.xml Warning: face reid gallery is empty! [ INFO ] Loading network files for Face Detection [ INFO ] Batch size is set to 1 [ INFO ] Checking Face Detection inputs [ INFO ] Checking Face Detection outputs [ INFO ] Loading Face Detection model to the MYRIAD plugin [ INFO ] Head Pose DISABLED [ INFO ] Start inference Press any key to stop terminate called after throwing an instance of 'InferenceEngine::details::InferenceEngineException' what(): Dynamic batch is not supported Aborted
More Information about my hardware
Processor : Renesas (RZG1H) opencv_version : 4.1.1 kernel : 4.4.138 architecture : armv7 hf
Hi @Harishrelysys,
That's a reasonable output. The problem is that the MYRIAD doesn't support dynamic batching. When processing only 1 image, you don't do dynamic batching. We just added a new flag that overrides this on the model loading. We also added another flag to set every device on the myriad so you don't have to make those changes manually again :).
Remember to git pull or rebase!
You can now run:
./driver_behavior -m ~/models/face-detection-adas-0001/face-detection-adas-0001-fp16.xml -d_all MYRIAD -i ../../../data/video1.mp4 -no_async
Let us know how it turns out!
Cheers
Hi @HernanG234 Thanks for your update it is working fine now but when I run head position checking thing I am getting below error
InferenceEngine: API version ............ 2.0 Build .................. custom_2019_ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf Description ....... API [ INFO ] Parsing input parameters [ INFO ] Reading input [ WARN:0] global /usr/src/debug/opencv/4.1.1-r0/git/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1 [ INFO ] Loading plugin MYRIAD /home/root/models/FP32/face-reidentification-retail-0095-fp16.xml Warning: face reid gallery is empty! [ INFO ] Loading network files for Face Detection [ INFO ] Batch size is set to 1 [ INFO ] Checking Face Detection inputs [ INFO ] Checking Face Detection outputs [ INFO ] Loading Face Detection model to the MYRIAD plugin [ INFO ] Loading network files for Head Pose detection [ INFO ] Batch size is set to 16 for Head Pose Network [ INFO ] Checking Head Pose Network inputs [ INFO ] Checking Head Pose network outputs [ INFO ] Loading Head Pose model to the MYRIAD plugin [ INFO ] Start inference Press any key to stop
(driver_behavior:2194): Gdk-CRITICAL **: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed [ ERROR ] OpenCV(4.1.1) /usr/src/debug/opencv/4.1.1-r0/git/modules/imgproc/src/resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
./driver_behavior -m ~/models/face-detection-adas-0001/face-detection-adas-0001-fp16.xml -m_hp ~/models/head-pose-estimation-adas-0001/head-pose-estimation-adas-0001-fp16.xml -d_all MYRIAD -i cam -no_async
And also the drowsiness detection will give segmentation fault after some time
InferenceEngine: API version ............ 2.0 Build .................. custom_2019_ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf Description ....... API [ INFO ] Parsing input parameters [ INFO ] Reading input [ WARN:0] global /usr/src/debug/opencv/4.1.1-r0/git/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1 [ INFO ] Loading plugin MYRIAD /home/root/models/FP32/face-reidentification-retail-0095-fp16.xml Warning: face reid gallery is empty! [ INFO ] Loading network files for Face Detection [ INFO ] Batch size is set to 1 [ INFO ] Checking Face Detection inputs [ INFO ] Checking Face Detection outputs [ INFO ] Loading Face Detection model to the MYRIAD plugin [ INFO ] Head Pose DISABLED [ INFO ] Start inference Press any key to stop
(driver_behavior:2510): Gdk-CRITICAL **: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed
(driver_behavior:2510): Gtk-WARNING **: Allocating size to GtkWindow 0x4955280 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? Segmentation fault
And I want to know how to run only inference part on MYRIAD and rest part in my arm CPU.Because my arm CPU is also octo core this may speed up the things.
Thank you,
Hey @Harishrelysys,
I'm not able to reproduce that error, and it seems to be a gstreamer problem (opencv uses it as backend to control the devices). Try with another camera if possible.
You're only running the inference on the MYRIAD, the rest is a normal process being run on the CPU. The MYRIAD is not really fast, it's probably a bottleneck if you're running so many models into it. But you have no other choice as you're running on arm and not on x86.
Let us know if you can debug it and we'll add it to our FAQ or if there's anything else we could help you with.
Cheers
Hi @HernanG234 , I am facing the same issue when I change camera.
@HernanG234 i have a problem when i execute ./driver_behavior -m $face132 -i ../../../data/img_1.jpg
output: InferenceEngine: API version ............ 2.1 Build .................. 2020.4.0-359-21e092122f4-releases/2020/4 Description ....... API [ INFO ] Parsing input parameters [ INFO ] Reading input [ INFO ] Loading plugin CPU /home/ai-team/OpenVino-Driver-Behaviour/OpenVino-Driver-Behaviour/scripts/../models/FP32/face-reidentification-retail-0095.xml Warning: face reid gallery is empty! [ INFO ] Loading network files for Face Detection [ INFO ] Batch size is set to 1 [ ERROR ] Could not allocate memory
Hi HernanG234 , I am trying to run compile your application in my arm board I am able to compile it. But while running the application I am getting the below error
error:
I am using intel NCS stick2 on my board usb and I had installed openvino also
Command I am using
Command:
./driver_behavior -m ../../../../models/face-detection-adas-0001/face-detection-adas-0001-fp16.xml -d MYRIAD