MATLAB Answers

0

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

Asked by Meghdeep Jana on 15 Jun 2018 at 4:30
Latest activity Edited by Meghdeep Jana on 15 Jun 2018 at 4:31

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.

  0 Comments

Sign in to comment.

0 Answers

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today