MAERec-Gradio / mmocr /utils /__init__.py
Mountchicken's picture
Upload 704 files
9bf4bd7
raw
history blame
3.33 kB
# Copyright (c) OpenMMLab. All rights reserved.
from .bbox_utils import (bbox2poly, bbox_center_distance, bbox_diag_distance,
bezier2polygon, is_on_same_line, rescale_bbox,
rescale_bboxes, stitch_boxes_into_lines)
from .bezier_utils import bezier2poly, poly2bezier
from .check_argument import (equal_len, is_2dlist, is_3dlist, is_none_or_type,
is_type_list, valid_boundary)
from .collect_env import collect_env
from .data_converter_utils import dump_ocr_data, recog_anno_to_imginfo
from .fileio import (check_integrity, get_md5, is_archive, list_files,
list_from_file, list_to_file)
from .img_utils import crop_img, warp_img
from .mask_utils import fill_hole
from .parsers import LineJsonParser, LineStrParser
from .point_utils import point_distance, points_center
from .polygon_utils import (boundary_iou, crop_polygon, is_poly_inside_rect,
offset_polygon, poly2bbox, poly2shapely,
poly_intersection, poly_iou, poly_make_valid,
poly_union, polys2shapely, rescale_polygon,
rescale_polygons, shapely2poly, sort_points,
sort_vertex, sort_vertex8)
from .processing import track_parallel_progress_multi_args
from .setup_env import register_all_modules
from .string_utils import StringStripper
from .transform_utils import remove_pipeline_elements
from .typing_utils import (ColorType, ConfigType, DetSampleList,
InitConfigType, InstanceList, KIESampleList,
LabelList, MultiConfig, OptConfigType,
OptDetSampleList, OptInitConfigType,
OptInstanceList, OptKIESampleList, OptLabelList,
OptMultiConfig, OptRecSampleList, OptTensor,
RangeType, RecForwardResults, RecSampleList)
__all__ = [
'collect_env', 'is_3dlist', 'is_type_list', 'is_none_or_type', 'equal_len',
'is_2dlist', 'valid_boundary', 'list_to_file', 'list_from_file',
'is_on_same_line', 'stitch_boxes_into_lines', 'StringStripper',
'bezier2polygon', 'sort_points', 'dump_ocr_data', 'recog_anno_to_imginfo',
'rescale_polygons', 'rescale_polygon', 'rescale_bbox', 'rescale_bboxes',
'bbox2poly', 'crop_polygon', 'is_poly_inside_rect', 'poly2bbox',
'poly_intersection', 'poly_iou', 'poly_make_valid', 'poly_union',
'poly2shapely', 'polys2shapely', 'register_all_modules', 'offset_polygon',
'sort_vertex8', 'sort_vertex', 'bbox_center_distance',
'bbox_diag_distance', 'boundary_iou', 'point_distance', 'points_center',
'fill_hole', 'LineJsonParser', 'LineStrParser', 'shapely2poly', 'crop_img',
'warp_img', 'ConfigType', 'DetSampleList', 'RecForwardResults',
'InitConfigType', 'OptConfigType', 'OptDetSampleList', 'OptInitConfigType',
'OptMultiConfig', 'OptRecSampleList', 'RecSampleList', 'MultiConfig',
'OptTensor', 'ColorType', 'OptKIESampleList', 'KIESampleList',
'is_archive', 'check_integrity', 'list_files', 'get_md5', 'InstanceList',
'LabelList', 'OptInstanceList', 'OptLabelList', 'RangeType',
'remove_pipeline_elements', 'bezier2poly', 'poly2bezier',
'track_parallel_progress_multi_args'
]