cr21 / Siamese-Network

Simese Network for similarity and ranking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Siamese-Network

Siamese Network for similarity and ranking

This repo contains Basic Simese Network on MNIST Dataset. 
        .
    ├── README.md
    ├── models
    │   ├── __init__.py
    │   └── simese_network.py
    ├── output
    │   ├── plot_binary.png
    │   └── siamese_model
    │       ├── assets
    │       ├── imagePair.png
    │       ├── keras_metadata.pb
    │       ├── saved_model.pb
    │       └── variables
    │           ├── variables.data-00000-of-00001
    │           └── variables.index
    ├── train.py
    └── utils
        ├── __init__.py
        ├── config.py
        ├── createMontagePair.py
        ├── imagePairGenerator.py
        └── utility.py

Training Positive and Negative Pairs

ImagePairGenerator class generates postive and negative pairs. 
see below sample pairs

ImagePair

Traing and Validation Loss Plot:

binary_Siamese

Training : 
    python train.py

Inference :
    python inference.py --inputDir Samples/

Inference Result

Result1

Result2

Result3

About

Simese Network for similarity and ranking


Languages

Language:PureBasic 79.6%Language:Python 20.4%