1 / 69

Words & Pictures

Words & Pictures . Clustering and Bag of Words Representations. Many slides adapted from Svetlana Lazebnik , Fei -Fei Li, Rob Fergus, and Antonio Torralba. Announcements. HW1 due Thurs , Sept 27 @ 12pm By email to cse595@gmail.com . No need to include shopping image set.

tameka
Download Presentation

Words & Pictures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Words & Pictures Clustering and Bag of Words Representations Many slides adapted from Svetlana Lazebnik, Fei-Fei Li, Rob Fergus, and Antonio Torralba

  2. Announcements • HW1 due Thurs, Sept 27 @ 12pm • By email to cse595@gmail.com. No need to include shopping image set. • Write-up can be webpage or pdf.

  3. Document Vectors • Represent document as a “bag of words”

  4. Origin: Bag-of-words models • Orderless document representation: frequencies of words from a dictionary Salton & McGill (1983)

  5. US Presidential Speeches Tag Cloudhttp://chir.ag/phernalia/preztags/ Origin: Bag-of-words models • Orderless document representation: frequencies of words from a dictionary Salton & McGill (1983)

  6. US Presidential Speeches Tag Cloudhttp://chir.ag/phernalia/preztags/ Origin: Bag-of-words models • Orderless document representation: frequencies of words from a dictionary Salton & McGill (1983)

  7. US Presidential Speeches Tag Cloudhttp://chir.ag/phernalia/preztags/ Origin: Bag-of-words models • Orderless document representation: frequencies of words from a dictionary Salton & McGill (1983)

  8. Bag-of-features models Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba

  9. Bags of features for image classification • Extract features

  10. Bags of features for image classification • Extract features • Learn “visual vocabulary”

  11. Bags of features for image classification • Extract features • Learn “visual vocabulary” • Quantize features using visual vocabulary

  12. Bags of features for image classification • Extract features • Learn “visual vocabulary” • Quantize features using visual vocabulary • Represent images by frequencies of “visual words”

  13. 1. Feature extraction • Regular grid • Vogel & Schiele, 2003 • Fei-Fei & Perona, 2005

  14. 1. Feature extraction • Regular grid • Vogel & Schiele, 2003 • Fei-Fei & Perona, 2005 • Interest point detector • Csurka et al. 2004 • Fei-Fei & Perona, 2005 • Sivic et al. 2005

  15. 1. Feature extraction • Regular grid • Vogel & Schiele, 2003 • Fei-Fei & Perona, 2005 • Interest point detector • Csurka et al. 2004 • Fei-Fei & Perona, 2005 • Sivic et al. 2005 • Other methods • Random sampling (Vidal-Naquet & Ullman, 2002) • Segmentation-based patches (Barnard et al. 2003)

  16. 1. Feature extraction

  17. 2. Learning the visual vocabulary

  18. 2. Learning the visual vocabulary Clustering Slide credit: Josef Sivic

  19. 2. Learning the visual vocabulary Visual vocabulary Clustering Slide credit: Josef Sivic

  20. Clustering • The assignment of objects into groups (called clusters) so that objects from the same cluster are more similar to each other than objects from different clusters. • Often similarity is assessed according to a distance measure. • Clustering is a common technique for statistical data analysis, which is used in many fields, including machine learning, data mining, pattern recognition, image analysis and bioinformatics.

  21. Any of the similarity metrics we talked about before (SSD, angle between vectors)

  22. Feature Clustering Clustering is the process of grouping a set of features into clusters of similar features. Features within a cluster should be similar. Features from different clusters should be dissimilar.

  23. source: Dan Klein

  24. K-means clustering • Want to minimize sum of squared Euclidean distances between points xi and their nearest cluster centers mk source: Svetlana Lazebnik

  25. K-means clustering • Want to minimize sum of squared Euclidean distances between points xi and their nearest cluster centers mk source: Svetlana Lazebnik

  26. source: Dan Klein

  27. source: Dan Klein

  28. Source: Hinrich Schutze

  29. Source: Hinrich Schutze

  30. Hierarchical clustering strategies • Agglomerative clustering • Start with each point in a separate cluster • At each iteration, merge two of the “closest” clusters • Divisive clustering • Start with all points grouped into a single cluster • At each iteration, split the “largest” cluster source: Svetlana Lazebnik

  31. source: Dan Klein

  32. source: Dan Klein

  33. Divisive Clustering • Top-down (instead of bottom-up as in Agglomerative Clustering) • Start with all docs in one big cluster • Then recursively split clusters • Eventually each node forms a cluster on its own. Source: Hinrich Schutze

  34. Flat or hierarchical clustering? • For high efficiency, use flat clustering (e.g. k means) • For deterministic results: hierarchical clustering • When a hierarchical structure is desired: hierarchical algorithm • Hierarchical clustering can also be applied if K cannot be predetermined (can start without knowing K) Source: Hinrich Schutze

  35. 2. Learning the visual vocabulary Clustering Slide credit: Josef Sivic

  36. 2. Learning the visual vocabulary Visual vocabulary Clustering Slide credit: Josef Sivic

  37. From clustering to vector quantization • Clustering is a common method for learning a visual vocabulary or codebook • Unsupervised learning process • Each cluster center produced by k-means becomes a codebook entry • Codebook can be learned on separate training set • Provided the training set is sufficiently representative, the codebook will be “universal” • The codebook is used for quantizing features • A vector quantizer takes a feature vector and maps it to the index of the nearest entry in the codebook • Codebook = visual vocabulary • Codebook entry = visual word

More Related