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.

Image Segmentation OpenVino + MYRIAD

Rasheed__Umer
Beginner
395 Views

Hi

I came across this very handy tutorial for image segmentation last week: 

https://software.intel.com/en-us/articles/intel-distribution-of-openvino-toolkit-image-segmentation-walkthrough-in-python

 

It works perfectly on CPU. However, since I wanted to test this on NCS device, I changed the step 13 in the link above to (Change is highlighted in red):

python3 mo_caffe.py --input_model ~/fcn.berkeleyvision.org/voc-fcn8s/fcn8s-heavy-pascal.caffemodel --input_proto ~/fcn.berkeleyvision.org/voc-fcn8s/deploy.prototxt -o ~/seg-sample --data_type FP16

 

This converted the model to FP16 instead of FP32. However, when I run the model for inference using the command below: 

python3 segmentation_sample.py -i camvid.png -m ~/seg-sample/fp16/fcn8s-heavy-pascal.xml -d MYRIAD

I get this error on NCS:

[ INFO ] Loading network files:

/home/avidbots/seg-sample/fp16/fcn8s-heavy-pascal.xml

/home/avidbots/seg-sample/fp16/fcn8s-heavy-pascal.bin

Device: MYRIAD

[ INFO ] Preparing input blobs

[ WARNING ] Image camvid.png is resized from (720, 960) to (500, 500)

[ INFO ] Batch size is 1

[ INFO ] Loading model to the plugin

[ INFO ] Starting inference (1 iterations)

E: [xLink] [         0] dispatcherWaitEventComplete:694 waiting is timeout, sending reset remote event

E: [ncAPI] [         0] ncFifoReadElem:2853 Packet reading is failed.

Traceback (most recent call last):

  File "segmentation_sample.py", line 156, in <module>

    main() #sys.exit(main() or 0)

  File "segmentation_sample.py", line 126, in main

    res = exec_net.infer(inputs={input_blob: images})

  File "ie_api.pyx", line 130, in inference_engine.ie_api.ExecutableNetwork.infer

  File "ie_api.pyx", line 160, in inference_engine.ie_api.InferRequest.infer

  File "ie_api.pyx", line 164, in inference_engine.ie_api.InferRequest.infer

RuntimeError: Failed to read output from FIFO: NC_ERROR

/teamcity/work/scoring_engine_build/releases_openvino-2018-r4/ie_bridges/python/inference_engine/ie_api_impl.cpp:329

 

And this error on NCS2:

 

[ INFO ] Loading network files:

/home/avidbots/seg-sample/fp16/fcn8s-heavy-pascal.xml

/home/avidbots/seg-sample/fp16/fcn8s-heavy-pascal.bin

Device: MYRIAD

[ INFO ] Preparing input blobs

[ WARNING ] Image camvid.png is resized from (720, 960) to (500, 500)

[ INFO ] Batch size is 1

[ INFO ] Loading model to the plugin

E: [xLink] [         0] handleIncomingEvent:240 handleIncomingEvent() Read failed -4

 

E: [xLink] [         0] dispatcherEventReceive:308 dispatcherEventReceive() Read failed -4 | event 0x7fdc71312ef0 USB_WRITE_REQ

 

E: [xLink] [         0] eventReader:254 eventReader stopped

E: [xLink] [         0] dispatcherWaitEventComplete:694 waiting is timeout, sending reset remote event

E: [ncAPI] [         0] ncGraphAllocate:1227 Can't read input tensor descriptors of the graph, rc: X_LINK_TIMEOUT

Traceback (most recent call last):

  File "segmentation_sample.py", line 156, in <module>

    main() #sys.exit(main() or 0)

  File "segmentation_sample.py", line 118, in main

    exec_net = plugin.load(network=net)

  File "ie_api.pyx", line 305, in inference_engine.ie_api.IEPlugin.load

  File "ie_api.pyx", line 318, in inference_engine.ie_api.IEPlugin.load

RuntimeError: Failed to allocate graph: NC_TIMEOUT

/teamcity/work/scoring_engine_build/releases_openvino-2018-r4/ie_bridges/python/inference_engine/ie_api_impl.

cpp:260

Umer Rasheed

0 Kudos
0 Replies
Reply