Answers.Body: <p>Whilst identities can be viewed strictly as a classification problem, typically at scale they are solved as a regression problem to a description vector, followed by lookup of nearest vectors outside of the AI (e.g. with a database search optimised to find nearest multi-dimensional vectors). To help with this approach, the regression system is trained to minimise distance between pictures of objects with the same identity and maximimse distance between pictures of objects with different identity.</p>
  <p><a href="https://towardsdatascience.com/triplet-loss-advanced-intro-49a07b7d8905" rel="nofollow noreferrer">Here's a reference to the triplet loss training approach used to do this</a>.</p>
  <p>In brief, the training database requires at least 2 images of each subject. Pairs of images are selected, some identical, some different, and with a bias towards scoring &quot;difficult&quot; pairs. Each image is converted to a description vector by the neural network, and the difference between pairs is used as the loss function (so unlike many supervised learning schemes, the loss is not per function call, but calculated over sets of three function calls).</p>
  <p>Prior to use of triplet loss function, it was quite common to have the neural networks learn to predict actual biometrics (e.g. distance between eyes) from images. This had the advantage that the description vector was meaningful, but the disadvantages of needing a lot of difficult data collection, and no guarantee that the chosen biometrics would be good at separating identities in practice, depending on the population.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-18T08:19:44.920Z
Answers.LastActivityDate: 2023-04-18T13:42:14.550Z
Answers.LastEditDate: 2023-04-18T13:42:14.550Z
Answers.UserDisplayName: Neil Slater
Body: <p>I came across a video with the title &quot;you can buy things with your face in China&quot;. in the video, a woman scanned her face into a vending machine to buy a drink with only her face and without anything else. The description claimed that each face is a digital ID linked to China's CBDC. (<a href="https://twitter.com/songpinganq/status/1647815358039101441?t=HlFavzyDXiGTxRdo_N0qww&amp;s=19" rel="nofollow noreferrer">link to the video</a>)</p>
  <p>But I can't understand how this is possible from a technical viewpoint. For this, the model should classify hundreds of thousands of faces and this doesn't sound feasible to me. The ImageNet dataset has only 1000 classes and the Google JFT dataset has only 30K labels!</p>
  <p>Is it feasible to perform facial recognition on hundreds of thousands of individuals?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-18T06:35:09.260Z
Comments.Text: What makes you think there is an AI with hundreds of thousands classes behind this technology? finger print detection seems to work to a pretty good extend, why shouldn't face recognition?
Comments.UserDisplayName: N. Kiefer
Tags: <classification><image-recognition><image-processing><face-recognition><face-detection>
Title: Is it feasible to perform facial recognition on hundreds of thousands of individuals?
UserDisplayName: Peyman
ThreadText: # Is it feasible to perform facial recognition on hundreds of thousands of individuals?
  
  (Asked by: username_0 on 2023-04-17)
  
  I came across a video with the title "you can buy things with your face in China". in the video, a woman scanned her face into a vending machine to buy a drink with only her face and without anything else. The description claimed that each face is a digital ID linked to China's CBDC. ([link to the video](https://twitter.com/songpinganq/status/1647815358039101441?t=HlFavzyDXiGTxRdo_N0qww&s=19))
  
  But I can't understand how this is possible from a technical viewpoint. For this, the model should classify hundreds of thousands of faces and this doesn't sound feasible to me. The ImageNet dataset has only 1000 classes and the Google JFT dataset has only 30K labels!
  
  Is it feasible to perform facial recognition on hundreds of thousands of individuals?
  
  **Tags:** classification, image-recognition, image-processing, face-recognition, face-detection
  > **Comments:**
  > **username_1**: What makes you think there is an AI with hundreds of thousands classes behind this technology? finger print detection seems to work to a pretty good extend, why shouldn't face recognition?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-04-18. Score: 1 | Accepted answer
  
  Whilst identities can be viewed strictly as a classification problem, typically at scale they are solved as a regression problem to a description vector, followed by lookup of nearest vectors outside of the AI (e.g. with a database search optimised to find nearest multi-dimensional vectors). To help with this approach, the regression system is trained to minimise distance between pictures of objects with the same identity and maximimse distance between pictures of objects with different identity.
  
  [Here's a reference to the triplet loss training approach used to do this](https://towardsdatascience.com/triplet-loss-advanced-intro-49a07b7d8905).
  
  In brief, the training database requires at least 2 images of each subject. Pairs of images are selected, some identical, some different, and with a bias towards scoring "difficult" pairs. Each image is converted to a description vector by the neural network, and the difference between pairs is used as the loss function (so unlike many supervised learning schemes, the loss is not per function call, but calculated over sets of three function calls).
  
  Prior to use of triplet loss function, it was quite common to have the neural networks learn to predict actual biometrics (e.g. distance between eyes) from images. This had the advantage that the description vector was meaningful, but the disadvantages of needing a lot of difficult data collection, and no guarantee that the chosen biometrics would be good at separating identities in practice, depending on the population.
  
  
  ---
  
  