Siamese Network Training Using Sampled Triplets and Image Transformation