Answers.Body: <p>Simply put, <a href="https://en.wikipedia.org/wiki/Euclidean_distance" rel="nofollow noreferrer">Euclidean distance</a> measures how far away two items are (see Neil Slater's comment).</p>
  
  <p>In order to apply this to a pattern recognition task, you will need to convert the items to compare (in your case images of faces) into feature vectors (ie lists of numerical values), and then you do a pairwise comparison to work out how distant two faces are. You will then need to set a threshold where you treat two images as being the same face (typically where the distance between the feature vectors is small).</p>
  
  <p>Selecting the right features is obviously crucial here. I'm not an expert on face descriptions, but it would probably be something like</p>
  
  <ul>
  <li>the distance between the eyes</li>
  <li>the distance between the bottom of the nose and the top of the upper lip</li>
  <li>...</li>
  </ul>
  
  <p>Once you have these measurements, store the values for each image in a vector and you can apply the Euclidean distance. Effectively, each image is represented as a point in the  <span class="math-container">$m$</span>-dimensional feature space, where each measurement is a dimension. To select good features make sure they are not correlated (ie they are independent of each other) and are the same scale (eg all are distances, so not eye colour)</p>
  
  <p>The choice of Euclidean distance is fairly minor: there are other distance metrics which might work equally well or even better. As I mentioned, the key point is selecting appropriate feature values.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-25T14:07:04.363Z
Answers.Text: You are describing "old school" biometric feature embeddings. Typical modern systems will learn more automated vector representation. Most importantly these can be trained without requiring labels with all the biometrics from thousands of faces. Instead to learn a feature vector they just need to know the true identity of person plus have multiple images of same person (at least 2 for each person, but more can be better). Otherwise the Euclidean distance part is the same
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-25T14:22:48.247Z
Answers.Text: @NeilSlater Yes, you are right; but for a simple project (which I assume the OP is talking about) it's easier to do it that way.
Answers.UserDisplayName: Oliver Mason
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-25T13:22:13.223Z
Answers.LastActivityDate: 2019-11-25T13:22:13.223Z
Answers.UserDisplayName: Oliver Mason
Body: <p>I am trying to make a face login application. face comparison algorithm is using Euclidean distance to calculate two different face images that are the same or not the same. can anyone help me with how the Euclidean distance algorithm is working?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-25T10:30:12.377Z
Comments.Text: Euclidean distance is the vector distance - https://en.wikipedia.org/wiki/Euclidean_distance - e.g. $\sqrt{\sum_i (x_i - y_i)^2}$. This seems a bit simple for a question though if you are doing face recognition work . . . could you explain more about where you are stuck
Comments.UserDisplayName: Neil Slater
Tags: <image-recognition><facial-recognition>
Title: How Euclidean distance algorithm calculate two different face images are match or not match in face recognition?
UserDisplayName: Bivin Vinod
ThreadText: # How Euclidean distance algorithm calculate two different face images are match or not match in face recognition?
  
  (Asked by: username_0 on 2019-11-25)
  
  I am trying to make a face login application. face comparison algorithm is using Euclidean distance to calculate two different face images that are the same or not the same. can anyone help me with how the Euclidean distance algorithm is working?
  
  **Tags:** image-recognition, facial-recognition
  
  > **Comments:**
  > **username_1**: Euclidean distance is the vector distance - https://en.wikipedia.org/wiki/Euclidean_distance - e.g. $\sqrt{\sum_i (x_i - y_i)^2}$. This seems a bit simple for a question though if you are doing face recognition work . . . could you explain more about where you are stuck  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-11-25. Score: 4
  
  Simply put, [Euclidean distance](https://en.wikipedia.org/wiki/Euclidean_distance) measures how far away two items are (see username_1 username_1's comment).
  
  In order to apply this to a pattern recognition task, you will need to convert the items to compare (in your case images of faces) into feature vectors (ie lists of numerical values), and then you do a pairwise comparison to work out how distant two faces are. You will then need to set a threshold where you treat two images as being the same face (typically where the distance between the feature vectors is small).
  
  Selecting the right features is obviously crucial here. I'm not an expert on face descriptions, but it would probably be something like
  
  * the distance between the eyes
  * the distance between the bottom of the nose and the top of the upper lip
  * ...
  
  Once you have these measurements, store the values for each image in a vector and you can apply the Euclidean distance. Effectively, each image is represented as a point in the $m$-dimensional feature space, where each measurement is a dimension. To select good features make sure they are not correlated (ie they are independent of each other) and are the same scale (eg all are distances, so not eye colour)
  
  The choice of Euclidean distance is fairly minor: there are other distance metrics which might work equally well or even better. As I mentioned, the key point is selecting appropriate feature values.
  
  > **Comments:**
  > **username_1**: You are describing "old school" biometric feature embeddings. Typical modern systems will learn more automated vector representation. Most importantly these can be trained without requiring labels with all the biometrics from thousands of faces. Instead to learn a feature vector they just need to know the true identity of person plus have multiple images of same person (at least 2 for each person, but more can be better). Otherwise the Euclidean distance part is the same  
  > **username_2**: @username_1 Yes, you are right; but for a simple project (which I assume the OP is talking about) it's easier to do it that way.  
  
  ---
  
  