I am utilizing Imaginative and prescient framework (VNDetectFaceLandmarksRequest
) with the identical code and the identical take a look at picture to detect face landmarks. On iOS 18 every part works as anticipated: detected face landmarks align with the face accurately.
However after I run the identical code on gadgets with iOS 26, the landmarks are fully off – coordinates are shifted outdoors the detected face bounds.
How I get face landmarks:
non-public let faceRectangleRequest = DetectFaceRectanglesRequest(.revision3)
non-public var faceLandmarksRequest = DetectFaceLandmarksRequest(.revision3)
func detectFaces(in ciImage: CIImage) async throws -> FaceTrackingResult {
strive await performFaceDetection(ciImage: ciImage)
}
non-public func performFaceDetection(ciImage: CIImage) async throws -> FaceTrackingResult {
let faces = strive await faceRectangleRequest.carry out(on: ciImage)
faceLandmarksRequest.inputFaceObservations = faces
let landmarksResults = strive await faceLandmarksRequest.carry out(on: ciImage)
...
}
How I present face landmarks in SwiftUI View:
non-public func convert(
level: NormalizedPoint,
faceBoundingBox: NormalizedRect,
imageSize: CGSize
) -> CGPoint {
let level = level.toImageCoordinates(
from: faceBoundingBox,
imageSize: imageSize,
origin: .upperLeft
)
return level
}
Issues I’ve already tried:
- Similar picture enter
- Examined a number of gadgets on iOS 26 -> all the time improper.
- Examined a number of gadgets on iOS 18 -> all the time right.
Atmosphere:
- macOS 26.0.1
- Xcode 26.0 (17A324)
- Actual gadgets, not simulator
Face Landmarks iOS 18
Face Landmarks iOS 26