When I try to replace camera with static image, it detects the face landmarks but points are misplaced. Below is the code, where the points are misplaced and it draws the path on wrong position.
if let boundingBox = self.faceLandmarks.inputFaceObservations?.first?.boundingBox {
let faceBoundingBox = boundingBox.scaled(to: self.imgView.frame.size)
//different types of landmarks
let allpoints = observation.landmarks?.allPoints
self.convertPointsForFace(allpoints, faceBoundingBox)
}
Can you please help me to get correct facelandmarks points from static image?