sarah marqusee sachs advisor: pedro...

28
Similar-Part Approximation Using Invariant Feature Descriptors Sarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes the implementation of a new algorithm for iden- tifying similar parts in multiple images. Visual words of Scale Invariant Feature Transform descriptors are used to describe parts of images and Locality Sensitive Hashing is utilized for quick similar-part lookup. This algorithm proves very eective on identical items of dierent sizes and rotations, and moderately eective on similar yet unidentical items of the same class. Suggestions are made for apply this approximation to building object grammars. Further exploration on feature descriptors and distance functions are needed for better performance accuracy. Introduction This paper presents an approach for estimating similar parts in a set of images. Imagine you want to search Google Images for a certain object, but you cannot think of the name of that object. Instead, you might have ten other photographs that all happen to contain that object somewhere in the image – the images have dierent backgrounds and may have other things in the foreground, but nonetheless share this object in common. The search engine should recognize that the images all share your unnamed object in common. Consequently, the search engine should be focusing its search on that particular object. The object that each image contains can be thought of as the most similar part among all the images. For example, imagine that you forget the name of President Barack Obama, but you provide the search engine with the ten photographs in Figure 0.1a on the following page. It is clear to the human eye that Barack Obama is in all ten images. However, the images also share other things. Multiple images have an American flag and multiple have repeating characters like Malia Obama or Hillary Clinton. Google Images might return the search query with images of Hillary Clinton without Barack Obama, which would be an incorrect identifi- cation of the similar part. We want to develop an algorithm that can realize, without any training from humans or manual image annotation, that Barack 1

Upload: others

Post on 01-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Similar-Part Approximation Using Invariant

Feature Descriptors

Sarah Marqusee Sachs

Advisor: Pedro Felzenszwalb

Abstract

This thesis describes the implementation of a new algorithm for iden-tifying similar parts in multiple images. Visual words of Scale InvariantFeature Transform descriptors are used to describe parts of images andLocality Sensitive Hashing is utilized for quick similar-part lookup. Thisalgorithm proves very effective on identical items of different sizes androtations, and moderately effective on similar yet unidentical items of thesame class. Suggestions are made for apply this approximation to buildingobject grammars. Further exploration on feature descriptors and distancefunctions are needed for better performance accuracy.

Introduction

This paper presents an approach for estimating similar parts in a set of images.Imagine you want to search Google Images for a certain object, but you cannotthink of the name of that object. Instead, you might have ten other photographsthat all happen to contain that object somewhere in the image – the imageshave different backgrounds and may have other things in the foreground, butnonetheless share this object in common. The search engine should recognizethat the images all share your unnamed object in common. Consequently, thesearch engine should be focusing its search on that particular object. The objectthat each image contains can be thought of as the most similar part among allthe images.

For example, imagine that you forget the name of President Barack Obama,but you provide the search engine with the ten photographs in Figure 0.1a onthe following page. It is clear to the human eye that Barack Obama is in allten images. However, the images also share other things. Multiple images havean American flag and multiple have repeating characters like Malia Obama orHillary Clinton. Google Images might return the search query with images ofHillary Clinton without Barack Obama, which would be an incorrect identifi-cation of the similar part. We want to develop an algorithm that can realize,without any training from humans or manual image annotation, that Barack

1

Page 2: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

(a) Selection of photographs provided to the algorithm

(b) Yellow boxes indicate the parts of the images that the algorithm should selectas being similar parts

Figure 0.1: Sample of photos and their ideal similar-part selection

2

Page 3: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Obama is the most common thing in all of these images. If our algorithm candetermine that the most similar part in these photos is Barack Obama’s face,we have enough information to do an informed and accurate image search forthings that are similar to Barack Obama’s face. An ideal output of the algo-rithm is illustrated in Figure 0.1b on the previous page, where the highlightedboxes represent which part of each image the algorithm should choose as thesimilar part.

The ability to recognize a shared object in multiple images has importancefor many areas of research. Consider the field of research that focuses on de-tecting humans in images. Research has already been done in utilizing the partsof an object to improve human detection in images, for example in the work ofGirshick, Felzenszwalb, and McAllester [1]. In their study, if the common partsof a person are already known (forming an “object grammar” for the structureof a person), then an algorithm can have more information on how to detect aperson in an image and can perform with significantly better accuracy.

However, work on person detection with object grammars currently relies onmanually created grammars for objects. Experts in this field have noted that“automatically learning the structure of grammar models remains a significantchallenge for future work.”[1] If we can estimate similar parts in images automat-ically without human intervention, then we can estimate multiple similar partsin images. This thesis presents an efficient implementation of this automaticestimation.

To visualize how this estimation can automate grammar modeling, considerthe following example. The most similar part among a series of photographsof humans may be a head. A similar-part approximation algorithm may thenrecognize that the legs in each image are the second most similar part. Third,the algorithm may notice that a long torso is a similar part among the imagesof humans. Eventually, the algorithm will have noticed a series of similar partsand has enough information to build an object grammar and understand theparts of a human body. Note that this process needs no human annotation orinvolvement. Hypothetically, the same process could be done on other objects,such as trees, dogs, cars, etc. We now have a process to create object grammarsand detect almost any item, provided that the approximation algorithm is runon many photos of that item.

This work in person detection using object grammars is particularly relevanttoday as we advance the technology for self-driving cars. In order for self-driving cars to safely navigate roads, we need to be confident in their pedestriandetection systems. The real-time algorithms that provide a self-driving car withenvironmental information should be well-equipped to recognize if something isa dog, a human, a tree, or a car. This information is crucial for safe navigation,as a tree has different movement patterns than a pedestrian or a dog. Part-based models of detection have proved to be paramount in the development ofrobust models for pedestrian detection systems in advanced driver assistancesystems (like self-driving cars or autonomous parallel parking cars) [2, 3]. Thework of this thesis provides a first step into a large-scale process of automatingthe grammars of these models to make comprehensive detection systems.

