1. A computer-implemented method for identifying an object in an image, comprising: segmenting a first image of an object into one or more superpixels, each superpixel having a known location; extracting local descriptors from the first image, each of the local descriptors having an interest point with a location; correlating the local descriptors to the superpixels based on locations of the local descriptors and superpixels; for each superpixel from a set of the superpixels from the one or more superpixels: for each local descriptor of a set of local descriptors correlated to the superpixel, obtaining a sparse code based on distance between the local descriptor and a set of similar leaf nodes in a tree voting structure; and combining the sparse code obtained from the local descriptors correlated to the superpixel to form a feature representing the superpixel; and assigning an object label to each superpixel from the set of the superpixels based, at least in part, on the feature that represents the superpixel.