How to use YOLOv7 ONNX model on MATLAB2023b ?

30 次查看(过去 30 天)
Hello. I am doing a study on strawberry detection using MATLAB.
I am considering using YOLOv7 for object detection, but MATLAB only supports up to yolov4.
Therefore, I would like to convert the best.pt trained with yolov7 to ONNX format and use it in MATLAB using the " importNetworkFromONNX" function,
is this possible?
Please reply.

回答(1 个)

Balaji
Balaji 2024-5-14
编辑:Balaji 2024-5-15
Hello Tomonori,
I understand that you want to import the YOLOv7 model saved in ONNX format into MATLAB using the importNetworkFromONNX function. Yes, this is possible. For this, I suggest you either convert the YOLOv7 model to ONNX format or use an already existing ONNX file of the model. Then, pass the ONNX file as an argument to the importNetworkFromONNX function. Please note that some of the ONNX operators may not be fully supported and might not import correctly, resulting in placeholder layers being created in their place, such as 'GatherND'. These operators can be implemented by referring to their ONNX documentation. The returned `dlnetwork` object may be uninitialized, which will need to be initialized.
Hope this helps,
Thanks,
Balaji
  1 个评论
Tomonori Yamamoto
Tomonori Yamamoto 2024-5-15
Thank you for the reply.
I understand your response and possibility.
But I have no ideas after importing ONNX date.
How should I get next step after executing " importONNXnetwork(example.onnx) " ?
I'm sorry I keep relying on you.
Thanks Balaji.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by