3

Page 4: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

VOCABULARY

Cluster all descriptors from VOC

images

Collect SIFT Descriptors

Assign each

descriptor to a word from the

vocabulary

Create a frequency

histogram for the object over all the

words in the vocabulary Object

Figure 0.2: Overview of the object description process. An object is describedusing SIFT descriptor matrices (which are visualized with green grids). Eachdescriptor is assigned to the closest word in a predetermined vocabulary, whichis created over a large set of images. The collection of words used to describethe object is transformed into a word frequency histogram.

From a theoretical perspective, part similarity is measured by minimizingan objective function over pairwise costs. This thesis presents an efficient im-plementation of an approximation of this algorithm, developed by Felzenszwalb[4], which estimates the optimal solution to the objective without calculating allpairwise costs. Through this approximation, the algorithm is able to approachthe problem at large scales.

However, in order to even compare the similarity of objects in different im-ages, a shared “vocabulary” needs to be developed that can provide consistentmeasures of similarity and difference. For instance, just looking at the pixelvalues of an image will not provide information about the key curves and tex-tures in the image that describe the objects. Moreover, objects that only varyin rotation, illumination, and size should still be viewed as extremely similar.In Section4, this thesis explores the use of SIFT feature descriptors to providethis invariant description of objects.

Once all of the objects in an image can be described using these SIFT de-scriptors (which are expressed as matrices), we need to develop a system formeasuring similarity among descriptors in all images. This provides the need tosimplify our descriptors to a fixed and limited set. We can think about this byproviding an analogy where descriptors aren’t matrices but words in the Englishlanguage. Assume we have two images, each with one person in the image. Inone image we describe the person’s hair as “platinum” and in another imagewe describe the person’s hair as “golden”. We can assume these two descriptorsare describing the same color and we want an increased measure of similarity

4

Page 5: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

between the people in both images. However, if we describe one person’s hairas “platinum” and the other person’s hair as “brunette”, we have less confidencein their similarity. We must make a system that recognizes “platinum” and“golden” as the same descriptor but “platinum” and “brunette” as different. Inthe case of this analogy, if we only had the words “blonde” and “brown” in ourvocabulary, it would be much easier to determine if the people’s hair colors aresimilar or different because there would be no ambiguity among synonyms. Itis important to note that we may also lose some descriptive ability, but we gainthe ability to make consistent comparisons. This example illustrates the need tocreate a limited vocabulary of feature descriptors so we can better discriminateobject similarity. The creation of this vocabulary is described in Section 5.1 onpage 12.

If we count how often each vocabulary word is used to describe a given object,the object can be described with a word-frequency histogram. An overview ofthis process is defined in Figure 0.2 on the previous page and described in muchgreater detail in Part II. These histograms are what we will use to determine thesimilarity of objects. Histograms with a small l1 distance from each other implysimilarity, while histograms with a large l1 distance imply stark difference.

This thesis explains the implementation of an approximation algorithm tofind similar parts. First by breaking images down into subpatches (Section 3),extracting SIFT descriptors from the subpatches (Section 4), describing sub-patches by a set of visual words (Section 5), and then approximating the op-timal solution using LSH nearest neighbor search (Section 6) and star-graphobjectives (Section 2).

Part I

Algorithm overview

1 ObjectiveConsider a set of I items with some distance metric d that measures the distancebetween two items. Let B1, ..., Bk

be K subsets of I. We will refer to thesesubsets as “bags” of items. It is possible, but not necessary, that B

j

\ Bk

6= ;,j 6= k. The motivation for this thesis is to find a set of elements x = (x1, ..., xk

)

where xi

2 Bi

and the elements of x are as similar as possible. We formalizeour objective as the sum of pairwise distances among selected items using ourdistance metric, d. Let V = {1, ...,K}. V ⇥V is expressed as V 2. The objectiveis defined as:

c(x) =X

(i,j)2V

2

d(xi

, xj

) . (1.1)

Let x⇤= argmin

x

c(x) be the optimal solution to this optimization. Bruteforce computation of argmin over all possible x’s is intractable. The cost ofcalculating c(x) for any given x is O(k2). Let X be the set of all feasible x’s.

5

Page 6: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

If each subset Bi

has at most N items, then |X| = NK . Thus, the cost ofcalculating c(x) for every x 2 X is O(NK · K2

). This slow runtime motivatesan approximation of our objective.

2 Approximation

2.1 Overview of ApproximationAn optimization of c(x) is difficult when all pairwise distances must be calcu-lated. Instead we consider a tractable approximation proposed by Felzenszwalb[4]. Consider the same space of possible solutions to the initial optimization,but with K “star-graph” objective functions.

For r 2 V we define the “star-graph” objective as

cr(x) =X

j2V \{r}

d(xr

, xj

) . (2.1)

Let xr

= argmin

x

cr(x) be the optimal solution for this optimization problem.Using dynamic programming, cr(x) can be solved efficiently by first computingxr

r

and then solving for xr

j

:

xr

r

= argminxr2Br

X

j2V \{r}

min

xj2Bj

d(xr,

xj

) (2.2)

xr

j

= argminxj2Bj

d(xr

, xj

) . (2.3)

After calculating xr for 1 r K we have x1, . . . , xk that represent Ksolutions to the “star-graph” objective. Each solution, described by the itemsin xi, contains an item xi

r

