Post

Replies

Boosts

Views

Activity

Reply to VisionFramework does not work with VisionOS2.0
@Frameworks Engineer sorry for your misunderstanding. I know this method in VisionRequest protocol. but I can not access it from implement request class ex.GenerateForegroundInstanceMaskRequest Value of type 'GenerateForegroundInstanceMaskRequest' has no member 'setComputeDevice' Do you have any solution? this is my code let request = GenerateForegroundInstanceMaskRequest(GenerateForegroundInstanceMaskRequest.Revision.revision1) let allDevices = MLComputeDevice.allComputeDevices if computeDevice == nil{ for device in allDevices { print("device.description\(device.description)") if(device.description.contains("MLGPUComputeDevice")){ computeDevice = device break } } } request.setComputeDevice(computeDevice,for: ComputeStage.main)
Aug ’24