cardocr(身份证/银行卡分析)与 YOLO 卡面检测模型整体迁入 cardreader,插件不再依赖 desktopauto;常规识别读不出合法卡号时按 balanced→thorough 补读。
670 lines
28 KiB
JSON
670 lines
28 KiB
JSON
{
|
|
"schema_version": 1,
|
|
"sdk_id": "cardreader",
|
|
"version": "0.1.0",
|
|
"modules": {
|
|
"cardreader": {
|
|
"exports": [
|
|
"Result",
|
|
"read_card",
|
|
"detect",
|
|
"cardocr",
|
|
"analyze_image",
|
|
"analyze_folder",
|
|
"read_bank_card_number",
|
|
"ocr_card",
|
|
"ocr_cards"
|
|
],
|
|
"all": [
|
|
"Result",
|
|
"read_card",
|
|
"detect",
|
|
"cardocr",
|
|
"analyze_image",
|
|
"analyze_folder",
|
|
"read_bank_card_number",
|
|
"ocr_card",
|
|
"ocr_cards"
|
|
],
|
|
"signatures": {
|
|
"Result": "(number: 'str' = '', luhn_ok: 'bool' = False, confidence: 'str' = 'low', needs_review: 'bool' = True, votes: 'int' = 0, source: 'str' = '', elapsed: 'float' = 0.0, boxes: 'list' = <factory>, kinds: 'list' = <factory>, views: 'dict' = <factory>) -> None",
|
|
"read_card": "(path, mode: 'str' = 'balanced') -> 'Result'",
|
|
"detect": "(img)",
|
|
"analyze_image": "(path: 'str', expected_name: 'str' = '', mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False) -> 'dict'",
|
|
"analyze_folder": "(root: 'str', expected_names: 'Optional[Dict[str, str]]' = None, mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False, limit: 'int' = 0) -> 'List[dict]'",
|
|
"read_bank_card_number": "(image, face_text: 'str' = '') -> 'NumberReading'",
|
|
"ocr_card": "(path: 'str', expected_name: 'str' = '', mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False) -> 'dict'",
|
|
"ocr_cards": "(root: 'str', expected_names: 'Optional[Dict[str, str]]' = None, mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False, limit: 'int' = 0) -> 'List[dict]'"
|
|
}
|
|
},
|
|
"cardreader.__main__": {
|
|
"exports": [
|
|
"EXTS",
|
|
"Path",
|
|
"annotations",
|
|
"argparse",
|
|
"csv",
|
|
"json",
|
|
"main",
|
|
"read_card",
|
|
"sys"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Path": "(*args, **kwargs)",
|
|
"main": "() -> 'None'",
|
|
"read_card": "(path, mode: 'str' = 'balanced') -> 'Result'"
|
|
}
|
|
},
|
|
"cardreader._selftest": {
|
|
"exports": [
|
|
"CASES",
|
|
"Path",
|
|
"SAMPLE",
|
|
"annotations",
|
|
"case",
|
|
"core",
|
|
"main",
|
|
"sys",
|
|
"tempfile",
|
|
"traceback"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Path": "(*args, **kwargs)",
|
|
"case": "(name: 'str')",
|
|
"main": "(argv: 'list[str] | None' = None) -> 'int'"
|
|
}
|
|
},
|
|
"cardreader.cardocr": {
|
|
"exports": [
|
|
"analyze_image",
|
|
"analyze_folder",
|
|
"check_person",
|
|
"check_persons",
|
|
"write_review_workbook",
|
|
"verify_workbook",
|
|
"__version__"
|
|
],
|
|
"all": [
|
|
"analyze_image",
|
|
"analyze_folder",
|
|
"check_person",
|
|
"check_persons",
|
|
"write_review_workbook",
|
|
"verify_workbook",
|
|
"__version__"
|
|
],
|
|
"signatures": {
|
|
"analyze_image": "(path: 'str', expected_name: 'str' = '', mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False) -> 'dict'",
|
|
"analyze_folder": "(root: 'str', expected_names: 'Optional[Dict[str, str]]' = None, mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False, limit: 'int' = 0) -> 'List[dict]'",
|
|
"check_person": "(person: 'dict', truth: 'Dict[str, str]') -> 'dict'",
|
|
"check_persons": "(persons: 'Sequence[dict]', truth_map: 'Dict[str, Dict[str, str]]') -> 'List[dict]'",
|
|
"write_review_workbook": "(persons, path, source_root: 'str' = '') -> 'str'",
|
|
"verify_workbook": "(path: 'str') -> 'dict'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.__main__": {
|
|
"exports": [
|
|
"main"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"main": "(argv=None) -> 'int'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.bankcard": {
|
|
"exports": [
|
|
"BANK_KEYWORDS",
|
|
"BANK_NAMES",
|
|
"BIN_BANK",
|
|
"BankCardResult",
|
|
"CardCandidate",
|
|
"Dict",
|
|
"Line",
|
|
"List",
|
|
"Optional",
|
|
"Sequence",
|
|
"annotations",
|
|
"bin_bank",
|
|
"card_candidates",
|
|
"dataclass",
|
|
"field",
|
|
"join_text",
|
|
"looks_like_bank_card",
|
|
"luhn_ok",
|
|
"normalize_text",
|
|
"parse",
|
|
"re"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"BankCardResult": "(number: 'str' = '', luhn_ok: 'bool' = False, length: 'int' = 0, bank: 'str' = '', bank_source: 'str' = '', expiry: 'str' = '', card_type: 'str' = '', found: 'bool' = False, confidence: 'str' = 'low', evidence: 'List[str]' = <factory>, candidates: 'List[dict]' = <factory>) -> None",
|
|
"CardCandidate": "(number: 'str', digits: 'int', luhn_ok: 'bool', prefix: 'str' = '', bank: 'str' = '', origin: 'str' = 'raw', edits: 'int' = 0, votes: 'int' = 1, score: 'float' = 0.0) -> None",
|
|
"Dict": "(*args, **kwargs)",
|
|
"Line": "(text: 'str', left: 'int', top: 'int', width: 'int', height: 'int', score: 'float') -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"bin_bank": "(no: 'str') -> 'str'",
|
|
"card_candidates": "(text: 'Union[str, Sequence[str]]', want_lengths: 'Sequence[int]' = (16, 19, 18), limit: 'int' = 8, exclude: 'Sequence[str]' = ()) -> 'List[CardCandidate]'",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"field": "(*, default=<dataclasses._MISSING_TYPE object at 0xADDR>, default_factory=<dataclasses._MISSING_TYPE object at 0xADDR>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0xADDR>)",
|
|
"join_text": "(items: 'List[Line]') -> 'str'",
|
|
"looks_like_bank_card": "(text: 'str') -> 'bool'",
|
|
"luhn_ok": "(no: 'str') -> 'bool'",
|
|
"normalize_text": "(text: 'str') -> 'str'",
|
|
"parse": "(lines: 'Sequence[Line]', full_text: 'str' = '', exclude: 'Sequence[str]' = (), rows: 'Optional[Sequence[str]]' = None) -> 'BankCardResult'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.cards": {
|
|
"exports": [
|
|
"CARD_ASPECT",
|
|
"CardRegion",
|
|
"List",
|
|
"Optional",
|
|
"Sequence",
|
|
"Tuple",
|
|
"annotations",
|
|
"cv2",
|
|
"dataclass",
|
|
"expand_pts",
|
|
"find_card_color",
|
|
"find_cards",
|
|
"four_point_warp",
|
|
"locate_bank_card",
|
|
"np",
|
|
"order_points",
|
|
"quad_area",
|
|
"sqrt_",
|
|
"to_gray"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"CardRegion": "(pts: 'np.ndarray', area: 'float', aspect: 'float', score: 'float', warped: 'Optional[np.ndarray]' = None, source: 'str' = 'contour') -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"expand_pts": "(pts: 'np.ndarray', ratio: 'float', shape: 'Tuple[int, int]') -> 'np.ndarray'",
|
|
"find_card_color": "(img: 'np.ndarray', warp_width: 'int' = 1712) -> 'Optional[CardRegion]'",
|
|
"find_cards": "(img: 'np.ndarray', max_cards: 'int' = 3, warp_width: 'int' = 0) -> 'List[CardRegion]'",
|
|
"four_point_warp": "(img: 'np.ndarray', pts: 'Sequence[Sequence[float]]', width: 'int' = 0, height: 'int' = 0) -> 'Tuple[np.ndarray, np.ndarray]'",
|
|
"locate_bank_card": "(img: 'np.ndarray', warp_width: 'int' = 1712) -> 'Optional[np.ndarray]'",
|
|
"order_points": "(pts: 'Sequence[Sequence[float]]') -> 'np.ndarray'",
|
|
"quad_area": "(pts: 'np.ndarray') -> 'float'",
|
|
"sqrt_": "(x: 'float') -> 'float'",
|
|
"to_gray": "(img: 'np.ndarray') -> 'np.ndarray'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.cli": {
|
|
"exports": [
|
|
"Path",
|
|
"analyze_folder",
|
|
"analyze_image",
|
|
"annotations",
|
|
"argparse",
|
|
"check_persons",
|
|
"json",
|
|
"load_persons",
|
|
"load_truth_workbook",
|
|
"logging",
|
|
"main",
|
|
"print_report",
|
|
"print_verify",
|
|
"summary_table",
|
|
"sys",
|
|
"verify_workbook",
|
|
"write_review_workbook"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Path": "(*args, **kwargs)",
|
|
"analyze_folder": "(root: 'str', expected_names: 'Optional[Dict[str, str]]' = None, mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False, limit: 'int' = 0) -> 'List[dict]'",
|
|
"analyze_image": "(path: 'str', expected_name: 'str' = '', mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False) -> 'dict'",
|
|
"check_persons": "(persons: 'Sequence[dict]', truth_map: 'Dict[str, Dict[str, str]]') -> 'List[dict]'",
|
|
"load_persons": "(json_path: 'str') -> 'List[dict]'",
|
|
"load_truth_workbook": "(path: 'str') -> 'Dict[str, Dict[str, str]]'",
|
|
"main": "(argv=None) -> 'int'",
|
|
"print_report": "(rows: 'Sequence[dict]') -> 'str'",
|
|
"print_verify": "(result: 'dict') -> 'None'",
|
|
"summary_table": "(persons: 'Sequence[dict]') -> 'str'",
|
|
"verify_workbook": "(path: 'str') -> 'dict'",
|
|
"write_review_workbook": "(persons: 'Sequence[dict]', path: 'str', source_root: 'str' = '') -> 'str'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.engine": {
|
|
"exports": [
|
|
"Iterable",
|
|
"Line",
|
|
"List",
|
|
"Optional",
|
|
"annotations",
|
|
"dataclass",
|
|
"engine_available",
|
|
"join_text",
|
|
"lines",
|
|
"load",
|
|
"logger",
|
|
"logging",
|
|
"np",
|
|
"row_texts",
|
|
"row_texts_multi",
|
|
"text_line",
|
|
"threading"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Iterable": "(*args, **kwargs)",
|
|
"Line": "(text: 'str', left: 'int', top: 'int', width: 'int', height: 'int', score: 'float') -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"engine_available": "() -> 'bool'",
|
|
"join_text": "(items: 'List[Line]') -> 'str'",
|
|
"lines": "(img: 'np.ndarray', min_score: 'float' = 0.0) -> 'List[Line]'",
|
|
"load": "(path: 'str') -> 'Optional[np.ndarray]'",
|
|
"row_texts": "(items: 'List[Line]', y_tol: 'float' = 0.75, gap_factor: 'float' = 1.6) -> 'List[str]'",
|
|
"row_texts_multi": "(views: 'Iterable') -> 'List[str]'",
|
|
"text_line": "(img: 'np.ndarray') -> 'str'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.enhance": {
|
|
"exports": [
|
|
"Dict",
|
|
"GroupRead",
|
|
"List",
|
|
"NumberReading",
|
|
"Optional",
|
|
"Sequence",
|
|
"Tuple",
|
|
"annotations",
|
|
"bin_bank",
|
|
"cv2",
|
|
"dataclass",
|
|
"digitize",
|
|
"field",
|
|
"find_number_bands",
|
|
"imread",
|
|
"logger",
|
|
"logging",
|
|
"luhn_ok",
|
|
"np",
|
|
"prefix_ok",
|
|
"read_bank_card_number",
|
|
"text_line",
|
|
"time",
|
|
"to_gray"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Dict": "(*args, **kwargs)",
|
|
"GroupRead": "(rect: 'Tuple[int, int, int, int]', offset: 'float', reads: 'Dict[str, str]' = <factory>, digits: 'str' = '', votes: 'List[Dict[str, int]]' = <factory>) -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"NumberReading": "(number: 'str' = '', luhn_ok: 'bool' = False, length: 'int' = 0, bank: 'str' = '', confidence: 'str' = 'low', status: 'str' = 'failed', band: 'Tuple[int, int, int, int]' = (0, 0, 0, 0), groups: 'List[GroupRead]' = <factory>, candidates: 'List[dict]' = <factory>, elapsed_s: 'float' = 0.0) -> None",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"bin_bank": "(no: 'str') -> 'str'",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"digitize": "(text: 'str') -> 'Tuple[str, List[int]]'",
|
|
"field": "(*, default=<dataclasses._MISSING_TYPE object at 0xADDR>, default_factory=<dataclasses._MISSING_TYPE object at 0xADDR>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0xADDR>)",
|
|
"find_number_bands": "(gray: 'np.ndarray', limit: 'int' = 3) -> 'List[Tuple[int, int, int, int]]'",
|
|
"imread": "(path: 'str') -> 'np.ndarray'",
|
|
"luhn_ok": "(no: 'str') -> 'bool'",
|
|
"prefix_ok": "(no: 'str') -> 'bool'",
|
|
"read_bank_card_number": "(image, face_text: 'str' = '') -> 'NumberReading'",
|
|
"text_line": "(img: 'np.ndarray') -> 'str'",
|
|
"to_gray": "(img: 'np.ndarray') -> 'np.ndarray'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.idcard": {
|
|
"exports": [
|
|
"Dict",
|
|
"ID_KEYWORDS",
|
|
"IdCandidate",
|
|
"IdCardResult",
|
|
"Line",
|
|
"List",
|
|
"Optional",
|
|
"Sequence",
|
|
"annotations",
|
|
"dataclass",
|
|
"field",
|
|
"id_birth",
|
|
"id_candidates",
|
|
"id_checksum_ok",
|
|
"id_gender",
|
|
"id_plausible",
|
|
"id_region",
|
|
"join_text",
|
|
"looks_like_id",
|
|
"normalize_text",
|
|
"parse",
|
|
"re"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Dict": "(*args, **kwargs)",
|
|
"IdCandidate": "(number: 'str', checksum_ok: 'bool', origin: 'str' = 'raw', edits: 'int' = 0, score: 'float' = 0.0) -> None",
|
|
"IdCardResult": "(number: 'str' = '', checksum_ok: 'bool' = False, birth: 'str' = '', gender: 'str' = '', name: 'str' = '', ethnicity: 'str' = '', address: 'str' = '', issue: 'str' = '', valid_to: 'str' = '', confidence: 'str' = 'low', evidence: 'List[str]' = <factory>, candidates: 'List[dict]' = <factory>, found: 'bool' = False) -> None",
|
|
"Line": "(text: 'str', left: 'int', top: 'int', width: 'int', height: 'int', score: 'float') -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"field": "(*, default=<dataclasses._MISSING_TYPE object at 0xADDR>, default_factory=<dataclasses._MISSING_TYPE object at 0xADDR>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0xADDR>)",
|
|
"id_birth": "(no: 'str') -> 'str'",
|
|
"id_candidates": "(text: 'Union[str, Sequence[str]]', limit: 'int' = 8) -> 'List[IdCandidate]'",
|
|
"id_checksum_ok": "(no: 'str') -> 'bool'",
|
|
"id_gender": "(no: 'str') -> 'str'",
|
|
"id_plausible": "(no: 'str') -> 'bool'",
|
|
"id_region": "(no: 'str') -> 'str'",
|
|
"join_text": "(items: 'List[Line]') -> 'str'",
|
|
"looks_like_id": "(text: 'str') -> 'bool'",
|
|
"normalize_text": "(text: 'str') -> 'str'",
|
|
"parse": "(lines: 'Sequence[Line]', expected_name: 'str' = '', full_text: 'str' = '', rows: 'Optional[Sequence[str]]' = None) -> 'IdCardResult'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.img": {
|
|
"exports": [
|
|
"CARD_ASPECT",
|
|
"Iterable",
|
|
"List",
|
|
"Optional",
|
|
"Sequence",
|
|
"Tuple",
|
|
"annotations",
|
|
"apply_exif",
|
|
"cv2",
|
|
"four_point_warp",
|
|
"gray_variants",
|
|
"imread",
|
|
"iou_rect",
|
|
"np",
|
|
"order_points",
|
|
"os",
|
|
"quad_area",
|
|
"resize_side",
|
|
"rotate90",
|
|
"to_gray"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Iterable": "(*args, **kwargs)",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"apply_exif": "(img: 'np.ndarray', path: 'str') -> 'np.ndarray'",
|
|
"four_point_warp": "(img: 'np.ndarray', pts: 'Sequence[Sequence[float]]', width: 'int' = 0, height: 'int' = 0) -> 'Tuple[np.ndarray, np.ndarray]'",
|
|
"gray_variants": "(gray: 'np.ndarray', upscale: 'float' = 1.0) -> 'List[Tuple[str, np.ndarray]]'",
|
|
"imread": "(path: 'str') -> 'np.ndarray'",
|
|
"iou_rect": "(a: 'Tuple[int, int, int, int]', b: 'Tuple[int, int, int, int]') -> 'float'",
|
|
"order_points": "(pts: 'Sequence[Sequence[float]]') -> 'np.ndarray'",
|
|
"quad_area": "(pts: 'np.ndarray') -> 'float'",
|
|
"resize_side": "(img: 'np.ndarray', max_side: 'int' = 0, min_side: 'int' = 0) -> 'np.ndarray'",
|
|
"rotate90": "(img: 'np.ndarray', k: 'int') -> 'np.ndarray'",
|
|
"to_gray": "(img: 'np.ndarray') -> 'np.ndarray'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.match": {
|
|
"exports": [
|
|
"Dict",
|
|
"EXACT",
|
|
"Iterable",
|
|
"LABEL",
|
|
"List",
|
|
"PARTIAL",
|
|
"PRIMARY",
|
|
"STRONG",
|
|
"Sequence",
|
|
"Tuple",
|
|
"WEAK",
|
|
"annotations",
|
|
"bin_bank",
|
|
"check_person",
|
|
"check_persons",
|
|
"coverage",
|
|
"difflib",
|
|
"digits",
|
|
"normalize_text",
|
|
"print_report"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Dict": "(*args, **kwargs)",
|
|
"Iterable": "(*args, **kwargs)",
|
|
"List": "(*args, **kwargs)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"bin_bank": "(no: 'str') -> 'str'",
|
|
"check_person": "(person: 'dict', truth: 'Dict[str, str]') -> 'dict'",
|
|
"check_persons": "(persons: 'Sequence[dict]', truth_map: 'Dict[str, Dict[str, str]]') -> 'List[dict]'",
|
|
"coverage": "(expected: 'str', runs: 'Iterable[str]', card_mode: 'bool' = True, id_digits: 'str' = '') -> 'Tuple[float, str, str]'",
|
|
"digits": "(text: 'str') -> 'str'",
|
|
"normalize_text": "(text: 'str') -> 'str'",
|
|
"print_report": "(rows: 'Sequence[dict]') -> 'str'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.pipeline": {
|
|
"exports": [
|
|
"Dict",
|
|
"IMAGE_EXT",
|
|
"Line",
|
|
"List",
|
|
"Optional",
|
|
"PRIMARY",
|
|
"Path",
|
|
"Sequence",
|
|
"Tuple",
|
|
"View",
|
|
"analyze_folder",
|
|
"analyze_image",
|
|
"annotations",
|
|
"apply_exif",
|
|
"bankcard",
|
|
"bline",
|
|
"card_candidates",
|
|
"classify",
|
|
"cv2",
|
|
"dataclass",
|
|
"field",
|
|
"find_cards",
|
|
"gray_variants",
|
|
"group_blocks",
|
|
"hashlib",
|
|
"id_candidates",
|
|
"idcard",
|
|
"idline",
|
|
"imread",
|
|
"join_text",
|
|
"locate_bank_card",
|
|
"logger",
|
|
"logging",
|
|
"normalize_text",
|
|
"np",
|
|
"number_runs",
|
|
"ocr_lines",
|
|
"os",
|
|
"resize_side",
|
|
"rotate90",
|
|
"row_texts",
|
|
"rows_of",
|
|
"sha256_file",
|
|
"summary_table",
|
|
"text_line",
|
|
"time",
|
|
"to_gray"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Dict": "(*args, **kwargs)",
|
|
"Line": "(text: 'str', left: 'int', top: 'int', width: 'int', height: 'int', score: 'float') -> None",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Path": "(*args, **kwargs)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"View": "(name: 'str', image: 'np.ndarray', source: 'str', rect: 'Tuple[int, int, int, int]', lines: 'List[Line]' = <factory>, text: 'str' = '', kind: 'str' = 'unknown') -> None",
|
|
"analyze_folder": "(root: 'str', expected_names: 'Optional[Dict[str, str]]' = None, mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False, limit: 'int' = 0) -> 'List[dict]'",
|
|
"analyze_image": "(path: 'str', expected_name: 'str' = '', mark_dir: 'Optional[str]' = None, extra_passes: 'bool' = True, fast: 'bool' = False) -> 'dict'",
|
|
"apply_exif": "(img: 'np.ndarray', path: 'str') -> 'np.ndarray'",
|
|
"bline": "(views: 'Sequence[View]', kind: 'str') -> 'List[Line]'",
|
|
"card_candidates": "(text: 'Union[str, Sequence[str]]', want_lengths: 'Sequence[int]' = (16, 19, 18), limit: 'int' = 8, exclude: 'Sequence[str]' = ()) -> 'List[CardCandidate]'",
|
|
"classify": "(text: 'str') -> 'str'",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"field": "(*, default=<dataclasses._MISSING_TYPE object at 0xADDR>, default_factory=<dataclasses._MISSING_TYPE object at 0xADDR>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0xADDR>)",
|
|
"find_cards": "(img: 'np.ndarray', max_cards: 'int' = 3, warp_width: 'int' = 0) -> 'List[CardRegion]'",
|
|
"gray_variants": "(gray: 'np.ndarray', upscale: 'float' = 1.0) -> 'List[Tuple[str, np.ndarray]]'",
|
|
"group_blocks": "(lines: 'Sequence[Line]', max_blocks: 'int' = 12) -> 'List[List[Line]]'",
|
|
"id_candidates": "(text: 'Union[str, Sequence[str]]', limit: 'int' = 8) -> 'List[IdCandidate]'",
|
|
"idline": "(views: 'Sequence[View]', kind: 'str') -> 'List[Line]'",
|
|
"imread": "(path: 'str') -> 'np.ndarray'",
|
|
"join_text": "(items: 'List[Line]') -> 'str'",
|
|
"locate_bank_card": "(img: 'np.ndarray', warp_width: 'int' = 1712) -> 'Optional[np.ndarray]'",
|
|
"normalize_text": "(text: 'str') -> 'str'",
|
|
"number_runs": "(text: 'str', min_len: 'int' = 6) -> 'List[str]'",
|
|
"ocr_lines": "(img: 'np.ndarray', min_score: 'float' = 0.0) -> 'List[Line]'",
|
|
"resize_side": "(img: 'np.ndarray', max_side: 'int' = 0, min_side: 'int' = 0) -> 'np.ndarray'",
|
|
"rotate90": "(img: 'np.ndarray', k: 'int') -> 'np.ndarray'",
|
|
"row_texts": "(items: 'List[Line]', y_tol: 'float' = 0.75, gap_factor: 'float' = 1.6) -> 'List[str]'",
|
|
"rows_of": "(views: 'Sequence[View]', kind: 'str' = '') -> 'List[str]'",
|
|
"sha256_file": "(p: 'Path') -> 'str'",
|
|
"summary_table": "(persons: 'Sequence[dict]') -> 'str'",
|
|
"text_line": "(img: 'np.ndarray') -> 'str'",
|
|
"to_gray": "(img: 'np.ndarray') -> 'np.ndarray'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.review": {
|
|
"exports": [
|
|
"Alignment",
|
|
"BORDER",
|
|
"Border",
|
|
"Dict",
|
|
"Font",
|
|
"HEADER_FILL",
|
|
"IMAGE_COLS",
|
|
"INPUT_FILL",
|
|
"List",
|
|
"Optional",
|
|
"PERSON_COLS",
|
|
"PatternFill",
|
|
"Sequence",
|
|
"Side",
|
|
"THIN",
|
|
"Workbook",
|
|
"annotations",
|
|
"get_column_letter",
|
|
"json",
|
|
"load_persons",
|
|
"load_truth_workbook",
|
|
"load_workbook",
|
|
"print_verify",
|
|
"verify_workbook",
|
|
"write_review_workbook"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"Alignment": "(horizontal=None, vertical=None, textRotation=0, wrapText=None, shrinkToFit=None, indent=0, relativeIndent=0, justifyLastLine=None, readingOrder=0, text_rotation=None, wrap_text=None, shrink_to_fit=None, mergeCell=None)",
|
|
"Border": "(left=None, right=None, top=None, bottom=None, diagonal=None, diagonal_direction=None, vertical=None, horizontal=None, diagonalUp=False, diagonalDown=False, outline=True, start=None, end=None)",
|
|
"Dict": "(*args, **kwargs)",
|
|
"Font": "(name=None, sz=None, b=None, i=None, charset=None, u=None, strike=None, color=None, scheme=None, family=None, size=None, bold=None, italic=None, strikethrough=None, underline=None, vertAlign=None, outline=None, shadow=None, condense=None, extend=None)",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"PatternFill": "(patternType=None, fgColor=<openpyxl.styles.colors.Color object>\nParameters:\nrgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', bgColor=<openpyxl.styles.colors.Color object>\nParameters:\nrgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', fill_type=None, start_color=None, end_color=None)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Side": "(style=None, color=None, border_style=None)",
|
|
"Workbook": "(write_only=False, iso_dates=False)",
|
|
"get_column_letter": "(col_idx)",
|
|
"load_persons": "(json_path: 'str') -> 'List[dict]'",
|
|
"load_truth_workbook": "(path: 'str') -> 'Dict[str, Dict[str, str]]'",
|
|
"load_workbook": "(filename, read_only=False, keep_vba=False, data_only=False, keep_links=True, rich_text=False)",
|
|
"print_verify": "(result: 'dict') -> 'None'",
|
|
"verify_workbook": "(path: 'str') -> 'dict'",
|
|
"write_review_workbook": "(persons: 'Sequence[dict]', path: 'str', source_root: 'str' = '') -> 'str'"
|
|
}
|
|
},
|
|
"cardreader.cardocr.validators": {
|
|
"exports": [
|
|
"BIN_BANK",
|
|
"CardCandidate",
|
|
"Dict",
|
|
"IdCandidate",
|
|
"Iterable",
|
|
"List",
|
|
"Optional",
|
|
"PRIMARY",
|
|
"Sequence",
|
|
"Tuple",
|
|
"Union",
|
|
"annotations",
|
|
"bin_bank",
|
|
"card_candidates",
|
|
"consensus",
|
|
"dataclass",
|
|
"digit_runs",
|
|
"digitize",
|
|
"field",
|
|
"id_birth",
|
|
"id_candidates",
|
|
"id_checksum_ok",
|
|
"id_gender",
|
|
"id_plausible",
|
|
"id_region",
|
|
"luhn_check_digit",
|
|
"luhn_ok",
|
|
"normalize_text",
|
|
"prefix_ok",
|
|
"re"
|
|
],
|
|
"all": [],
|
|
"signatures": {
|
|
"CardCandidate": "(number: 'str', digits: 'int', luhn_ok: 'bool', prefix: 'str' = '', bank: 'str' = '', origin: 'str' = 'raw', edits: 'int' = 0, votes: 'int' = 1, score: 'float' = 0.0) -> None",
|
|
"Dict": "(*args, **kwargs)",
|
|
"IdCandidate": "(number: 'str', checksum_ok: 'bool', origin: 'str' = 'raw', edits: 'int' = 0, score: 'float' = 0.0) -> None",
|
|
"Iterable": "(*args, **kwargs)",
|
|
"List": "(*args, **kwargs)",
|
|
"Optional": "(*args, **kwds)",
|
|
"Sequence": "(*args, **kwargs)",
|
|
"Tuple": "(*args, **kwargs)",
|
|
"Union": "(*args, **kwds)",
|
|
"bin_bank": "(no: 'str') -> 'str'",
|
|
"card_candidates": "(text: 'Union[str, Sequence[str]]', want_lengths: 'Sequence[int]' = (16, 19, 18), limit: 'int' = 8, exclude: 'Sequence[str]' = ()) -> 'List[CardCandidate]'",
|
|
"consensus": "(numbers: 'Iterable[str]') -> 'List[str]'",
|
|
"dataclass": "(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)",
|
|
"digit_runs": "(text: 'str', min_len: 'int' = 13) -> 'List[str]'",
|
|
"digitize": "(text: 'str') -> 'Tuple[str, List[int]]'",
|
|
"field": "(*, default=<dataclasses._MISSING_TYPE object at 0xADDR>, default_factory=<dataclasses._MISSING_TYPE object at 0xADDR>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0xADDR>)",
|
|
"id_birth": "(no: 'str') -> 'str'",
|
|
"id_candidates": "(text: 'Union[str, Sequence[str]]', limit: 'int' = 8) -> 'List[IdCandidate]'",
|
|
"id_checksum_ok": "(no: 'str') -> 'bool'",
|
|
"id_gender": "(no: 'str') -> 'str'",
|
|
"id_plausible": "(no: 'str') -> 'bool'",
|
|
"id_region": "(no: 'str') -> 'str'",
|
|
"luhn_check_digit": "(prefix: 'str') -> 'str'",
|
|
"luhn_ok": "(no: 'str') -> 'bool'",
|
|
"normalize_text": "(text: 'str') -> 'str'",
|
|
"prefix_ok": "(no: 'str') -> 'bool'"
|
|
}
|
|
},
|
|
"cardreader.core": {
|
|
"exports": [
|
|
"Result",
|
|
"read_card",
|
|
"detect"
|
|
],
|
|
"all": [
|
|
"Result",
|
|
"read_card",
|
|
"detect"
|
|
],
|
|
"signatures": {
|
|
"Result": "(number: 'str' = '', luhn_ok: 'bool' = False, confidence: 'str' = 'low', needs_review: 'bool' = True, votes: 'int' = 0, source: 'str' = '', elapsed: 'float' = 0.0, boxes: 'list' = <factory>, kinds: 'list' = <factory>, views: 'dict' = <factory>) -> None",
|
|
"read_card": "(path, mode: 'str' = 'balanced') -> 'Result'",
|
|
"detect": "(img)"
|
|
}
|
|
}
|
|
}
|
|
} |