2 years ago
#60920
RealUglyDuck
ARBodyTrackingConfiguration - CPU jump to 200%
I have an app that uses ARKit with RealityKit using ARBodyTrackingConfiguration. I also perform CoreML detections on CVPixelBuffers from ARFrame.
It worked perfectly without issues until around iOS 14.5. Since then if I run AR experience for longer than 20-30s with body detection and CoreML processing detections at the same time, I get big jump in CPU usage (from 80-100% to around 200-220%) which lasts for few seconds and produce lagging/stuttering video footage on device screen.
What I've tried:
I checked for memory leaks in instruments and can't find anything wrong there. If I disable either body detection or CoreML processing, the issue disappears.
I tried putting CoreML processing on .utility qos (which gives less detections per second) but it still didn't help.
I never process more than one frame in CoreML (I check if previous processing was finished).
It's not thermal issue because it appears even if I start the phone after night of not using it, it still appears after around 20-30s
arkit
coreml
realitykit
0 Answers
Your Answer