def encode_id(instance_id):
    """
    Convert an instance id to mask colour
    This matches the encoding done in the dataset renderer, see
    https://github.com/jskinn/Dataset_Synthesizer/blob/local-devel/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerUtils.cpp#L673
    :param instance_id:
    :return:
    """
    return [
        (instance_id << 1) & 254,
        (instance_id >> 6) & 254,
        (instance_id >> 13) & 254
    ]