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

Load Two Networks on NCS2 Error

Hello, I am using the NCS2 with a raspberry 4

I executed this commands on the python API, and it gives me the attached errors when loading a second IR to the NCS2

from openvino.inference_engine import IENetwork, IECore
ie=IECore()
model_xml1 = '/home/pi/models/face-detection-retail-0004.xml'
model_bin1 = '/home/pi/models/face-detection-retail-0004.bin'
net1=ie.read_network(model=model_xml1, weights=model_bin1, init_from_buffer=False)
num_requests=1
device = 'MYRIAD'
ln1=ie.load_network(network=net1, num_requests=num_requests, device_name=device)
model_xml2 = '/home/pi/models/head-pose-estimation-adas-0001.xml'
model_bin2 = '/home/pi/models/head-pose-estimation-adas-0001.bin'
net2=ie.read_network(model=model_xml2, weights=model_bin2, init_from_buffer=False)
ln2=ie.load_network(network=net2, num_requests=num_requests, device_name=device)

 

E: [global] [      3191] [Scheduler00Thr] dispatcherEventSend:61	Write failed -1

E: [xLink] [      3191] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      3192] [python3] addEvent:264	Condition failed: event->header.flags.bitField.ack != 1
E: [global] [      3192] [python3] addEventWithPerf:276	 addEvent(event) method call failed with an error: 3
E: [global] [      3193] [python3] XLinkReadData:156	Condition failed: (addEventWithPerf(&event, &opTime))
E: [ncAPI] [      3193] [python3] ncGraphAllocate:2062	Can't read input tensor descriptors of the graph, rc: X_LINK_ERROR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ie_api.pyx", line 306, in openvino.inference_engine.ie_api.IECore.load_network
  File "ie_api.pyx", line 315, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: Failed to allocate graph: NC_ERROR
>>> E: [global] [      4016] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      4016] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      5016] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      5017] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      6014] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      6014] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      7013] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      7013] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      8012] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      8012] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [      9011] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [      9012] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     10010] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     10010] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     11009] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     11009] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     12008] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     12008] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     13007] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     13007] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     14006] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     14006] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     15005] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     15005] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     16004] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     16004] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     17003] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     17003] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     18002] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     18002] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     19001] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     19001] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     20000] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     20000] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     20999] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     20999] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     21998] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     21998] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     22997] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     22997] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     23996] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     23996] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     24995] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     24995] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     25994] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     25994] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     26993] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     26993] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     27992] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     27992] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     28991] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     28991] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     29990] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     29990] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     30989] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     30989] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     31988] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     31988] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     32987] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     32987] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     33986] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     33987] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     34985] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     34986] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     35984] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     35985] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     36983] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     36984] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     37982] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     37983] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     38981] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     38982] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     39980] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     39980] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     40979] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     40979] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     41978] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     41978] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     42977] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     42977] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     43976] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     43976] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     44975] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     44975] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     45974] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     45974] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     46973] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     46973] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     47972] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     47972] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     48971] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     48971] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     49970] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     49971] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     50969] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     50970] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     51968] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     51969] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     52967] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     52968] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     53967] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     53967] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     54966] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     54966] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     55965] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     55965] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     56964] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     56964] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     57963] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     57963] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     58962] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     58962] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     59961] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     59961] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     60960] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     60960] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     61959] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     61959] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     62958] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     62958] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     63957] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     63957] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     64956] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     64956] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     65955] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     65955] [Scheduler00Thr] sendEvents:1027	Event sending failed
E: [global] [     66954] [Scheduler00Thr] dispatcherEventSend:53	Write failed (header) (err -4) | event XLINK_WRITE_REQ

E: [xLink] [     66954] [Scheduler00Thr] sendEvents:1027	Event sending failed

0 Kudos
5 Replies
Highlighted
Beginner
243 Views

Also, running the benchmark app before the previous python commands, shows that the NCS2 is working correctly, however, running the benchmark after the commands, gives error:

 

BEFORE:
 

pi@raspberrypi:~/dldt/bin/armv7l/Release $ ./benchmark_app -m /home/pi/models/face-detection-retail-0004.xml -d MYRIAD
[Step 1/11] Parsing and validating input arguments
[ INFO ] Parsing input parameters
[Step 2/11] Loading Inference Engine
[ INFO ] InferenceEngine:
    API version ............ 2.1
    Build .................. custom_master_c6e03d73d8064f9c022b19dfa3c9e8c2d3fe93c7
    Description ....... API
