VNGeneratePersonSegmentationRequest slow on Intel MacBooks

Hello

I have a very simple feature that tries to remove the background from a web camera video stream using VNGeneratePersonSegmentationRequest and VNImageRequestHandler.

let personSegmentationRequest = VNGeneratePersonSegmentationRequest()
personSegmentationRequest.qualityLevel = .balanced
let imageRequestHandler = VNImageRequestHandler(ciImage: ciImage) // a frame from the camera

try? imageRequestHandler.perform([personSegmentationRequest])
guard let result = personSegmentationRequest.results?.first else {
      return nil
}

On Mac computers with M1 processors works great (60 fps without any issue). The same code/app on MacBook Pro Intel i7 2.7GHz and AMD Radeon the performance is only 10 fps, much lower.

Any thoughts? Thank you

  • Intel Iris Plus Graphics 655 1536 MB, sorry, not AMD Radeon.

Add a Comment