Clear Filters
Clear Filters

how to train YOLOv8 using MATLAB?

192 views (last 30 days)
BASHIR AHMAD RASHEEDY
BASHIR AHMAD RASHEEDY on 28 Apr 2024
Answered: Vivek Akkala on 28 Oct 2024 at 10:37
Greetings everyone,
Ultralytics has released the latest pre-trained YOLOv8 network as a .mat file on GitHub. I am interested in retraining it using my own data. I would like to know how to modify aspects such as the feature-extracting layer, and how to add or remove layers to adjust image size. Until now, with YOLOx, there were functions available in MATLAB for handling the pre-trained network, but for YOLOv8, I am unsure how to proceed.
Any guidance would be greatly appreciated.
Thank you
  2 Comments
Mohammad Sami
Mohammad Sami on 29 Apr 2024
Currently the newer versions are not provided by Matlab. The only way is to export the yolov8 model to onnx and import it in to matlab, remove the final layers which are not supported and then train it with yolov4 head.
The results would however not be as good as running yolo v8 in python as there are improvements to the yolo architecture which are not incorporated. essentially yolo v8 is anchor free architecture, while yolo v4 is anchor based. you can however get the benefits of a more efficient backbone network.
Yolo X is anchor free model, however i dont see an option to use your own backbone layer that is currently allowed in yolov4 detectors.
Hopefully Matlab implements the new achor free layers soon together with support to change the backbone layers which is available in yolov4 models.
Cris LaPierre
Cris LaPierre on 29 Apr 2024
Edited: Cris LaPierre on 29 Apr 2024
i think (i.e. not an official answer from MathWorks), you can find the current status of MathWorks support for Yolov8 here: https://github.com/matlab-deep-learning/Pretrained-YOLOv8-Network-For-Object-Detection
The source is MathWorks Developent. The page indicates they have not included a transfer learning script, which sounds like what you want to do.

Sign in to comment.

Answers (1)

Vivek Akkala
Vivek Akkala on 28 Oct 2024 at 10:37
Training support has been added to YOLO v8. You may refer to the following page for more details:
https://github.com/matlab-deep-learning/Pretrained-YOLOv8-Network-For-Object-Detection/

Categories

Find more on Image Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!