I am trying to implement an object localization system with MATLAB and Simulink. But simulink is showing the following errors.

1 visualizzazione (ultimi 30 giorni)
The Simulink model: (function: locateObj with RGB image input):
function [I, bboxes, scores, label] = locateObj(image)
I = image;
[bboxes, scores, label] = detect(objDetect, I);
label = cellstr(label);
I = insertObjectAnnotation(I,'rectangle',bboxes, label);
end
It is showing the following error:
Here 'objDetect' is a trained fasterRCNN for object detection and is a variable of type : "1x1 fasterRCNNObjectDetector" So I tried to load the variable into the function
function [I, bboxes, scores, label] = locateObj(image)
objDetect= load('objDetector.mat', 'objDetector');
I = image;
[bboxes, scores, label] = detect(objDetect, I);
label = cellstr(label);
I = insertObjectAnnotation(I,'rectangle',bboxes, label);
end
But I still got an error:
Please help. How do I run the trained object detector on simulink to get the bboxes.

Risposte (0)

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by