Skip to content

CNN based Siamese network for similarity detection. A toy database is used to demonstrate its functionality.

License

Notifications You must be signed in to change notification settings

fvilmos/shape_similarity_siamese_network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shape similarity identification with siamese network

Learning from a few samples is a difficult task in machine learning. The siamese network architecture provides a computationally reasonable way to check the similarity of sample pairs.

This implementation provides an example to test this concept, by generating a sample of pairs of similar and non-similar input images.

Steps:

  1. Create a toy database, generate different shapes pairs label logic: 1 - similar shapes ; 0 - different shapes
  2. Visualize data
  3. Create the siamese model
  4. Test similarity with the reference image

Model:

Outputs:

With high similarity:

With low similarity, below the threshold:

References

  1. Siamese Neural Networks for One-shot Image Recognition, G Koch et al
  2. Few-Shot Learning with Siamese Networks and Label Tuning T Muller arXiv:2203.14655 [cs.CL]

/Enjoy.

About

CNN based Siamese network for similarity detection. A toy database is used to demonstrate its functionality.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published