title: Kmeans clustering for sift features
body: <p>NOTE: This is my first ever stackexchange question. I'm sorry if the way I put my question was not as expected. So, here goes my doubt.</p>
  
  <p>I have a data set of about 3000 images. I performed sift (scale invariant feature transform) for all those images (using David Lowe's sift demo) and have obtained the images' respective (3000) keypoint features. Now I have to perform the k-means clustering for the 3000 images' keypoint features. Each image has its own keypoints  (changes from image to image) and they are in a 128 dimensional matrix. Now for me to perform the k-means, these 3000 sift vectors must be put together, and they should be trained to obtain one k-means model from it.</p>
  
  <p>For example:</p>
  
  <p>The images were converted to .pgm format before sift, and here are the 226 keypoints for one of the images after performing sift:</p>
  
  <pre><code>74 128
  
  98.20 126.13 16.47 2.776
  
  0 0 0 0 0 0 0 0 9 12 1 0 0 0 0 0 39 9 0 0
  
  0 15 24 12 29 1 0 0 0 27 92 33 13 1 0 0 0 0 0 20
  
  83 90 19 1 2 6 3 19 165 86 2 0 1 8 44 88 24 0 3 21
  
  8 24 165 64 3 1 4 0 0 1 1 18 116 23 10 0 1 14 11 51
  
  165 101 9 20 5 1 5 84 38 24 28 157 40 5 10 14 0 3 5 0
  
  0 0 0 0 45 101 16 0 0 0 0 1 114 165 17 8 1 0 0 1
  
  7 56 17 46 26 0 0 0
  </code></pre>
  
  <p>(likewise the remaining keypoints and their 128 dimensions continue till the 226th keypoint features).</p>
  
  <p>Likewise the remaining 2999 images have their respective keypoint features.</p>
  
  <p>Now I have to perform the k-means clustering for the entire 3000 images' sift features and get one k-means model from them. I am planning on using k-means package from scikit  (sklearn). How to input these 3000 images' keypoints in scikit? Please help.</p>