def image_count(list_bboxes, list_classes):
    """
    统计全图各个类别的数量。
    :param list_bboxes: BoundingBoxs list
    :param list_classes: Classes list
    :return: 各个类别的数量.
    """
    class_num = [0]*len(list_classes)
  
    for i in range(0, len(list_bboxes)):
        x1 = list_bboxes[i].xmin
        y1 = list_bboxes[i].ymin
        x2 = list_bboxes[i].xmax
        y2 = list_bboxes[i].ymax
        cls = list_bboxes[i].Class
        # 撞线的点(中心点)
        x = int(x1 + ((x2 - x1) * 0.5))
        y = int(y1 + ((y2 - y1) * 0.5))

        cls_index = list_classes.index(cls)
        class_num[cls_index] += 1

    return class_num