19. A device comprising: a storage; and a processor configured to: obtain, for a first object in an image, a first set of text labels using visual data extracted from the image; obtain, for a second object in the image, a second set of text labels using the visual data extracted from the image; generate, for various pairs of text labels, a relation score based on a number of co-occurrences of the text labels in text of web pages, wherein each pair of text labels includes a text label from the first set and a text label from the second set; and label the image with a given pair of text labels, from among the various pairs of text labels, based on solving a global optimization problem utilizing at least the relation score, wherein the relation score for the given pair of text labels meets a specified threshold relation score.
19. A device comprising: a storage; and a processor configured to: obtain, for a first object in an image, a first set of text labels using visual data extracted from the image; obtain, for a second object in the image, a second set of text labels using the visual data extracted from the image; generate, for various pairs of text labels, a relation score based on a number of co-occurrences of the text labels in text of web pages, wherein each pair of text labels includes a text label from the first set and a text label from the second set; and label the image with a given pair of text labels, from among the various pairs of text labels, based on solving a global optimization problem utilizing at least the relation score, wherein the relation score for the given pair of text labels meets a specified threshold relation score. 23. The device of claim 19 , wherein the relation score is generated based on co-occurrences that are within a limit selected from the group consisting of: adjacent words or terms, a number of words, an area, a same sentence, a same paragraph, a same page, and a same document.