1. A method comprising: segmenting, by one or more processors, an image having an array of image pixels into a plurality of patches, each patch including one or more of the image pixels; generating a graph of the image, the graph comprising a set of nodes and a set of edges connecting the nodes to each other, the set of nodes including a plurality of patch nodes corresponding to the plurality of patches and a virtual background node; computing a length of a shortest path from each patch to the virtual background node; and designating respective lengths as a saliency value for each patch to create a saliency map of the image.