- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I am trying to use NCS2 for inference my own model and data, my input data is a numpy float array with the shape [1, 3, 3000, 1], instead of the unit8 format of the image data, and I am Using the script classification_sample.py with small modification, basically,it is like this:
I use:
Image = np.load(args.input)["data"]
Instead of
Image = cv2.resize(image, (w, h))
The main change is I don't use the CV module to load the input data, and it worked successfully with CPU device,but failed with MYRIAD, with the following error message:
<class 'numpy.ndarray'> (1, 3, 3000, 1)
E: [xLink] [ 4052] dispatcherEventReceive:347 dispatcherEventReceive() Read failed -4 | event 0x7fe240b68e80 XLINK_WRITE_RESP
E: [xLink] [ 4052] eventReader: 233 eventReader stopped
E: [xLink] [ 4052] XLinkReadDataWithTimeOut: 1343 Event data is invalid
E: [ncAPI] [ 4052] checkGraphMonitorResponse: 1673 XLink error, rc: X_LINK_ERROR
E: [ncAPI] [ 4052] ncGraphQueueInference: 3822 Can't get trigger response
Traceback (most recent call last):
File "classification_sample.py", line 346, in <module>
sys.exit(main() or 0)
File "classification_sample.py" , line 299, in main
res = exec_net.infer(inputs={input_blob: images})
File "ie_api.pyx", line 146, in openvino.inference_engine.ie_api.ExecutableNetwork.infer
File "ie_api.pyx", line 179, In openvino.inference_engine.ie_api.InferRequest.infer
File "ie_api.pyx", line 183, in openvino.inference_engine.ie_api.InferRequest.infer
RuntimeError: Failed to queue inference: NC_ERROR
E: [ncAPI] [ 4195] ncFifoDestroy:3176 Failed to write to fifo before deleting it!
It is definitely an error related with NCS2,because I have already run successfully with CPU. Does that mean the NCS2 only works with image data? If so,that would limit its application..
Thank you in advance for your time.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically,in classification_sample.py
I use:
image = np.load(args.input)["data"]
instead of :
image = cv2.imread(args.input)
And it works with CPU but fail with NCS2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now,whn I use the newest openvino_2019.3.376 ,the error message becomes:
$ python3 classification_sample_new.py -i /home/zm/generalized-phase-detection/BH_ref_answer_second/some/*.mseed -m inference_graph.xml -d MYRIAD -dt mseed
[ INFO ] Creating Inference Engine
[ INFO ] Loading network files:
inference_graph.xml
inference_graph.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 798
[ INFO ] read data time of one iteration takes: 33898.28610420227 ms :
[ INFO ] Loading model to the plugin
Traceback (most recent call last):
File "classification_sample_new.py", line 397, in <module>
sys.exit(main() or 0)
File "classification_sample_new.py", line 349, in main
exec_net = ie.load_network(network=net, device_name=args.device)
File "ie_api.pyx", line 85, in openvino.inference_engine.ie_api.IECore.load_network
File "ie_api.pyx", line 92, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: AssertionFailed: _allocatedIntermData.count(topParent) > 0
As a comparison, when use CPU:
$ python3 classification_sample_new.py -i /home/zm/generalized-phase-detection/BH_ref_answer_first/*.mseed -m inference_graph.xml -d CPU -dt mseed
[ INFO ] Creating Inference Engine
[ INFO ] Loading network files:
inference_graph.xml
inference_graph.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 14704
[ INFO ] read data time of one iteration takes: 450066.1780834198 ms :
[ INFO ] Loading model to the plugin
[ INFO ] Starting inference in synchronous mode
[ INFO ] Processing output blob
orig_shape (44112000, 3)
matrix
[ INFO ] running time of one iteration takes: 34914.21580314636 ms :
[(array([ 42620, 45629, 69594, ..., 44061622, 44103626, 44106614]), array([0.64882964, 0.5323102 , 0.64882964, ..., 0.64882964, 0.6478357 ,
0.7073154 ], dtype=float32)), (array([ 25397, 42612, 355297, ..., 44074285, 44092713, 44103619]), array([1. , 1. , 0.99999833, ..., 0.99994004, 1. ,
0.79882926], dtype=float32))] 2585 4918 2585 4918
Any suggestions?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page