Is it possible to use a YOLOv2 detector to detect images from a multimedia file in Simulink? I've looked at the examples listed here:
But none of them feature loading in a trained YOLOv2 detector and using that in a simulink block.
I have tried myself to implement my model in Simulink using both a MATLAB function block and Stateflow to no avail. I am trying to develop a Simulink block that can take in an image, run the YOLOv2 detector algorithm on it, then output the detected image:
ARbot = exampleHelperARbotPickPlace(rgbImg);
rgbImg = zeros(216,216,3)
resizedImg = zeros(224,224,3)
bboxes = 1;
labels = 1;
resizedImg = imresize(rgbImg,[224 224]);
[bboxes,labels] = detect(ARbot.DetectorModel,resizedImg);
labeledImg = insertObjectAnnotation(resizedImg,'Rectangle',bboxes,cellstr(labels));
ARbot.Bboxes = bboxes;
ARbot.Labels = labels;
MATLAB Function Block Error:
Attempt to extract field 'DetectorModel' from 'mxArray'
Full assignment to data 'detect' is missing. Specify values for all elements of Stateflow chart locals and outputs.
For more information, see Supported Operations for Vectors and Matrices. For structure types, a full assignment
is not necessary when the type is specified as "Bus: typename" and not inherited or parameterized.
Is it possible to implement load a YOLOv2 detector into Simulink? If so how would one load the detector in and use the 'detect' function?
Thanks in advance!