Import Object Detector Model into Simulink

8 次查看(过去 30 天)
BLUF: I want to integrate a Yolov4 Object detector into Simulink
I'm currently working on a project involving multiple vision detection methods to identify and track a target option. I'm using Simulink along with the computer vision and image processing toolboxes to analyse videos to pull out target object and its location.
I'd like to implement a Yolov4 Object Detector into my simulink model. I have made a dataset, and trained the model, and have saved the trained object detection system to a .mat file. MY ISSUE: is that I can't seem to import the object detection object/system/structure into my simulink model. The common error is that the load() function throwing an unsupported class.
Currently I am trying to improt the object through the load function in a MATLAB_Function block. Is Simulink capable of importing this object? Cna it be done through standard blocks, or will I need to create a custom function to overcome the load function? Should I do it through the workspace instead?
Open to any and all suggestions, thank you for your help.

回答(1 个)

Malay Agarwal
Malay Agarwal 2024-5-21
编辑:Malay Agarwal 2024-5-22
I understand that you want to use a trained "YOLOv4" model in Simulink as a block.
Since MATLAB R2021b, there is a block called “Deep Learning Object Detector” which can be used to import an object detection model from a MAT-file into Simulink and use it as a block. Please refer to the documentation on how you can use the block: https://www.mathworks.com/help/vision/ref/deeplearningobjectdetector.html.
You can also refer to the following link for an example showing how to use the block: https://www.mathworks.com/help/deeplearning/ug/lane-vehicle-detection-simulink-using-predict-block.html.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Computer Vision with Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by