A method for associating an object detection in a first frame with an object detection in a second frame using a convolutional neural network trained to determine feature vectors such that feature vectors of object detections relating to separate objects are arranged in separate clusters in a feature vector space, comprising: receiving an area of the first frame corresponding to the object detection in the first frame; determining, by the trained convolutional neural network, a set of feature vectors associated with the area in the first frame comprising two or more feature vectors, thereby determining a reference set of feature vectors comprising two or more feature vectors; receiving a plurality of areas of the second frame corresponding to respective ones of a plurality of object detections in the second frame; for each of the plurality of areas in the second frame, determining, by the trained convolutional neural network, a set of feature vectors associated with that area in the second frame, thereby determining a plurality of candidate sets of feature vectors; for each feature vector of the reference set of feature vectors, identifying, among the feature vectors of the plurality of candidate sets of feature vectors, a predetermined number of feature vectors having smallest distances in the feature vector space to that feature vector of the reference set of feature vectors, thereby identifying a set of closest feature vectors; and for each candidate set of feature vectors of the plurality of candidate sets of feature vectors, determining a measure of closeness to the reference set of feature vectors as a proportion of the set of closest feature vectors that belong to that candidate set of feature vectors; for each of the plurality of object detections in the second frame, assigning a weight based on the determined measure of closeness to the reference set of feature vectors of the candidate set of feature vectors corresponding to that object detection; and associating the object detection in the first frame with one object detection of the plurality of object detections in the second frame based on the assigned weights. receiving an area of the first frame corresponding to the object detection in the first frame; determining, by the trained convolutional neural network, a set of feature vectors associated with the area in the first frame comprising two or more feature vectors, thereby determining a reference set of feature vectors comprising two or more feature vectors; receiving a plurality of areas of the second frame corresponding to respective ones of a plurality of object detections in the second frame; for each of the plurality of areas in the second frame, determining, by the trained convolutional neural network, a set of feature vectors associated with that area in the second frame, thereby determining a plurality of candidate sets of feature vectors; for each feature vector of the reference set of feature vectors, identifying, among the feature vectors of the plurality of candidate sets of feature vectors, a predetermined number of feature vectors having smallest distances in the feature vector space to that feature vector of the reference set of feature vectors, thereby identifying a set of closest feature vectors; and for each candidate set of feature vectors of the plurality of candidate sets of feature vectors, determining a measure of closeness to the reference set of feature vectors as a proportion of the set of closest feature vectors that belong to that candidate set of feature vectors; for each of the plurality of object detections in the second frame, assigning a weight based on the determined measure of closeness to the reference set of feature vectors of the candidate set of feature vectors corresponding to that object detection; and associating the object detection in the first frame with one object detection of the plurality of object detections in the second frame based on the assigned weights.