that has the smallest distance to items in the otherbags. Also in xi are the K � 1 items, each being the closest to xi

r

in theirrespective bags. Each collection of items xi leads to a possible solution to ourinitial objective c(x). Thus, we can choose among x1, . . . , xk by defining ourapproximate solution as

x̂ = argminx

rc(xr

) 1 r K .

The initial objective pairwise cost function is only calculated K times, asopposed to the brute force solution to the objective 1.1 which calculates c(x)NK times. Pseudocode for an implementation of this approximation can beseen in Algorithm 1 on the following page. A deeper analysis of the runtime ofthis approximation can be found in Section 2.3.

2.2 Justification of ApproximationApproximating the initial objective has little use unless the approximation’ssolution is bounded by the objective’s optimal solution. An unbounded ap-proximation cannot be used confidently in practice. However, as described by

6

Page 7: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Algorithm 1 Similar item approximationInput: K bags B1, . . . , Bk

, each with up to n itemsOutput: Graph of similar items, x̂ = x1, . . . , xk

where xi

2 Bi

for K bags, Bi

, i = 1 : K do

minCost = 1 and minStar = nullfor each of N items in bag, xi

j

, j = 1 : N do

cr(xi

j

) = 0

starij

2 RK , starij

(j) = xi

j

for K bags, Bm

, m = 1 : K do

find xm

closest

2 Bm

that minimizes d(xm

closest

, xi

j

)

add d(xm

closest

, xi

j

) to cr(xi

j

)

end for

if cr(xi

j

) < minCost then

minCost = cr(xi

j

) and minStar = starij

end if

end for

set the min-star for Bi

such that xi

= minStarend for

x̂ = nullc(x̂) = 1for K bags, B

i

, i = 1 : K do

c(xi

) = 0

for item xi

j

, j = 1 : K do

for item xi

k

, k = j : K do

c(xi

) = c(xi

) + d(xi

j

, xi

k

)

end for

end for

if c(xi

) < c(x̂) then

x̂ = xi

c(x̂) = c(xi

)

end if

end for

return x̂

7

Page 8: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Felzenszwalb [4], this approximation objective’s optimal solution is no morethan twice as large as the original objective’s optimal solution.

Theorem 1. This approximation of the objective leads to a 2-approximation

algorithm s.t.

c(x̂) 2c(x⇤)

where c(x) is described by 1.1, x⇤ is the optimal solution found by argminx

c(x),and x̂ is the approximation described in Section 2.1.

Proof.

Since the minimum of a set is as most the average,

c(x̂) = min

x

rc(xr

) 1

N

X

r2V

c(xr

) .

And by the triangle inequality, for any xr,

c(xr

) =

X

j,k2V

2

d(xr

j,

xr

k

) X

j,k2V

2

(d(xr

r

, xr

j

) + d(xr

r

, xr

k

))

=

X

j2V

X

k2V

(d(xr

r

, xr

j

) + d(xr

r

, xr

k

))

=

X

j2V

X

k2V

d(xr

r

, xr

j

) +

X

j2V

X

k2V

d(xr

r

, xr

k

)

= N ·X

j2V

d(xr

r

, xr

j

) +N ·X

k2V

d(xr

r

, xr

k

)

= 2N ·X

j2V

d(xr

r

, xr

j

)

= 2N · cr(xr

) .

Thus, c(xr

) 2N · cr(xr

).Therefore,

1

N

X

r2V

c(xr

) 2

X

r2V

cr(xr

)

and we can conclude that

c(x̂) 2

X

r2V

cr(xr

) .

8

Page 9: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Given the dynamic programming solution used to compute xr

cr(xr

) = min

xr2Br

X

j2V

min

xj2Bj

d(xr

, xj

)

we can simplify our inequality into

c(x̂) 2 ·X

r2V

min

xr2Br

X

j2V

min

xj2Bj

d(xr

, xj

)

2 ·min

X

r2V

min

xr2Br

X

j2V

d(xr

, x̄j

)

2 ·min

X

r2V

X

j2V

d(x̄r

, x̄j

)

= 2 ·min

X

r,j2V

2

d(x̄r

, x̄j

)

= 2 · c(x⇤) .

Thus, c(x̂) 2 · c(x⇤).

2.3 Runtime AnalysisConsider the runtime for this approximation. Assume that upon implementa-tion, items are represented by vectors of length J (see Section 5 on page 12).

For K bags, a star is formed for each of the N items in each bag. In order toform that star, each item must look at K�1 other bags, find the closest item ineach bag (which is done in a constant amount of time, see Section 6), find thecurrent item’s vector’s distance to that closest item’s vector of length J , andadd that distance to the cost of that star. This process will end with a collectionof possible approximations, x1, . . . , xk

. Thus, the process of calculating theseK solutions takes K2 ·N · J time.

Now consider the process of choosing the best approximation, x̂, that has thelowest c(x) among all possible solutions x1, . . . , xk

. To calculate argmin

x

c(x),each of the K possible approximations must look at each of its K items. Foreach item, a distance is calculated from the item’s vector of length J to all ofthe other K�1 items in the possible approximation. Thus, finding argmin

x

c(x)takes K3 · J time.

Thus, the runtime of this approximation algorithm is O(K2NJ + K3J).Assuming N � K, this algorithm runs in O(K2NJ) time. This is significantlyfaster1 than the brute force solution for the objective, which runs in O(NK ·K2

),as discussed in Section 1.

1Assuming N > K.

9

Page 10: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Remark. M-root SelectionIn analyzing datasets larger than K = 10, consider a � such that |c(xi

) �c(xj

)| < �, 8i, j 2 V . In practice, this � is not very large. Thus, it does notdrastically increase the cost of our approximation if we don’t evaluate all sets xi

