Giter VIP home page Giter VIP logo

Comments (8)

majianjia avatar majianjia commented on May 23, 2024

I am afraid not yet.
NNoM only supports one input currently but siamese has 2 input.
If there is a strong need for multiple inputs, I can plan for it in the next version.
Image processing is not the main focus for NNoM, but I am happy to discuss.

from nnom.

392625227 avatar 392625227 commented on May 23, 2024

I try to achieve fingerprint comparison on a very low-cost MCU. It has only 70KB ram. At present, only this Siamese network is found. The accuracy is good, so it is necessary to quantify the network parameters,for that limited MCU. I have only one year's experience in neural network. I don't know what better network structure with smaller precision can be recommended?

from nnom.

majianjia avatar majianjia commented on May 23, 2024

Fingerprint comparison sounds quite interesting.
If you separate the whole Siamese into 3 models, you should be able to use the current nnom to run it.

Perform 2 image with the identical Conv net model, then sub their output manually. Then pass the number to another NN for ranking.
image

from nnom.

392625227 avatar 392625227 commented on May 23, 2024

Yes, that's the essence of Siamese network. Thank you for drawing such a detailed picture. I'm going to try it. At the same time, I have seen your octave conv example, which is very enlightening. I also want to try it to see if it can achieve or surpass the classic SIFT algorithm.

from nnom.

392625227 avatar 392625227 commented on May 23, 2024

When we try to train the Siamese network, the input is img1, img2, and the label is 1 or 0, which is manually marked in advance. If we split it into two models from the subtract layer and train them separately, then the label of the previous model doesn't know how to do this?

from nnom.

jonnor avatar jonnor commented on May 23, 2024

One would train the Siamense network jointly. But use the 3 individual pieces when doing inference. Might want to prototype/test it in Python before translating to C using nnom.

from nnom.

majianjia avatar majianjia commented on May 23, 2024

When we try to train the Siamese network, the input is img1, img2, and the label is 1 or 0, which is manually marked in advance. If we split it into two models from the subtract layer and train them separately, then the label of the previous model doesn't know how to do this?

You may try this method:

Build and train the model as you did in keras.
After that, you can create 2 new models out of the one you trained. One for the image processing part and the other for the ranking.
layer_model = Model(inputs=model.input, outputs=layer.output)

This is a ref how creating a sub model out of an existing model is done.

layer_model = Model(inputs=model.input, outputs=layer.output)

from nnom.

jonnor avatar jonnor commented on May 23, 2024

This has been answered, and should be closed. CC @majianjia

from nnom.

Related Issues (20)

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.