Add a detector to Simulink Model

2 ビュー (過去 30 日間)
Gueni Hamza
Gueni Hamza 2022 年 1 月 26 日
回答済み: T.Nikhil kumar 2023 年 10 月 20 日
Hi guys , i need to integrate this function in Simulink and i neet 2 inputs , one is a picture and second one is a detector to detect the stop sign in the picture but i coundn't add the Yolo detector to the simulink model , how can i do it if it's possible?
Thanks in advance!
function y = fcn(picture,detectorYolo2_stop)
[bboxes1,scores1,labels1] = detect(detectorYolo2_stop,picture);
picture = insertObjectAnnotation(picture,'Rectangle',bboxes1,cellstr(labels1));
y = picture;

回答 (1 件)

T.Nikhil kumar
T.Nikhil kumar 2023 年 10 月 20 日
Hello Gueni Hamza,
I understand that you are trying to create an object detector in Simulink using ‘MATLAB Function’ Block and want to know how to pass the detector object of type ‘yolov2ObjectDetector’ to the ‘MATLAB Function’ block as an input argument.
You can use the ‘From File’ block to read data from the ‘.mat’ file that contains the detector object and pass it as an input to your ‘MATLAB Function’ block
I would suggest you to use the ‘Deep Learning Object Detector’ Block, which is specifically designed for this purpose of predicting bounding boxes, class labels, and scores for an input image by using the trained object detector specified through the block parameter. You can then use a ‘MATLAB Function’ block to superimpose the bounding box on the image using the ‘insertObjectAnnotation’ function.
You can refer to the following documentation to understand more about ‘From File’ block.
You can refer to the following documentation to understand more about the ‘Deep Learning Object Detector’ Block.
Hope this helps!

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by