8i 2 V , but only find the set xi for 8i 2 V st imod(m) = 0. Worst case, our ap-proximation will cost �more than x̂. Thus, order to increase the efficiency of thealgorithm, only every mth bag was considered to create a star-graph when overten images were analyzed. Thus, x̂ was selected as the argmin of K

m

stars, notK stars. This did not dramatically change the results of the algorithm, thoughit did significantly decrease the runtime. However, it is important to note thatthis optimization delegitimizes the theoretical approximation argument made inSection 2.2.

Part II

Implementation

3 Defining the “parts” of an imageImages provide a great landscape for discussing similar parts, particularly be-cause different images of the same item will be similar but not identical. In orderto apply our algorithm to images, we convert the colored images to grayscalewhere each pixel is defined by a value in the range [0, 255]. Consequently, theimages are now matrices with elements in range [0, 255]. Consider applying thealgorithm to k images, img1, . . . , img

k

. Consider a grayscale image imgi

withsize 300 ⇥ 450. The corresponding matrix to img

i

is expressed as the m ⇥ nmatrix D

i

with m = 300, n = 450, and 8x 2 Di

, x is in range [0, 255]. Notethat not all images need to be the same size.

For this algorithm, each image can be thought of as an individual bag. Theitems of the bag can be thought of as “patches” of the image In particular, forsome w, the bag will contain all possible patches of the image of size w⇥w. Oneway to visualize this is to imagine a window of size w ⇥ w. The window slideshorizontally and vertically, taking “snapshots” of the part of the image that thewindow contains.

In practice, the algorithm adopts the approach used by Agarwal and Roth[5] in which the window moves by 20% of the window size each iteration. Forexample, a square window of size 100 pixels would move 20 pixels on each it-eration. There are, however, limitations to this approach. Consider the casewhere the item similar among all images is larger than w ⇥ w. To ensure thatevery object in an image can be fully included in the window, we reduce thedimension of the image. With reduced image size (which results in a grainierimage), a window of size w ⇥ w can now capture larger objects. This size re-duction continues until the image itself is the size of the window. The collectionof these “snapshots” at every size constitute the n items inside the bag. This

10

Page 11: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

method of item generation allows objects of different sizes in different images tostill be considered similar.

4 Scale Invariant Feature Transform DescriptorsPixel-by-pixel descriptions of a subpatch of an image are not sufficient descrip-tors for identifying commonalities between subpatches. Because pixel-by-pixeldescriptions only examine grayscale values, a set of identical images with differ-ent light exposures would be seen as completely different. In order to describesubpatches accurately and with informational descriptors, images are describedusing features attainted through Scale-Invariant Feature Transform (SIFT) fil-ters. The goal of SIFT filters is to provide invariant descriptors of patches. Thesedescriptors are intended to be robust to changes in illumination and viewpoint.Initially developed by Lowe [6], SIFT descriptors provide the perfect tool forsubpatch description. This thesis used the SIFT feature descriptor implementedin the open-source library VLFeat [7].

SIFT descriptors utilize gradients to attain illumination, rotation, and sizeinvariance. SIFT key points are initially detected by looking for local maximaor minima among a difference-of-gaussians function. Each feature is describedby its key point center (in x,y coordinates), its rotation (described in radians),the radius of its region, and a descriptor. The descriptor of a feature describesthe image gradients of a key point with a 3-D spatial histogram. Gradientsthat are farther from the key point are given less importance by a Gaussianweighting function over all the gradients. SIFT features have the advantage ofbeing invariant to rotation, scale, translation, and some illumination changes.Therefore, SIFT features are ideal for recognizing similar yet rotated objectsthat vary in size, which is common in the sets of images this algorithm is an-alyzing. An example of an image and a random selection of some of its SIFTdescriptors and keypoints can be found in Figure. In this figure, 800 descriptorsare visualized. This image has over 50,000 keypoints and descriptors.

Another similar option for image feature description are Dense-SIFT fea-tures, however they lack the ability to make invariant descriptions. Unlike SIFTfilters, Dense-SIFT filters do not identify interest points. Rather, they dividethe image into a grid of cells and describe the histogram at each cell. Thesecells may overlap, allowing a comprehensive description of an image. Whilecomprehensive, Dense-SIFT features lack both scale and rotational invariance.Consequently, they were not nearly as effective in recognizing similar featuresamong similar images. Figures 4.2 and 4.3 show the performance of this algo-rithm while using SIFT and Dense-SIFT features respectively.

11

Page 12: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Figure 4.1: Original image and a random selection of 800 keypoints (in yellow)and their descriptors (in green)

5 Visual Words

5.1 Building a Vocabulary to Describe ImagesIn practice, the SIFT features of a given image or subpatch can be summarizedin a low dimensional space using visual words. Visual words are an attempt toprovide generic visual categorization of images. These visual words create a vo-cabulary of words that can be used to describe any image. Consequently, visualwords allow for easy cross-image comparisons. An image may contain multiplevisual words, often called a “bag of words”. This thesis attempts to create avocabulary, or codebook, of visual words using SIFT descriptors. Assuming avocabulary can be formed, using the “bag of words” approach to describe theSIFT features of a given region allows similarity measurements to be done morequickly and consistently.

Research has already proved the success of using affine invariant point de-scriptors in a “bag of words” model. Csurka et al. [8] showed the utility of thismethod in object classification. By describing patches of images with invariantfeatures and clustering those patches into one of 100 visual words, Csurka etal. created a “bag of key points” which counts the number of patches in eachimage assigned to each visual word. This “bag of key points” was then used as afeature vector to be analyzed by a multi-class classifier. Their approach provedmost successful in classifying faces with only a 2% error rate.

