Building image pairs for siamese networks with Python