Shortcuts

RemoveIgnored

class mmocr.datasets.transforms.RemoveIgnored[源代码]

Removed ignored elements from the pipeline.

Required Keys:

  • gt_ignored

  • gt_polygons (optional)

  • gt_bboxes (optional)

  • gt_bboxes_labels (optional)

  • gt_texts (optional)

Modified Keys:

  • gt_ignored

  • gt_polygons (optional)

  • gt_bboxes (optional)

  • gt_bboxes_labels (optional)

  • gt_texts (optional)

transform(results)[源代码]

The transform function. All subclass of BaseTransform should override this method.

This function takes the result dict as the input, and can add new items to the dict or modify existing items in the dict. And the result dict will be returned in the end, which allows to concate multiple transforms into a pipeline.

参数

results (dict) – The result dict.

返回

The result dict.

返回类型

dict