Similarly, Agarwal and Roth [5] used a “bag of words” approach on interestpoints to create binary vectors that describe each image by the visual words

12

Page 13: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

OriginalImage

Itemselected

Figure 4.2: Item approximation using SIFT features

13

Page 14: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

500 1000 1500 2000

500

1000

1500

2000

2500

3000

200 400 600

100

200

300

400

500

600

OrginalImage

ItemSelected

Figure 4.3: Item approximation using Dense-SIFT features

14

Page 15: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

contained in the image. They were able to use this approach for classificationwith similarly high accuracy. However, unlike Csurka et al., Agarwal and Rothchose to embed spatial relationships among the interest points in the featurevector.

In order to form a vocabulary that can apply to most images, a comprehen-sive dataset was needed. The Pascal VOC[9] dataset provided a wide range ofimages in multiple categories.2

SIFT features were gathered from all of the images in the VOC dataset.These SIFT features were then used to create a generic vocabulary using K-means clustering with J clusters. The selection of J is discussed in Section 5.2.This thesis implemented clustering of visual words using open-source code from[7]. After clustering, we have J centers of each cluster. Each center representsthe canonical SIFT descriptor of that cluster. These J descriptors of featuresform a codebook, or dictionary, of J visual words.

With this codebook, any given image can be defined by frequency histogramsof these J visual words. This practice of describing parts with a histogram ofgradients has already been done, notably by Leibe and Schiele [10] and Dalaland Triggs [11]. After calculating the SIFT features of a given image, we havea collection of SIFT features. Those features are then assigned to the closestcluster center using distance metric d. We now have a collection of visual wordsin an image, with each visual word associated with a feature center. Withthis information, a histogram of visual word frequency can be made for eachsubwindow. The histograms are normalized so the histogram for a subpatchrepresents the frequency of each visual word appearing in that subpatch. Thishistogram for subwindow i in image j will be the “item” x

i

added to the “bag” Bj

.When looking for similar items, our approximation algorithm will be calculatingsimilarities between these different histograms.

5.2 Selecting the Number of Visual WordsSelecting the number of visual words can often seem like black magic. Using acodebook that is too small weakens the algorithm’s ability to notice differencesin images. With such a limited vocabulary, very different items are discussed us-ing the same small collection of words, over exaggerating the similarity betweenitems. On the contrary, using a codebook that is too large weakens the algo-rithm’s ability to recognize similarity in images. If there are many visual wordsthat describe extremely similar features, two items that are almost identicalcan be described using completely different visual words. Because the algo-rithm does not decipher the similarity of visual words themselves, we are stuckviewing the two similar items as starkly different. This weakens the algorithm’sability to notice similar items.

After experimenting with different values, the final results of this thesis werecreated with J = 1000 unless otherwise stated. This value was derived from

2All images were labeled with one or more of the following tags: ’aeroplane’, ’bicycle’,’bird’, ’boat’, ’bottle’, ’bus’, ’car’, ’cat’, ’chair’, ’cow’, ’diningtable’, ’dog’, ’horse’, ’motorbike’,’person’, ’pottedplant’, ’sheep’, ’sofa’, ’train’, ’tvmonitor’;

15

Page 16: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000

Itemselected

withJ=200

Item selected with 200

visual words

Item selected

with 1000 visual words

200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000200 400 600 800 1000

200

400

600

800

1000

Itemselected

withJ=1000

Original Image

1000 2000 3000

500

1000

1500

20001000 2000 3000

200

400

600

800

1000

1200

1400

1600

1000 2000 3000

500

1000

1500

2000

500 1000 1500 2000

500

1000

1500

2000

2500

30001000 2000 3000

500

1000

1500

2000

OriginalImage

Figure 5.1: Sample of five results from similar-part approximation of ten imageswith 200 and 1000 visual words

a process of trial and error. An example of how results differ with different Jvalues can be found in Figure 5.1. We see that there are two images wherethe algorithm does not capture anything with J = 200 but captures Obama’sface with J = 1000. Without a quantitative approach to measuring algorithmaccuracy (which goes beyond the scope of this thesis), the other results canbe qualitatively identified as having equal performance. The topic literaturesuggests other more advanced approaches to cluster words. Agarwal and Roth[5] implement bottom-up clustering and cluster merging while Csurka et. al [8]select J based on algorithm accuracy when compared to other J values.

6 Locality Sensitive Hashing (LSH)The similar-item approximation algorithm requires finding an item’s nearestneighbor in each bag. This nearest neighbor search can be time-intensive work-ing in high dimensions, where conventional nearest-neighbor search optimiza-tions, such as K-D trees, rarely perform better than brute-force search. In

16

Page 17: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

practice, though, the exact nearest-neighbor is not necessary for the function-ality of this algorithm. Nearest neighbor approximations suffice, particularlybecause in each bag there are many items that are extremely similar.3

Locality Sensitive Hashing, first developed by Gionis, Indyk and Motwani[12], achieves nearest-neighbor approximations in sub-linear time. The algo-rithm creates a series of hash functions such that images that are similar havea high chance of collision. The probability of collision of two items is tied tothe distance of those items. Thus, if items are very similar, they have a highchance of being hashed to the same “bucket”.4 Consequently, looking up a newitem in the LSH scheme will hash the item to a particular “bucket”. LSH willretrieve the closet item to the query in that bucket. This functionally returnsthe nearest neighbor to a given query point.

In this algorithm, an LSH table is created for each bag. These tables(T1, . . . , TK

) are formed after items are added to each bag but before the similar-item approximation begins. During the approximation algorithm, when an itemxi

