MCPcopy Create free account

hub / github.com/Topdu/OpenOCR / functions

Functions1,872 in github.com/Topdu/OpenOCR

↓ 2 callersMethodencode_image
Encode image using encoder ONNX model.
tools/infer_unirec_onnx.py:484
↓ 2 callersMethodencode_image
(self, image)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:754
↓ 2 callersMethodeval
(self)
openrec/modeling/cmer_modeling/modeling_cmer.py:217
↓ 2 callersMethodeval_step
(self, global_step, epoch)
tools/engine/trainer.py:500
↓ 2 callersFunctionexport_single_model
(model: torch.nn.Module, _cfg, export_dir, export_config, logger, type)
tools/export_rec.py:37
↓ 2 callersFunctionfilter_overlap_boxes
Remove overlapping boxes from layout detection results based on a given overlap ratio. Args: layout_det_res (Dict[str, List[Dict]]):
tools/utils/opendoc_onnx_utils/utils.py:129
↓ 2 callersMethodforward_parallel_decoding
(self, src)
openrec/modeling/decoders/mdiff_decoder.py:264
↓ 2 callersMethodforward_stream
Forward pass for a single stream (i.e. content or query) tgt_norm is just a LayerNorm'd tgt. Added as a separate parameter for effici
openrec/modeling/decoders/parseq_decoder.py:71
↓ 2 callersMethodforward_stream
Forward pass for a single stream (i.e. content or query) tgt_norm is just a LayerNorm'd tgt. Added as a separate parameter for effici
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:884
↓ 2 callersMethodforward_test
(self, memory: Tensor, clip_ids, pos_query: Ten
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1305
↓ 2 callersMethodforward_test_step
Args: feat (Tensor): Tensor of shape :math:`(N, D_i, H, W)`. out_enc (Tensor): Encoder output of shape
openrec/modeling/decoders/robustscanner_decoder.py:327
↓ 2 callersMethodfull_mask
(self, text)
openrec/preprocess/mdiff_label_encode.py:63
↓ 2 callersMethodfuse
(self)
openrec/modeling/encoders/repvit.py:133
↓ 2 callersMethodgenerate_square_subsequent_mask
Generate a square mask for the sequence. The masked positions are filled with float('-inf'). Unmasked positions are filled with float
openrec/modeling/decoders/ote_decoder.py:141
↓ 2 callersMethodgenerate_square_subsequent_mask
Generate a square mask for the sequence. The masked positions are filled with float('-inf'). Unmasked positions are filled with float
openrec/modeling/decoders/nrtr_decoder.py:188
↓ 2 callersMethodget_character_num
(self)
openrec/postprocess/__init__.py:75
↓ 2 callersMethodget_ext_data
(self)
tools/data/simple_dataset.py:104
↓ 2 callersMethodget_ignored_tokens
(self)
openrec/postprocess/srn_postprocess.py:79
↓ 2 callersMethodget_lmdb_sample_info
(self, txn, index)
tools/data/lmdb_dataset.py:115
↓ 2 callersMethodget_lmdb_sample_info
(self, txn, index, norm
tools/data/text_lmdb_dataset.py:101
↓ 2 callersMethodget_lmdb_sample_info
(self, txn, index)
tools/data/strlmdb_dataset.py:117
↓ 2 callersMethodget_loss
(self, model_output, labels, label_lens)
openrec/modeling/decoders/lister_decoder.py:513
↓ 2 callersMethodget_metric
return metrics { 'precision': 0, 'recall': 0, 'hmean': 0 }
opendet/metrics/det_metric.py:59
↓ 2 callersFunctionget_minarea_rect_crop
(img, points)
tools/infer/utility.py:205
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:81
↓ 2 callersFunctionget_pipeline
Get or initialize OpenDocONNX pipeline. Args: layout_model_path: Path to layout detection ONNX model. unirec_encoder_path: Path t
demo_opendoc.py:21
↓ 2 callersFunctionget_union
(pD, pG)
opendet/preprocess/crop_paste.py:135
↓ 2 callersMethodinit_weights
(self, module)
openrec/modeling/transforms/aster_tps.py:56
↓ 2 callersFunctioninitialize_ocr
(model_type, drop_score)
demo_gradio.py:18
↓ 2 callersFunctioninput_reading_mod
This helper reads input from txt files
tools/utils/e2e_metric/Deteval.py:13
↓ 2 callersFunctioniod
This helper determine the fraction of intersection area over detection area
tools/utils/e2e_metric/polygon_fast.py:65
↓ 2 callersMethodis_zero_layer
()
openrec/modeling/encoders/autostr_encoder.py:34
↓ 2 callersMethodleft_to_right_mask
(self, text)
openrec/preprocess/mdiff_label_encode.py:69
↓ 2 callersMethodmap_arguments
(self, augmenter_type, augmenter_args)
opendet/preprocess/iaa_augment.py:129
↓ 2 callersFunctionnorm2
(x, axis=None)
tools/utils/e2e_utils/visual.py:145
↓ 2 callersFunctionpadding_image
Padding an image using OpenCV: - If the image is smaller than the target size, pad it to 640x640. - If the image is larger than the targe
opendet/preprocess/crop_resize.py:5
↓ 2 callersFunctionpatch_device
(module)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1050
↓ 2 callersFunctionpatch_float
(module)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1076
↓ 2 callersFunctionpoints2polygon
Convert k points to 1 polygon. Args: points (ndarray or list): A ndarray or a list of shape (2k) that indicates k points.
tools/utils/poly_nms.py:5
↓ 2 callersFunctionpoly_intersection
Calculate the intersection area between two polygon. Args: poly_det (Polygon): A polygon predicted by detector. poly_gt (Polygon)
tools/utils/poly_nms.py:25
↓ 2 callersMethodpreprocess
( self, images: ImageInput, return_tensors: Optional[Union[str, TensorType]] = None,
openrec/preprocess/cmer_label_encode.py:593
↓ 2 callersMethodquestion_encoder
(self, targets, train_i)
openrec/modeling/decoders/igtr_decoder.py:397
↓ 2 callersFunctionrand_augment_transform
(magnitude=5, num_layers=3)
openrec/preprocess/parseq_aug.py:136
↓ 2 callersFunctionrandom_select
(axis, max_size)
opendet/preprocess/crop_resize.py:61
↓ 2 callersFunctionregion_wise_random_select
(regions, max_size)
opendet/preprocess/crop_resize.py:70
↓ 2 callersFunctionreplace_batchnorm
(net)
tools/infer_det.py:119
↓ 2 callersMethodreset
(self)
opendet/metrics/det_metric.py:72
↓ 2 callersMethodreset
(self)
opendet/metrics/det_metric.py:147
↓ 2 callersMethodreset
(self)
openrec/metrics/rec_metric_long.py:132
↓ 2 callersMethodreset
(self)
openrec/metrics/rec_metric_cmer.py:251
↓ 2 callersFunctionresize_image
(original_width, original_height, max_width, max_height)
tools/data/native_size_dataset.py:182
↓ 2 callersMethodright_to_left_mask
(self, text)
openrec/preprocess/mdiff_label_encode.py:187
↓ 2 callersMethodsave_to_json
保存结果为JSON
tools/infer_doc_onnx.py:1079
↓ 2 callersMethodsave_to_markdown
保存结果为Markdown,按阅读顺序包含图片
tools/infer_doc_onnx.py:1093
↓ 2 callersMethodsemi_left_to_right_mask
(self, text, block_size=5, step=3, i=0)
openrec/preprocess/mdiff_label_encode.py:77
↓ 2 callersMethodset_device
(self, device)
tools/engine/trainer.py:230
↓ 2 callersFunctionshrink_quad_along_width
(quad, begin_width_ratio=0.0, end_width_ratio=1.0)
tools/utils/e2e_utils/extract_textpoint_fast.py:293
↓ 2 callersFunctionshrink_quad_along_width
Generate shrink_quad_along_width.
tools/utils/e2e_utils/visual.py:104
↓ 2 callersFunctionshrink_quad_along_width
Generate shrink_quad_along_width.
tools/utils/e2e_utils/extract_textpoint_slow.py:42
↓ 2 callersFunctionsort_and_expand_with_direction_v2
f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...] binary_tcl_map: h x w
tools/utils/e2e_utils/extract_textpoint_slow.py:257
↓ 2 callersFunctionsort_with_direction
f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
tools/utils/e2e_utils/extract_textpoint_fast.py:139
↓ 2 callersFunctionsorted_boxes
Sort text boxes in order from top to bottom, left to right args: dt_boxes(array):detected text boxes with shape [4, 2] return:
tools/infer_e2e.py:54
↓ 2 callersFunctionsplit_regions
(axis)
opendet/preprocess/crop_resize.py:50
↓ 2 callersMethodtest_command_line
Test OpenOCR using command-line interface
test_openocr.py:194
↓ 2 callersMethodtest_python_api
Test OpenOCR using Python API
test_openocr.py:66
↓ 2 callersFunctionto_np_array
Convert the input to a numpy array. Args: img (PIL.Image or numpy.ndarray): Input image. Returns: numpy.ndarray: Numpy
tools/utils/opendoc_onnx_utils/utils.py:186
↓ 2 callersMethodto_tuple_if_list
(self, obj)
opendet/preprocess/iaa_augment.py:169
↓ 2 callersFunctiontokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An input s
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1103
↓ 2 callersFunctiontokenize_figure_of_table
Replace figures in a table area with tokens, return new image and token map. Args: table_block_img (np.ndarray): Table image.
tools/utils/opendoc_onnx_utils/utils.py:478
↓ 2 callersMethodtraining_step
(self, memory, pos_query, tgt_ids, clip_ids)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1502
↓ 2 callersFunctiontruncate_repetitive_content
Detect and truncate character-level, phrase-level, or line-level repetition in content. Args: content (str): Input text. lin
tools/utils/opendoc_onnx_utils/utils.py:973
↓ 2 callersMethodunclip
(self, box, unclip_ratio)
opendet/postprocess/db_postprocess.py:141
↓ 2 callersFunctionuntokenize_figure_of_table
Replace tokens in a string with their HTML image equivalents. Args: table_res_str (str): Table string with tokens. figure_to
tools/utils/opendoc_onnx_utils/utils.py:537
↓ 2 callersFunctionvalid_boundary
(x, with_score=True)
tools/utils/poly_nms.py:64
↓ 2 callersFunctionwriteCache
(env, cache)
tools/create_lmdb_dataset.py:50
↓ 1 callersFunctionBanlanceMultiClassCrossEntropyLoss
(x_o, x_t)
openrec/losses/cam_loss.py:7
↓ 1 callersMethod__init__
(self, target_charset)
tools/data/ratio_dataset_test.py:19
↓ 1 callersMethod__init__
(self, target_charset)
tools/data/ratio_dataset_tvresize_test.py:21
↓ 1 callersMethod__init__
(self, config, mode, logger, seed=None, epoch=0, task='rec')
tools/data/simple_dataset.py:16
↓ 1 callersMethod__init__
(self, in_channels, kernel_list=[3, 2, 2], **kwargs)
opendet/modeling/heads/db_head.py:8
↓ 1 callersMethod__init__
(self, augmenter_args=None, **kwargs)
opendet/preprocess/iaa_augment.py:178
↓ 1 callersMethod__init__
( self, in_channels=3, block=BasicBlock, layers=[3, 4, 6, 6, 3], strid
openrec/modeling/encoders/rec_resnet_45.py:61
↓ 1 callersMethod__init__
(self, inplanes, planes, stride=1, downsample=None)
openrec/modeling/encoders/resnet31_rnn.py:25
↓ 1 callersMethod__init__
( self, in_channels=3, layers=[1, 2, 5, 3], channels=[64, 128, 256, 256, 512,
openrec/modeling/encoders/rec_resnet_31.py:68
↓ 1 callersMethod__init__
(self, in_channels, out_channels, nhead=None,
openrec/modeling/decoders/mdiff_decoder.py:28
↓ 1 callersMethod__init__
(self, enc_bi_rnn=False, enc_drop_rnn=0.1, in_channels=512,
openrec/modeling/decoders/sar_decoder.py:10
↓ 1 callersMethod__init__
(self, in_channels, out_channels, max_len=25,
openrec/modeling/decoders/mgp_decoder.py:52
↓ 1 callersMethod__init__
(self, in_channels, gtc_decoder, ctc_decoder,
openrec/modeling/decoders/__init__.py:55
↓ 1 callersMethod__init__
(self, dim, nhead, dim_feedforward, dropout, num_layers)
openrec/modeling/decoders/lpv_decoder.py:12
↓ 1 callersMethod__init__
(self, in_channels, out_channels, nhead=8,
openrec/modeling/decoders/matrn_decoder.py:132
↓ 1 callersMethod__init__
(self, label_smoothing=0.1, ignore_index=0, **kwargs)
openrec/losses/seed_loss.py:21
↓ 1 callersMethod__init_line_lmdb
Initializes the LMDB environment.
tools/data/native_size_dataset.py:479
↓ 1 callersMethod__init_lmdb
Initializes the LMDB environment.
tools/data/native_size_dataset.py:452
↓ 1 callersMethod__setstate__
(self, state)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:820
↓ 1 callersMethod_apply_attn_mask
(self, attn_score)
openrec/modeling/decoders/lister_decoder.py:57
↓ 1 callersMethod_apply_basic
(self, img, mixing_weights, m)
openrec/preprocess/auto_augment.py:922
↓ 1 callersMethod_apply_blended
(self, img, mixing_weights, m)
openrec/preprocess/auto_augment.py:906
↓ 1 callersMethod_attn
(self, feat, h_state)
openrec/modeling/decoders/aster_decoder.py:48
↓ 1 callersMethod_build_augmentations
(self)
openrec/preprocess/cmer_label_encode.py:462
↓ 1 callersMethod_build_rope2d_cache
(self, H: int, W: int, device, dtype)
openrec/modeling/cmer_modeling/modeling_cmer.py:227
← previousnext →201–300 of 1,872, ranked by callers