Skip to content

This notebook discusses a simple implementation of siamese architecture using pytorch.

Notifications You must be signed in to change notification settings

manharsharma007/siamese-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

siamese_network

This notebook discusses a simple implementation of siamese architecture using pytorch.

Siamese architecture

We will use a simple convolitional model to encode our input image into vectors and calculate the similarity between different encodings to verify users. The task is to learn these embeddinds or vectors from images such that similar images have similar encodings/vectors and vice versa. We will try to learn these embeddings with a simese network architecture as shown in the image below. The $F,G$ are the same models called twice to convert and anchor image and an input image (positive/negative) and calculate the absolute difference between the outputs (L1 Norm). Other distance measures like $L_2$ norm and $l_ps$ norm can also be used. $$ L1 = |F-G|$$ The output of this siamese network is fed to a sigmoid unit to predict the probability of the images being the same.

Loss Graph over 30 epochs

About

This notebook discusses a simple implementation of siamese architecture using pytorch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published