2 Bi

is looking for the nearest item in Bj

, xi

is queried in Tj

. The result ofthe lookup, x

j

, is accepted as the nearest neighbor to xi

in Bj

.This thesis used the LSH implementation created by Andoni and Indyk [13].

This implementation allowed for both l1 and l2 distance schemes. Both wereexperimented with. Ultimately, in practice, l1 norms were more effective. Thecomparison of these two parameters can be seen in Figure 4.2 on page 13 andFigure 6.1 above. Figure 4.2 on page 13 are the results of the algorithm with das the l1 norm and Figure 6.1 are the results with the l2 norm. In the top row ofeach figure are the original set of seven images. On the second row are the itemsselected for each image. In other words, the first element in column i representsB

i

and the second element represents x̂i

where x̂ is the optimal solution to theapproximation and x̂

i

2 Bi

.

7 Pre-processing of images using entropyOccasionally in practice, not all subpatches of an image were included in thefinal bags. After the histogram of each subpatch was calculated, a pre-processingstep excluded subpatches with extremely low histogram entropy. This exclusionwas to prevent the algorithm from determining that the most similar items ina set of images were the subpatches with no visual words, such as the sky or awhite patch.

The entropy of an frequency histogram of visual words, h, with length J can3This is mainly a result of our item generation. For example, sliding windows imply that

multiply items share overlapping parts of the image. Similarly, changing the resolution of animage may not alter the visual words of the image, implying that many items contain nearlyidentical histograms.

4A “bucket” can be thought of as the index that a particular hash value references. Whenan item is added to hash set, a hash function is applied to that item to derive the index towhich bucket the item should be added.

17

Page 18: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

500 1500

1000

2000

3000

200 400 600

200

400

600

200 600 1000

500

1000

1500

200 400 600

200

400

600

500 1500

1000

2000

3000

200 400 600

200

400

600

500 1500

1000

2000

3000

200 400 600

200

400

600

500 1500

1000

2000

3000

200 400 600

200

400

600

200 600 1000

500

1000

1500

200 400 600

200

400

600

500 1500

1000

2000

3000

200 400 600

200

400

600

ItemSelected

OriginalImage

Figure 6.1: Item approximation using l2 distances

be described by

entropy(h) = �JX

j=1

hj

· log2(hj

) .

Each histogram’s entropy was compared to the mean entropy of all collectedsubpatches for all images. Histograms with entropy less than 1

4 of the meanentropy were excluded from their respective bags.

More formally, let M be the total number of items in all bags. Let B0

i

be allof the items for image i before pre-processing. For any x

i

2 B0

i

xi

2 Bi

() entropy(xi

) � 1

4

· 1

M

KX

j=1

X

x2B

0j

entropy(x) .

In rare cases where the similar item in question has low entropy, subpatcheswith extremely high entropy were excluded. In practice, this was helpful forimages with hectic backgrounds. Highly entropic images tended to have manyvisual words but very low frequency for each visual word. Consequently thenormalized histogram for a subpatch with hectic images will have many visualwords with nonzero probabilities, but most visual words will have extremelysmall probabilities. Thus, the l1 distance between histograms of hectic sub-patches will be very low because both will have an extremely small l1 distancefrom the origin. Figure 7.1 shows an example of the effect of entropy filtering.

18

Page 19: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000500 100015002000

500

1000

1500

2000

2500

3000

OriginalImage

200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600

Itemselected

usingentropyfiltering

200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600200 400 600

100

200

300

400

500

600

Itemselectedwithoutentropyfiltering

Figure 7.1: Item approximation with and without filtering out highly entropicsubpatches

19

Page 20: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Figure 8.1: Sample of images created using the same face

8 DatasetsThe implementation of this algorithm was run on a series of different datasets,each seeking to test the effectiveness of the algorithm in different contexts.

First, to ensure the algorithm was working, it was crucial to determine ifthe algorithm could find a common element e if B1 \ B2 \ · · · \ B

k

= e. Toconfirm this, the same image of a face was inserted in multiple different randomimages (which were taken from the Pascal VOC dataset[9]). The insert variedin size and location, but nevertheless existed in all images. This provided anexcellent test that the algorithm’s approximation was able to detect similar (inthis case identical) items that had different sizes in different images. The facewas taken from the Yale Face Database[14]. Example images from this datasetcan be found in Figure 8.1.

In general, the Yale Face Database provided a good dataset where imageswere almost the same, but varied by individual person. Nevertheless, if eachface were superimposed on a different random busy image, the similar items in

20

Page 21: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

each image should be the set of superimposed faces.To ensure that the SIFT features were rotationally invariant, a small dataset

was created that included the same exact item in different scenes. A framedphotograph of a dog was placed in many different places. The dog’s face andthe frame were exactly the same in each image, the only difference being therotation of the object. This framed photograph was rich enough in texture tocontribute a substantial number of visual words to the histogram of a givenpatch. Moreover, because the framed photograph presented itself as differentsizes in each image, it also pressed the algorithm to take advantage of imageresizing to detect similar items.

A small dataset of Barack Obama in different scenes was created to testthe algorithm’s ability to notice extremely similar yet un-identical items. Asopposed to the framed photograph, the facial expression and angle of Obama’sface differed in each image. This presented a harder problem for the algorithm,because depending on the structure of Obama’s face, histograms may be verydifferent but should still be the most similar in patches around his face.

