MCPcopy Create free account

hub / github.com/Topdu/OpenOCR / functions

Functions1,872 in github.com/Topdu/OpenOCR

↓ 286 callersMethodget
(self, extras=None)
tools/utils/stats.py:42
↓ 62 callersMethodencode
(self, labels: List[str], device: Optional[torch.device] = None)
openrec/preprocess/dptr_label_encode.py:113
↓ 30 callersMethoddecode
Decode token IDs to text. Args: token_ids: list of token IDs skip_special_tokens: whether to skip special to
tools/infer_unirec_onnx.py:302
↓ 26 callersMethodmerge_dict
(self, args)
tools/engine/config.py:144
↓ 25 callersMethodupdate
(self, stats)
tools/utils/stats.py:35
↓ 24 callersMethodapply
(self, img, **params)
openrec/preprocess/cmer_label_encode.py:102
↓ 23 callersFunctiontransform
transform.
opendet/preprocess/__init__.py:74
↓ 21 callersMethodparse_args
(self, argv=None)
tools/utility.py:19
↓ 18 callersMethodconvert
Convert recognition results to markdown format
tools/to_markdown.py:377
↓ 16 callersFunctionget_logger
Initialize and get a logger by name. If the logger has not been initialized, this method will initialize the logger by adding one or two handl
tools/utils/logging.py:10
↓ 16 callersFunctionmake_divisible
(v, divisor=16, min_value=None)
openrec/modeling/encoders/rec_lcnetv3.py:50
↓ 14 callersMethodlog
(self, extras=None)
tools/utils/stats.py:52
↓ 13 callersFunctioncreate_operators
(op_param_list, global_config=None)
opendet/preprocess/__init__.py:155
↓ 13 callersFunctionget_image_file_list
(img_file)
tools/utils/utility.py:34
↓ 12 callersMethod__init__
( self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scal
openrec/modeling/encoders/svtrv2_lnconv_two33.py:80
↓ 12 callersMethodget_test_image
Get first valid image from directory
test_openocr.py:52
↓ 12 callersMethodrun
(self, image_numpy)
tools/infer/onnx_engine.py:61
↓ 11 callersMethod__init__
( self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scal
openrec/modeling/encoders/svtrv2_lnconv.py:80
↓ 11 callersMethod__init__
(self, d_model, nhead, dim_feedforward=2048,
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:796
↓ 10 callersMethodeval
(self)
tools/engine/trainer.py:536
↓ 9 callersMethod__init__
( self, dim, num_heads, mixer='Global', local_mixer=[7, 11], H
openrec/modeling/encoders/svtrnet2dpos.py:214
↓ 9 callersMethod__init__
(self)
openrec/modeling/encoders/cam_encoder.py:23
↓ 9 callersMethod__init__
(self, mag=-1, always_apply=False, p=1.)
openrec/preprocess/cmer_label_encode.py:97
↓ 8 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
openrec/modeling/common.py:108
↓ 8 callersMethod__init__
(self, num_classes=None, dim_input=512, dim_model=128,
openrec/modeling/decoders/robustscanner_decoder.py:625
↓ 8 callersMethod__init__
(self, step_each_epoch, step_size, warmup_epoch=0,
openrec/optimizer/lr.py:10
↓ 8 callersFunction_get_length
Greed decoder to obtain length from logit.
openrec/modeling/decoders/abinet_decoder.py:248
↓ 8 callersMethoddecode
convert text-index into text-label.
openrec/postprocess/ar_postprocess.py:40
↓ 8 callersFunctionencoder_layer
(in_c, out_c, k=3, s=2, p=1)
openrec/modeling/decoders/abinet_decoder.py:68
↓ 8 callersMethodforward_decoding
(self, src, tgts, step_i=0)
openrec/modeling/decoders/mdiff_decoder.py:240
↓ 8 callersFunctionis_main_process
()
tools/engine/trainer.py:25
↓ 8 callersFunctionmake_divisible
(v, divisor=8, min_value=None, round_limit=0.9)
openrec/modeling/encoders/repvit.py:31
↓ 7 callersMethod__init__
(self, in_channels, out_channels, use_asf=False, **kwargs)
opendet/modeling/necks/db_fpn.py:232
↓ 7 callersMethod__init__
(self, config: CMERConfig)
openrec/modeling/cmer_modeling/modeling_cmer.py:319
↓ 7 callersMethod__init__
( self, dim, num_heads, mixer='Global', local_k=[7, 11], mlp_r
openrec/modeling/encoders/svtrv2.py:126
↓ 7 callersFunction_check_args_tf
(kwargs)
openrec/preprocess/auto_augment.py:60
↓ 7 callersFunctionarea
(x, y)
tools/utils/e2e_metric/polygon_fast.py:16
↓ 7 callersFunctionbuild_dataloader
(config, mode, logger, seed=None, epoch=1, task='rec')
tools/data/__init__.py:39
↓ 7 callersFunctioncos
(p1, p2)
tools/utils/e2e_utils/visual.py:151
↓ 7 callersFunctionsample_sym
(magnitude, size=None)
openrec/preprocess/abinet_aug.py:19
↓ 6 callersMethod__init__
(self, act='hard_swish', lr_mult=1.0, lab_lr=0.1)
openrec/modeling/encoders/rec_lcnetv3.py:104
↓ 6 callersMethod__init__
( self, dim, num_heads, mixer='Global', local_mixer=[7, 11], H
openrec/modeling/encoders/svtrnet.py:142
↓ 6 callersMethod__init__
(self, in1, in2, out, bias=True)
openrec/modeling/decoders/lister_decoder.py:193
↓ 6 callersFunction_randomly_negate
With 50% prob, negate the value.
openrec/preprocess/auto_augment.py:209
↓ 6 callersFunctionarea_of_intersection
(det_x, det_y, gt_x, gt_y)
tools/utils/e2e_metric/polygon_fast.py:48
↓ 6 callersFunctionconv3x3_block
3x3 convolution with padding.
openrec/modeling/transforms/aster_tps.py:10
↓ 6 callersMethoddecode
( self, tgt: torch.Tensor, memory: torch.Tensor, tgt_mask: Optional[Tensor] =
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:1271
↓ 6 callersMethodload_state_dict
(self, state_dict, strict=True)
openrec/modeling/cmer_modeling/modeling_cmer.py:357
↓ 6 callersFunctionsample_uniform
(low, high, size=None)
openrec/preprocess/abinet_aug.py:23
↓ 6 callersMethodsave
(self, p, cfg=None)
tools/engine/config.py:154
↓ 6 callersFunctionsort_part_with_direction
(pos_list, point_direction)
tools/utils/e2e_utils/extract_textpoint_fast.py:145
↓ 6 callersFunctionsort_part_with_direction
(pos_list, point_direction)
tools/utils/e2e_utils/extract_textpoint_slow.py:172
↓ 6 callersMethodstate_dict
(self, *args, **kwargs)
openrec/modeling/cmer_modeling/modeling_cmer.py:349
↓ 5 callersMethod__init__
(self, cfgs, in_channels=3, out_indices=None)
opendet/modeling/backbones/repvit.py:247
↓ 5 callersMethod__init__
(self, cfgs, in_channels=3, out_indices=None)
openrec/modeling/encoders/repvit.py:247
↓ 5 callersMethod__init__
( self, n_dim=512, n_position=256, n_head=8, dim_feedforward=2048,
openrec/modeling/decoders/visionlan_decoder.py:109
↓ 5 callersMethod__init__
(self, d_model, fusion_num)
openrec/modeling/decoders/cdistnet_decoder.py:69
↓ 5 callersMethod__init__
(self, d_model, vocab, padding_idx=None, scale_embedding=True)
openrec/modeling/decoders/nrtr_decoder.py:428
↓ 5 callersMethod__len__
(self)
tools/data/simple_dataset.py:170
↓ 5 callersMethod_make_layer
(self, block, planes, blocks, stride=1)
openrec/modeling/encoders/rec_resnet_45.py:136
↓ 5 callersMethod_make_layer
(self, planes, blocks, stride)
openrec/modeling/encoders/resnet31_rnn.py:96
↓ 5 callersFunctionbuild_decoder
(config)
openrec/modeling/decoders/__init__.py:35
↓ 5 callersFunctionget_interpolation
(type='random')
openrec/preprocess/abinet_aug.py:27
↓ 5 callersMethodget_masked_indice_after_eos
Get the indices of the masked tokens after the first EOS token.
openrec/modeling/decoders/mdiff_decoder.py:274
↓ 4 callersMethod__init__
(self, stride)
openrec/modeling/encoders/autostr_encoder.py:21
↓ 4 callersMethod__init__
( self, img_size=[32, 128], patch_size=[4, 4], out_channels=256, out_c
openrec/modeling/encoders/focalsvtr.py:456
↓ 4 callersMethod__init__
( self, stem_channels, stage_config, layer_num, in_channels=3,
openrec/modeling/encoders/rec_hgnet.py:177
↓ 4 callersMethod__init__
(self, in_channels, out_channels, stride, is_first=False)
openrec/modeling/encoders/rec_resnet_fpn.py:35
↓ 4 callersMethod__init__
( self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scal
openrec/modeling/decoders/igtr_decoder.py:180
↓ 4 callersFunction_get_op
(key, factory)
openrec/preprocess/parseq_aug.py:62
↓ 4 callersFunction_get_param
(level, img, max_dim_factor, min_level=1)
openrec/preprocess/parseq_aug.py:71
↓ 4 callersMethod_handle_formula
Handle formula-specific content
tools/to_markdown.py:340
↓ 4 callersMethod_handle_table
Convert table content to markdown format
tools/to_markdown.py:292
↓ 4 callersMethod_handle_text
Process regular text content, preserving paragraph structure
tools/to_markdown.py:171
↓ 4 callersMethod_make_layer
(self, input_channels, output_channels, blocks)
openrec/modeling/encoders/rec_resnet_31.py:160
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:514
↓ 4 callersMethod_normalize_text
(self, text)
openrec/metrics/rec_metric.py:54
↓ 4 callersFunction_rotate_half
(x: torch.Tensor)
openrec/modeling/cmer_modeling/modeling_cmer.py:74
↓ 4 callersMethodbiased_random_int
返回 [0, max_value] 之间的一个整数,值越大概率越小。 exponent > 1 越大表示越偏向小值。
openrec/preprocess/rec_aug.py:228
↓ 4 callersFunctionbuild_post_process
(config, global_config=None)
opendet/postprocess/__init__.py:10
↓ 4 callersFunctioncalculate_bbox_area
Calculate bounding box area
tools/utils/opendoc_onnx_utils/utils.py:27
↓ 4 callersMethoddecode
( self, tgt: torch.Tensor, memory: torch.Tensor, tgt_mask: Optional[Tensor] =
openrec/modeling/decoders/parseq_decoder.py:244
↓ 4 callersMethoddecode
convert text-index into text-label.
openrec/postprocess/igtr_postprocess.py:63
↓ 4 callersMethoddecode
convert text-index into text-label.
openrec/postprocess/nrtr_postprocess.py:54
↓ 4 callersMethoddecode
Decode a batch of token distributions. Args: token_dists: softmax probabilities over the token distribution. Shape: N, L, C
openrec/preprocess/dptr_label_encode.py:75
↓ 4 callersMethodencode_text
(self, text)
openrec/modeling/decoders/dptr_parseq_clip_b_decoder.py:757
↓ 4 callersFunctionget_intersection
(pD, pG)
tools/utils/e2e_metric/Deteval.py:299
↓ 4 callersFunctionget_rotate_crop_image
img_height, img_width = img.shape[0:2] left = int(np.min(points[:, 0])) right = int(np.max(points[:, 0])) top = int(np.min(points[:,
tools/infer/utility.py:167
↓ 4 callersFunctionis_aligned
(a1, a2)
tools/utils/opendoc_onnx_utils/utils.py:282
↓ 4 callersFunctionlaunch_demo
Launch OpenDoc ONNX Gradio demo with default configuration. Args: layout_model_path: Path to layout detection ONNX model (default: auto-d
demo_opendoc.py:463
↓ 4 callersFunctionlaunch_demo
Launch OpenOCR Gradio demo with default configuration. Args: share: Whether to create a public share link (default: False) server
demo_gradio.py:119
↓ 4 callersFunctionload_ckpt
Resume from saved checkpoints :param checkpoint_path: Checkpoint path to be resumed
tools/utils/ckpt.py:49
↓ 4 callersMethodrandom_mask
(self, text)
openrec/preprocess/mdiff_label_encode.py:41
↓ 4 callersFunctionsample_asym
(magnitude, size=None)
openrec/preprocess/abinet_aug.py:15
↓ 4 callersFunctionsave_ckpt
Saving checkpoints :param epoch: current epoch number :param log: logging information of the epoch :param save_best: if True, rename
tools/utils/ckpt.py:7
↓ 4 callersMethodsave_to_json
Save doc task results to JSON (only for doc task). Supports both single result dict and list of results (from PDF).
openocr.py:266
↓ 4 callersMethodsave_to_markdown
Save doc task results to Markdown (only for doc task). Supports both single result dict and list of results (from PDF).
openocr.py:277
↓ 4 callersMethodsave_visualization
Save doc task visualization (only for doc task). Supports both single result dict and list of results (from PDF).
openocr.py:288
↓ 4 callersFunctionsort_with_direction
f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
tools/utils/e2e_utils/extract_textpoint_slow.py:166
↓ 4 callersFunctionto_pil_image
Convert the input to a PIL Image. Args: img (PIL.Image or numpy.ndarray): Input image. Returns: PIL.Image: PIL Image ob
tools/utils/opendoc_onnx_utils/utils.py:171
next →1–100 of 1,872, ranked by callers