Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1638 Discussions

Demos not working

Ibrahim__Aya
Beginner
1,394 Views

Hello,

Following the Workshop held this week, I tried to use the demos on the cloud. 

To do so, I started with running the verification samples but this didn't work on the cloud:

uxxx@s001-n221:~$ /opt/intel/openvino/deployment_tools/demo/demo_squeezenet_download_convert_run.sh -d CPU
target = CPU
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized


###################################################

Downloading the Caffe model and the prototxt
Installing dependencies
Run sudo -E apt -y install build-essential python3-pip virtualenv cmake libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libswscale-dev libavcodec-dev libavformat-dev libgstreamer1.0-0 gstreamer1.0-plugins-base
Dear User,

this server does not allow you to run "sudo".

If you need to install a dependency, please put it in your home directory.
* For autotools, you can do it with "./configure --prefix=~/my-path"
* For Python packages, use "pip install <package_name> --user" or create a Conda environment.

Sincerely,
Admins
Error on or near line 122; exiting with status 1

So, next, I tried to manual set up the samples as following:

/opt/intel/openvino/deployment_tools/inference_engine/demos/build_demos.sh

This created a demo directory in my home. I tried the ./interactive_face_detection_demo but produces the following error:

uxxxx@s001-n221:~/omz_demos_build/intel64/Release$ ./interactive_face_detection_demo -i ~/sitting-on-car.jpg -m intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -d CPU -l /opt/intel/openvino/inference_engine/lib/intel64/libcpu_extension_sse4.so -o results
InferenceEngine:
        API version ............ 2.1
        Build .................. custom_releases/2019/R3_cb6cad9663aea3d282e0e8b3e0bf359df665d5d0
        Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Reading input
[ WARN:0] global /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/videoio/src/cap_gstreamer.cpp (1498) open OpenCV | GStreamer warning: OpenCV backend does not support this file type (extension): results
[ WARN:0] global /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/videoio/src/cap_gstreamer.cpp (1272) close_ OpenCV | GStreamer warning: No source in GStreamer pipeline. Ignore
[ERROR:0] global /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/videoio/src/cap.cpp (392) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.1.2-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/videoio/src/cap_images.cpp:253: error:(-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): results in function 'icvExtractPattern'


[ INFO ] Loading device CPU
        CPU
        MKLDNNPlugin version ......... 2.1
        Build ........... 30677

[ INFO ] CPU Extension loaded: /opt/intel/openvino/inference_engine/lib/intel64/libcpu_extension_sse4.so
[ INFO ] Loading network files for Face Detection
[ INFO ] Batch size is set to 1
[ INFO ] Checking Face Detection network inputs
[ INFO ] Checking Face Detection network outputs
[ INFO ] Loading Face Detection model to the CPU device
[ INFO ] Age/Gender DISABLED
[ INFO ] Head Pose DISABLED
[ INFO ] Emotions Recognition DISABLED
[ INFO ] Facial Landmarks DISABLED
[ INFO ] Start inference
To close the application, press 'CTRL+C' here or switch to the output window and press any key
Unable to init server: Could not connect: Connection refused

(interactive_face_detection_demo:68078): Gtk-WARNING **: 10:31:45.486: cannot open display:

0 Kudos
4 Replies
Andrey_Vladimirov
New Contributor III
1,394 Views

Instead of the default samples, please use the samples included in your DevCloud account.  You can find the samples here: https://devcloud.intel.com/edge/advanced/sample_applications/

The default samples included with OpenVINO require root privileges, which is not possible in the DevCloud environment. Furthermore, the default samples assume that you have compute devices attached to the local host, which is not the case: in the DevCloud, you have to submit a job to the queue to get access to edge inference devices. In contrast, the samples at the above URL are adapted for the DevCloud environment and have integrated job submission facilities.

0 Kudos
Ibrahim__Aya
Beginner
1,394 Views

Hi,

