'importONNXFunction' cannot import yolov3.onnx?

1 visualización (últimos 30 días)
cui,xingxing
cui,xingxing el 8 de Nov. de 2020
Comentada: cui,xingxing el 17 de Oct. de 2022
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 comentarios
Sivylla Paraskevopoulou
Sivylla Paraskevopoulou el 9 de Mayo de 2022
Try to use the importONNXNetwork or importONNXLayers function. The functionality of these functions was significantly enhanced in R2021b.
cui,xingxing
cui,xingxing el 17 de Oct. de 2022
That's a good news.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by