1. A method for re-identification of objects, comprising steps: obtaining a pair of images, wherein each image represents an object; applying a convolutional neural network (CNN) to the pair of images, wherein the CNN comprises: a first convolutional layer; a first max pooling layer, which follows the first convolutional layer, wherein the first convolutional layer and the first max pooling layer are applied to each image separately to determine a feature map for each image; a cross-input neighborhood differences layer, which is applied to the feature maps to produce neighborhood difference maps; a patch summary layer, which is applied to the neighborhood difference maps to produce patch summary feature maps; a first fully connected layer, which is applied to the patch summary feature maps to produce a feature vector representing higher order relationships in the patch summary feature maps; a second fully connected layer, which is applied to the feature vector representing higher order relationships to produce two scores representing positive pair and negative pair classes; a softmax layer, which is applied to the two scores to produce positive pair and negative pair probabilities; and outputting the positive pair probability to signal whether the two images represent the same object or not, wherein the steps are performed in a processor.