Giter VIP home page Giter VIP logo

kadenze / siamese_net Goto Github PK

View Code? Open in Web Editor NEW
128.0 128.0 37.0 33.93 MB

This package shows how to train a siamese network using Lasagne and Theano and includes network definitions for state-of-the-art networks including: DeepID, DeepID2, Chopra et. al, and Hani et. al. We also include one pre-trained model using a custom convolutional network.

License: Other

Python 1.06% Jupyter Notebook 98.94%

siamese_net's People

Contributors

pkmital avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siamese_net's Issues

Data Format

What is the format/assumption about how the data is stored if we are training on our own data? Does each class contain its own folder of images in the root data directory?

CorrMM images and kernel must have the same stack size

Hello,
When I try to train my own dataset, after training I try to run the notebook, and at "Visualize the output of the network at any layer" step, I also get:
"ValueError: CorrMM images and kernel must have the same stack size"
I checked my resolution size, and made sure its 50, in all files. But still I get the error.

Usage of train set during performance evaluation

Hi @pkmital. In Line 2258 of siamese_net.py,
for split in ['train', 'valid', 'test']:
The pairs in the training set seems to be used to measure the performance of the trained model. Is this intentional? Aren't one supposed to not include the training set to evaluate the model? Or is it a special case in Siamese Networks?

The current example problem

I tried running the current example using "model.pkl", but the results are always "same person". Also I tried training my own model, and same result.

Contrastive Loss

In the siamese_net.py in the contrastive_loss function I think the definition of the loss is implemented wrong.

The output of the function is the following:
return T.mean(y * d + (1.0 - y) * T.maximum(margin - d, 0.0))
but according to the paper, if you see page 3 (bottom) according to the definition, the output must be:
return T.mean((1.0 - y) * d + y * T.maximum(margin - d, 0.0))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.