adambielski/siamese-triplet
PyTorch library implementing siamese and triplet networks for learning compact embedding vectors from images.

This repository provides implementations of siamese and triplet neural network architectures along with custom loss functions for contrastive learning. It includes online pair/triplet mining strategies that automatically select hard positive and negative examples within mini-batches to improve embedding quality. The code provides dataset wrappers for MNIST, batch samplers for balanced training, and a unified fit function for training these embedding networks.