Cvpr2007 object category recognition p1 - bag of words models

1,568 views

Published on

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,568
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
57
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • For that we will use a method called probabilistic latent semantic analysis. pLSA can be thought of as a matrix decomposition. Here is our term-document matrix (documents, words) and we want to find topic vectors common to all documents and mixture coefficients P(z|d) specific to each document. Note that these are all probabilites which sum to one. So a column here is here expressed as a convex combination of the topic vectors. What we would like to see is that the topics correspond to objects. So an image will be expressed as a mixture of different objects and backgrounds.
  • An images is a mixture of learned topic vectors and mixing weights. Fit the model and use the learned mixing coeficents to classify an image. In particular assign to the highest P(z|d)
  • We use maximum likelihood approach to fit parameters of the model. We write down the likelihood of the whole collection and maximize it using EM. M,N goes over all visual words and all documents. P(w|d) factorizes as on previous slide the entries in those matrices are our parameters. n(w,d) are the observed counts in our data
  • Cvpr2007 object category recognition p1 - bag of words models

    1. 1. Part 1: Bag-of-words models by Li Fei-Fei (Princeton)
    2. 2. Related works <ul><li>Early “bag of words” models: mostly texture recognition </li></ul><ul><ul><li>Cula & Dana, 2001; Leung & Malik 2001; Mori, Belongie & Malik, 2001; Schmid 2001; Varma & Zisserman, 2002, 2003; Lazebnik, Schmid & Ponce, 2003; </li></ul></ul><ul><li>Hierarchical Bayesian models for documents (pLSA, LDA, etc.) </li></ul><ul><ul><li>Hoffman 1999; Blei, Ng & Jordan, 2004; Teh, Jordan, Beal & Blei, 2004 </li></ul></ul><ul><li>Object categorization </li></ul><ul><ul><li>Csurka, Bray, Dance & Fan, 2004; Sivic, Russell, Efros, Freeman & Zisserman, 2005; Sudderth, Torralba, Freeman & Willsky, 2005; </li></ul></ul><ul><li>Natural scene categorization </li></ul><ul><ul><li>Vogel & Schiele, 2004; Fei-Fei & Perona, 2005; Bosch, Zisserman & Munoz, 2006 </li></ul></ul>
    3. 3. Object Bag of ‘words’
    4. 4. Analogy to documents Of all the sensory impressions proceeding to the brain, the visual experiences are the dominant ones. Our perception of the world around us is based essentially on the messages that reach the brain from our eyes. For a long time it was thought that the retinal image was transmitted point by point to visual centers in the brain; the cerebral cortex was a movie screen, so to speak, upon which the image in the eye was projected. Through the discoveries of Hubel and Wiesel we now know that behind the origin of the visual perception in the brain there is a considerably more complicated course of events. By following the visual impulses along their path to the various cell layers of the optical cortex, Hubel and Wiesel have been able to demonstrate that the message about the image falling on the retina undergoes a step-wise analysis in a system of nerve cells stored in columns. In this system each cell has its specific function and is responsible for a specific detail in the pattern of the retinal image. sensory, brain, visual, perception, retinal, cerebral cortex, eye, cell, optical nerve, image Hubel, Wiesel China is forecasting a trade surplus of $90bn (£51bn) to $100bn this year, a threefold increase on 2004's $32bn. The Commerce Ministry said the surplus would be created by a predicted 30% jump in exports to $750bn, compared with a 18% rise in imports to $660bn. The figures are likely to further annoy the US, which has long argued that China's exports are unfairly helped by a deliberately undervalued yuan. Beijing agrees the surplus is too high, but says the yuan is only one factor. Bank of China governor Zhou Xiaochuan said the country also needed to do more to boost domestic demand so more goods stayed within the country. China increased the value of the yuan against the dollar by 2.1% in July and permitted it to trade within a narrow band, but the US wants the yuan to be allowed to trade freely. However, Beijing has made it clear that it will take its time and tread carefully before allowing the yuan to rise further in value. China, trade, surplus, commerce, exports, imports, US, yuan, bank, domestic, foreign, increase, trade, value
    5. 5. <ul><li>Looser definition </li></ul><ul><ul><li>Independent features </li></ul></ul>A clarification: definition of “BoW”
    6. 6. A clarification: definition of “BoW” <ul><li>Looser definition </li></ul><ul><ul><li>Independent features </li></ul></ul><ul><li>Stricter definition </li></ul><ul><ul><li>Independent features </li></ul></ul><ul><ul><li>histogram representation </li></ul></ul>
    7. 7. category decision learning feature detection & representation codewords dictionary image representation category models (and/or) classifiers recognition
    8. 8. Representation 1. 2. 3. feature detection & representation codewords dictionary image representation
    9. 9. 1.Feature detection and representation
    10. 10. 1.Feature detection and representation <ul><li>Regular grid </li></ul><ul><ul><li>Vogel & Schiele, 2003 </li></ul></ul><ul><ul><li>Fei-Fei & Perona, 2005 </li></ul></ul>
    11. 11. 1.Feature detection and representation <ul><li>Regular grid </li></ul><ul><ul><li>Vogel & Schiele, 2003 </li></ul></ul><ul><ul><li>Fei-Fei & Perona, 2005 </li></ul></ul><ul><li>Interest point detector </li></ul><ul><ul><li>Csurka, et al. 2004 </li></ul></ul><ul><ul><li>Fei-Fei & Perona, 2005 </li></ul></ul><ul><ul><li>Sivic, et al. 2005 </li></ul></ul>
    12. 12. 1.Feature detection and representation <ul><li>Regular grid </li></ul><ul><ul><li>Vogel & Schiele, 2003 </li></ul></ul><ul><ul><li>Fei-Fei & Perona, 2005 </li></ul></ul><ul><li>Interest point detector </li></ul><ul><ul><li>Csurka, Bray, Dance & Fan, 2004 </li></ul></ul><ul><ul><li>Fei-Fei & Perona, 2005 </li></ul></ul><ul><ul><li>Sivic, Russell, Efros, Freeman & Zisserman, 2005 </li></ul></ul><ul><li>Other methods </li></ul><ul><ul><li>Random sampling (Vidal-Naquet & Ullman, 2002) </li></ul></ul><ul><ul><li>Segmentation based patches (Barnard, Duygulu, Forsyth, de Freitas, Blei, Jordan, 2003) </li></ul></ul>
    13. 13. 1.Feature detection and representation Normalize patch Detect patches [Mikojaczyk and Schmid ’02] [Mata, Chum, Urban & Pajdla, ’02] [Sivic & Zisserman, ’03] Compute SIFT descriptor [Lowe’99] Slide credit: Josef Sivic
    14. 14. 1.Feature detection and representation …
    15. 15. 2. Codewords dictionary formation …
    16. 16. 2. Codewords dictionary formation Vector quantization Slide credit: Josef Sivic …
    17. 17. 2. Codewords dictionary formation Fei-Fei et al. 2005
    18. 18. Image patch examples of codewords Sivic et al. 2005
    19. 19. 3. Image representation frequency codewords … ..
    20. 20. Representation 1. 2. 3. feature detection & representation codewords dictionary image representation
    21. 21. category models (and/or) classifiers Learning and Recognition category decision codewords dictionary
    22. 22. category models (and/or) classifiers Learning and Recognition <ul><li>Generative method: </li></ul><ul><ul><li>- graphical models </li></ul></ul><ul><li>Discriminative method: </li></ul><ul><ul><li>- SVM </li></ul></ul>
    23. 23. <ul><li>Naïve Bayes classifier </li></ul><ul><ul><li>Csurka Bray, Dance & Fan, 2004 </li></ul></ul><ul><li>Hierarchical Bayesian text models (pLSA and LDA) </li></ul><ul><ul><li>Background: Hoffman 2001, Blei, Ng & Jordan, 2004 </li></ul></ul><ul><ul><li>Object categorization: Sivic et al. 2005, Sudderth et al. 2005 </li></ul></ul><ul><ul><li>Natural scene categorization: Fei-Fei et al. 2005 </li></ul></ul>2 generative models
    24. 24. <ul><li>w n : each patch in an image </li></ul><ul><ul><li>w n = [0,0,…1,…,0,0] T </li></ul></ul><ul><li>w: a collection of all N patches in an image </li></ul><ul><ul><li>w = [w 1 ,w 2 ,…,w N ] </li></ul></ul><ul><li>d j : the j th image in an image collection </li></ul><ul><li>c: category of the image </li></ul><ul><li>z: theme or topic of the patch </li></ul>First, some notations
    25. 25. w N c Case #1: the Naïve Bayes model Csurka et al. 2004 Prior prob. of the object classes Image likelihood given the class Object class decision
    26. 26. Csurka et al. 2004
    27. 27. Csurka et al. 2004
    28. 28. Hoffman, 2001 Case #2: Hierarchical Bayesian text models Blei et al., 2001 Probabilistic Latent Semantic Analysis (pLSA) Latent Dirichlet Allocation (LDA) w N d z D w N c z D 
    29. 29. Case #2: Hierarchical Bayesian text models Probabilistic Latent Semantic Analysis (pLSA) Sivic et al. ICCV 2005 w N d z D “ face”
    30. 30. Case #2: Hierarchical Bayesian text models Latent Dirichlet Allocation (LDA) Fei-Fei et al. ICCV 2005 w N c z D  “ beach”
    31. 31. Case #2: the pLSA model w N d z D
    32. 32. Case #2: the pLSA model Slide credit: Josef Sivic w N d z D Observed codeword distributions Codeword distributions per theme (topic) Theme distributions per image
    33. 33. Case #2: Recognition using pLSA Slide credit: Josef Sivic
    34. 34. Maximize likelihood of data using EM Observed counts of word i in document j M … number of codewords N … number of images Case #2: Learning the pLSA parameters Slide credit: Josef Sivic
    35. 35. Demo <ul><li>Course website </li></ul>
    36. 36. task: face detection – no labeling
    37. 37. <ul><li>Output of crude feature detector </li></ul><ul><ul><li>Find edges </li></ul></ul><ul><ul><li>Draw points randomly from edge set </li></ul></ul><ul><ul><li>Draw from uniform distribution to get scale </li></ul></ul>Demo: feature detection
    38. 38. Demo: learnt parameters Codeword distributions per theme (topic) Theme distributions per image <ul><li>Learning the model: do_plsa(‘config_file_1’) </li></ul><ul><li>Evaluate and visualize the model: do_plsa_evaluation(‘config_file_1’) </li></ul>
    39. 39. Demo: recognition examples
    40. 40. <ul><li>Performance of each theme </li></ul>Demo: categorization results
    41. 41. category models (and/or) classifiers Learning and Recognition <ul><li>Generative method: </li></ul><ul><ul><li>- graphical models </li></ul></ul><ul><li>Discriminative method: </li></ul><ul><ul><li>- SVM </li></ul></ul>
    42. 42. Discriminative methods based on ‘bag of words’ representation Zebra Non-zebra Decision boundary
    43. 43. Discriminative methods based on ‘bag of words’ representation <ul><li>Grauman & Darrell, 2005, 2006: </li></ul><ul><ul><li>SVM w/ Pyramid Match kernels </li></ul></ul><ul><li>Others </li></ul><ul><ul><li>Csurka, Bray, Dance & Fan, 2004 </li></ul></ul><ul><ul><li>Serre & Poggio, 2005 </li></ul></ul>
    44. 44. Summary: Pyramid match kernel optimal partial matching between sets of features Grauman & Darrell, 2005, Slide credit: Kristen Grauman
    45. 45. Pyramid Match (Grauman & Darrell 2005) Histogram intersection Slide credit: Kristen Grauman
    46. 46. Pyramid Match (Grauman & Darrell 2005) Histogram intersection Slide credit: Kristen Grauman Difference in histogram intersections across levels counts number of new pairs matched matches at this level matches at previous level
    47. 47. Pyramid match kernel <ul><li>Weights inversely proportional to bin size </li></ul><ul><li>Normalize kernel values to avoid favoring large sets </li></ul>Slide credit: Kristen Grauman measure of difficulty of a match at level i histogram pyramids number of newly matched pairs at level i
    48. 48. Example pyramid match Level 0 Slide credit: Kristen Grauman
    49. 49. Example pyramid match Level 1 Slide credit: Kristen Grauman
    50. 50. Example pyramid match Level 2 Slide credit: Kristen Grauman
    51. 51. Example pyramid match pyramid match optimal match Slide credit: Kristen Grauman
    52. 52. Summary: Pyramid match kernel optimal partial matching between sets of features number of new matches at level i difficulty of a match at level i Slide credit: Kristen Grauman
    53. 53. Object recognition results <ul><li>ETH-80 database 8 object classes </li></ul><ul><li>( Eichhorn and Chapelle 2004) </li></ul><ul><li>Features: </li></ul><ul><ul><li>Harris detector </li></ul></ul><ul><ul><li>PCA-SIFT descriptor, d =10 </li></ul></ul>Slide credit: Kristen Grauman Recognition rate Complexity Kernel Pyramid match Bhattacharyya affinity [Kondor & Jebara] Match [Wallraven et al.] 84% 85% 84%
    54. 54. Object recognition results <ul><li>Caltech objects database 101 object classes </li></ul><ul><li>Features: </li></ul><ul><ul><li>SIFT detector </li></ul></ul><ul><ul><li>PCA-SIFT descriptor, d =10 </li></ul></ul><ul><li>30 training images / class </li></ul><ul><li>43% recognition rate </li></ul><ul><li>(1% chance performance) </li></ul><ul><li>0.002 seconds per match </li></ul>Slide credit: Kristen Grauman
    55. 55. category decision learning feature detection & representation codewords dictionary image representation category models (and/or) classifiers recognition
    56. 56. What about spatial info? ?
    57. 57. What about spatial info? <ul><li>Generative models </li></ul><ul><ul><li>Sudderth, Torralba, Freeman & Willsky, 2005, 2006 </li></ul></ul><ul><ul><li>Niebles & Fei-Fei, CVPR 2007 </li></ul></ul>
    58. 58. What about spatial info? <ul><li>Generative models </li></ul><ul><ul><li>Sudderth, Torralba, Freeman & Willsky, 2005, 2006 </li></ul></ul><ul><ul><li>Niebles & Fei-Fei, CVPR 2007 </li></ul></ul>P 3 P 1 P 2 P 4 Bg Image w
    59. 59. What about spatial info? <ul><li>Generative models </li></ul><ul><li>Discriminative methods </li></ul><ul><ul><li>Lazebnik, Schmid & Ponce, 2006 </li></ul></ul>
    60. 60. Invariance issues <ul><li>Scale and rotation </li></ul><ul><ul><li>Implicit </li></ul></ul><ul><ul><li>Detectors and descriptors </li></ul></ul>Kadir and Brady. 2003
    61. 61. <ul><li>Scale and rotation </li></ul><ul><li>Occlusion </li></ul><ul><ul><li>Implicit in the models </li></ul></ul><ul><ul><li>Codeword distribution: small variations </li></ul></ul><ul><ul><li>(In theory) Theme (z) distribution: different occlusion patterns </li></ul></ul>Invariance issues
    62. 62. <ul><li>Scale and rotation </li></ul><ul><li>Occlusion </li></ul><ul><li>Translation </li></ul><ul><ul><li>Encode (relative) location information </li></ul></ul><ul><ul><ul><li>Sudderth, Torralba, Freeman & Willsky, 2005, 2006 </li></ul></ul></ul><ul><ul><ul><li>Niebles & Fei-Fei, 2007 </li></ul></ul></ul>Invariance issues
    63. 63. <ul><li>Scale and rotation </li></ul><ul><li>Occlusion </li></ul><ul><li>Translation </li></ul><ul><li>View point (in theory) </li></ul><ul><ul><li>Codewords: detector and descriptor </li></ul></ul><ul><ul><li>Theme distributions: different view points </li></ul></ul>Invariance issues Fergus, Fei-Fei, Perona & Zisserman, 2005
    64. 64. <ul><li>Intuitive </li></ul><ul><ul><li>Analogy to documents </li></ul></ul>Model properties Of all the sensory impressions proceeding to the brain, the visual experiences are the dominant ones. Our perception of the world around us is based essentially on the messages that reach the brain from our eyes. For a long time it was thought that the retinal image was transmitted point by point to visual centers in the brain; the cerebral cortex was a movie screen, so to speak, upon which the image in the eye was projected. Through the discoveries of Hubel and Wiesel we now know that behind the origin of the visual perception in the brain there is a considerably more complicated course of events. By following the visual impulses along their path to the various cell layers of the optical cortex, Hubel and Wiesel have been able to demonstrate that the message about the image falling on the retina undergoes a step-wise analysis in a system of nerve cells stored in columns. In this system each cell has its specific function and is responsible for a specific detail in the pattern of the retinal image. sensory, brain, visual, perception, retinal, cerebral cortex, eye, cell, optical nerve, image Hubel, Wiesel
    65. 65. <ul><li>Intuitive </li></ul><ul><ul><li>Analogy to documents </li></ul></ul><ul><ul><li>Analogy to human vision </li></ul></ul>Model properties Olshausen and Field, 2004, Fei-Fei and Perona, 2005
    66. 66. <ul><li>Intuitive </li></ul><ul><li>generative models </li></ul><ul><ul><li>Convenient for weakly- or un-supervised, incremental training </li></ul></ul><ul><ul><li>Prior information </li></ul></ul><ul><ul><li>Flexibility (e.g. HDP) </li></ul></ul>Model properties Li, Wang & Fei-Fei, CVPR 2007 Sivic, Russell, Efros, Freeman, Zisserman, 2005 model Classification Dataset Incremental learning
    67. 67. <ul><li>Intuitive </li></ul><ul><li>generative models </li></ul><ul><li>Discriminative method </li></ul><ul><ul><li>Computationally efficient </li></ul></ul>Model properties Grauman et al. CVPR 2005
    68. 68. <ul><li>Intuitive </li></ul><ul><li>generative models </li></ul><ul><li>Discriminative method </li></ul><ul><li>Learning and recognition relatively fast </li></ul><ul><ul><li>Compare to other methods </li></ul></ul>Model properties
    69. 69. <ul><li>No rigorous geometric information of the object components </li></ul><ul><li>It’s intuitive to most of us that objects are made of parts – no such information </li></ul><ul><li>Not extensively tested yet for </li></ul><ul><ul><li>View point invariance </li></ul></ul><ul><ul><li>Scale invariance </li></ul></ul><ul><li>Segmentation and localization unclear </li></ul>Weakness of the model

    ×