Finally, to notice entirely different items that maintained the same structure,the Pascal VOC dataset was used. Each class (person, dog, bicycle) presenteda set of images with similar object grammars. Thus, the algorithm was run onitems in a shared category. For example, ten images with the label “car” shouldreturn ten similar items that all include a car. The algorithm was also run at alarge scale on 100 images of side-facing cars taken from the Pascal dataset. Allcars had a minimum size of 60x60 in an image that was around 375x500.5 Thisprovided a chance to see how the algorithm performed at a larger scale.

Part III

Results

9 Performance of algorithmIn general, the approximation proved very effective. As seen in Figure 9.1,the algorithm worked when the face was superimposed on various images. Thealgorithm performed similarly well when different (yet almost identical) faceportraits were superimposed, which is shown in Figure 9.2. These two exam-ples prove the heart of the problem: there is an obvious similar item that thealgorithm should be detecting.

When a key object is inserted in various scenes and rotation, size, and light-ing are the only things that change (such as the Dog Frame dataset createdfor this thesis), the algorithm still is able to choose items with the key objectwith near perfect accuracy (Figure 4.2). In this case, the algorithm is less able

5Car size was determined by the size of the bounding box in the training data associatedwith the label. Images varied in size and orientation, but were between 202x500 and 375x500(the most common size).

21

Page 22: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

100 200 300 400 500

100

200

300

400

50 100 150 200 250 300

100

200

300

400

50050 100 150

50

100

150

100 200 300 400 500

100

200

300

50 100 150

50

100

150100 200 300 400 500

100

200

300

50 100 150

50

100

150

100 200 300 400 500

100

200

300

50 100 150

50

100

150100 200 300 400 500

100

200

300

50 100 150

50

100

150

100 200 300 400 500

100

200

300

50 100 150

50

100

150100 200 300 400 500

100

200

300

50 100 150

50

100

150

100 200 300 400 500

100

200

300

50 100 150

50

100

150100 200 300 400 500

100

200

300

50 100 150

50

100

150

50 100 150

50

100

150

Original Image Item Selected Original Image Item Selected

Figure 9.1: Performance of algorithm when the same item exists in every bag

22

Page 23: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

100 200 300 400 500

100

200

300

400

50 100 150 200

50

100

150

20050 100 150 200 250 300

100

200

300

400

50050 100 150 200

50

100

150

200

100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200

100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200

100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200100 200 300 400 500

100

200

300

50 100 150 200

50

100

150

200

Original image Item Selected Original image Item Selected

Figure 9.2: Performance of algorithm when near-identical images exist in everybag

23

Page 24: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

1000 2000 3000

500

1000

1500

2000

200 400 600

200

400

600

1000 2000 3000

500

1000

1500

2000

200 400 600

200

400

600

1000 2000 3000

500

1000

1500

2000

200 400 600

200

400

600

1000 2000 3000

500

1000

1500

200 400 600

200

400

600

500 1000 1500 2000

1000

2000

3000200 400 600

200

400

600

1000 2000 3000

500

1000

1500

200 400 600

200

400

600

500 1000 1500

200

400

600

800

1000200 400 600

200

400

600

1000 2000 3000

500

1000

1500

2000

200 400 600

200

400

600

Item selectedOriginal image Original imageItem selected

Figure 9.3: Performance of algorithm on 10 Pascal cars of different type, rota-tion, and size

to form a bounding box around the key object but is able to choose an itemcontaining the key object. This is expected because the item generation schemadescribed in Section 3 does not actually create every possible subpatch in ev-ery possible dimension. Consequently, the item that is a perfect bounding boxaround the key object may not even exist in any of the bags. This item gen-eration implies that we cannot expect the algorithm to do any better than agenerally zoomed-in subpatch of the key object.

The algorithm was still able to recognize similar objects from the Pascaldataset. In the Pascal dataset, images might share an object of the same class,but their similarity is much looser. Consequently, this proved a much harderexercise for the algorithm. An image of a frontal facing car and a left facing carmay share similar semantic meaning. However, the similarity of the object fromthe viewpoint of visual words and SIFT features is quite small. This proved alimitation of the algorithm. Nevertheless, as seen in Figure 9.3 it was still ableto discern commonality between these rotated and different images.

At a large scale of 100 images of cars selected from the Pascal dataset, thealgorithm was able to hone in on key parts of the car in 79 of the images.6

6It is important to note that 8 of the images consisted entirely of a car. It was impossible

24

Page 25: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

The other 11 items selected did not include parts of a car. Given how diversethe images were, this can be viewed as good performance, though not nearly asaccurate as other experiments. A sample of 8 images and their selected itemsare shown in Figure 9.4.

Part IV

Discussion

The algorithm proved effective when the key objects of similarity among imageswere almost identical. SIFT was developed to find key points of an object and beable to recognize the same object from different viewpoints. It is consequentlyunsurprising that the algorithm is most effective on images that contain thesame object in different viewpoints. While the car and (in some regards) Obamadatasets had completely different objects of the same class, the algorithm wasstill able to recognize similarity. Further exploration should be done on theeffects of other invariant feature descriptors.

While l1 norm proved the most effective distance measure among lp

distancefunctions, it may not be the most appropriate. For example, chi-squared dis-tances are most often used when comparing histograms. However, due to limita-tions given by the support code utilized in this thesis7, other distance measureswere not explored. However, they certainly would be able to improve the algo-rithm. Because this thesis was limited to l1 and l2 distances, entropy filtering(Section 7) was used to eliminate some of the faults of l1 distance comparisons.However, entropy is not the best way to describe these histograms. While theyare frequency histograms, they are not probability distributions and an imagewith low or high entropy does not say anything about its innate probability ofbeing the most similar item in a bag.

