https://github.com/wangyongjie-ntu/siamese-network
siamese network
https://github.com/wangyongjie-ntu/siamese-network
Last synced: 3 months ago
JSON representation
siamese network
- Host: GitHub
- URL: https://github.com/wangyongjie-ntu/siamese-network
- Owner: wangyongjie-ntu
- Created: 2019-06-02T05:23:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-04T13:45:04.000Z (almost 6 years ago)
- Last Synced: 2025-01-09T19:57:44.970Z (4 months ago)
- Language: Python
- Homepage:
- Size: 3.82 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SIAMESE NETWORK
## Introduction
This repo just illustrates the mechanism of contrastive loss function.
Under this loss, if x_i, x_j are the features from same person, the distance is small. If x_i, x_j are the features from different person, the distance is large.

The network structure can be illustrated in the following image:

Download the att face training set, and create your own positive pairs and negative pairs. The ratio should be 1:1 ideally, but in fact, the negative is far more than positive pairs. Hard sample mining is adopted to make learning efficient.
# Training result
positive:negative = 1:1
learning rate = 0.0005