def METHOD_NAME(image, anno, labels):
    """ 目标检测类型生成标注图
    Args:
        image: 图片路径
        anno: 图片标注
        labels: 图片所属数据集的类别信息
    """
    catid2color = {}
    img = cv2.imread(image)
    img, scale_value = resize_img(img)
    tree = ET.parse(anno)
    objs = tree.findall('object')
    color_map = get_color_map_list(len(labels) + 1)
    for i, obj in enumerate(objs):
        cname = obj.find('name').text
        catid = labels.index(cname)
        if cname not in labels:
            continue
        xmin = int(float(obj.find('bndbox').find('xmin').text) * scale_value)
        ymin = int(float(obj.find('bndbox').find('ymin').text) * scale_value)
        xmax = int(float(obj.find('bndbox').find('xmax').text) * scale_value)
        ymax = int(float(obj.find('bndbox').find('ymax').text) * scale_value)
        if catid not in catid2color:
            catid2color[catid] = color_map[catid + 1]
        color = tuple(catid2color[catid])
        img = draw_rectangle_and_cname(img, xmin, ymin, xmax, ymax, cname,
                                       color)
    return img