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.

Failed to allocate graph: NC_ERRORWrite

Simardeep
Beginner
492 Views

Hi,

 

I converted an ONNX file(https://drive.google.com/drive/folders/1KU8EIAyqO1J2HQ5vQubdse7vc7AkXkvG?usp=sharing) to openvino IR using model optimizer.  

The model optimizer command which I used:

mo --input_model "tmp (1).onnx" --mean_values [123.675,116.28,103.53] --scale_values [58.395,57.12,57.375] --data_type FP16 --input_shape [1,3,320,416]

 

I was able to run the converted model on CPU, however, on MYRIAD NCS2 I got the following error while compiling the model:

 

WinUsb_WritePipe failed with error:=22
←[0m
←[35mE: [global] [ 0] [Scheduler00Thr] dispatcherEventSend:54 Write failed (header) (err -2) | event XLINK_RESET_REQ
←[0m
←[35mE: [xLink] [ 0] [Scheduler00Thr] sendEvents:1150 Event sending failed←[0m
←[35mE: [ncAPI] [ 0] [] ncDeviceClose:1851 Device didn't appear after reboot←[0m

 

The original input_shape was {1,3,1024,2048}, even after reducing the input shape I am facing the error. Is there any method to run this model on NCS2? 

0 Kudos
1 Solution
Hairul_Intel
Moderator
410 Views

Hi Simardeep,

Thank you for sharing your model details with us.

 

Cascade Mask RCNN and HRNet is not supported for NCS2 and is only supported on CPU and GPU. Please refer to this documentation for further information.

 

 

Regards,

Hairul


View solution in original post

0 Kudos
5 Replies
Hairul_Intel
Moderator
443 Views

Hi Simardeep,

Thank you for reaching out to us.

 

I've replicated this issue and encountered similar error message as yours when running the model using benchmark_app on NCS2 but no error occurs on CPU.

 

Since this was a custom trained model, it could be possible that it is not supported on Myriad device, which is probably why it runs on the CPU but not on the NCS2.

 

Can you please provide additional information regarding your model:

  • Source repository of the base model used for training.
  • Framework & Topology of the model.

 

 

Regards,

Hairul


0 Kudos
Simardeep
Beginner
432 Views

Hi,

 

The base model which I am using is  Pedestron.

It is a Cascade Mask RCNN with HRNet backbone. The base model was built on mmdetection 0.6.2 version; therefore, I made a few changes and built it upon the novel mmdetection version. This is the path to the updated model weights(\mmdetection\mmdetection\epoch_5_converted.pth.stu) and updated config file (\mmdetection\mmdetection\configs\elephant\cascade_hrnet_modified.py)

 

Finally, we used mmdetection pytorch2onnx.py to convert the model to the ONNX file with the command:

python pytorch2onnx.py \mmdetection\mmdetection\configs\elephant\cascade_hrnet_modified.py   \mmdetection\mmdetection\epoch_5_converted.pth.stu --input-img="FD_23012022_0001_F006.jpg"

 

This is the drive link for the environment that was used in the conversion. [We are currently removing the mask pipeline and the post-processing]

  

0 Kudos
Hairul_Intel
Moderator
411 Views

Hi Simardeep,

Thank you for sharing your model details with us.

 

Cascade Mask RCNN and HRNet is not supported for NCS2 and is only supported on CPU and GPU. Please refer to this documentation for further information.

 

 

Regards,

Hairul


0 Kudos
Simardeep
Beginner
402 Views

Hi, 

Just checked the documentation, Thanks a lot for the information.

 

Regards,

Simardeep 

0 Kudos
Hairul_Intel
Moderator
390 Views

Hi Simardeep,

Glad to be of help.

 

This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Hairul


0 Kudos
Reply