""" added by CCJ """ def color_map_info(palette): labels = [ 'background', #0 'aeroplane', #1 'bicycle', #2 'bird', #3 'boat', #4 'bottle', #5 'bus', #6 'car', #7 'cat', #8 'chair', #9 'cow', #10 'diningtable', #11 'dog', #12 'horse', #13 'motorbike', #14 'person', #15 'pottedplant', #16 'sheep', #17 'sofa', #18 'train', #19 'tv/monitor', #20 "void/unlabelled", #255 ] print 'class colormap and palette = {r,g,b}' for i in range(0,21*3,3): print '# {:>3d}: {:<20} (R,G,B) = {},{},{}'.format(i/3, labels[i/3], palette[i], palette[i+1],palette[i+2]) i = 255*3 print '# {:>3d}: {:<20} (R,G,B) = {},{},{}'.format(i/3, labels[21], palette[i], palette[i+1],palette[i+2])