A method for training a machine learning model to generate a determinative compact representation of detected objects, the method comprising: a first generating step of generating (410a, 504a), using first machine learning logic, a first compact representation of a first object in a first image captured by an image sensor of a first moving object at a first location by reducing a first number of features of a first initial representation of the first object including a first initial feature vector, IFV, including features of modalities comprising texture, color, context and viewpoint, the first compact representation including a first compact feature vector, CFV, including features of a first subset of the modalities; a second generating step of generating (410n, 504n), using second machine learning logic, a second compact representation of a second object in a second image captured by an image sensor of a second moving object at a second location different from the first location by reducing a second number of features of a second initial representation of the second object including a second IFV including features of the modalities comprising texture, color, context and viewpoint, the second compact representation including a second CFV including features of the first subset of the modalities, wherein the first machine learning logic is a first subnetwork of a neural network and the second machine learning logic is a second subnetwork of the neural network, wherein the first subnetwork is identical to the second subnetwork; a computing step of computing (412, 506) a similarity score reflecting a level of similarity between the first compact representation of the first object and the second compact representation of the second object; a determining step of determining a difference between the similarity score and a predetermined target output; a back-propagating step of back-propagating the difference between the similarity score and the predetermined target output; an adjusting step of adjusting the parameters of the machine learning model; an identifying step of identifying features of the first and the second object corresponding to another subset of the modalities of the first initial representation, as being more determinative in generating the first CFV and the second CFV than the features of the first subset, the other subset of the modalities of the first initial representation including different modalities than the first subset, until the difference between the similarity score and the predetermined target output satisfies a predetermined difference threshold. a first generating step of generating (410a, 504a), using first machine learning logic, a first compact representation of a first object in a first image captured by an image sensor of a first moving object at a first location by reducing a first number of features of a first initial representation of the first object including a first initial feature vector, IFV, including features of modalities comprising texture, color, context and viewpoint, the first compact representation including a first compact feature vector, CFV, including features of a first subset of the modalities; a second generating step of generating (410n, 504n), using second machine learning logic, a second compact representation of a second object in a second image captured by an image sensor of a second moving object at a second location different from the first location by reducing a second number of features of a second initial representation of the second object including a second IFV including features of the modalities comprising texture, color, context and viewpoint, the second compact representation including a second CFV including features of the first subset of the modalities, wherein the first machine learning logic is a first subnetwork of a neural network and the second machine learning logic is a second subnetwork of the neural network, wherein the first subnetwork is identical to the second subnetwork; a computing step of computing (412, 506) a similarity score reflecting a level of similarity between the first compact representation of the first object and the second compact representation of the second object; a determining step of determining a difference between the similarity score and a predetermined target output; a back-propagating step of back-propagating the difference between the similarity score and the predetermined target output; an adjusting step of adjusting the parameters of the machine learning model; an identifying step of identifying features of the first and the second object corresponding to another subset of the modalities of the first initial representation, as being more determinative in generating the first CFV and the second CFV than the features of the first subset, the other subset of the modalities of the first initial representation including different modalities than the first subset, until the difference between the similarity score and the predetermined target output satisfies a predetermined difference threshold.