Handling YOLOv8 Object Detection in 60FPS UltraWideCamera on iOS: Frame Processing Query

I am developing an iOS app that uses YOLOv8 for object detection and aims to detect objects at 60 FPS using the UltraWide camera. My goal is to process every frame within captureOutput and utilize the detected data (such as coordinates) for each one.

I have a question regarding how background thread processing behaves in this scenario. Does the size of the YOLO model (n, s, m, etc.) or the weight of the operations inside captureOutput affect the number of frames that can be successfully processed?

Specifically, I would like to know if all frames will be processed sequentially with a delay due to heavy processing in the background, or if some frames will be dropped and not processed at all. Any insights on how to handle this would be greatly appreciated.

Thank you!

Answered by DTS Engineer in 807998022

Hello @keisan1231,

Generally speaking, if you are doing some processing in captureOutput, that processing should be faster than the frame rate you are capturing at, otherwise the video data output will start dropping new frames by default. The size of the model is very likely to be a factor in whether your processing can occur at the capture frame rate or not.

Best regards,

Greg

Accepted Answer

Hello @keisan1231,

Generally speaking, if you are doing some processing in captureOutput, that processing should be faster than the frame rate you are capturing at, otherwise the video data output will start dropping new frames by default. The size of the model is very likely to be a factor in whether your processing can occur at the capture frame rate or not.

Best regards,

Greg

@DTS Engineer

I see. Thank you for the explanation.

It seems very likely that the reason the FPS is dropping is due to using the YOLO model for object detection within captureOutput.

However, due to the requirements of the app, I don't want to lower the FPS. As one idea, would it be possible to save the images obtained in captureOutput and then run YOLO detection on them later?

Handling YOLOv8 Object Detection in 60FPS UltraWideCamera on iOS: Frame Processing Query
 
 
Q