The similar item approximation can be easily extended to apply to sets ofimages with multiple common parts. For example, a set of faces will have eyes,ears, nose, and mouth all in common. By running the algorithm multiple timeson the set of faces with some small adjustments to the items B1, . . . , Bk

, we candetermine multiple common parts of image.

Consider a final star x̂, which is derived from the min-star generated byB

r

and thus has root x̂r

. Let xm

= argmax

k2V r

d(x̂r

, x̂k

). That is, x̂m

is thefurthest distance from the center of the star. Let us refer to that distance asf . For every item xk

i

2 Bk

, 8k 2 V \{m}, 8i we know that if d(xk

i

, x̂r

) f ,xk

i

is more similar to x̂r

than any item in Bm

. Thus, we can assume no newinformation is given by those items. They cannot represent a new aspect of theimages, as they are closer to the root of the star than other items that are inthe star. Thus, for each bag, we remove all elements that are are closer to x̂

r

than x̂m

.

for the algorithm to fail on those images, so accuracy estimations may be artificially inflated.7The LSH support code [12] only accepts l1 and l2 distance functions.

25

Page 26: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

Figure 9.4: Sample of results from running algorithm on 100 side-view imagesof cars. On the left are original images and on the right are the selected items

26

Page 27: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

We now have a new set of bags B0

1, . . . , B0

K

that have no items close to thesimilar item that is described by the star x̂ with root x̂

r

. Thus, we can runthe algorithm again on our new set of bags to find a new distinct set of itemsdescribed by a completely different star x̂

0, whose root has at least a distance

of f from the root of our original star x̂.Consider a set of L distinct stars represented by x̂1, . . . , x̂L

. Each star repre-sents a distinct similar part that’s shared between bags B1, . . . , BK

. These starscould potentially serve as the sub-parts of a new object grammar.

Conclusion

This thesis has shown that a 2-approximation algorithm can be implemented toestimate similar items among a set of images. SIFT features and visual words aidin describing the image beyond pixel-by-pixel values. More exploration needsto be done in different distance functions and feature descriptors to improvethe algorithm’s accuracy on images with semantic similarity but very differentimage representations. Future applications of this research include buildingobject grammars. Moreover, by applying this research to non-visual datasetssuch as public speech transcripts, similar-part approximation can describe thethematic emphases by honing in on similar patterns among a series of speeches.Finally, if applying this algorithm to different scenes, similar-part approximationcan help define the canonical aspects of a given environment or location.

References[1] Girshick, R., P. Felzenszwalb and D. McAllester. "Object Detection with

Grammar Models." 2011 Advances in Neural Information Processing Sys-tems 24 (NIPS), 2011

[2] Prioletti, A., A. Møgelmose, P. Grisleri, M. Manubhai Trivedi, A. Broggi,and T. B. Moeslund. “Part-Based Pedestrian Detection and Feature-Based Tracking for Driver Assistance: Real-Time, Robust Algorithms,and Evaluation.” IEEE Transactions on Intelligent Transportation Systems14(3):1346-1359, 2013

[3] Gerónimo, D., A. M. López, A. D. Sappa, and T. Graf. “Survey of Pedes-trian Detection for Advanced Driver Assistance Systems.” IEEE Transac-tions on Pattern Analysis & Machine Intelligence, 2010

[4] Felzenszwalb, P. Personal communication.

[5] Agarwal, S., and D. Roth. "Learning a Sparse Representation for ObjectDetection." ECCV Lecture Notes in Computer Science, 2002

27

Page 28: Sarah Marqusee Sachs Advisor: Pedro Felzenszwalbcs.brown.edu/research/pubs/theses/ugrad/2016/sachs.sarah.pdfSarah Marqusee Sachs Advisor: Pedro Felzenszwalb Abstract This thesis describes

[6] Lowe, D. "Object Recognition from Local Scale-invariant Features." Pro-ceedings of the Seventh IEEE International Conference on Computer Vi-sion, 1999

[7] Vedaldi, A. and B. Fulkerson. “VLFeat: An Open and Portable Library ofComputer Vision Algorithms.” http://www.vlfeat.org

[8] Csurka G, C Dance, L Fan, J Willamowski, C Bray. “Visual categoriza-tion with bags of key points.” EECV Workshop on Statistical Learning inComputer Vision, 2004Gionis, A., P. Indyk, and R. Motwani. “Similaritysearch in high dimensions via hashing.” Proceedings of the 25th Interna-tional Conference on Very Large Data Bases (VLDB), 1999

[9] Everingham, M., L. Van-Gool, C. K. I. Williams, J. Winnand A. Zisserman. “The PASCAL Visual Object ClassesChallenge 2012 (VOC2012) Results". http://www.pascal-network.org/challenges/VOC/voc2012/workshop/index.html

[10] Leibe, B., and B. Schiele. "Interleaved Object Categorization and Segmen-tation." Proceedings of the British Machine Vision Conference, 2003

[11] Dalal, N., and B. Triggs. "Histograms of Oriented Gradients for HumanDetection." IEEE Computer Society Conference on Computer Vision andPattern Recognition, 2005

[12] Gionis, A., P. Indyk, and R. Motwani. “Similarity search in high dimensionsvia hashing.” Proceedings of the 25th International Conference on VeryLarge Data Bases (VLDB), 1999

[13] Andoni, A., and P. Indyk. “LSH Algorithm and Implementation (E2LSH)”http://www.mit.edu/~andoni/LSH/

[14] Belhumeur, P., J. Hespanha, and D. Kriegman. “Eigenfaces vs. Fisherfaces:Recognition Using Class Specific Linear Projection,” IEEE Transactions onPattern Analysis and Machine Intelligence, July 1997, pp. 711-720.

28