words pictures
play

Words & Pictures Clustering and Bag of Words Many - PowerPoint PPT Presentation

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


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

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

  3. Bag-­‑of-­‑features ¡models ¡ Many ¡slides ¡adapted ¡from ¡Fei-­‑Fei ¡Li, ¡Rob ¡Fergus, ¡and ¡Antonio ¡Torralba ¡

  4. Origin: ¡Bag-­‑of-­‑words ¡models ¡ • Orderless ¡document ¡representaJon: ¡frequencies ¡ of ¡words ¡from ¡a ¡dicJonary ¡ ¡ Salton ¡& ¡McGill ¡(1983) ¡

  5. Origin: ¡Bag-­‑of-­‑words ¡models ¡ • Orderless ¡document ¡representaJon: ¡frequencies ¡ of ¡words ¡from ¡a ¡dicJonary ¡ ¡ Salton ¡& ¡McGill ¡(1983) ¡ US ¡PresidenJal ¡Speeches ¡Tag ¡Cloud ¡ http://chir.ag/phernalia/preztags/

  6. Origin: ¡Bag-­‑of-­‑words ¡models ¡ • Orderless ¡document ¡representaJon: ¡frequencies ¡ of ¡words ¡from ¡a ¡dicJonary ¡ ¡ Salton ¡& ¡McGill ¡(1983) ¡ US ¡PresidenJal ¡Speeches ¡Tag ¡Cloud ¡ http://chir.ag/phernalia/preztags/

  7. Origin: ¡Bag-­‑of-­‑words ¡models ¡ • Orderless ¡document ¡representaJon: ¡frequencies ¡ of ¡words ¡from ¡a ¡dicJonary ¡ ¡ Salton ¡& ¡McGill ¡(1983) ¡ US ¡PresidenJal ¡Speeches ¡Tag ¡Cloud ¡ http://chir.ag/phernalia/preztags/

  8. Bags ¡of ¡features ¡for ¡image ¡ classificaJon ¡ 1. Extract ¡features ¡

  9. Bags ¡of ¡features ¡for ¡image ¡ classificaJon ¡ 1. Extract ¡features ¡ 2. Learn ¡“visual ¡vocabulary” ¡

  10. Bags ¡of ¡features ¡for ¡image ¡ classificaJon ¡ 1. Extract ¡features ¡ 2. Learn ¡“visual ¡vocabulary” ¡ 3. QuanJze ¡features ¡using ¡visual ¡vocabulary ¡ ¡

  11. Bags ¡of ¡features ¡for ¡image ¡ classificaJon ¡ 1. Extract ¡features ¡ 2. Learn ¡“visual ¡vocabulary” ¡ 3. QuanJze ¡features ¡using ¡visual ¡vocabulary ¡ ¡ 4. Represent ¡images ¡by ¡frequencies ¡of ¡ ¡ “visual ¡words” ¡ ¡

  12. 1. ¡Feature ¡extracJon ¡ • Regular ¡grid ¡ – Vogel ¡& ¡Schiele, ¡2003 ¡ – Fei-­‑Fei ¡& ¡Perona, ¡2005 ¡

  13. 1. ¡Feature ¡extracJon ¡ • Regular ¡grid ¡ – Vogel ¡& ¡Schiele, ¡2003 ¡ – Fei-­‑Fei ¡& ¡Perona, ¡2005 ¡ • Interest ¡point ¡detector ¡ – Csurka ¡et ¡al. ¡2004 ¡ – Fei-­‑Fei ¡& ¡Perona, ¡2005 ¡ – Sivic ¡et ¡al. ¡2005 ¡

  14. 1. ¡Feature ¡extracJon ¡ • 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) ¡ – SegmentaJon-­‑based ¡patches ¡(Barnard ¡et ¡al. ¡2003) ¡

  15. Compute ¡SIFT ¡ Normalize ¡patch ¡ descriptor ¡ ¡ ¡ ¡ ¡ ¡ ¡[Lowe’99] ¡ Detect ¡patches ¡ [Mikojaczyk ¡and ¡Schmid ¡’02] ¡ [Mata, ¡Chum, ¡Urban ¡& ¡Pajdla, ¡’02] ¡ ¡ [Sivic ¡& ¡Zisserman, ¡’03] ¡ Slide ¡credit: ¡Josef ¡Sivic ¡

  16. … ¡

  17. … ¡

  18. … ¡ Clustering ¡ Slide ¡credit: ¡Josef ¡Sivic ¡

  19. 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. ¡ ¡ – Ojen ¡similarity ¡is ¡assessed ¡according ¡to ¡a ¡distance ¡ measure. ¡ ¡ – Clustering ¡is ¡a ¡common ¡technique ¡for ¡staJsJcal ¡data ¡ analysis, ¡which ¡is ¡used ¡in ¡many ¡fields, ¡including ¡ machine ¡learning, ¡data ¡mining, ¡pakern ¡recogniJon, ¡ image ¡analysis ¡and ¡bioinformaJcs. ¡

  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 ¡ x i ¡and ¡their ¡ nearest ¡cluster ¡centers ¡ m k ¡ source: ¡Svetlana ¡Lazebnik ¡ ¡

  25. K-­‑means ¡clustering ¡ • Want ¡to ¡minimize ¡sum ¡of ¡ squared ¡Euclidean ¡distances ¡ between ¡points ¡ x i ¡and ¡their ¡ nearest ¡cluster ¡centers ¡ m k ¡ source: ¡Svetlana ¡Lazebnik ¡ ¡

  26. source: ¡Dan ¡Klein ¡ ¡

  27. source: ¡Dan ¡Klein ¡ ¡

  28. Source: ¡Hinrich ¡Schutze ¡

  29. Source: ¡Hinrich ¡Schutze ¡

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

  31. source: ¡Dan ¡Klein ¡ ¡

  32. source: ¡Dan ¡Klein ¡ ¡

  33. Divisive ¡Clustering ¡ • Top-­‑down ¡(instead ¡of ¡bokom-­‑up ¡as ¡in ¡ AgglomeraJve ¡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 ¡determinisJc ¡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. … ¡ Clustering ¡ Slide ¡credit: ¡Josef ¡Sivic ¡

  36. Visual ¡vocabulary ¡ … ¡ Clustering ¡ Slide ¡credit: ¡Josef ¡Sivic ¡

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

  38. Fei-­‑Fei ¡et ¡al. ¡2005 ¡

  39. Sivic ¡et ¡al. ¡2005 ¡

  40. Visual ¡vocabularies: ¡Issues ¡ • How ¡to ¡choose ¡vocabulary ¡size? ¡ – Too ¡small: ¡visual ¡words ¡not ¡ representaJve ¡of ¡all ¡patches ¡ – Too ¡large: ¡quanJzaJon ¡arJfacts, ¡ overfisng ¡ • GeneraJve ¡or ¡discriminaJve ¡ learning? ¡ • ComputaJonal ¡efficiency ¡ – Vocabulary ¡trees ¡ ¡ (Nister ¡& ¡Stewenius, ¡2006) ¡

  41. frequency ¡ ….. ¡ codewords ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend