matlab-deep-learning / Pretrained-YOLOv8-Network-For-Object-Detection

YOLO v8 training and inference in MATLAB for Object Detection with yolov8n, yolov8s, yolov8m, yolov8l, yolov8x, networks
https://in.mathworks.com/help/vision/ug/getting-started-with-object-detection-using-deep-learning.html
GNU Affero General Public License v3.0
30 stars 3 forks source link

Simulink Support is running slow #9

Closed jmaxwell-21 closed 2 months ago

jmaxwell-21 commented 3 months ago

When I try running the yolov8SimulinkSupport model, it is running extremely slowly. It takes nearly 10 minutes from when I hit "Run" to getting an output from the simulation. My goal is to use this in a live feed in Simulink, so hopefully I can get this working fast!

viakkala commented 3 months ago

You might consider using the yolov8n and yolov8s models, as they are faster than other variants.

RE>> It takes nearly 10 minutes from when I hit "Run" to getting an output from the simulation. Typically, only the first instance will take more time due to initialization; subsequent images will process more quickly.

anandy22 commented 2 months ago

Verified by the above suggestions given by @viakkala. It was observed that smaller models (like yolov8n and yolov8s) had first instance run-time of ~5mins. However, for subsequent runs the run-time comes down to less than 1min. The above behavior was observed in R2024b (GPU configuration: - NVIDIA RTXA500(Memory:25gb and Multiprocessors:64)).

viakkala commented 2 months ago

Closing the issue as it's validated by @anandy22.