Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
81 Views

Can't launch action recognition demo

I can't launch action recognition python demo on my raspberry pi (raspbian 9). OpenVINO version 2019_R1.01

(py3cv4) pi@raspberrypi:/opt/intel/openvino/deployment_tools/inference_engine/samples/python_samples/action_recognition $ python3 demo.py --encoder driver-action-recognition-adas-0002-encoder.xml --decoder driver-action-recognition-adas-0002-decoder.xml --labels driver_actions.txt --video cam
Initializing plugin for CPU device...
Traceback (most recent call last):
  File "demo.py", line 98, in <module>
    sys.exit(main() or 0)
  File "demo.py", line 81, in main
    decoder_plugin = create_ie_plugin('CPU', cpu_extension=args.cpu_extension, plugin_dir=args.plugin_dir)
  File "demo.py", line 23, in create_ie_plugin
    plugin = IEPlugin(device, plugin_dirs=plugin_dir)
  File "ie_api.pyx", line 393, in openvino.inference_engine.ie_api.IEPlugin.__cinit__
RuntimeError: Cannot find plugin to use :

And the program output unexpectedly ends... Does anybody know the solution?

0 Kudos
2 Replies
Highlighted
New Contributor I
81 Views

Hi kurbanov,

You have to specify the device type as MYRIAD.  The Openvion will not run on raspberry pi (raspbian 9) CPU. 

I assume NCS 2 or NCS 1 is connected to the raspberry pi. 

Run below command:

python3 demo.py --encoder driver-action-recognition-adas-0002-encoder.xml --decoder driver-action-recognition-adas-0002-decoder.xml --labels driver_actions.txt --video cam -d MYRIAD

Thanks,

Akshaya M

 

0 Kudos
Highlighted
81 Views

Yeah, you are right. NCS 2 is connected to raspberry pi.

I already tried to set -d MYRIAD but there is no changes in error output. I think the problem in this line (demo.py) because it uses 'CPU'

decoder_plugin = create_ie_plugin('CPU', cpu_extension=args.cpu_extension, plugin_dir=args.plugin_dir)

I've tried to change 'CPU' to 'MYRIAD', but something wrong again and my output looks like this:

(py3cv4) pi@raspberrypi:/opt/intel/openvino/deployment_tools/inference_engine/samples/python_samples/action_recognition $ python3 demo.py --encoder driver-action-recognition-adas-0002-encoder.xml --decoder driver-action-recognition-adas-0002-decoder.xml --labels driver_actions.txt --video cam -d MYRIAD
Initializing plugin for MYRIAD device...
Initializing plugin for MYRIAD device...
Reading IR...
Loading IR to the plugin...
Reading IR...
Loading IR to the plugin...
Traceback (most recent call last):
  File "demo.py", line 100, in <module>
    sys.exit(main() or 0)
  File "demo.py", line 95, in main
    decoder = IEModel(decoder_xml, decoder_bin, decoder_plugin, num_requests=2)
  File "/opt/intel/openvino/deployment_tools/inference_engine/samples/python_samples/action_recognition/action_recognition_demo/models.py", line 82, in __init__
    self.exec_net = self.plugin.load(self.net, num_requests=num_requests)
  File "ie_api.pyx", line 395, in openvino.inference_engine.ie_api.IEPlugin.load
  File "ie_api.pyx", line 406, in openvino.inference_engine.ie_api.IEPlugin.load
RuntimeError: Can not init USB device: NC_ERROR

NC_ERROR? But on another samples my NCS 2 works good. What's the problem?

May be this script tries to open connection to NCS2 twice? How i can use my NCS as decoder & encoder? I already tried to write something like encoder_plugin = decoder_plugin but it gives me segmentation fault error, so i think that this is not the solution.

0 Kudos