Search code examples
iosswiftimage-processingface-recognitionios11

iOS11 vision framework mapping all face landmarks


I am playing with vision framework and getting all landmark points with this code:

if let allFaceLandmarks = landmarks.allPoints {
    print(allFaceLandmarks)
}

But cant find mapping for these points. For example index numbers for right eye.

Looking for something the same as this, but for Vision framework instead.


Solution

  • I have no clue why apple doesn't provide a graphic of this. It seems like it would be super helpful information to give people in the docs. At any rate, I was able to read the allPoints property of the observation and draw them out with numbers. I'm not really sure about the difference between nose and nose crest. You can probably draw them out and see...

    • Right eyebrow = 0 - 3
    • Left eyebrow = 4 - 7
    • Right eye contour = 8 - 15
    • Left eye contour = 16 - 23
    • Outer lips = 24 - 33
    • Inner lips = 34 - 39
    • Face Contour = 40 - 50
    • Nose and Nose Crest = 51 - 59
    • Meidan Line = 60 - 62
    • Right Pupil = 63
    • Left Pupil = 64

    Here's a pic that hopefully helps!

    face points