Abstract:
Described is a technology in which an image retrieval system is updated incrementally as new image data becomes available. Updating is incrementally performed and only triggered when the new image data is large enough or diverse enough relative to the image data currently in use for image retrieval. Incremental updating updates the leaf nodes of a vocabulary tree based upon the new image data. Each leaf node&#39;s feature frequency is evaluated against upper and/or lower threshold values, to modify the nodes of the tree based on the feature frequency. Upon completion of the incremental updating, a server that performed the incremental updating is switched to an active state with respect to handling client queries for image retrieval, and another server that was actively handling client queries is switched to an inactive state, awaiting a subsequent incremental updating before switching back to active state.

Description:
BACKGROUND 
     As mobile devices grow in popularity, patch-based image retrieval allows a user to photograph current surroundings via a camera-embedded mobile telephone or other device, transmit the photograph to a server as a query, and receive a corresponding GPS location and/or other location information. Additional location-related information may include shopping information, restaurant reviews and so forth, and may be returned to the user as part of the query results. 
     To determine the location corresponding to a photograph, images are offline-indexed for use by the server, using patch-based scene recognition model. However, to ensure sufficient coverage of a large area such as a city, enormous amounts of data need to be used. This means that the scene recognition model has to be effectively constructed and maintained in large-scale scenario. 
     In this technology, textual descriptors of scenes are quantized by hierarchical k-means clustering to generate a vocabulary tree, which produces “visual words” (quantized clusters with SIFT features) to represent each image as a Bag-of-Word (BoW) vector. In retrieval, the similarity of images is evaluated by the cosine distance between their BoW vectors. While this system works to a reasonable extent, the scene dataset requires a substantial amount of updating and extending, which is computationally expensive given the enormous amounts of data being maintained and accessed. 
     SUMMARY 
     This Summary is provided to introduce a selection of representative concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used in any way that would limit the scope of the claimed subject matter. 
     Briefly, various aspects of the subject matter described herein are directed towards a technology by which an image retrieval system is updated incrementally as new image data becomes available, with updating triggered in a controlled manner based upon characteristics of the new image data. When new image data is received, the image data is evaluated to determine whether it meets a triggering criterion. If so a vocabulary tree model structure based upon the new image data is updated. 
     In one aspect, one triggering criterion corresponds to and amount (how much volume) of new image data is available. In one aspect, one triggering criterion corresponds to how diverse the new image data is with respect to other image data currently being used for image retrieval. 
     In one aspect, incremental updating updates the leaf nodes of a vocabulary tree based upon the new image data. Each leaf node&#39;s feature frequency is evaluated against upper and/or lower threshold values, to split a leaf node when the feature frequency exceeds an upper threshold value, delete a leaf node when the feature frequency is below a lower threshold value and the leaf node has at least one sibling leaf node, and withdraw a parent node to a leaf node when the feature frequency is below a lower threshold value and the leaf node has no sibling leaf node or nodes. 
     In one aspect, upon completion of the incremental updating, the server that performed the incremental updating is switched to an active state with respect to handling client queries for image retrieval, and another server that was actively handling client queries is switched to an inactive state, awaiting a subsequent incremental updating before switching back to active 
     Other advantages may become apparent from the following detailed description when taken in conjunction with the drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The present invention is illustrated by way of example and not limited in the accompanying figures in which like reference numerals indicate similar elements and in which: 
         FIG. 1  is a block diagram showing an example scene recognition system configured for incremental indexing at adaptively triggered times. 
         FIG. 2  is a flow diagram representing example steps for performing incremental indexing in a scene recognition system. 
         FIG. 3  shows an illustrative example of a computing environment into which various aspects of the present invention may be incorporated. 
     
    
    
     DETAILED DESCRIPTION 
     Various aspects of the technology described herein are generally directed towards enabling a scene recognition system to be maintained in a scalable and incremental way. To this end, scene images from different sources, such as web search results and user query examples, are incrementally uploaded to extend the server&#39;s scene dataset. More particularly, described is a scalable vision-based location recognition system in which the backend database is updated incrementally. Further described is a trigger mechanism that determines when the incremental updating is to occur. 
     While some of the examples described herein are directed towards a particular vocabulary tree structure, it is understood that these are only examples. Other structures and scene recognition models may be used. As such, the present invention is not limited to any particular embodiments, aspects, concepts, structures, functionalities or examples described herein. Rather, any of the embodiments, aspects, concepts, structures, functionalities or examples described herein are non-limiting, and the present invention may be used various ways that provide benefits and advantages in computing and scene recognition in general. 
     Turning to  FIG. 1 , there is shown a general scene recognition model configured for incremental updating as described herein. In general, a client device  102  sends in queries in the form of images to match to results. Logic  104 , which as exemplified herein handles updating and switching decisions, decides whether the client device query is to be sent to an original recognition model  106 , or to an updated/updating recognition model  108  based upon the state of the incremental update with respect to new scene images  105 , e.g., whether it is finished or updating (or still awaiting an update trigger as described below). Note that once switched, the updating recognition model becomes the next original recognition model, but for purposes of the description herein the models are named so as to indicate which is the one that is most-recently updated or being updated. 
     Further note that while each model  106 ,  108  includes a server  107  or  109  respectively, the server may be the same physical machine that is switched to use the appropriate data store ( 110  or  112 ) and vocabulary tree model ( 111  or  113 ) according to the incremental updating state. However, in one implementation, to provide consistent service while performing incremental indexing, there are two separate central computers at the server-end, e.g., server  107  and  109  as represented in  FIG. 1 . Each maintains its respective location recognition model  106  or  108  that operate identically once updated. Initially, the status of one model  106  is set as active while the other model  108  is inactive, where active generally means that the model provide the service to the client, while inactive means that the server (its program) is being utilized for incremental indexing. 
     In general, the system collects incremental scene images as well as their GPS locations from scene images uploaded by system administrators, which are carefully selected and treated as fully trusted, from query images sent by users to the server-end computer, which are considered as under evaluated, and images periodically crawled from a remote third-party source (also considered under evaluated); the scene name and the city name may be used as crawling criteria. 
     For under evaluated scene images, pre-processing is conducted to further filter for irrelevance. More particularly, considering each new image as a query, the scene recognition process is simulated in a server, in which the cosine distance between this query and the best matched image is compared with a maximum diversity threshold Tmax. If the distance is larger than Tmax, the image is discarded, otherwise it is added to the fully trusted image set (data store  105 ), which is treated as the new data batch to update the database. 
     As generally represented in  FIG. 2 , when the inactive model receives a new batch of scene images, criteria are evaluated (step  202 ) to determine whether to activate the incremental indexing process. If so, incremental indexing is performed at step  204 , and when finished (step  206 ), the model is switched (step  208 ) from inactive status to active, (and vice-versa for the other model). If not ready for switching, the images are stored and added via subsequent new image batches. Step  210  indicates that the original recognition model remains active when the updating criteria is not met, and until updating is finished. 
     Thus, via the logic and a trigger mechanism, there is provided a unified solution to adapt a vision-based location recognition system to handle dataset changes. More particularly, the recognition model is incrementally updated by an adaption implementation algorithm, but is only updated when triggered by an adaption trigger criteria. To summarize via  FIG. 1 , the exemplified framework enables incremental update of the backend database comprising adding images  105  to the data store  112  and indexing of a vocabulary tree model  113 , which efficiently includes new data into the recognition model  108  without needing to regenerate the entire model from the overall dataset. To reduce computational costs, an adaption trigger criteria is used to determine when the incremental updating occurs according to density-based relative entropy estimation between the original dataset and newly arriving data. Instead of overall model re-training only the vocabulary tree is used to generate the BoW vectors for new images, without updating or re-training the VT-based recognition model. 
     Note that when the distribution of new image patch is sufficiently different with respect to the original dataset, the performance decreases as new image batches arrive. This is handled by having the model be scalable to data variation, wherein “scalable” generally indicates that the recognition model is adaptive to data addition and removal in an incremental dataset. 
     To achieve scalability in vision-based location recognition, a vocabulary tree incremental indexing algorithm is presented to match a vocabulary tree-based recognition model to frequent distribution of new data. In general, the SIFT (Scale Invariant Feature Transform) features of a new data batch are re-indexed using the original tree, based on which new TF-IDF (term frequency-inverse document frequency) term weightings for each word is calculated. The frequency of each word corresponds to its relevance and its possible need for further expansion. Further, words in the vocabulary tree that contain overabundant or over-limited features are adapted to fit the new data. 
     In one implementation, three operations are defined to iteratively refine the model structure to fit the new data distribution, as generally represented in Table 1. One operation is a Leaf Split, wherein if the number of features contained in a leaf node is higher than a maximum threshold Lmax, the features of this node are clustered to m leaves in its sub-level (m is the same branching factor as in vocabulary tree construction). Another operation is Leaf Delete, wherein if the feature frequency of a newly generated leaf is lower than a pre-defined minimum threshold Lmin, its features are reassigned to the nearest leaves within the sibling nodes of this deleted leaf. Another operation is Parent Withdraw: if the feature frequency of a newly-generated leaf is lower than minimum threshold, and this leaf is the only child of its parent, this leaf is withdrawn and its parent degraded as a new leaf. 
     
       
         
               
             
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                 Vocabulary tree incremental indexing 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 Input: SIFT feature set of new data batches. 
               
               
                 For each feature in new data batches{ 
               
               
                   Re-index this feature vector over the VT hierarchy 
               
               
                   Increase the feature frequency of the nodes in VT hierarchy that this 
               
               
                   feature goes through in indexing} 
               
               
                 Go through all leaf nodes of VT{ 
               
               
                   If its feature frequency is lower than L min  or higher than L max , 
               
               
                   push this node into the Operation Array.} 
               
               
                 While the Operation Array is not empty{ 
               
               
                   Get the first element 
               
               
                   If its feature frequency is higher than L max { 
               
               
                    Leaf Split, push new leaves into Operation Array} 
               
               
                   If its feature frequency is lower than L min { 
               
               
                    If there are siblings of this node{ 
               
               
                     Leaf Delete, push renewed leaves into Operation Array} 
               
               
                    Else{ 
               
               
                     Parent Withdraw}}} 
               
               
                   Delete this first element} 
               
               
                 Output: Refined vocabulary tree after adaption. 
               
               
                   
               
             
          
         
       
     
     With respect to the updating criteria based on relative entropy estimation, when a new batch of images is available, it is not always necessary to activate the incremental indexing process in the inactive model. In general, the vocabulary tree can be regarded as a data driven model; if the distribution of new data is almost identical to that of original dataset, the updating may be postponed awaiting additional new images. 
     In one implementation, triggering occurs based on one of two (or both) criteria being met, namely when the volume of new images is sufficiently large, and/or when the distribution of new images is extremely diverse from that of original dataset. 
     One adaption trigger criteria uses Kullback-Leibler diversity based relative entropy estimation. In a first step, data distribution is measured by its sample density, which is further discretely approximated by point density. Initially, a Density Field of current dataset in SIFT space is estimated and approximated by the density of each SIFT point, in which the density of a SIFT point in 128-dimensional SIFT space is defined as: 
                     D   ⁡     (   i   )       =       1   n     ⁢         ∑   _       j   =   1     n     ⁢     ⅇ     -              x   i     -     x   j              L   ⁢           ⁢   2                       (   1   )               
