georg-jung / FaceAiSharp

State-of-the-art face detection and face recognition for .NET.
https://nuget.org/packages/FaceAiSharp/
MIT License
75 stars 10 forks source link

Information on captured face landmark #25

Closed GeorgeS2019 closed 1 year ago

GeorgeS2019 commented 1 year ago

There are few standards, wonder which one this project provides on the resolution of the facial landmark?

georg-jung commented 1 year ago

I assume you're interested in "How many and which points does IFaceLandmarksDetector.DetectLandmarks or IFaceDetectorWithLandmarks.DetectFaces(img)[0].Landmarks return?"?

FaceAiSharp currently uses SCRFD for face detection and landmarks. SCRFD emits 5 facial landmark points, in this order:

FaceAiSharp is loosley prepared to be extended for usage with other models too. Abstractions like IFaceLandmarksDetector don't make any assumptions about what and how many landmarks are detected. ArcFaceEmbeddingsGenerator.AlignFaceUsingLandmarks does however currently assume it is called with SCRFD's points as an argument.

Feel free to re-open or discuss further if this doesn't answer your question.

GeorgeS2019 commented 1 year ago

image

georg-jung commented 1 year ago

The landmarks in the image you posted look similar to those in the iBUG 300W dataset. One widely used library that detects these 68 points is dlib. While it would certainly be possible to extend FaceAiSharp to support dlib-like landmarks, this feature is currently not implemented.