def decodeClassMask(im):
    """
    Decodes pixel-level object/part class and instance data from
    the given image, previously encoded into RGB channels.
    """
    # Classes are a combination of RG channels (dividing R by 10)
    return (im[:,:,0] // 10) * 256 + im[:,:,1]