Open
Description
I encountered an error while trying to import a YOLOv8 segmentation model in MATLAB using the script provided in the repository. The error appears to be related to ONNX operators not being supported. Below is the detailed information about the setup and error:
Script:
net = importYOLOv8SegmentationModel('D:\semanticSegmentationTest\yolov8s_n.onnx');
Environment:
MATLAB version: 2024b
Operating System: Windows 11
Error Message:
Warning:
Unable to import some ONNX operators, because they are not supported. They have been replaced by placeholder layers or by placeholder functions inside generated custom layers. To find the placeholder layers, call the function
findPlaceholderLayers on the returned object.
2 operator(s) : Attribute 'atialias' is not supported.
To import the ONNX network as a function, use importONNXFunction.
> In nnet.internal.cnn.onnx.importONNXNetwork>iWarnIfContainsPlaceholders (line 163)
In nnet.internal.cnn.onnx.importONNXNetwork>iHandleTranslationIssues (line 104)
In nnet.internal.cnn.onnx.importONNXNetwork (line 57)
In nnet.internal.cnn.onnx.importNetworkFromONNX (line 13)
In importNetworkFromONNX (line 77)
In importYOLOv8SegmentationModel (line 4)
In test (line 2)
Warning: Returning an uninitialized dlnetwork. Initialize the network by passing example input data to the initialize object function.
> In nnet.internal.cnn.onnx.importONNXNetwork>constructDlnetwork (line 93)
In nnet.internal.cnn.onnx.importONNXNetwork (line 62)
In nnet.internal.cnn.onnx.importNetworkFromONNX (line 13)
In importNetworkFromONNX (line 77)
In importYOLOv8SegmentationModel (line 4)
In test (line 2)
Error using dlnetwork/initialize (line 600)
Invalid network.
Error in dlnetwork (line 182)
net = initialize(net, dlX{:});
^^^^^^^^^^^^^^^^^^^^^^^
Error in helper.mapToSwishLayer (line 60)
output = dlnetwork(lgraph);
^^^^^^^^^^^^^^^^^
Error in importYOLOv8SegmentationModel (line 43)
networkImported = helper.mapToSwishLayer(networkImported);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in test (line 2)
net = importYOLOv8SegmentationModel("D:\semanticSegmentationTest\ss_nn.onnx");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Layer 'ResizeLayer1023': Error using the predict function in layer ss_nn.ResizeLayer1023. The function threw an error and could not be executed.
Undefined function 'PLACEHOLDER' for input arguments of type 'dlarray'.
Error in ss_nn.ResizeLayer1023>ResizeGraph1020 (line 175)
[Vars.x_model_10_Resize_ou, NumDims.x_model_10_Resize_ou] = PLACEHOLDER(Vars.x_model_9_cv2_act_Mu, Vars.x_model_10_Constant_);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ss_nn.ResizeLayer1023>ResizeFcn (line 162)
[x_model_10_Resize_ou, x_model_10_Resize_ouNumDims, state] = ResizeGraph1020(x_model_9_cv2_act_Mu, NumDims.x_model_9_cv2_act_Mu, Vars, NumDims, Training, params.State);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ss_nn.ResizeLayer1023/predict (line 33)
[x_model_10_Resize_ou, x_model_10_Resize_ouNumDims] = ResizeFcn(x_model_9_cv2_act_Mu, x_model_9_cv2_act_MuNumDims, onnxParams, 'Training', false, ...
Metadata
Metadata
Assignees
Labels
No labels