[ INFO ] Device info:
    MYRIAD
    myriadPlugin version ......... 2.1
    Build ........... custom_master_c6e03d73d8064f9c022b19dfa3c9e8c2d3fe93c7

[Step 3/11] Setting device configuration
[Step 4/11] Reading the Intermediate Representation network
[ INFO ] Loading network files
[ INFO ] Read network took 40.75 ms
[Step 5/11] Resizing network to match image sizes and given batch
[ INFO ] Network batch size: 1
[Step 6/11] Configuring input of the model
[Step 7/11] Loading the model to the device
[ INFO ] Load network took 2744.84 ms
[Step 8/11] Setting optimal runtime parameters
[Step 9/11] Creating infer requests and filling input blobs with images
[ INFO ] Network input 'data' precision U8, dimensions (NCHW): 1 3 300 300
[ WARNING ] No input files were given: all inputs will be filled with random values!
[ INFO ] Infer Request 0 filling
[ INFO ] Fill input 'data' with random values (image is expected)
[ INFO ] Infer Request 1 filling
[ INFO ] Fill input 'data' with random values (image is expected)
[ INFO ] Infer Request 2 filling
[ INFO ] Fill input 'data' with random values (image is expected)
[ INFO ] Infer Request 3 filling
[ INFO ] Fill input 'data' with random values (image is expected)
[Step 10/11] Measuring performance (Start inference asyncronously, 4 inference requests, limits: 60000 ms duration)

[Step 11/11] Dumping statistics report
Count:      4868 iterations
Duration:   60066.16 ms
Latency:    48.67 ms
Throughput: 81.04 FPS

 

 

AFTER:

pi@raspberrypi:~/dldt/bin/armv7l/Release $ ./benchmark_app -m /home/pi/models/face-detection-retail-0004.xml -d MYRIAD
[Step 1/11] Parsing and validating input arguments
[ INFO ] Parsing input parameters
[Step 2/11] Loading Inference Engine
[ INFO ] InferenceEngine: 
	API version ............ 2.1
	Build .................. custom_master_c6e03d73d8064f9c022b19dfa3c9e8c2d3fe93c7
	Description ....... API
[ INFO ] Device info: 
	MYRIAD
	myriadPlugin version ......... 2.1
	Build ........... custom_master_c6e03d73d8064f9c022b19dfa3c9e8c2d3fe93c7

[Step 3/11] Setting device configuration
[Step 4/11] Reading the Intermediate Representation network
[ INFO ] Loading network files
[ INFO ] Read network took 19.71 ms
[Step 5/11] Resizing network to match image sizes and given batch
[ INFO ] Network batch size: 1
[Step 6/11] Configuring input of the model
[Step 7/11] Loading the model to the device
W: [ncAPI] [    385046] [benchmark_app] ncDeviceOpen:936	ncDeviceOpen() XLinkBootRemote returned error X_LINK_COMMUNICATION_FAIL for 1.1.4.3-ma2480
E: [ncAPI] [    400046] [benchmark_app] ncDeviceOpen:1008	Failed to find booted device after boot
W: [ncAPI] [    400046] [benchmark_app] ncDeviceOpen:1011	Device (1.1.4.3-ma2480) doesn't disappear after firmware loading
[ ERROR ] Can not init Myriad device: NC_ERROR

 

0 Kudos
Highlighted
243 Views

Hi David,

 

Thanks for reaching out.

We are currently looking into your issue and will come back to you as soon as possible.

 

Regards,

Javier A.

0 Kudos
Highlighted
243 Views

Hi David,

 

We tested your code on Windows 10 and Raspbian OS. On Windows, we got the same behavior as you with num_requests=1. When we changed to num_requests = 2, the two models loaded fine so, it resolved the issue.

On our Raspberry Pi, it works with both num_request=1 and 2. We used OpenVINO™ Toolkit 2020.1 version on Raspberry Pi.

Which version of OpenVINO™ Toolkit and which version of the models you are using? You should use models from Open Model Zoo 2019R3.

 

Regards,

Javier A.

0 Kudos
Highlighted
Beginner
243 Views

Thanks for the response.

I think we are using 2020.3 from https://github.com/opencv/dldt.git

For the models, face-detection-retail-0004 is from 2019R3 and head-pose-estimation-adas-0001 is from 2020.2

However, the problem seems to have disappeared after unplugging all other usb devices except of the NCS2

0 Kudos
Highlighted
243 Views

Hi David,

 

It sounds like it may be due to a power delivery issue. We are glad that you resolved it!

Thanks for sharing your solution with the community.

 

Regards,

Javier A.

0 Kudos