be set for each node by finding a fixed number of nearest neighbors for each node once the affinity graph 150 is created a tag system can be used for retrieval and annotation a variety of modes and usages could be implemented in accordance with the teachings herein two possible modes include interactive 160 and automatic 170 modes in the interactive mode 160 users can browse view inspect and label images or videos using a graphic user interface gui an embodiment of which is described in more detail hereinafter in connection with fig2 initially before any label is assigned a subset of default data can be displayed in the browsing window of the gui based on for example certain metadata e g time id etc or a random sampling of the data collection using the gui a user can view an image of interest and then provide feedback about relevance of the result e g marking the image as u201c relevant u201d or u201c irrelevant u201d or with multi grade relevance labels such feedback can then be used to encode labels which are assigned to the corresponding nodes in the graph in automatic mode 170 the initial labels of a subset of nodes in the graph can be provided by external filters classifiers or ranking systems for example for a given target an external classifier using image features and computer vision classification models can be used to predict whether the target is present in an image and assign the image to the most likely class positive vs negative or one of multiple classes as another example if the target of interest is a product image search for web based.