Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
411 views
in Technique[技术] by (71.8m points)

ios vision - VNDetectFaceLandmarksRequest not working on m1 macs with iOS 14 simulator? (Unspecified error)

Why are new simulators on M1 (iPhone 12, iOS 14.3) providing unspecified error when I use the vision framework. I guess the iOS 14 simulators don't have access to a working vision framework? It can't be the code, since it does give me results on x86_64 (Intel) macs and also on my M1 mac running iPhone 11 simulator (iOS 13.7, which runs in Intel 80486 emulation).

let handler = VNImageRequestHandler(cgImage: image)
let request = VNDetectFaceLandmarksRequest { request, error in
    guard error == nil else { // <-- The error is `unspecified error`
          finish()
          return
    }
    if let faceObservations = request.results as? [VNFaceObservation] {
        outputFaceImages = faceObservations.map { image.cropping(to: $0.boundingBox)! }
    }
    finish()
}

do {
    try handler.perform([request])
} catch {
    finish()
}

Unfortunately, I get an unspecified error: XCode debugger screenshot

question from:https://stackoverflow.com/questions/65919206/vndetectfacelandmarksrequest-not-working-on-m1-macs-with-ios-14-simulator-unsp

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...