Request for training code / pipeline details

#1
by zuriher786 - opened

Hi,
I came across your Siamese Signature Verification model and found it really interesting. The architecture and explanation were very helpful.

I noticed that the repository includes the inference code and pretrained weights, but I couldn’t find the training code. I’m particularly interested in understanding how you set up the triplet loss training and how the dataset was prepared.

If you’re able to share the training code or point me in the right direction, I’d really appreciate it.

Thanks for your work on this!

Hi @zuriher786 ,

Thank you for your interest in the project. The entire project is available in this repo Siamese-network

The full training pipeline is included in the repository under the src directory:
https://github.com/Siddharth-magesh/deep-learning-sandbox/tree/main/siamese-network/src

Key components:

  • train.py: main training loop
  • siamese_network.py: model architecture
  • data_loader.py: triplet generation and dataset handling
  • config.py: hyperparameters
  • optimize.py: Optuna-based tuning
  • evaluate.py: evaluation pipeline

The model is trained using triplet loss, where each sample consists of an anchor, a positive (same signer), and a negative (different signer). Triplets are generated dynamically in the data loader.

The dataset is available here:
https://www.kaggle.com/datasets/siddharthmagesh/signature-verfication

Documentation and implementation details are provided here:
https://github.com/Siddharth-magesh/deep-learning-sandbox/tree/main/siamese-network/docs

For an overview of the approach, refer to:
https://github.com/Siddharth-magesh/deep-learning-sandbox/blob/main/siamese-network/docs/README.md

Additional theory references:
https://medium.com/@rinkinag24/a-comprehensive-guide-to-siamese-neural-networks-3358658c0513
https://www.analyticsvidhya.com/blog/2023/08/introduction-and-implementation-of-siamese-networks/

Let me know if you need clarification on any part of the training pipeline.

Sign up or log in to comment