In an object retrieval system, a user may select a query image and specify a region of interest in the query image around the object of interest (referred to as the query object) to specify the search intent. Features may be extracted from the region of interest and quantized into visual words. The visual words representation of the region of interest may be used to identify relevant images.
However, current object retrieval methods may fail to return satisfactory results under certain circumstances. For example, if the region of interest specified by the user is inaccurate or if the object captured in the query image is too small to provide discriminative details, the object retrieval may result in erroneous or few matches with similar objects. In other words, object retrieval based on visual words may not achieve reliable search results where the visual words extracted from the region of interest are unable to reliably reveal the search intent of the user.
A user typically specifies a region of interest using a bounding box, i.e., a rectangle that specifies a portion of the query image. However, the bounding box may be a rough approximation of the region of interest representing the query object. For example, the bounding box may not accurately represent the region of interest because the bounding box may be rectangular while the region of interest may have a complex shape. In this example, the visual words extracted from the bounding box may include information that is unrelated to the search intent. In addition, in cases where the region of interest is too small, or where the query object lacks discriminative details, the number of visual words derived from the bounding box may be insufficient to perform a reliable relevance estimation, with the consequence that irrelevant images may be returned.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter; nor is it to be used for determining or limiting the scope of the claimed subject matter.
Some implementations provide techniques and arrangements to perform image retrieval. For example, some implementations identify an object of interest and a visual context in a first image. In some implementations, a second image that includes a second object of interest and a second visual context may be compared to the object of interest and the visual content, respectively, to determine whether the second image matches the first image.
The detailed description is set forth with reference to the accompanying drawing figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different figures indicates similar or identical items or features.
Conventional object retrieval methods may fail to return satisfactory results if the region of interest specified by the user is inaccurate or if the object of interest captured in the query image is too small to provide discriminative details. Some implementations herein provide techniques to identify a visual context in the query image. The visual context may be used along with the object of interest to determine a search intent of the user. The search intent may be used to retrieve matching images from an image database.
For example, a visual context of a query object may be used to compensate for possible uncertainty in feature-based query object representation. Contextual information may be drawn from visual elements surrounding the query object in the query image. The region of interest may be regarded as an uncertain observation of the latent search intent. A saliency map detected for the query image may be used as a prior probability distribution (also referred to as a prior). A search intent may be determined based on the uncertain region of interest and the saliency prior. A contextual object retrieval may be performed using a language modeling approach in which words are selected to represent the search intent. The selected words may be compared to words associated with images in an image database to identify matching images.
In some implementations, a framework that provides context-based object retrieval may use a language modeling approach for retrieval. In a conventional object retrieval system visual words associated with the region of interest are used to perform a search. In contrast, some of the implementations described herein may use visual words from both the region of interest and the visual context. The visual words may be weighted using the search intent scores based on the uncertain observation of the search intent (e.g., the region of interest) and the saliencey prior derived from a saliency map of the query image.
The technologies described herein generally relate to object retrieval. Some implementations provide techniques to receive a query associated with a query image and determine saliency scores for a plurality of positions in the query image. A prior probability distribution may be determined based on the saliency scores. A search intent may be determined based on the prior probability distribution and the user-specified bounding box. Based on the search intent, some implementations may identify, from a set of images, one or more images that match the query image.
Some instances may receive data identifying a region of interest associated with the query image provided by the user. An object of interest may be identified in the query image based on the region of interest. A visual context associated with the object of interest may be identified, in the query image. The visual context may include a portion of the query image that does not include the object of interest. A comparison between the query and the database image is performed based on the object of interest in query image, as well as the visual context.
Additionally, some implementations may receive a query image automatically determined with contrast-based saliency scores. The contrast-based saliency scores may be used to determine a prior probability distribution. A search intent associated with the query may be determined based on the prior probability distribution. The contextual object retrieval may use visual words selected based on the search intent.
The framework 100 includes a search engine 102 communicatively coupled to an image database 110. In some implementations, the search engine 102 may execute at a first computing device (not shown) and the image database may execute at a second computing device (not shown). In other implementations, the search engine 102 and the image database may both execute at the same computing device (not shown). The image database 110 may include one or more images 112. The search engine 102 includes a search intent detection module 106 and a context-based object retrieval module 108.
The search intent detection module 106 may determine a search intent 104 from an image, such as the query image 114, that is received as input at the search engine 102. The context-based object retrieval module may perform a search of the image database 110 based on the search intent 104 to determine whether any images 112 in the image database 110 match the query image 114.
For example, the search engine 102 may receive a search query that includes the query image 114. The query image 114 include multiple pixels 130. The query image 114 may include a region of interest 118 that identifies at least a portion of the query image 114. The region of interest 118 may be specified by a user. The region of interest 118 may include an object of interest 120. Conventional object retrieval techniques may directly compare the region of interest 118 with images 112 in the image database 110, without regard to a context 116 associated with the object of interest 120. For example, even though one or more of the other image(s) in the image database 110 may include the object of interest 120, conventional object retrieval techniques may not recognize a match when the region of interest 118 is inaccurate (e.g., does not include all of the object of interest) or when the object captured in the query image is too small to provide discriminative details.
In order to address these issues, the search intent detection module 106 may determine the search intent 104 from the context 116 or from a combination of the context 116 and the object of interest 120. The context 116 may be a portion of the query image 114 that includes the object of interest 120. The context 116 may be a portion of the query image 114 that is larger than the region of interest 118. For example, the object of interest 120 may be a building that is located near distinctive features, such as large trees or a mountain. The distinctive features may appear in the context 116 but not in the region of interest 118. The search intent detection module 106 may determine the search intent 104 based on both the context 116 and the object of interest 120.
The context-based object retrieval module 108 may perform a search of the image database 110 based on the search intent 104 to determine whether any images 112 in the image database 110 match the query image 114. The search engine 102 may provide as output one or more matching images 124 when the search identifies matching images (e.g., a first image 126 and a second image 128) from the images 112 that match the search intent 104. The first image 126 and the second image 128 may include at least a portion of the object of interest 120, at least a portion of the context 116, or any combination thereof. The search engine 102 may indicate that no match 122 was found when the search does not identify any of the images 112 in the image database 152 as matching the search intent 104.
Thus, the search intent detection module 106 may use the context 116 in addition to or instead of the object of interest 120 to determine the search intent 104. The context-based object retrieval module 108 may use the search intent to perform a search of the image database 110 to identify matching images 126 and 128. By including the context 116 when determining the search intent 104, the search engine 102 may identify the matching images 126 and 128 when the region of interest 118 is inaccurate (e.g., does not include all of the object of interest) or when the object captured in the query image is too small to provide discriminative details
Some implementations may return a ranked list of relevant images (e.g., the images 126 and 128) in response to a query. In mathematical terms, some implementations may determine a relevance of an image d in a database with respect to a query q={qI,qb}, where qI represents the image and qb=[xl,yl,xr,yr] identifies the region of interest. In this example, a rectangular bounding box is used to specify the region of interest, with (xl, yl) and (xr,yr) representing the coordinates of the top left and bottom right point of the rectangle, respectively.
For ease of understanding, a rectangular bounding box and corresponding coordinates are used example herein. However, other geometric shapes, such as a triangle, circle, or the like may be used to identify the region of interest. For example, qb=[x1, y1, x2, y2, and x3, y3] may be used to represent a triangular shaped region of interest, with (x1, y1), (x2, y2), and (x3,y3) identifying coordinates of three vertices of the triangle. As another example, qb=[x1, y1, r] may be used to represent a circular shaped region of interest, with (x1, y1) identifying coordinates of a center of the circle and r identifying a radius of the circle. In some implementations, a free-form shape may be used to identify the region of interest. For example, qb=[x1, y1, l1, x2, y2, l2, . . . xn, yn, ln] may be used to represent a free-form shaped region of interest (where n>2). In this example, (x1, y1, l1), (x2, y2, l2), . . . (xn, yn, ln) identify multiple lines that make up the free-form shape. For example, the multiple lines may include a line that starts at coordinates (x1, y1), ends at coordinates (x2, y2) and has a length of l1. The tuple (xn, yn, ln) may identify a line that starts at coordinates (xn, yn), ends at coordinates (x1, y1) and has a length of ln.
In a context-based retrieval framework, image retrieval may be performed using visual words to represent the search intent 104. To perform language model based queries using visual words, the query image 114 and the images 112 in the image database 110 may each be represented as one or more visual words. To identify visual words to represent a particular image, interest points may be detected in the particular image based on techniques such as Difference of Gaussian (DoG) or Harris Affine detectors. For each of the detected interest points, Scale Invariant Feature Transform (SIFT) descriptors may be extracted to represent a local region around each interest point. The SIFT descriptors may be quantized into visual words using a K-means vector quantization method. This may result in the query image being represented as qI=[(qi,pi)]i=1M
After the query image 114 and the images 112 in the image database 110 are represented as sets of visual words, a language model based retrieval model may be used to perform a search. In the language model based retrieval model, a language model, such as a unigram model p(w|d), may be estimated for words w for each of the images 112 (referred to as documents) d in the image database 110. The relevance between a query and a document may be estimated as the query likelihood given the document d and may be written as:
A language model based retrieval model may be considered a risk minimization problem in which the risk of returning a document d given the query q may be defined as:
where a=d is the action to return the document d for the query q, C is the collection of documents in the database, r indicates the relevance of the document d to the query q, and where θQ and θD are the language models for the query model and the document model, respectively. In the above equation, L represents a loss function, which may be modeled using a Kullback-Leibler (KL) divergence between the query model and the document model. The divergence may be used estimate the loss function resulting in the following risk function:
are the maximum a posteriori estimations of the query model and the document model. The term ξq is a query-dependent constant and may be ignored when equation (3) is used to rank the resulting documents (e.g., the matching images 124) for a particular query. The probability of words may be estimated using a maximum-likelihood criterion:
where ci(q) and ci(d) are the term frequencies of the words qi and di in the query and a document, respectively.
In an empirical estimation of a document model, a probability of visual words which do not occur in a document may be zero, resulting in infinite numbers in the relevance estimation based on the divergence in equation (3). To address this, a smoothing function may be used. For example, a smoothing function that incorporates linear interpolation of a maximum likelihood estimation of a language model and a collection model, such as Jelinek-Mercer smoothing, may be performed. The smoothing may be formulated as:
p
λ(wi|{circumflex over (θ)}D)=(1−λ)pml(wi|{circumflex over (θ)}D)+λp(wi|C), (6)
where p(wi|C) is the collection language model and λε[0,1] is the trade-off parameter to control the contribution of the smoothing term.
As discussed above, conventional object retrieval systems use only visual words that represent the region of interest 118 to estimate the query model. However, in a context-based object retrieval framework, the visual context may be used to improve the reliability of this estimation by looking beyond information available in the region of interest 118. A divergence retrieval model may be used to estimate the relevance between the query and database images using a context-aware query model.
The query image 114 with the region of interest 118 may be generated from the following distribution:
where S(pi,q) is the search intent score of the visual word qi at the position pi. A context-based object retrieval framework may include both visual words associated with the region of interest 118 and visual words associated with the context 116. The search intent score may indicate a confidence that a particular visual word is relevant to the search intent. In contrast, a conventional object retrieval system that does not consider the context 116 has a binary search intent score, where visual words associated with the region of interest have a search intent score of 1, and visual words outside the region of interest have a search intent score of 0.
Based on the distribution represented by equation (7), a maximum likelihood estimation of the context-aware query model θQ may be expressed as:
Equation (9) may be integrated into the retrieval model represented by equation (3) to rank the images.
The search intent score of each visual word associated with the query image 114 may be proportional to a probability of a corresponding position of that visual word to reflect a search intent of a user given the query image 114 and the region of interest 118:
S(pi,q)∝p(pi|q). (10)
Assuming a uniform prior, the probability represented by equation (10) may be proportional to a likelihood of generating the query image 114 and the region of interest 118 given the search intent score:
p(pi|q)=p(pi|qI,qb)
∝p(qI,qb|pi). (11)
Assuming that the region of interest 118 and the query image 114 are conditionally independent given the search intent score per position:
p(pi|q)∝p(qb|pi)p(qI|pi). (12)
Equation (12) may be represented as:
p(pi|q)∝p(pi|qb)p(pi|qI). (13)
In equation (13), the first term, p(pi|qb) represents the probability that the position pi reflects a search intent determined from the region of interest 118. The second term, p(pi|qI), represents the probability that the position pi represents salient properties of the query image 114, indicating a logical choice of a prior for inferring a user's search intent given a search session. As such, the second term in equation (13) may be estimated using saliency detection and may be used to improve the reliability of the search intent score estimation, particular when information provided by the region of interest 118 is unreliable. For example, the information provided by the region of interest 118 may be unreliable if the region of interest 118 is inaccurate or if the object of interest 120 in the query image 114 is too small to provide discriminative details.
Saliency detection may be used in content-based image retrieval to detect potentially important and representative regions in the query image 114. For example, saliency detection may be used to determine the prior for defining the region of interest 118 in the query image 114. In some implementations, contrast-based saliency detection may be used because color contrast plays an important part in attracting human attention when an image is viewed. A contrast-based saliency score may be determined for each of the positions in an image using the following equation:
where Ni is the neighborhood of the position pi in the image, and l(pi) and l(y) are the color values in the positions pi and y, and d is the Gaussian distance between the color values. In some implementations, the colors may be chosen from an LUV space. The contrast-based saliency score of equation (14) may be normalized into the range [0,1], resulting in a saliency score Ai for each of the positions in an image. The contrast-based saliency score of equation (14) may be transformed into the prior probability using the equation:
p(pi|qI)∝exp(−γ(Ai−1)2), (15)
where γ is the inverse of color temperature.
Search intent may be determined using various techniques, such as spatial propagation or appearance propagation. When determining the search intent using spatial propagation, a dual sigmoid approximation that considers spatial proximity of pixels in an image may be used.
The region of interest 118 that is specified by a user may be rough and inaccurate for a variety of reasons. For example, the user may be in a hurry and not take the time to accurately specify the region of interest 118. As another example, the user may be unfamiliar with what constitutes an accurate region of interest. In addition, a query interface that enables a user to specify the region of interest 118 via a geometric shape, such as a rectangle, may not accurately represent a complex region of interest. For example, a rectangular shaped region of interest may not accurately represent a building with architectural features such as towers or spires.
When estimating the search intent 104 based on information from the region of interest 118, assume that the intents for the two dimensions of the image are independent of each other so that the intent probability can be decomposed into the product of the probabilities estimated from the two dimensions respectively:
The function ƒ, i.e., the search intent score estimation of a single dimension, may be a smoothed approximation of the region of interest 118 along the single dimension to take into account the uncertainty and the context 116. In other words, the value of ƒ for xl<xi<xr may be close to 1 and may be approaching 0 the further xi is from the region of interest 118. In this example, for ease of understanding, the region of interest 118 is assumed to be a rectangular shape, referred to as a bounding box. To obtain a probability distribution, the function ƒ may be modeled as the minimization of two sigmoid functions for the two sides of the bounding box along each dimension. For the x-dimension this model may be defined as:
where δ is a parameter serving as a tradeoff between fitting the bounding box and being sufficiently smooth to incorporate the context. The same model for ƒ may also be used for the y-dimension.
The search intent score may be determined by multiplying the prior, represented in equation 15, with the probability estimation indicating the search intent 104 based on the bounding box specification:
S
a(pi,q)exp(−γ(Ai−1)2)׃(xi;xl,xr,δ)ƒ(yi;yl,yr,δ). (18)
The parameters γ and δ determine the contributions from the prior and the bounding box, respectively, to the intent score estimation. For example, when the bounding box specification is reliable then a smaller γ and a larger δ may be used and when the bounding box specification is unreliable, a larger γ and a smaller δ may be used.
Estimating Search Intent from the Bounding Box by Matting
The search intent 104 is estimated from the bounding box (e.g., the region of interest 104) to assign high scores to the object of interest 120, which is typically in the foreground. Lower scores may be assigned to the background or other foreground objects that are not of interest to the user, but that are regarded as a useful context for image retrieval based on the region of interest 118. This is similar to image matting, in which the foreground is separated from the background by estimating alpha values (values in the alpha channel indicate opacity) for each pixel. In some implementations, an image matting algorithm may be used to estimate the search intent 104 from the bounding box.
Because the bounding box is a rough specification of the object of interest 120, the bounding box may be regarded as containing the object of interest 120 along with other portions of the query image 114. As a result of their proximity to the object of interest, these other portions of the query image 114 are more likely to include background (e.g., contextual) information rather than foreground-related information.
The following approach may be used to determine which portions of the bounding box to categorize as foreground and which portions of the bounding box to categorize as background. Based on the bounding box specification, the image may be segmented to estimate a foreground model and a background model. The estimated foreground and background models may be used to categorize the pixels 130 as foreground pixels or background pixels. The search intent score of each individual pixel may be estimated based on the categorized pixels.
The image may be segmented to estimate a foreground model and a background model using a segmentation algorithm, such as a GrabCut algorithm (an iterative energy minimization algorithm), in which the foreground and background models may be Gaussian Mixture Models (GMM) in a Red-Green-Blue (RGB) color space. The segmentation algorithm may be used to minimize an energy function that includes both a data fitting term and a smoothness term, as defined by the following equation:
E(α,k,θ,z)=U(α,k,θ,z)+γV(α,z), (19)
In equation (19), αε{F,B} indicates whether the pixels 130 belong to the foreground or background, and k indicates which GMM is assigned. Furthermore, θ are the model parameters, z represents the color of each pixel, and γ is the parameter regulating the trade-off between data fitting and smoothing. Specifically, the data fitting term U and the smoothness term V may be defined respectively as follows:
where μ and Σ are the parameters of the foreground and background models, where is the set of pairs of neighboring pixels, and where β is the parameter to adjust the extent of smoothness in a coherent region.
The estimated foreground and background models may be used to determine the probabilities that each pixel belongs to the foreground and to the background, respectively. The probability that a particular pixel of the query image 114 belongs to the foreground may be expressed as:
Using the estimated probabilities as the search intent scores may not take into account spatial smoothness and therefore may not perform accurately. To account for spatial smoothness, the intent scores may be determined based on a portion of the pixels 130 that have been categorized as foreground pixels or background pixels. For example, the top 10% of the pixels inside the bounding box that have the largest foreground probabilities (referred to as ΩF) and the top 20% of the pixels outside the bounding box that have the largest background probabilities (referred to as ΩB) may be used as input to a matting algorithm. For example, a matting algorithm based on geodesic distance may be used, as defined by the following equation:
where lε{F,B} and where d(s,x) is computed as follows:
where Ps
Based on the above, the search intent score 104 may determined from the bounding box (e.g., the region of interest 118) using matting and the prior as follows:
where γ controls the contribution from the prior and xi is the pixel value in the position pi.
Thus, some implementations of a context-based object retrieval framework may use the query language model of equation (9), the search intent score estimated by equation (18) and equation (25) and the divergence retrieval model of equation (3). The inclusion of the visual context 116 may improve the accuracy of an image search engine in various search intent categories, including landmarks, animals, logos, book covers, and paintings. For example, image searches for a particular landmark that take into account the visual context 116 may have a higher accuracy than image searches that do not take into account the visual context 116 because landmarks are usually in a fixed geographical location with adjacent contextual landmarks. As another example, a panda bear may often be found in close proximity to bamboos so taking into account bamboos in the context of an image of a panda bear may assist in distinguishing pictures of a panda bear from pictures of other types of bears during an image search. As a further example, paintings are typically associated with a particular frame. Distinctive features of the frame may be part of a context that assists in distinguishing a particular painting from other paintings during an image search.
The architecture 300 may include a computing device 306 coupled to the search engine 102 via a network 304. The computing device 306 may be coupled to a display device 302. A camera 308 may be coupled to the computing device 306. For example, the camera 308 may be coupled to the computing device 306 via a Universal Serial Bus (USB) interface or via a wireless interface, such as 802.11 b/g/n, Bluetooth®, or wireless USB. In some implementations, one or more of the camera 308 and the display device 302 may be integrated into the computing device 306. For example, the computing device 306 may be a wireless communication device (e.g., a mobile phone), a tablet device, or laptop computer with an integrated camera and display.
The display device 302 may display a user interface 310 that is provided by the computing device. The user interface 310 may include a search query area 312 and a search results area 314. The search query area 312 may enable a user to select the query image 114. For example, the user may retrieve the query image 114 from the computing device 306 or from the camera 308. The search query area 312 may enable the user to specify the region of interest 118.
The search engine 102 may be coupled to the image database 110 that includes the images 112. The search engine 102 may use a context-based object retrieval framework to perform image retrieval.
In operation, the user may select the query image 114 and specify the region of interest 118. For illustration purposes, a rectangular-shaped bounding box is used to specify the region of interest 118. However, the region of interest 118 may be specified using other shapes, such as a geometric shape (e.g., a triangle, a circle, a rhombus, or a trapezoid), or a free form shape. The search query area 312 of the user interface 310 may enable the user to send a search query 316 to the search engine 102. The search query 316 may include the first image or include data (e.g., an address or a pointer) that enables the search engine to access the query image 114. The search query 316 may also include data specifying the region of interest 118.
In response to receiving the search query 316, the search engine 102 may perform a context-based search of the image database 110 to determine if any of the images 112 matches the query image 114. For example, the search engine 102 may determine contrast-based saliency scores for at least some of the pixels 130 in the query image 114. The contrast-based saliency scores may be normalized. The search engine 102 may determine a prior probability distribution based on the contrast-based saliency scores. The search engine 102 may determine a search intent based on the prior probability distribution via a dual-sigmoid approximation. The search intent may be used to identify visual words associated with the query image 114. Based on the search intent, the search engine 102 may identify one or more images, such as the first image 126 and the second image 128 from the images 112. The images 126 and 128 may be identified by comparing the visual words associated with the query image 114 to visual words associated with each of the images 112. The search engine 102 may send search results 318 to the computing device 306. The computing device 306 may receive the search results 318 from the search engine 102 and display the images 126 and 128 in the search result area 314 of the user interface 310.
Thus, the search engine 102 may use a context-based image retrieval framework to perform a search of the image database 110 to identify one or more images 126 and 128 that match the query image 114. To perform the search, the search engine 102 may determine a search intent of the user based on the context 116 and the region of interest 118. By including the context 116 when determining the search intent, the search engine 102 may provide more accurate results than a conventional system that does not include the context 116 when determining the search intent.
The architecture 400 may include a computing device 402 coupled to a display device 302 and to an imaging device 404. The imaging device 404 may be capable of generating an image. For example, the imaging device 404 may be a camera or a scanner. In some implementations, the imaging device 404 may be coupled to the computing device 402 via a Universal Serial Bus (USB) interface or via a wireless interface, such as 802.11 b/g/n, Bluetooth®, or wireless USB. In some implementations, the imaging device 404 and the display device 302 may be integrated into the computing device 402. For example, the computing device 402 may be a wireless communication device (e.g., a mobile phone), a tablet device, or laptop computer with an integrated camera and display. The display device 302 may display the user interface 310 that is provided by the computing device 402.
The computing device 402 may include one or more processors 406 and a memory 408. The memory 408 may include the search engine module 410 and an image database 110. The search engine module 410 may include instructions that are executable by the one or more processors 406. In some implementations, the search engine module 410 may be a software application that is installed in the memory 408. In some implementations, the search engine module 410 may be part of an operating system executing in the memory 408.
In operation, a user may select the query image 114 from the image database 110 or retrieve the query image 114 from the imaging device 404. The user may specify the region of interest 118. The user interface 310 may enable the user to send a search query 412 to the search engine module 410 that is executing on the computing device 402. The search query 412 may include data 414 identifying the region of interest 118. The data 414 may also include the query image 114 or include an address that enables the search engine to access the query image 114.
In response to receiving the search query 412, the search engine module 410 may perform a context-based search of the image database 110 to determine if any of the images in the image database 110 matches the query image 114. For example, the search engine module 410 may determine a search intent of the user based on the region of interest 118 and the context 116. The search intent may be used to identify first visual words 418 associated with the query image 114. The search engine 102 may identify one or more images, such as the first image 126 and the second image 128, from the image database 110. The images 126 and 128 may be identified by comparing the visual words 418 associated with the query image 114 to visual words 426 associated with the first image 126 and with visual words 434 associated with the second image 128.
The search engine module 410 may determine that the second image 442 matches the first image 422 if a number or a percentage of the first visual words 418 that match the second visual words 426 satisfies a threshold. For example, the search engine module 410 may determine that the second image 442 matches the first image 422 if at least eighty-percent of the second visual words 426 match the first visual words 418.
In some implementations, before receiving the search query 412, the search engine module 410 may pre-process images in the image database 110 by selecting visual words for each image in the image database 110. For example, during the pre-processing, the search engine module 410 may select the second visual words 426 for the first image 126 based on one or more of a region of interest 422, a context 420, and an object of interest 424. The search engine module 410 may select the third visual words 434 for the second image 128 based on one or more of a region of interest 430, a context 428, and an object of interest 432. After selecting visual words for each image in the image database 110, the search engine module 410 may store the selected visual words in the image database 110 so that each image in the image database 110 has an associated set of visual words.
In some implementations, each time an image is added to the image database 110, the search engine module 410 may automatically (e.g., without human interaction) pre-process the added image by selecting visual words and storing the selected visual words in association with the added image. In some implementations, the search engine module 410 may periodically and automatically (e.g., without human interaction) pre-process newly added images. For example, the search module 414 may initially pre-process images in the image database 110 at a first date. At a second date that occurs after the first date, the search module 414 may pre-process new images that have been added to the image database 110 since the first date. The interval between the first date and the second date may be user selectable. For example, the user may specify that the search module 414 pre-process newly added images every week, every month, every three months, etc. In some implementations, a user may selectively override the automatic pre-processing. For example, the user may instruct the search engine module 410 to initiate pre-processing of newly added images.
After performing the search in response to the search query 412, the search engine 102 may send search results 416 to the display device 302. When the search results 416 include the images 126 and 128, the display device 302 may display the images 126 and 128 in the user interface 310.
Thus, the search engine 102 may determine a search intent of the user based on the context 116 and the region of interest 118 of the query image 114. The search engine module 410 may use a context-based image retrieval framework to perform a search of the image database 110 to identify one or more images 126 and 128 that match the query image 114 based on the search intent. Including the context 116 when determining the search intent may result in more accurate results than a conventional system that does not include the context 116 when determining search intent.
The architecture 500 may include the computing device 306 coupled to an image hosting server 502 via the network 304. The computing device 306 may be coupled to the display device 302. The image hosting server 502 may be coupled to the image database that hosts the images 112.
The image hosting server 502 may include the one or more processors 504 and a memory 506. The memory 506 may include an image collection 508 and the search engine module 410. The search engine module 410 may use a context-based object retrieval framework. The image collection 508 may include one or more images uploaded by a user from the computing device 306 to the image hosting server 502 via the network 304.
In operation, the user may select the query image 114 and specify the region of interest 118. The user interface 310 may enable the user to send a search query 510 to the search engine module 410 at the image hosting server 502. The search query 316 may include data identifying the region of interest 118. The data may also include the query image 114 or include an address of the query image 114 to enable the search engine module 410 to access the query image 114. In addition, the search query 316 may identify a search target for the query. The search target may include the image collection 508, the image database 110, another image collection, or any combination thereof. For example, the user may wish to identify all images in the image collection 508 that include the object of interest 120. As another example, the user may wish to identify all images in the image database 110 that include the object of interest 120. As yet another example, the user may wish to identify all images in the image collection 508 and in the image database 110 that include the object of interest 120. As a further example, the user may wish to identify all images in a second image collection (not shown) that include the object of interest 120, where the second image collection is hosted by the image hosting server 502. The second image collection may be uploaded to the image hosting server 502 by a friend or relative of the user. For ease of understanding, the examples below assume the image database 110 is the search target.
After receiving the search query 510, the search engine module 410 may perform a context-based search of the image database 110 to determine if any of the images 112 matches the query image 114. For example, the search engine module 410 may determine a search intent based on one or more of the region of interest 118, the context 116, and the object of interest 120. Based on the search intent, the search engine module may identify one or more images (e.g., the first image 126 and the second image 128) that match the query image 114. The images 126 and 128 may be identified by comparing the visual words associated with the query image 114 to visual words associated with each of the images 112. The search engine module 410 may send search results 512 to the computing device 306 via the network 304. The computing device 306 may receive the search results 512 from the search engine module 410 and display the images 126 and 128 in the user interface 310.
Thus, the search engine module 410 executing at the image hosting server 502 may determine a search intent of the user based on the context 116 and the region of interest 118. Including the context 116 when determining the search intent may result in more accurate results than a conventional system. The search engine module 410 may use a context-based image retrieval framework to perform a search of one or more of the image database 110, the image collection 508, and a second image collection (not shown), to identify one or more images 126 and 128 that match the query image 114.
Furthermore, while
In the flow diagrams of
At block 604, the search engine determines a context for an object of interest in the query image based on the region of interest. The context may be determined using a dual-sigmoid approximation via equation (17).
At block 606, the search engine determines a prior probability distribution using equation (15).
At block 608, the search engine determines a search intent weight using equation (18).
At block 610, the search engine determines a query language model using equation (9).
At block 612, the search engine determines a database image language model using equation (6).
At block 614, the search engine determines a ranking score using equation (3).
At block 702, a search engine module receives a query associated with a first image. The query includes data identifying a region of interest. For example, the search engine module 410 may receive the search query 412 associated with the query image 114. The search query 412 may include the data 414 identifying the region of interest 118.
At block 704, the search engine module determines a context associated with the query image via the dual-sigmoid approximation of equation (17).
At block 706, the search engine module determines a prior probability distribution using equation (15).
At block 708, the search engine module determines a search intent associated with the query using equation (18).
At block 710, the search engine module selects visual words based on the search intent. For example, the search engine module 410 may select the first visual words 418 based on the search intent 104. To illustrate, the query language model may be determined using equation (9) and the database image language model may be determined using equation (6).
At block 712, the search engine module determines whether at least one image of a plurality of images matches the first image based on the visual words. For example, the search engine module 410 may determine whether at least one image of the images 112 matches the first image 114 based on the first visual words 418. The results of the search (e.g., the matching images 112) may be ranked using equation (3). For example, the first image 126 may have the highest rank, indicating that the first image 126 has a higher probability of matching the object of interest 120 in the query image 114 as compared to the second image 128.
At block 802, a search engine module receives data identifying a region of interest associated with a first image. For example, the search engine 414 may receive the search query 510 including the data 414 identifying the region of interest 118 of the first image 114.
At block 804, the search engine module identifies an object of interest in the first image based on the region of interest. At block 806, the search engine module identifies, in the first image, a visual context associated with the object of interest. For example, the search engine module 410 may identify the object of interest 120 and the context 116 based on the region of interest 118.
At block 808, the search engine module performs a first comparison between the object of interest in the first image and a second object of interest in a second image. For example, the search engine module 410 may perform a first comparison between the object of interest 120 in the query image 114 and the object of interest 424 in the first image 126.
At block 810, the search engine module performs a second comparison between the visual context in the first image and a second visual context in the second image. For example, the search engine module 410 may perform a second comparison between the context 116 in the query image 114 and the context 428 in the first image 126. The first comparison and the second comparison may be performed in a single, indivisible operation (e.g., substantially simultaneously).
At block 812, the search engine module determines whether the second image matches the first image based on the first comparison and the second comparison. For example, the search engine module 410 may determine whether first image 126 matches the query image 114 based on the first comparison between the object of interest 120 in the query image 114 and the object of interest 424 in the first image 126 and based on the second comparison between the context 116 in the first image and the context 428 in the first image 126.
The processor 902 may be a single processing unit or a number of processing units, all of which may include single or multiple computing units or multiple cores. The processor 902 can be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the processor 902 can be configured to fetch and execute computer-readable instructions stored in the memory 904, mass storage devices 912, or other computer-readable media.
Memory 904 and mass storage devices 912 are examples of computer storage media for storing instructions which are executed by the processor 902 to perform the various functions described above. For example, memory 904 may generally include both volatile memory and non-volatile memory (e.g., RAM, ROM, or the like). Further, mass storage devices 912 may generally include hard disk drives, solid-state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CD, DVD), a storage array, a network attached storage, a storage area network, or the like. Both memory 904 and mass storage devices 912 may be collectively referred to as memory or computer storage media herein, and may be a non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that can be executed by the processor 902 as a particular machine configured for carrying out the operations and functions described in the implementations herein.
The computing device 900 may also include one or more communication interfaces 906 for exchanging data with other devices, such as via a network, direct connection, or the like, as discussed above. The communication interfaces 906 can facilitate communications within a wide variety of networks and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet and the like. Communication interfaces 906 can also provide communication with external storage (not shown), such as in a storage array, network attached storage, storage area network, or the like.
A display device 908, such as a monitor may be included in some implementations for displaying information and images to users. Other I/O devices 910 may be devices that receive various inputs from a user and provide various outputs to the user, and may include a keyboard, a remote controller, a mouse, a printer, audio input/output devices, and so forth.
Memory 904 may include modules and components for context-based object retrieval according to the implementations herein. In the illustrated example, memory 904 includes the search engine module 410. For example, the search engine module 410 may include a saliency detection module 920, a prior determination module 922, the search intent detection module 106, a visual words identification module 924, and the context-based object retrieval module 108. The saliency detection module 920 may determine contrast-based saliency scores 932 based on equation (14). The prior determination module 922 may determine a prior probability distribution 930 based on the saliency scores 932 using the equation (15). The search intent detection module 106 may determine the search intent 104 based on equation (3). The visual words identification module 924 may identify and/or select visual words (e.g., the visual words 418, 426, and 434) for one or more images. The context-based object retrieval module 108 may receive the query image 114 and identify the matching images 124 from the image database 110 based on equations (7) and (8).
Memory 904 may also include other data and data structures described herein, such as the search intent 104, the query image 114, the matching images 124, the saliency scores 932, the prior distribution probability 934, and results of comparing the query image 114 with the first image 126 and the second image 128, as exemplified by a first comparison 926 and a second comparison 928. Memory 904 may further include one or more other modules 916, such as an operating system, drivers, communication software, or the like. Memory 904 may also include other data 918, such as data stored while performing the functions described above and data used by the other modules 916.
The example systems and computing devices described herein are merely examples suitable for some implementations and are not intended to suggest any limitation as to the scope of use or functionality of the environments, architectures and frameworks that can implement the processes, components and features described herein. Thus, implementations herein are operational with numerous environments or architectures, and may be implemented in general purpose and special-purpose computing systems, or other devices having processing capability. Generally, any of the functions described with reference to the figures can be implemented using software, hardware (e.g., fixed logic circuitry) or a combination of these implementations. The term “module,” “mechanism” or “component” as used herein generally represents software, hardware, or a combination of software and hardware that can be configured to implement prescribed functions. For instance, in the case of a software implementation, the term “module,” “mechanism” or “component” can represent program code (and/or declarative-type instructions) that performs specified tasks or operations when executed on a processing device or devices (e.g., CPUs or processors). The program code can be stored in one or more computer-readable memory devices or other computer storage devices. Thus, the processes, components and modules described herein may be implemented by a computer program product.
Although illustrated in
Computer storage media includes volatile and non-volatile, 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 storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computing device.
In contrast, communication media may embody computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, or other transmission mechanism. As defined herein, computer storage media does not include communication media.
Furthermore, this disclosure provides various example implementations, as described and as illustrated in the drawings. However, this disclosure is not limited to the implementations described and illustrated herein, but can extend to other implementations, as would be known or as would become known to those skilled in the art. Reference in the specification to “one implementation,” “this implementation,” “these implementations” or “some implementations” means that a particular feature, structure, or characteristic described is included in at least one implementation, and the appearances of these phrases in various places in the specification are not necessarily all referring to the same implementation.
Although the subject matter has been described in language specific to structural features and/or methodological acts, the subject matter defined in the appended claims is not limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. This disclosure is intended to cover any and all adaptations or variations of the disclosed implementations, and the following claims should not be construed to be limited to the specific implementations disclosed in the specification. Instead, the scope of this document is to be determined entirely by the following claims, along with the full range of equivalents to which such claims are entitled.