Questions tagged [siamese-networks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
92 views

Siamese Network in TensorFlow employing Triplet Loss

I am constructing a siamese network using tensorflow which uses triplet loss. My inputs are of shape (100,100,1) and I have made a CNN embed_model to so that the output is a tensor with 50 points. Now ...
Adveat Prasad Karnik's user avatar
0 votes
0 answers
95 views

Siamese neural network - 100% accuracy when normalising data/50% when unnormalised

I am a currently trying to create a siamese neural network to classify my data. When I normalised the input images (img/255) i achieve 100% accuracy whereas when I dont I achieve 50% accuracy. I ...
user333276's user avatar
0 votes
0 answers
121 views

Why facenet works better than siamese network

I have been reading about face recognition literature. I stumbled upon siamese networks with contrastive loss and the facenet paper. Both approaches use metric learning. The difference is mainly in ...
satinder singh's user avatar
0 votes
0 answers
46 views

Siamese Neural network inputs

A currently task involves the classification of bacteria as antibiotic susceptible and antibiotic resistant. I have 4 data sets: treated resistant, treated susceptible, untreated resistant and ...
user333276's user avatar
0 votes
1 answer
215 views

Determine how each element in a vector contributes to cosine similarity when compare with other vector

I have a vector that represents my object and does a job of calculating which object is similar to the other object by using cosine similarity. To create that vector, I've combined many features that ...
Can Nguyen's user avatar
0 votes
1 answer
313 views

Difference between Siamese Network and Prototypical Networks for One Shot Learning

I am having a bit of trouble understanding how the architecture of prototypical networks in a one shot learning use case differs from Siamese networks. If I’m understanding correctly, Siamese networks ...
charactercapital's user avatar
1 vote
0 answers
87 views

Why won’t my Siamese model learn?

I´m trying to create a siamese model with Keras which learns to recognize differences in Mel-Spectrograms. The dataset I´m using is the ESC-50 dataset. I split it in training files (40 classes a 40 ...
Jonas D.'s user avatar
1 vote
1 answer
1k views

Siamese model accuracy stuck at 0.5

I'm trying to train a Siamese Network model for a signatures dataset using Keras API and considering the loss only seems not bad. But ironically enough the model accuracy stuck at 0.5. Model Loss: ...
Alex Aramyan's user avatar
1 vote
2 answers
918 views

Can siamese model trained with euclidean distance as distance metric use cosine similarity during inference?

If I have 3 embeddings Anchor, Positive, Negative from a Siamese model trained with Euclidean distance as distance metric for triplet loss. During inference can ...
B200011011's user avatar
0 votes
1 answer
648 views

Siamese Network for face comparison wont learn, accuracy stuck on 0.5, and loss stuck too

I'm trying to train a siamese network which contains a CNN and an embedding layer at the end to yield 2 similar (close) vectors for 2 images of the same person. I'm using the LFW_Cropped dataset, and ...
Jhon Margalit's user avatar
1 vote
0 answers
392 views

Split npz Dataset into Train/Test using Sklearn [closed]

I have a dataset of faces stored in an NPZ file that I would like to train it on Siamese Network. To do that, the dataset must be split into train / test using Sklearn. However, when I run the code to ...
Mohammed Abed's user avatar
1 vote
1 answer
312 views

Feature extraction from sequence of images with Siamese Neural Network

I am trying to train a neural network to recognize certain actions in short movies. Each such movie consists of a fixed number of frames, each frame - the image is of course the same size, after ...
JohnyBe's user avatar
  • 113
1 vote
2 answers
370 views

How gradients are flown back to Network in siamese architecture? How weights of all CNN models are same even when using different models

TL;DR: Intuition behind the gradient flow in Siamese Network? How can 3 models share the same weights? And if 1 model is used, how Gradients are updated from 3 different paths? I am trying to build a ...
Deshwal's user avatar
  • 323
1 vote
1 answer
45 views

Sneakers representation learning

I am trying to make a model which would take an image of shoes as an input and output a meaningful N-dimensional embedding of the shoes, so that they could be searchable/comparable/clustered and used ...
monomonedula's user avatar
0 votes
0 answers
262 views

How do I implement my loss function in Keras/Tensorflow, when it seems to have different parameters to the default ones?

So, I'm a university student studying Data Science, and after my previous question about TensorFlow got literally zero answers on Stack Overflow, I figured I'd post this one here instead. I need to ...
nick012000's user avatar
1 vote
2 answers
1k views

Siamese Network - Sigmoid function to compute similarity score

I am referring to siamese neural networks introduced in this paper by G. Koch et al. The siamese net computes 2 embeddings, then calculates the absolute value of the L1 distance, which would be a ...
Stefan J.'s user avatar
2 votes
1 answer
936 views

Why does Siamese neural networks use tied weights and how do they work?

Reading this paper on one-shot learning "Siamese Neural Networks for One-shot Image Recognition" I was introduced to the idea of Siamese Neural Networks. What I did not fully grasp was what they ...
Frank Weslien's user avatar
2 votes
1 answer
786 views

Binary Classification Comparing two time series of variable length

Is there a machine learning model (something like LSTM or 1D-CNN) that takes two time series of variable length as input and ...
gustavz's user avatar
  • 141
3 votes
0 answers
343 views

Chess deep learning siamese network overfitting when shouldn't in theory

TLDR: My network is training with pairs so instead of 10^6 samples it has 10^12 samples (The number of samples squared) . With that large of a data set is shouldn't overfit but it does after very few ...
EXTORY's user avatar
  • 31
3 votes
1 answer
3k views

How to combine different models in Keras?

I have a pre-trained network, consist of two parts, the feature extraction, and the similarity learning. The network takes two inputs and predicts the images are same or not. The feature extraction ...
Ali Raza Memon's user avatar
3 votes
0 answers
224 views

How to create anchor-positive and anchor-negative pair for feature X in a signature data set for training Siamese network

How to create anchor-positive and anchor-negative pair for feature X in a signature data set for training Siamese network? Im have a cedar signature data set with 55 peoples signatures(classes) with ...
star's user avatar
  • 1,461
3 votes
4 answers
2k views

Siamese Network in Keras

I‘m looking for a minimal applied example for the implementation of a (one shot) Siamese Network, preferably in Keras. I‘m well aware of the various data science online pages and the respective ...
Peter's user avatar
  • 7,426
1 vote
1 answer
1k views

Training a Siamese Neural Network for object similarity assessment

I am training a Siamese neural network with pairs of similar and dissimilar objects. The features of the objects are binary data on whether they contain some properties or not (2048 features per ...
Daniel's user avatar
  • 123
1 vote
0 answers
69 views

Why not use loss value for stopping the training in Siamese Networks?

I was building the training pipeline for a siamese network for one-shot learning. Everybody on the internet uses accuracy rather than loss for stopping training. Why use one-shot accuracy over loss ...
ankitf's user avatar
  • 11
1 vote
0 answers
103 views

Binary classification of graph pairs

I have a dataset made of pairs of graphs and a binary label (0 or 1 depending on if the graphs are similar). I am trying to find a model that, when given two graphs, will output if these two graphs ...
HannahB's user avatar
  • 11
1 vote
1 answer
243 views

Siamese networks vs Semantic similarity (may be gensim)

I am trying to understand the Siamese networks . In this vector is calculated for an object (say an image) and a distance metric is applied (say manhatten) on two vectors produced by the neural ...
Sandeep Bhutani's user avatar