# C4W4L03 Siamese Network | Summary and Q&A

129.5K views
โข
November 7, 2017
by
DeepLearningAI
C4W4L03 Siamese Network

## TL;DR

Siamese networks are used to input two faces and determine their similarity or difference based on encoded vectors.

## Key Insights

• ๐ Siamese networks use encoded vectors to represent face images and measure their similarity.
• ๐ The distance between encodings is used to determine the similarity or difference between faces.
• ๐ Training a Siamese network involves adjusting the parameters to optimize the encoding and ensure accurate face recognition.

## Transcript

the job of the function D which you learned about in the last video is to input two faces and tell you how similar or how different they are a good way to do this is to use a Siamese Network let's take a look you're used to seeing pictures of confidence like these where you input an image let's say X 1 and through a sequence of convolutional and pu... Read More

### Q: What is the purpose of the function D in a Siamese network?

The function D takes in two faces and determines how similar or different they are by measuring the distance between their encoded vectors.

### Q: How is the face-recognition system built using a Siamese network?

To compare two pictures, each picture is fed into the same neural network, producing separate encoded vectors. The distance between these vectors is then calculated to determine the similarity of the images.

### Q: Where did the ideas for Siamese networks come from?

The concepts and architecture of Siamese networks were inspired by a research system called deep face, developed by Yann LeCun, Aymeric Jabon, Marc'Aurelio Ranzato, and Lรฉon Bottou.

### Q: How are Siamese networks trained to perform face recognition?

The training of a Siamese network involves adjusting the parameters of the neural network so that the encodings of the same person's faces have a small distance, while the encodings of different persons have a large distance. Backpropagation is used to optimize these parameters.

## Summary & Key Takeaways

• Siamese networks use a sequence of convolutional and fully connected layers to encode face images into a vector of 128 numbers.

• The encoded vectors, or encodings, represent the input images and can be used to compare and measure the distance between different images.

• The training of a Siamese network involves optimizing the parameters to ensure that the distance between encodings of the same person is small and that the distance between encodings of different persons is large.