parameters: (self, label_image)
return_statement: return label_index
docstring: change label image to label index
docstring_summary: change label image to label index
docstring_tokens: change label image to label index
function: def _process_label_image(self, label_image):
          """
          change label image to label index
          """
          class_colors = self._class_colors
          width = label_image.shape[1]
          height = label_image.shape[0]
          label_index = np.zeros((height, width), dtype=np.float32)
  
          # label image is in BGR order
          index = label_image[:,:,2] + 256*label_image[:,:,1] + 256*256*label_image[:,:,0]
          for i in xrange(len(class_colors)):
              color = class_colors[i]
              ind = color[0] + 256*color[1] + 256*256*color[2]
              I = np.where(index == ind)
              label_index[I] = i
  
          return label_index
function_tokens: def _process_label_image ( self , label_image ) : class_colors = self . _class_colors width = label_image . shape [ 1 ] height = label_image . shape [ 0 ] label_index = np . zeros ( ( height , width ) , dtype = np . float32 ) # label image is in BGR order index = label_image [ : , : , 2 ] + 256 * label_image [ : , : , 1 ] + 256 * 256 * label_image [ : , : , 0 ] for i in xrange ( len ( class_colors ) ) : color = class_colors [ i ] ind = color [ 0 ] + 256 * color [ 1 ] + 256 * 256 * color [ 2 ] I = np . where ( index == ind ) label_index [ I ] = i return label_index