1 / 82

An introduction to Generalized K-means with image processing applications

An introduction to Generalized K-means with image processing applications. Jeremy Watt and Reza Borhani. What we’ll discuss. The cutting edge – Dictionary Learning and large scale image compression From K-means to G- Kmeans (aka Dictionary Learning)

harley
Télécharger la présentation

An introduction to Generalized K-means with image processing applications

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. An introduction to Generalized K-means with image processing applications Jeremy Watt and Reza Borhani

  2. What we’ll discuss • The cutting edge – Dictionary Learning and large scale image compression • From K-means to G-Kmeans (aka Dictionary Learning) • A tried and true application of G-K Means in Image Processing

  3. Dictionary Learning and Joint Image Compression

  4. Image compression via G-Kmeans An 8x8 block

  5. Image compression via G-Kmeans

  6. Image compression via G-Kmeans • Say we have a robust matrix D that can represent image blocks from like images well as a sparse sum of its columns So we essentially have where # nonzero values in Standard basis

  7. Image compression via G-Kmeans Image adapted from Irina Rish’s Sparse Statistical Models Course

  8. Image compression via G-Kmeans • Can record far fewer coefficients than pixel values! • Since sender and receiver both have Dictionary, we just send a few coefficients – much cheaper!

  9. How do we find the right fit? subject to • Greed is Good - what is a greedy approach to solving this problem? • Repeat S times • Cycle through each column of D not yet used and find the single best fit • Subtract the best column’s influence from y

  10. Francis Bach et al. Sparse Coding and Dictionary Learning for Image Analysis Part III: Optimization for Sparse Coding and Dictionary Learning

  11. How do we find the right fit? subject to • Greed is Good - what is a greedy approach to solving this problem? for

  12. The era of Big Data 250 million images uploaded to Facebook everyday. There are currently   ~ 90 billion photos totalon Facebook. In 2007, almost 70 million CT-scans performed only in the U.S. bits Joint Compressor JPEG JPEG JPEG bits bits bits Joint Compressor bits DICOM DICOM DICOM bits bits bits

  13. Joint image compressor

  14. From K-means to G-Kmeans (aka Dictionary Learning)

  15. What is data clustering? • A method for understanding the structure of a given (training) data set via clustering. • A way of classifying points in a newly received (test) data set • K-means is the most popular method

  16. Begin Training Phase First – Initialize centroids

  17. Next – Assign data

  18. Recalculate centroids

  19. Re-assign data

  20. Re-compute centroids

  21. Re-assign data

  22. Pick K centroids • Repeat until convergence • Assign each (training) point to its closest centroid • Re compute centroid locations • Output final K centroids and assignments

  23. Begin Testing Phase ?

  24. Which centroid is closest?

  25. Shortcomings • Number of centroids? • Initialization? • Are yours the right ones? • non-glob clusters • complexity

  26. Classification • Not the best, but not bad right out of the box • MNIST dataset – 60,000 training, 10,000 test • Compeitors include SVMs, Logistic regression, etc.

  27. (Pseudo) Image Compression • Per pixel: instead of (R,G,B) store index of closest centroid • Also called vector quantization • Image taken from Bishop’s Pattern Recognition

  28. For K Centroids

  29. Y For P Points

  30. = = x Assignment vector

  31. = = X For P Assignments

  32. Notice • Columns of X – assignment of one data point • Rows of X – all assignments to a single centroid =

  33. K-Means algorithm: Notation • Centroid location matrix • Data matrix • Assignment matrix

  34. K-Means algorithm: Notation • Centroid matrix • Data matrix • Assignment matrix • the kth cluster • the cardinality of the kth cluster

  35. K-means algorithm Input: Y, initial D and X Output: Final D and X Until Convergence: for p (Update Assignments) for (Update Centroids)

  36. K-means algorithm Input: Y, initial D and X Output: Final D and X Until Convergence: for p (Update Assignments) for (Update Centroids)

  37. K-means algorithm Input: Y, initial D and X Output: Final D and X Until Convergence: for p (Update Assignments) for (Update Centroids)

  38. K-means algorithm Input: Y, initial D and X Output: Final D and X Until Convergence: for p (Update Assignments) for (Update Centroids)

  39. K-means algorithm Input: Y, initial D and X Output: Final D and X Until Convergence: for p (Update Assignments) for (Update Centroids) The kth row of X

  40. For example say we • 4 data points,,, • 2 centroids , Then records which points are assigned to the first centroid. And

  41. What value of is minimizes the squared distances?

  42. Not quite…

  43. Not quite…

More Related