1. A method of image annotation performed by a data processing apparatus, the method comprising: receiving an input image in the data processing apparatus; identifying one or more nearest neighbor images of the input image from among a collection of digital images stored on computer-readable media by operation of the data processing apparatus, each of the one or more nearest neighbor images being associated with a respective one or more image labels, wherein the collection of digital images comprises a plurality of reference images, and wherein identifying the one or more nearest neighbor images comprises: calculating, for each reference image, a whole-image distance between the input image and the reference image as 1 N ∑ k = 1 N d ~ k , wherein N is a number of image features extracted from both the input image and the reference image, and {tilde over (d)} k is a weighted feature distance representing a degree of difference between a k th image feature extracted from the input image and a corresponding k th image feature extracted from the reference image, and identifying one or more reference images closest to the input image, as measured by the whole-image distances, as the one or more nearest neighbors; assigning a plurality of image labels to the input image, wherein the plurality of image labels are selected by the data processing apparatus from the image labels associated with the one or more nearest neighbor images; and storing in a digital data repository the input image having the assigned plurality of image labels.