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.
6404 Discussions

Runtime Error: Slice op in ONNX is not support in GPU device (Integrated GPU)

VishnuT
Beginner
789 Views

Hello Team,

    I develop the MaskRCNN Resnet50 model using Pytorch. 

model = torchvision.models.detection.maskrcnn_resnet50_fpn(weights=MaskRCNN_ResNet50_FPN_Weights.DEFAULT)

Model training reference link: https://haochen23.github.io/2020/06/fine-tune-mask-rcnn-pytorch.html#.ZCRDd3ZBy5d

Convert the Pytorch model to ONNX using the below code (convert_pth_to_onnx.py).

Converted ONNX model to Openvino using the below command.

Model optimization command: mo --framework=onnx --data_type=FP16 --output_dir=./weights/Openvino/FP16/ --model_name=mask_rcnn_resnet50 --input_model=./weights/ONNX/MaskRCNN_resnet-50.onnx --input_shape=[1,3,536,559]

 

Inference the openvino model using CPU is working fine. Change the device name to GPU in 

core.compile_model(model,"GPU.0") has a RuntimeError: Operation: ONNX: Slice of type If(op::v0) is not supported.
 
Openvino version: w_openvino_toolkit_windows_2022.3.0.9052.9752fafe8eb_x86_64
Python version: Python 3.8.8
Pytorch version: 1.13.1+cpu
ONNX version: 1.12.0
 
 
Please let me know the solution for this issue. Feel free to ask do you have any queries.
 
Thanks
Vishnu T
 
 
 
Labels (2)
0 Kudos
2 Replies
IntelSupport
Community Manager
766 Views

Hi Vishnu T,

 

Thanks for reaching out.

 

Your shared folder is not including your model files. The weight folder is empty. Please reshare the model for us to validate on our end.


Meanwhile, for conversion of Mask R-CNN model, use the same parameter as shown in Converting an ONNX Mask R-CNN Model documentation.

 

On another note, please also try to compile your model with compiled_model=core.compile_model(model,"GPU"); instead of (model,"GPU.0")

 

 

Regards,

Aznie


0 Kudos
IntelSupport
Community Manager
674 Views

Hi Vishnu T,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.



Regards,

Aznie



0 Kudos
Reply