def load_json_info(gt_file, img_info):
    'Collect the annotation information.\n\n    Args:\n        gt_file (str): The path to ground-truth\n        img_info (dict): The dict of the img and annotation information\n\n    Returns:\n        img_info (dict): The dict of the img and annotation information\n    '
    annotation = mmcv.load(gt_file)
    anno_info = []
    for form in annotation['form']:
        for ann in form['words']:
            iscrowd = (1 if (len(ann['text']) == 0) else 0)
            (x1, y1, x2, y2) = ann['box']
            x = max(0, min(math.floor(x1), math.floor(x2)))
            y = max(0, min(math.floor(y1), math.floor(y2)))
            (w, h) = (math.ceil(abs((x2 - x1))), math.ceil(abs((y2 - y1))))
            bbox = [x, y, w, h]
            segmentation = [x, y, (x + w), y, (x + w), (y + h), x, (y + h)]
            anno = dict(iscrowd=iscrowd, category_id=1, bbox=bbox, area=(w * h), segmentation=[segmentation])
            anno_info.append(anno)
    img_info.update(anno_info=anno_info)
    return img_info
Collect the annotation information.

Args:
    gt_file (str): The path to ground-truth
    img_info (dict): The dict of the img and annotation information

Returns:
    img_info (dict): The dict of the img and annotation information
def load_json_info(gt_file, img_info):
    'Collect the annotation information.\n\n    Args:\n        gt_file (str): The path to ground-truth\n        img_info (dict): The dict of the img and annotation information\n\n    Returns:\n        img_info (dict): The dict of the img and annotation information\n    '
    annotation = mmcv.load(gt_file)
    anno_info = []
    for form in annotation['form']:
        for ann in form['words']:
            iscrowd = (1 if (len(ann['text']) == 0) else 0)
            (x1, y1, x2, y2) = ann['box']
            x = max(0, min(math.floor(x1), math.floor(x2)))
            y = max(0, min(math.floor(y1), math.floor(y2)))
            (w, h) = (math.ceil(abs((x2 - x1))), math.ceil(abs((y2 - y1))))
            bbox = [x, y, w, h]
            segmentation = [x, y, (x + w), y, (x + w), (y + h), x, (y + h)]
            anno = dict(iscrowd=iscrowd, category_id=1, bbox=bbox, area=(w * h), segmentation=[segmentation])
            anno_info.append(anno)
    img_info.update(anno_info=anno_info)
    return img_info