vkit.engine.char_mask.type
1# Copyright 2022 vkit-x Administrator. All Rights Reserved. 2# 3# This project (vkit-x/vkit) is dual-licensed under commercial and SSPL licenses. 4# 5# The commercial license gives you the full rights to create and distribute software 6# on your own terms without any SSPL license obligations. For more information, 7# please see the "LICENSE_COMMERCIAL.txt" file. 8# 9# This project is also available under Server Side Public License (SSPL). 10# The SSPL licensing is ideal for use cases such as open source projects with 11# SSPL distribution, student/academic purposes, hobby projects, internal research 12# projects without external distribution, or other projects where all SSPL 13# obligations can be met. For more information, please see the "LICENSE_SSPL.txt" file. 14from typing import Sequence, Optional 15 16import attrs 17 18from vkit.element import Box, Polygon, Mask 19 20 21@attrs.define 22class CharMaskEngineRunConfig: 23 height: int 24 width: int 25 char_polygons: Sequence[Polygon] 26 char_bounding_boxes: Optional[Sequence[Box]] = None 27 char_bounding_polygons: Optional[Sequence[Polygon]] = None 28 29 30@attrs.define 31class CharMask: 32 combined_chars_mask: Mask 33 char_masks: Optional[Sequence[Mask]] = None
class
CharMaskEngineRunConfig:
23class CharMaskEngineRunConfig: 24 height: int 25 width: int 26 char_polygons: Sequence[Polygon] 27 char_bounding_boxes: Optional[Sequence[Box]] = None 28 char_bounding_polygons: Optional[Sequence[Polygon]] = None
CharMaskEngineRunConfig( height: int, width: int, char_polygons: Sequence[vkit.element.polygon.Polygon], char_bounding_boxes: Union[Sequence[vkit.element.box.Box], NoneType] = None, char_bounding_polygons: Union[Sequence[vkit.element.polygon.Polygon], NoneType] = None)
2def __init__(self, height, width, char_polygons, char_bounding_boxes=attr_dict['char_bounding_boxes'].default, char_bounding_polygons=attr_dict['char_bounding_polygons'].default): 3 self.height = height 4 self.width = width 5 self.char_polygons = char_polygons 6 self.char_bounding_boxes = char_bounding_boxes 7 self.char_bounding_polygons = char_bounding_polygons
Method generated by attrs for class CharMaskEngineRunConfig.
class
CharMask:
CharMask( combined_chars_mask: vkit.element.mask.Mask, char_masks: Union[Sequence[vkit.element.mask.Mask], NoneType] = None)
2def __init__(self, combined_chars_mask, char_masks=attr_dict['char_masks'].default): 3 self.combined_chars_mask = combined_chars_mask 4 self.char_masks = char_masks
Method generated by attrs for class CharMask.