where D(i) is the point-density of ith SIFT point; n is the total number of SIFT points in this dataset; x j  is j th  SIFT point. L2 distance evaluates the distance between two SIFT points. To reduce computational cost, the density of each SIFT point by its local neighbors are estimated as an approximation:
 
                       D   ~     ⁡     (     i   ,   m     )       =       1   m     ⁢       ∑     k   =   1     m     ⁢     ⅇ     -              x   i     -     x   j              L   ⁢           ⁢   2                       (   2   )               
where {tilde over (D)}(x,m) is the point-density of i th  SIFT feature in its m neighborhood. By neighborhood approximation, point based density is estimated. Their m nearest neighbors are stored for Density Field updating of new data batch. The data dissimilarity between the original dataset and the new data batch is evaluated by their density-based KL-like relative entropy estimation as:
 
                     Diver   Accumulate     =       ∑     i   =   1     n     ⁢     (           D   ~     new     ⁡     (     i   ,   m     )       ⁢   log   ⁢           D   ~     new     ⁡     (     i   ,   m     )             D   ~     org     ⁡     (       Nearest   ⁡     (   i   )       ,   m     )                       (   3   )               
in which {tilde over (D)} new (i,m) is the density of new data at i th  data point in m th  neighborhood; {tilde over (D)} org (Nearest(i),m) is the density of old data at the nearest old point of i th  new data in m th  neighborhood. It can be observed from the above equation that data diversity increases as the volume of new data batch increases, and/or as the distribution of original dataset and new data batch become more diverse.
 
     Based on data diversity evaluation, the incremental indexing process is controlled by the triggering criteria as follows: 
     
       
         
               
             
               
               
             
           
               
                 TABLE 2 
               
               
                   
               
               
                 Trigger criteria test: 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                   
                 Input: SIFT feature set of new data batches. 
               
               
                   
                 For each point i in the new dataset{ 
               
               
                   
                  Estimate the density of i by m neighborhood approximation 
               
               
                   
                  Search the nearest original point Nearest(i) 
               
               
                   
                  Calculate i th  part of Eq.3, add to Diver Accumulate } 
               
               
                   
                 If Diver Accumulate  ≧ μ max  (the maximum tolerant diversity{ 
               
               
                   
                  Carry out Vocabulary Tree Incremental Indexing 
               
               
                   
                  Go to Output } 
               
               
                   
                 Else 
               
               
                   
                 { Add current data to next batch images } 
               
               
                   
                 Output: Updated Vocabulary Tree 
               
               
                   
                   
               
             
          
         
       
     
     When merging the new data batch into original dataset, the density in the original dataset need not be updated. Indeed, their former density estimations can be partially preserved, and only need to be modified by the new data as:
 
 {tilde over (D)}   Update ( i,m )= {tilde over (D)}   org ( i,k )+ {tilde over (D)}   New ( i,m−k )  (4)
 
where k is the number of remaining original points in m nearest neighbors, which is achieved by comparing the new data with the former-stored m nearest neighbors of each point.
 
Exemplary Operating Environment
 
       FIG. 3  illustrates an example of a suitable computing and networking environment  300  on which the examples of  FIGS. 1 and 2  may be implemented. The computing system environment  300  is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the invention. Neither should the computing environment  300  be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the exemplary operating environment  300 . 
     The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to: personal computers, server computers, hand-held or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. 
     The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and so forth, which perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in local and/or remote computer storage media including memory storage devices. 
     With reference to  FIG. 3 , an exemplary system for implementing various aspects of the invention may include a general purpose computing device in the form of a computer  310 . Components of the computer  310  may include, but are not limited to, a processing unit  320 , a system memory  330 , and a system bus  321  that couples various system components including the system memory to the processing unit  320 . The system bus  321  may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus also known as Mezzanine bus. 
     The computer  310  typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by the computer  310  and includes both volatile and nonvolatile media, and removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by the computer  310 . Communication media typically embodies computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above may also be included within the scope of computer-readable media. 
     The system memory  330  includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM)  331  and random access memory (RAM)  332 . A basic input/output system  333  (BIOS), containing the basic routines that help to transfer information between elements within computer  310 , such as during start-up, is typically stored in ROM  331 . RAM  332  typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit  320 . By way of example, and not limitation,  FIG. 3  illustrates operating system  334 , application programs  335 , other program modules  336  and program data  337 . 
     The computer  310  may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,  FIG. 3  illustrates a hard disk drive  341  that reads from or writes to non-removable, nonvolatile magnetic media, a magnetic disk drive  351  that reads from or writes to a removable, nonvolatile magnetic disk  352 , and an optical disk drive  355  that reads from or writes to a removable, nonvolatile optical disk  356  such as a CD ROM or other optical media. Other removable/non-removable, volatile/nonvolatile computer storage media that can be used in the exemplary operating environment include, but are not limited to, magnetic tape cassettes, flash memory cards, digital versatile disks, digital video tape, solid state RAM, solid state ROM, and the like. The hard disk drive  341  is typically connected to the system bus  321  through a non-removable memory interface such as interface  340 , and magnetic disk drive  351  and optical disk drive  355  are typically connected to the system bus  321  by a removable memory interface, such as interface  350 . 
     The drives and their associated computer storage media, described above and illustrated in  FIG. 3 , provide storage of computer-readable instructions, data structures, program modules and other data for the computer  310 . In  FIG. 3 , for example, hard disk drive  341  is illustrated as storing operating system  344 , application programs  345 , other program modules  346  and program data  347 . Note that these components can either be the same as or different from operating system  334 , application programs  335 , other program modules  336 , and program data  337 . Operating system  344 , application programs  345 , other program modules  346 , and program data  347  are given different numbers herein to illustrate that, at a minimum, they are different copies. A user may enter commands and information into the computer  310  through input devices such as a tablet, or electronic digitizer,  364 , a microphone  363 , a keyboard  362  and pointing device  361 , commonly referred to as mouse, trackball or touch pad. Other input devices not shown in  FIG. 3  may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit  320  through a user input interface  360  that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). A monitor  391  or other type of display device is also connected to the system bus  321  via an interface, such as a video interface  390 . The monitor  391  may also be integrated with a touch-screen panel or the like. Note that the monitor and/or touch screen panel can be physically coupled to a housing in which the computing device  310  is incorporated, such as in a tablet-type personal computer. In addition, computers such as the computing device  310  may also include other peripheral output devices such as speakers  395  and printer  396 , which may be connected through an output peripheral interface  394  or the like. 
     The computer  310  may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer  380 . The remote computer  380  may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer  310 , although only a memory storage device  381  has been illustrated in  FIG. 3 . The logical connections depicted in  FIG. 3  include one or more local area networks (LAN)  371  and one or more wide area networks (WAN)  373 , but may also include other networks. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet. 
     When used in a LAN networking environment, the computer  310  is connected to the LAN  371  through a network interface or adapter  370 . When used in a WAN networking environment, the computer  310  typically includes a modem  372  or other means for establishing communications over the WAN  373 , such as the Internet. The modem  372 , which may be internal or external, may be connected to the system bus  321  via the user input interface  360  or other appropriate mechanism. A wireless networking component  374  such as comprising an interface and antenna may be coupled through a suitable device such as an access point or peer computer to a WAN or LAN. In a networked environment, program modules depicted relative to the computer  310 , or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,  FIG. 3  illustrates remote application programs  385  as residing on memory device  381 . It may be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used. 
     An auxiliary subsystem  399  (e.g., for auxiliary display of content) may be connected via the user interface  360  to allow data such as program content, system status and event notifications to be provided to the user, even if the main portions of the computer system are in a low power state. The auxiliary subsystem  399  may be connected to the modem  372  and/or network interface  370  to allow communication between these systems while the main processing unit  320  is in a low power state. 
     CONCLUSION 
     While the invention is susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit the invention to the specific forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions, and equivalents falling within the spirit and scope of the invention.