def label2rgb(label, image=None, colors=None, alpha=0.3, bg_label=(-1), bg_color=(0, 0, 0), image_alpha=1, kind='overlay'):
 if (kind == 'overlay'):
  return _label2rgb_overlay(label, image, colors, alpha, bg_label, bg_color, image_alpha)
 else:
  return _label2rgb_avg(label, image, bg_label, bg_color)

def label2rgb ( label , image = None , colors = None , alpha = 0.3 , bg_label = ( - 1 ) , bg_color = ( 0 , 0 , 0 ) , image_alpha = 1 , kind = 'overlay' ) : if ( kind == 'overlay' ) : return _label2rgb_overlay ( label , image , colors , alpha , bg_label , bg_color , image_alpha ) else : return _label2rgb_avg ( label , image , bg_label , bg_color )
return an rgb image where color-coded labels are painted over the image .