MCPcopy Create free account

hub / github.com/JiaquanYe/MASTER-mmocr / functions

Functions2,851 in github.com/JiaquanYe/MASTER-mmocr

↓ 4 callersMethodresults2json
Dump the detection results to a COCO style json file. There are 3 types of results: proposals, bbox predictions, mask predictions, an
mmdetection-2.11.0/mmdet/datasets/coco.py:273
↓ 4 callersMethodsave_best_checkpoint
(self, runner, key_score)
mmdetection-2.11.0/mmdet/core/evaluation/eval_hooks.py:160
↓ 4 callersMethodside_aware_split
Split side-aware features aligned with orders of bucketing targets.
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:265
↓ 4 callersFunctionsort_vertex
Sort box vertices in clockwise order from left-top first. Args: points_x (list[float]): x of four vertices. points_y (list[float]
mmocr/datasets/pipelines/box_utils.py:6
↓ 4 callersFunctionwarp_img
Crop box area from image using opencv warpPerspective w/o box jitter. Args: src_img (np.array): Image before cropping. box (list[
mmocr/datasets/pipelines/crop.py:40
↓ 4 callersMethodxyxy2xywh
Convert ``xyxy`` style bounding boxes to ``xywh`` style for COCO evaluation. Args: bbox (numpy.ndarray): The bounding box
mmdetection-2.11.0/mmdet/datasets/coco.py:183
↓ 3 callersMethod_2d_attention
(self, decoder_input, feat, holistic_feat,
mmocr/models/textrecog/decoders/sar_decoder.py:97
↓ 3 callersMethod__init__
(self, in_channels, out_channels, num_outs,
mmdetection-2.11.0/mmdet/models/necks/fpg.py:145
↓ 3 callersMethod__init__
(self, groups=1, base_width=4, radix=2, re
mmdetection-2.11.0/mmdet/models/backbones/resnest.py:294
↓ 3 callersMethod__init__
(self, depth, in_channels=3, stem_channels=None,
mmdetection-2.11.0/mmdet/models/backbones/resnet.py:363
↓ 3 callersMethod__init__
(self, num_classes, in_channels, anchor_generator=dict(
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:41
↓ 3 callersMethod__init__
(self, ignore_index=-1, reduction='none')
mmocr/models/textrecog/losses/ce_loss.py:18
↓ 3 callersMethod_add_conv_fc_branch
Add shared or separable branch. convs -> avg pool (optional) -> fcs
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py:85
↓ 3 callersMethod_add_fc_branch
(self, num_branch_fcs, in_channels, roi_feat_size, fc_out_channels)
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:180
↓ 3 callersMethod_bbox_forward
Box head forward function used in both training and testing. Returns all regression, classification results and a intermediate feature.
mmdetection-2.11.0/mmdet/models/roi_heads/sparse_roi_head.py:72
↓ 3 callersFunction_check_roi_extractor
(config, roi_extractor, prev_roi_extractor=None)
mmdetection-2.11.0/tests/test_runtime/test_config.py:168
↓ 3 callersFunction_create_dummy_input
()
tests/test_models/test_ocr_decoder.py:12
↓ 3 callersMethod_decode_init_proposals
Decode init_proposal_bboxes according to the size of images and expand dimension of init_proposal_features to batch_size. Args:
mmdetection-2.11.0/mmdet/models/dense_heads/embedding_rpn_head.py:46
↓ 3 callersMethod_gather_feat
Gather feature according to index. Args: feat (Tensor): Target feature map. ind (Tensor): Target coord index.
mmdetection-2.11.0/mmdet/models/dense_heads/corner_head.py:787
↓ 3 callersMethod_init_cls_convs
Initialize classification conv layers of the head.
mmdetection-2.11.0/mmdet/models/dense_heads/anchor_free_head.py:85
↓ 3 callersMethod_init_reg_convs
Initialize bbox regression conv layers of the head.
mmdetection-2.11.0/mmdet/models/dense_heads/anchor_free_head.py:105
↓ 3 callersMethod_make_stage
(self, layer_config, in_channels, multiscale_output=True)
mmdetection-2.11.0/mmdet/models/backbones/hrnet.py:438
↓ 3 callersMethod_make_transition_layer
(self, num_channels_pre_layer, num_channels_cur_layer)
mmdetection-2.11.0/mmdet/models/backbones/hrnet.py:357
↓ 3 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdetection-2.11.0/mmdet/models/roi_heads/standard_roi_head.py:196
↓ 3 callersMethod_mask_forward_train
Run forward function and calculate loss for mask head in training.
mmdetection-2.11.0/mmdet/models/roi_heads/scnet_roi_head.py:197
↓ 3 callersMethod_parse_anno_info
Parse bbox and mask annotation. Args: annotations (dict): Annotations of one image. Returns: dict: A dict con
mmocr/datasets/text_det_dataset.py:11
↓ 3 callersMethod_poly2mask
Private function to convert masks represented with polygon to bitmaps. Args: mask_ann (list | dict): Polygon mask annotat
mmdetection-2.11.0/mmdet/datasets/pipelines/loading.py:262
↓ 3 callersMethodanchor_center
Get anchor centers from anchors. Args: anchors (Tensor): Anchor list with shape (N, 4), "xyxy" format. Returns:
mmdetection-2.11.0/mmdet/models/dense_heads/gfl_head.py:196
↓ 3 callersMethodassign_wrt_overlaps
Assign w.r.t. the overlaps of bboxes with gts. Args: overlaps (Tensor): Overlaps between k gt_bboxes and n bboxes,
mmdetection-2.11.0/mmdet/core/bbox/assigners/max_iou_assigner.py:127
↓ 3 callersFunctionasync_inference_detector
Async inference image(s) with the detector. Args: model (nn.Module): The loaded detector. img (str | ndarray): Either image files
mmdetection-2.11.0/mmdet/apis/inference.py:155
↓ 3 callersMethodaug_test_bboxes
Test det bboxes with test time augmentation. Args: feats (list[Tensor]): the outer list indicates test-time augme
mmdetection-2.11.0/mmdet/models/dense_heads/dense_test_mixins.py:38
↓ 3 callersMethodaug_test_rpn
(self, feats, img_metas)
mmdetection-2.11.0/mmdet/models/dense_heads/rpn_test_mixin.py:39
↓ 3 callersMethodbalance_bce_loss
(self, pred, gt, mask)
mmocr/models/textdet/losses/drrg_loss.py:28
↓ 3 callersFunctionbbox2distance
Decode bounding box based on distances. Args: points (Tensor): Shape (n, 2), [x, y]. bbox (Tensor): Shape (n, 4), "xyxy" format
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:159
↓ 3 callersFunctionbbox2fields
The key correspondence from bboxes to labels, masks and segmentations.
mmdetection-2.11.0/mmdet/datasets/pipelines/auto_augment.py:28
↓ 3 callersFunctionbbox_xyxy_to_cxcywh
Convert bbox coordinates from (x1, y1, x2, y2) to (cx, cy, w, h). Args: bbox (Tensor): Shape (n, 4) for bboxes. Returns: Ten
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:229
↓ 3 callersMethodbitmasks2tensor
Convert Bitmasks to tensor. Args: bitmasks (list[BitmapMasks]): The BitmapMasks list. Each item is for one img.
mmocr/models/textdet/losses/drrg_loss.py:64
↓ 3 callersMethodbitmasks2tensor
Convert Bitmasks to tensor. Args: bitmasks (list[BitMasks]): The BitMasks list. Each item is for one img.
mmocr/models/textdet/losses/db_loss.py:45
↓ 3 callersFunctionbuild_match_cost
Builder of IoU calculator.
mmdetection-2.11.0/mmdet/core/bbox/match_costs/builder.py:6
↓ 3 callersFunctioncarl_loss
Classification-Aware Regression Loss (CARL). Args: cls_score (Tensor): Predicted classification scores. labels (Tensor): Targets
mmdetection-2.11.0/mmdet/models/losses/pisa_loss.py:122
↓ 3 callersFunctioncheck_norm_state
Check if norm layer is in correct train state.
mmdetection-2.11.0/tests/test_models/test_backbones/utils.py:25
↓ 3 callersFunctionclones
Produce N identical layers
mmocr/models/textrecog/decoders/master_decoder.py:26
↓ 3 callersFunctioncompleted
Async context manager that waits for work to complete on given CUDA streams.
mmdetection-2.11.0/mmdet/utils/contextmanagers.py:16
↓ 3 callersFunctioncomps2boundaries
Construct text instance boundaries from clustered text components. This code was partially adapted from https://github.com/GXYM/DRRG licensed unde
mmocr/models/textdet/postprocess/wrapper.py:782
↓ 3 callersFunctionconstruct_toy_data
(poly2mask=True)
mmdetection-2.11.0/tests/test_data/test_pipelines/test_transform/test_translate.py:134
↓ 3 callersFunctionconv3x3
(in_planes, out_planes, stride=1)
mmocr/models/textrecog/layers/conv_layer.py:4
↓ 3 callersFunctionconvert_annotations
Convert the annotation into coco style. Args: image_infos(list): The list of image information dicts out_json_name(str): The outp
mmocr/utils/data_convert_util.py:4
↓ 3 callersFunctionconvert_bn
(blobs, state_dict, caffe_name, torch_name, converted_names)
mmdetection-2.11.0/tools/model_converters/detectron2pytorch.py:10
↓ 3 callersFunctionconvert_conv_fc
(blobs, state_dict, caffe_name, torch_name, converted_names)
mmdetection-2.11.0/tools/model_converters/detectron2pytorch.py:23
↓ 3 callersFunctionconvert_result_list
Convert the torch forward outputs containing tuple or list to a list only containing torch.Tensor. Args: output (list(Tensor) | tuple
mmdetection-2.11.0/tests/test_onnx/utils.py:94
↓ 3 callersMethodcrop
see :func:`BaseInstanceMasks.crop`
mmdetection-2.11.0/mmdet/core/mask/structures.py:663
↓ 3 callersMethodcrop_and_resize
See :func:`BaseInstanceMasks.crop_and_resize`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:328
↓ 3 callersMethodcrop_img
(img, offset, target_size)
mmocr/datasets/pipelines/transforms.py:76
↓ 3 callersFunctiondecode
( decoding_type='pan', # 'pan' or 'pse' **kwargs)
mmocr/models/textdet/postprocess/wrapper.py:22
↓ 3 callersFunctiondet_recog_show_result
Draw `result`(boxes and texts) on `img`. Args: img (str or np.ndarray): The image to be displayed. end2end_res (dict): Text detect
mmocr/core/visualize.py:573
↓ 3 callersFunctiondraw_texts_by_pil
Draw boxes and texts on empty image, especially for Chinese. Args: img (np.ndarray): The original image. texts (list[str]): Recog
mmocr/core/visualize.py:517
↓ 3 callersFunctionenhance_level_to_value
Map from level to values.
mmdetection-2.11.0/mmdet/datasets/pipelines/auto_augment.py:18
↓ 3 callersFunctioneval_recalls
Calculate recalls. Args: gts (list[ndarray]): a list of arrays of shape (n, 4) proposals (list[ndarray]): a list of arrays of sha
mmdetection-2.11.0/mmdet/core/evaluation/recall.py:64
↓ 3 callersMethodevaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
mmocr/datasets/ocr_dataset.py:14
↓ 3 callersMethodextract_feat
Directly extract features from the backbone+neck.
mmdetection-2.11.0/mmdet/models/detectors/single_stage.py:52
↓ 3 callersMethodextract_feat
Directly extract features from the backbone.
mmocr/models/textrecog/recognizer/encode_decode_recognizer.py:75
↓ 3 callersMethodextract_feat
Directly extract features from the backbone.
mmocr/models/textrecog/recognizer/seg_recognizer.py:67
↓ 3 callersFunctionfill_hole
(input_mask)
mmocr/models/textdet/postprocess/wrapper.py:232
↓ 3 callersMethodfind_head_tail
Find the head edge and tail edge of a text polygon. Args: points (ndarray): The points composing a text polygon. orie
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:59
↓ 3 callersMethodformat_results
Format the results to json (standard format for COCO evaluation). Args: results (list[tuple | numpy.ndarray]): Testing results of
mmdetection-2.11.0/mmdet/datasets/coco.py:337
↓ 3 callersMethodforward_train
Args: img (Tensor): Input images of shape (N, C, H, W). Typically these should be mean centered and std scaled.
mmdetection-2.11.0/mmdet/models/detectors/rpn.py:65
↓ 3 callersFunctiongen_color
Generate BGR color schemes.
mmocr/core/visualize.py:432
↓ 3 callersMethodget_boundary
(self, score_maps, img_metas, rescale)
mmocr/models/textdet/dense_heads/fce_head.py:101
↓ 3 callersMethodget_cat_ids
Get category ids of repeat dataset by index. Args: idx (int): Index of data. Returns: list[int]: All categor
mmdetection-2.11.0/mmdet/datasets/dataset_wrappers.py:180
↓ 3 callersMethodget_item
(self, data_ret, index)
mmocr/datasets/utils/parser.py:30
↓ 3 callersFunctionget_results
(filename, dataset='coco', task='bbox', metric=None,
mmdetection-2.11.0/tools/analysis_tools/robustness_eval.py:155
↓ 3 callersMethodget_targets
A wrapper for computing ATSS and FCOS targets for points in multiple images. Args: cls_scores (list[Tensor]): Box iou-awa
mmdetection-2.11.0/mmdet/models/dense_heads/vfnet_head.py:622
↓ 3 callersMethodinit_weights
Initialize the weights in detector. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to No
mmdetection-2.11.0/mmdet/models/detectors/rpn.py:31
↓ 3 callersFunctionis_contain_chinese
Check whether string contains Chinese or not. Args: check_str (str): String to be checked. Return True if contains Chinese, else Fal
mmocr/core/visualize.py:559
↓ 3 callersFunctionis_norm
Check if is one of the norms.
mmdetection-2.11.0/tests/test_models/test_backbones/utils.py:18
↓ 3 callersFunctionis_not_png
Check img_file is not png image. Args: img_file(str): The input image file name Returns: The bool flag indicating whether it
mmocr/utils/img_util.py:37
↓ 3 callersMethodis_poly_outside_rect
(self, poly, x, y, w, h)
mmocr/datasets/pipelines/dbnet_transforms.py:187
↓ 3 callersFunctionisr_p
Importance-based Sample Reweighting (ISR_P), positive part. Args: cls_score (Tensor): Predicted classification scores. bbox_pred
mmdetection-2.11.0/mmdet/models/losses/pisa_loss.py:8
↓ 3 callersFunctionlevel_to_value
Map from level to values based on max_value.
mmdetection-2.11.0/mmdet/datasets/pipelines/auto_augment.py:13
↓ 3 callersMethodnorm1
nn.Module: normalization layer after the first convolution layer
mmdetection-2.11.0/mmdet/models/backbones/resnet.py:246
↓ 3 callersFunctionnormalize_adjacent_matrix
Normalize adjacent matrix for GCN. This code was partially adapted from https://github.com/GXYM/DRRG licensed under the MIT license. Args:
mmocr/models/textdet/modules/utils.py:4
↓ 3 callersMethodohem
(self, predict, target, train_mask)
mmocr/models/textdet/losses/fce_loss.py:123
↓ 3 callersFunctionpoints2polygon
Convert k points to 1 polygon. Args: points (ndarray or list): A ndarray or a list of shape (2k) that indicates k points.
mmocr/core/evaluation/utils.py:118
↓ 3 callersFunctionpoly_intersection
Calculate the intersection area between two polygon. Args: poly_det (Polygon): A polygon predicted by detector. poly_gt (Polygon)
mmocr/core/evaluation/utils.py:138
↓ 3 callersMethodpre_pipeline
(self, results)
mmocr/datasets/ocr_dataset.py:9
↓ 3 callersMethodprepare_train_img
Get training data and annotations after pipeline. Args: idx (int): Index of data. Returns: dict: Training da
mmdetection-2.11.0/mmdet/datasets/custom.py:199
↓ 3 callersMethodprepare_train_img
Get training data and annotations from pipeline. Args: index (int): Index of data. Returns: dict: Training d
mmocr/datasets/base_dataset.py:89
↓ 3 callersFunctionprint_coco_results
(results)
mmdetection-2.11.0/tools/analysis_tools/robustness_eval.py:8
↓ 3 callersFunctionrandom_negative
Randomly negate value based on random_negative_prob.
mmdetection-2.11.0/mmdet/datasets/pipelines/auto_augment.py:23
↓ 3 callersMethodreorder_poly_edge
Get the respective points composing head edge, tail edge, top sideline and bottom sideline. Args: points (ndarray): The p
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:158
↓ 3 callersMethodresample_sidelines
Resample two sidelines to be of the same points number according to step size. Args: sideline1 (ndarray): The points comp
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:246
↓ 3 callersFunctionretinanet_config
RetinanNet Head Config.
mmdetection-2.11.0/tests/test_onnx/test_head.py:22
↓ 3 callersMethodsample
Sample positive and negative bboxes. This is a simple implementation of bbox sampling given candidates, assigning results and ground
mmdetection-2.11.0/mmdet/core/bbox/samplers/score_hlr_sampler.py:215
↓ 3 callersFunctionscale_boxes
Expand an array of boxes by a given scale. Args: bboxes (Tensor): Shape (m, 4) scale (float): The scale factor of bboxes Ret
mmdetection-2.11.0/mmdet/core/bbox/assigners/center_region_assigner.py:9
↓ 3 callersFunctionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
mmdetection-2.11.0/mmdet/apis/train.py:18
↓ 3 callersFunctionshow_result_pyplot
Visualize the detection results on the image. Args: model (nn.Module): The loaded detector. img (str or np.ndarray): Image filena
mmdetection-2.11.0/mmdet/apis/inference.py:189
↓ 3 callersMethodsimple_test_bboxes
Test only det bboxes without augmentation. Args: x (tuple[Tensor]): Feature maps of all scale level. img_metas (list[
mmdetection-2.11.0/mmdet/models/roi_heads/test_mixins.py:52
↓ 3 callersMethodsimple_test_mask
Simple test for mask head without augmentation.
mmdetection-2.11.0/mmdet/models/roi_heads/test_mixins.py:246
↓ 3 callersMethodsingle_test
(self, feat_maps)
mmocr/models/textdet/dense_heads/drrg_head.py:150
↓ 3 callersMethodstr2tensor
Convert text-string to ctc-loss input tensor. Args: strings (list[str]): ['hello', 'world']. Returns: dict (s
mmocr/models/textrecog/convertors/ctc.py:57
← previousnext →201–300 of 2,851, ranked by callers