Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

Taking forever to load model on GPU

TarunM
Beginner
298 Views

Program hangs to load model onto integrated GPU.

 

GPU description is:-

spci -nn -s 0:002.0
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:9a60] (rev 01)

 

Program Output is:-

sudo ./demo_security_barrier_camera.sh -d GPU
target = GPU
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [551 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1298 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [867 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [642 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [362 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.4 kB]
Fetched 4342 kB in 2s (2418 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
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

Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.16.3-1ubuntu1).
libcairo2-dev is already the newest version (1.16.0-4ubuntu1).
libgstreamer1.0-0 is already the newest version (1.16.2-2).
libpango1.0-dev is already the newest version (1.44.7-2ubuntu4).
libgtk2.0-dev is already the newest version (2.24.32-4ubuntu4).
build-essential is already the newest version (12.8ubuntu1.1).
gstreamer1.0-plugins-base is already the newest version (1.16.2-4ubuntu0.1).
libglib2.0-dev is already the newest version (2.64.6-1~ubuntu20.04.4).
libavcodec-dev is already the newest version (7:4.2.4-1ubuntu0.1).
libavformat-dev is already the newest version (7:4.2.4-1ubuntu0.1).
libswscale-dev is already the newest version (7:4.2.4-1ubuntu0.1).
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
virtualenv is already the newest version (20.0.17-1ubuntu0.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpng-dev is already the newest version (1.6.37-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already satisfied: pyyaml>=5.4.1 in /usr/local/lib/python3.8/dist-packages (from -r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 1)) (6.0)
Requirement already satisfied: requests>=2.25.1 in /usr/local/lib/python3.8/dist-packages (from -r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.26.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2019.11.28)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.8/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.0.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.25.1->-r /opt/intel/openvino_2021.4.689/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (1.26.7)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[setupvars.sh] OpenVINO environment initialized


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

Downloading Intel models

target_precision = FP16
Run python3 /opt/intel/openvino_2021.4.689/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name vehicle-license-plate-detection-barrier-0106 --output_dir /root/openvino_models/ir --cache_dir /root/openvino_models/cache

################|| Downloading vehicle-license-plate-detection-barrier-0106 ||################

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16-INT8/vehicle-license-plate-detection-barrier-0106.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16-INT8/vehicle-license-plate-detection-barrier-0106.bin from the cache

Run python3 /opt/intel/openvino_2021.4.689/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name license-plate-recognition-barrier-0001 --output_dir /root/openvino_models/ir --cache_dir /root/openvino_models/cache

################|| Downloading license-plate-recognition-barrier-0001 ||################

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP32/license-plate-recognition-barrier-0001.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP32/license-plate-recognition-barrier-0001.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16-INT8/license-plate-recognition-barrier-0001.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16-INT8/license-plate-recognition-barrier-0001.bin from the cache

Run python3 /opt/intel/openvino_2021.4.689/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name vehicle-attributes-recognition-barrier-0039 --output_dir /root/openvino_models/ir --cache_dir /root/openvino_models/cache

################|| Downloading vehicle-attributes-recognition-barrier-0039 ||################

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16-INT8/vehicle-attributes-recognition-barrier-0039.xml from the cache

========== Retrieving /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16-INT8/vehicle-attributes-recognition-barrier-0039.bin from the cache

 

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

Build Inference Engine demos

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /opt/intel/openvino_2021.4.689/opencv (found version "4.5.3") found components: core highgui videoio imgproc imgcodecs gapi
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include inttypes.h
-- Looking for C++ include inttypes.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include sys/stat.h
-- Looking for C++ include sys/stat.h - found
-- Looking for C++ include fnmatch.h
-- Looking for C++ include fnmatch.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- 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 - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /root/inference_engine_demos_build
[ 21%] Built target monitors
[ 50%] Built target gflags_nothreads_static
[ 85%] Built target utils
[100%] Built target security_barrier_camera_demo


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

Run Inference Engine security_barrier_camera demo

Run ./security_barrier_camera_demo -d GPU -d_va GPU -d_lpr GPU -i /opt/intel/openvino_2021.4.689/deployment_tools/demo/car_1.bmp -m /root/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_lpr /root/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -m_va /root/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml

[ INFO ] InferenceEngine: IE version ......... 2021.4
Build ........... 1
[ INFO ] Files were added: 1
[ INFO ] /opt/intel/openvino_2021.4.689/deployment_tools/demo/car_1.bmp
[ INFO ] Loading device GPU
[ INFO ] GPU
clDNNPlugin version ......... 2021.4
Build ........... 1

[ INFO ] Loading detection model to the GPU plugin

-----------------------------------------------------------------------------------------------------------------

UPDATE

My machine is dual boot Windows and Ubuntu. The problem is only occurring in the ubuntu, I just checked its working on windows. Please help how to solve on Ubuntu also

0 Kudos
2 Replies
IntelSupport
Community Manager
272 Views

Hi Tarun Mishra,

Thanks for reaching out. I have tested the demo on Ubuntu and can run successfully with the output. Hence, it is true that the output takes some time to generate. On my observation, it took around 5 minutes for the demo to complete. I attached the result from my side as below.

 

Regards,

Aznie

 

IntelSupport
Community Manager
258 Views

Hi Tarun Mishra,

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,

Aznie


Reply