title: KMeans clustering with labels data
body: <p>I have a RGB image of shape (587, 987, 3). #height, width, num_channels</p>
  <p>I also have label data (pixels' locations) for each of 7 classes.</p>
  <p>I wanted to apply KMeans clustering algorithm to segment the given image into 7 classes.
  While applying KMeans clustering, I want to utilize the label data, i.e., pixels locations.</p>
  <p>How can I utilize label data?</p>
  <p>What I have tried so far is as follows.</p>
  <pre><code>img = np.random.randint(low=1,high=99, size=(587, 987, 3)) 
  
  im = img.reshape(img.shape[0]*img.shape[1], img.shape[2])
  im = StandardScaler().fit_transform(im)
  
  clusters = KMeans(n_clusters=7,n_init= 100,max_iter=100,n_jobs=-1).fit(im)
  kmeans_labels = clusters.labels_.reshape(img.shape[0], img.shape[1])
  
  plt.imshow(kmeans_labels)
  plt.show()
     
  </code></pre>
  <p>I'm looking for propagating some annotation to the remaining segments (superpixels)</p>