'importONNXFunction' cannot import yolov3.onnx?

When I tried to import 'yolov3.onnx', the following error occurred. How can I solve it?
Extraction code :kuni
%% 导入yolov3.onnx进行预测(推理)
yolov3model = 'yolov3.onnx';
params = importONNXFunction(yolov3model,'yolov3fcn');
%% 推理
img = imread('person.jpg');
img = imresize(img,[416,416]);
img = rescale(img,0,1);
inputImg = permute(img,[3,1,2]);
input_1_01 = reshape(inputImg,[1,size(inputImg)]); % n*c*h*w,[0,1],RGB顺序
image_shape_01 = [1,2];
[yolonms_layer_1_ExpandDims_1_0, yolonms_layer_1_ExpandDims_3_0, yolonms_layer_1_concat_2_0, state] = yolov3fcn(input_1_01, image_shape_01, params,...
'Training',false,...
'InputDataPermutation','none',...
'OutputDataPermutation','none')
Reference to non-existent field 'y3_01'.
Error in yolov3fcn>yolov3Graph2377 (line 1790)
[Vars.TFNodes_yolo_evaluation_layer_1_Shape_3_0, NumDims.TFNodes_yolo_evaluation_layer_1_Shape_3_0] = onnxShape(Vars.y3_01, NumDims.y3_01);
Error in yolov3fcn (line 98)
[yolonms_layer_1_ExpandDims_1_0, yolonms_layer_1_ExpandDims_3_0, yolonms_layer_1_concat_2_0, NumDims.yolonms_layer_1_ExpandDims_1_0, NumDims.yolonms_layer_1_ExpandDims_3_0, NumDims.yolonms_layer_1_concat_2_0, state] =
yolov3Graph2377(input_1_01, image_shape_01, NumDims.input_1_01, NumDims.image_shape_01, Vars, NumDims, Training, params.State);
Error in test1 (line 12)
[yolonms_layer_1_ExpandDims_1_0, yolonms_layer_1_ExpandDims_3_0, yolonms_layer_1_concat_2_0, state] = yolov3fcn(input_1_01, image_shape_01, params,...
MY analyze:

4 件のコメント

Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2021 年 2 月 12 日
The model download link is not working for me. Have you tried to download YOLOv3 from the ONNX model zoo?
>> pretrainedURL = 'https://github.com/onnx/models/raw/master/vision/object_detection_segmentation/yolov3/model/yolov3-10.onnx';
>> websave('yolov3.onnx',pretrainedURL);
Note that to import all the layers in yolov3, in addition to the support package, you will need Deep Learning Toolbox, Image Processing Toolbox, and Computer Vision Toolbox.
You might also want to try to replicate the following example with the imported network as a preliminary test
xingxingcui
xingxingcui 2021 年 2 月 24 日
編集済み: xingxingcui 2021 年 3 月 16 日
I am not really importing and exporting yolov3.onnx, what I want to express is that all onnx model architecture models similar to yolov3.onnx should be imported and exported, such as yolov4.onnx, yolov5.onnx, and other segmentation and detection , The general onnx model of semantics.
I wrote the matlab package of yolov3-v4 a year ago, but it was not supported at that time! My version depends less on the environment and is more efficient!
'importONNXFunction' still needs more improvement!
Update on March 16, 2021, using the latest version of MATLAB 2021a+Deep Learning Toolbox Converter for ONNX Model Format (version 21.1.0) still does not support the import of the above onnx!
Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2022 年 5 月 9 日
Try to use the importONNXNetwork or importONNXLayers function. The functionality of these functions was significantly enhanced in R2021b.
xingxingcui
xingxingcui 2022 年 10 月 17 日
That's a good news.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2020b

タグ

質問済み:

2020 年 11 月 8 日

コメント済み:

2022 年 10 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by