1. A method for object localization in a query image, comprising: with a processor: for each of a set of annotated images, with a model derived from part of a pre-trained neural network, the model including a sequence of convolutional layers, generating an annotated image representation based on activations output by a layer of the model, the annotated images each being annotated with object location information; for a query image, generating a query image representation based on activations output by the layer of the model; identifying a subset of similar annotated images from the set of annotated images, the identifying comprising computing a similarity between the query image representation and each of the annotated image representations; transferring object location information from at least one of the subset of similar annotated images to the query image; and outputting information based on the transferred object location information.