thanks, but the point is I couldn't find the human-pose sample in the advanced samples. Any suggestion on how to get default samples to work on cloud, please?

0 Kudos
Andrey_Vladimirov
New Contributor III
1,394 Views

You would need to study and tweaks the shell scripts that run the OpenVINO sample. In particular,

  • remove all the commands related to package installation (most dependencies are already installed),
  • tweak the model downloader command to operate in your home folder (follow a DevCloud sample) and
  • submit your script to an edge node via the queue with the "qsub" command (again, you follow the samples). 

We are also adding samples as we go. 

0 Kudos
Ibrahim__Aya
Beginner
1,394 Views

Hi Andrey Vladimirov,

Thanks. I have analyzed the problem further and resolved it. I would like to share my findings with the community here:

  1. The default samples included with OpenVINO DO NOT require root privileges so you can run them in the DevCloud environment. You do not need to run the verification samples as they are probably already run during the toolkit installation. 
  2. You first need to build the executable files. Here is how to build them:
    cd /opt/intel/openvino/deployment_tools/inference_engine/demos
    ./build_demos.sh
  3. The errors encountered are resolved by command line modification:
  • (interactive_face_detection_demo:68078): Gtk-WARNING **: 10:31:45.486: cannot open display:
    • This is due to not being able to access the server display so can easily be overcome by adding -no_show to the command line. This avoids calling the cv::imshow function (see the code below from main.cpp)
      if (!FLAGS_no_show) {
                          cv::imshow("Detection results", prev_frame);
                      }
      
  • CAP_IMAGES: can't find starting number (in the name of file): results in function 'icvExtractPattern'
    • This is solved by changing the -o argument in the command line.
    • The output argument represents different things in the default samples and the DevCloud reference samples.
      // Default samples
      if (!FLAGS_o.empty()) {
                  videoWriter.open(FLAGS_o, cv::VideoWriter::fourcc('I', 'Y', 'U', 'V'), 25, cv::Size(width, height));
              }
      
      //DevCloud Ref samples
      if (!FLAGS_o.empty()) {
                  videoWriter.open(FLAGS_o+"/output.mp4", cv::VideoWriter::fourcc('A','V','C','1'), 25, cv::Size(width, height), true);
              }

      So in the default sample, you need to provide the output file name-- not directory. Another difference that is more challenging is the CODEC used. The codec seems to restrict the extension of the output file. For example, if you use -o out.mp4, get the below error.

    • OpenCV: FFMPEG: tag 0x56555949/'IYUV' is not supported with codec id 14 and format 'mp4 / MP4 (MPEG-4 Part 14)'

    • While I wasn't able to figure out which file type is handled by the (IYUV) codec, I managed to get the output streamed within an AVI container after some failures with jpg, mp4, etc. 

The issue is resolved but I would be grateful if someone could help with more details about the codec and file extensions. 

Successful results below:

./omz_demos_build/intel64/Release/interactive_face_detection_demo -i sitting-on-car.jpg -m intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -no_show -o out.avi
InferenceEngine:
        API version ............ 2.1
        Build .................. custom_releases/2019/R3_cb6cad9663aea3d282e0e8b3e0bf359df665d5d0
        Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Reading input
[ INFO ] Loading device CPU
        CPU
        MKLDNNPlugin version ......... 2.1
        Build ........... 30677

[ INFO ] Loading network files for Face Detection
[ INFO ] Batch size is set to 1
[ INFO ] Checking Face Detection network inputs
[ INFO ] Checking Face Detection network outputs
[ INFO ] Loading Face Detection model to the CPU device
[ INFO ] Age/Gender DISABLED
[ INFO ] Head Pose DISABLED
[ INFO ] Emotions Recognition DISABLED
[ INFO ] Facial Landmarks DISABLED
[ INFO ] Start inference
To close the application, press 'CTRL+C' here
[ INFO ] Number of processed frames: 1
[ INFO ] Total image throughput: 121.671 fps
[ INFO ] Execution successful

 



 

0 Kudos
Reply