Hello everyone!
I’d like to ask is there any facial recognition API available to create app with this feature. I’m looking for something like Snapchat or MSQRD with detection of face details like mouth, nose, eyes and etc. Or is there any way to code it programmatically and how hard it is to create such algorithms an d which libraries a can use. I’m looking for the ways doing it in Swift as I haven’t worked with Objective-C. Thank you!
Hi @nurzhan,
Have you looked at CIDetector? It is part of the Core Image library provided by Apple. It allows you to look for simple shapes on an Image to looking for facial features.
you can do something like
let cImage = image.ciImage ?? CIImage(cgIamge: image.cgImage) // use a default image if not present
if let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow]) {
let features = dector.features(in: cImage)
if features.count > 0 {
// Each feature found is a face
}
}
Hope that is a start for you to look into this.
cheers,