Icône du site Apprenez Delphi

Comment reconnaître les visages avec l'API Microsoft Cognitive Services

Comment reconnaître les visages avec l'API Microsoft Face Cognitive Services

Face recognition is identifying or confirming the identity of a person using their face. It’s something we humans do from a very early age and we take that process almost for granted. We can do this either in person, using a photo, video, or even a painting or drawing, assuming it’s accurate enough. Getting a computer to perform the same function, though, is an immensely complicated task. In order to have any true success in true facial recognition, recognizing specific faces, rather than the location or area where a face is located, requires artificial intelligence.

Will Microsoft Cognitive Services API built with Native Windows Development recognize faces? Let’s find out all the answers in this post!

La polémique de la reconnaissance des visages

As more systems have entered the market with the ability to recognize people’s faces, people began to experience some of the positive benefits, such as the ability to verify the user’s identity when unlocking a smartphone or when carrying out sensitive actions such as accessing a banking app. Before too long law enforcement agencies also began to see how they too might be able to benefit from using this technology to identify wanted criminals or to spot a potential terrorist in a crowded airport. Stopping terrorist attacks and solving crime is of course something we all want. However, like all biometrics, face recognition is not a perfect technology. The face is much more likely to change over time and can also be easily obscured, intentionally or otherwise, with things like masks, hats, and facial hair.

Pourquoi la reconnaissance faciale est-elle si populaire dans le monde ?

Other biometric systems like fingerprints and iris scanners can also have challenges that affect their accuracy too, but less so than that of the face. Despite this, facial recognition has some benefits which might make it a good choice – for example, it is contactless, can be used from a significant distance, can be used to recognize persons of interest even if they are no longer physically present, for example via a video recording.

Facial recognition is also passive, which means you don’t need the co-operation of the people whose faces you are recognizing. The downside to that, of course, is that it can be abused by agencies or countries to track their citizens in aid to suppression of their rights, or to keep automated and possibly wide-ranging surveillance of people a government or organization might which to oppress or subjugate.

Les faux négatifs ou positifs peuvent entraîner des problèmes juridiques

Another downside of face recognition is that it can be “false negative” or “false positive”. False-negative is the situation in which the face recognition system failed to find the matching face from the database even though the database has a matching face. False-positive is the situation in which the system matches a face from a database even though the database doesn’t have any matching face. This can depend on the technology used by face recognition but even organizations with substantial technical resources can apparently faire des erreurs de reconnaissance. Ultimately it’s the developer’s responsibility to choose and understand the appropriate technology for the use-case of the application they develop.

Quelle est la technologie derrière la reconnaissance faciale ?

La technologie derrière la reconnaissance faciale obtient une représentation mathématique du visage. Il utilise la distance entre les yeux et la forme du menton, puis compare ce modèle avec les enregistrements existants dans la base de données. Certains systèmes calculent la probabilité du visage détecté au lieu de trouver une correspondance.

Comment utiliser l'API Azure Face pour la reconnaissance faciale ?

Azure est une plateforme de cloud computing. Ils sont une excellente alternative pour Amazon Web Services. Ils fournissent des centaines de services de cloud computing dans de nombreuses catégories. Ils ont une catégorie pour l'IA et l'apprentissage automatique. Il propose les offres d'IA et d'apprentissage automatique suivantes :

Dans ce cas, nous utilisons l'API Face qui nous permet de mettre en œuvre la reconnaissance faciale sans aucune expérience d'apprentissage automatique. Tout d'abord, vous devez créer un groupe de ressources pour votre application. Ainsi, chaque ressource utilisée par l'application sera facturée ensemble. Créez ensuite une nouvelle ressource Face (dans la catégorie AI + Machine learning). Souvenez-vous de la région que vous avez sélectionnée. Accédez ensuite à la ressource que vous venez de créer, accédez aux clés et au point de terminaison et copiez l'une des deux clés.

There is a great open-source application maintained by Embercardero to show you how to use Azure Face API with your Delphi Application using REST client. It’s a Firemonkey application that can compile to Windows, Mac, iOS, and Android. You can get it from GIT hub:

https://github.com/FMXExpress/MicrosoftFacialRecognition

You just have to change the API Key and the URL you want to detect faces. Edit Params of “TRESTRequest” according to your params.


Connectez-vous facilement à des API en ligne et à des ressources similaires à l'aide de RAD Studio Delphi et C++ Builder. Vous pouvez téléchargez une copie d'essai aujourd'hui et essayez la reconnaissance faciale par vous-même.

Quitter la version mobile