I am utilizing Imaginative and prescient framework (DetectFaceLandmarksRequest
) with the identical code and the identical take a look at picture to detect face landmarks. On iOS 18 the whole lot works as anticipated: detected face landmarks align with the face accurately.
However once I run the identical code on gadgets with iOS 26, the landmark coordinates are outdoors the [0,1] vary, which signifies they’re out of face bounds.
Enjoyable reality: the outdated VNDetectFaceLandmarksRequest
API works very effectively with out encountering this problem
How I get face landmarks:
personal let faceRectangleRequest = DetectFaceRectanglesRequest(.revision3)
personal var faceLandmarksRequest = DetectFaceLandmarksRequest(.revision3)
func detectFaces(in ciImage: CIImage) async throws -> FaceTrackingResult {
let faces = attempt await faceRectangleRequest.carry out(on: ciImage)
faceLandmarksRequest.inputFaceObservations = faces
let landmarksResults = attempt await faceLandmarksRequest.carry out(on: ciImage)
...
}
How I present face landmarks in SwiftUI View:
personal 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.0.1 -> at all times mistaken.
- Examined a number of gadgets on iOS 18.7.1 -> at all times appropriate.
Setting:
- macOS 26.0.1
- Xcode 26.0.1 (17A400)
- Actual gadgets, not simulator
Face Landmarks iOS 18
Face Landmarks iOS 26