MCPcopy Create free account

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

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

↓ 1 callersMethodpoint2line
Compute the distance from point to a line. This is adapted from https://github.com/MhLiao/DB. Args: xs (ndarray): The x c
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:18
↓ 1 callersMethodpoly2fourier
Perform Fourier transformation to generate Fourier coefficients ck from polygon. Args: polygon (ndarray): An input polygo
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:165
↓ 1 callersFunctionpoly_iou
Calculate the IOU between two polygons. Args: poly_det (Polygon): A polygon predicted by detector. poly_gt (Polygon): A gt polygo
mmocr/core/evaluation/utils.py:194
↓ 1 callersFunctionpoly_union
Calculate the union area between two polygon. Args: poly_det (Polygon): A polygon predicted by detector. poly_gt (Polygon): A gt
mmocr/core/evaluation/utils.py:157
↓ 1 callersMethodpolygon_area
Compute the polygon area. Please refer to Green's theorem. https://en.wikipedia.org/wiki/Green%27s_theorem. This is adapted from https
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:54
↓ 1 callersMethodpolygon_size
Estimate the height and width of the minimum bounding box of the polygon. Args: polygon (ndarray): The polygon point sequ
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:72
↓ 1 callersFunctionpolygon_to_bitmap
Convert masks from the form of polygons to bitmaps. Args: polygons (list[ndarray]): masks in polygon representation height (int):
mmdetection-2.11.0/mmdet/core/mask/structures.py:1010
↓ 1 callersMethodpositive_bag_loss
Compute positive bag loss. :math:`-log( Mean-max(P_{ij}^{cls} * P_{ij}^{loc}) )`. :math:`P_{ij}^{cls}`: matched_cls_prob, classifica
mmdetection-2.11.0/mmdet/models/dense_heads/free_anchor_retina_head.py:219
↓ 1 callersMethodpre_pipeline
Prepare results dict for pipeline.
mmocr/datasets/base_dataset.py:85
↓ 1 callersMethodpredict
(self, loss)
mmdetection-2.11.0/tests/test_models/test_dense_heads/test_paa_head.py:20
↓ 1 callersMethodprepare_test_img
Get testing data after pipeline. Args: idx (int): Index of data. Returns: dict: Testing data after pipeline
mmdetection-2.11.0/mmdet/datasets/custom.py:218
↓ 1 callersMethodprepare_train_img
Get training data and annotations from pipeline. Args: index (int): Index of data. Returns: dict: Training d
mmocr/datasets/ocr_seg_dataset.py:70
↓ 1 callersMethodprepare_train_img
Get training data and annotations after pipeline. Args: index (int): Index of data. Returns: dict: Training
mmocr/datasets/ner_dataset.py:19
↓ 1 callersMethodprepare_train_img
Get training data and annotations from pipeline. Args: index (int): Index of data. Returns: dict: Training d
mmocr/datasets/text_det_dataset.py:54
↓ 1 callersFunctionprint_map_summary
Print mAP and results of each class. A table will be printed to show the gts/dets/recall/AP of each class and the mAP. Args: mea
mmdetection-2.11.0/mmdet/core/evaluation/mean_ap.py:404
↓ 1 callersFunctionprint_recall_summary
Print recalls in a table. Args: recalls (ndarray): calculated from `bbox_recalls` proposal_nums (ndarray or list): top N proposal
mmdetection-2.11.0/mmdet/core/evaluation/recall.py:109
↓ 1 callersFunctionprocess_checkpoint
(in_file, out_file)
tools/publish_model.py:17
↓ 1 callersFunctionprocess_checkpoint
(in_file, out_file)
mmdetection-2.11.0/tools/model_converters/publish_model.py:16
↓ 1 callersMethodprocess_polygons
Convert polygons to list of ndarray and filter invalid polygons. Args: polygons (list[list]): Polygons of one instance.
mmdetection-2.11.0/mmdet/datasets/pipelines/loading.py:289
↓ 1 callersMethodpropose_comps
Propose text components. Args: score_map (ndarray): The score map for NMS. top_height_map (ndarray): The predicted te
mmocr/models/textdet/modules/proposal_local_graph.py:77
↓ 1 callersMethodpropose_comps_and_attribs
Generate text components and attributes. Args: text_region_map (ndarray): The predicted text region probability m
mmocr/models/textdet/modules/proposal_local_graph.py:131
↓ 1 callersFunctionpse_decode
Decoding predictions of PSENet to instances. This is partially adapted from https://github.com/whai362/PSENet. Args: preds (tensor):
mmocr/models/textdet/postprocess/wrapper.py:97
↓ 1 callersFunctionpytorch2onnx
(config_path, checkpoint_path, input_img, input_shape,
mmdetection-2.11.0/tools/deployment/pytorch2onnx.py:15
↓ 1 callersFunctionquality_focal_loss
r"""Quality Focal Loss (QFL) is from `Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection <ht
mmdetection-2.11.0/mmdet/models/losses/gfocal_loss.py:11
↓ 1 callersMethodquantize_float
Converts a float to closest non-zero int divisible by divisor. Args: number (int): Original number to be quantized. d
mmdetection-2.11.0/mmdet/models/backbones/regnet.py:254
↓ 1 callersMethodrandom_choice
Randomly select some elements from the gallery. If `gallery` is a Tensor, the returned indices will be a Tensor; If `gallery` is a nd
mmdetection-2.11.0/mmdet/core/bbox/samplers/score_hlr_sampler.py:62
↓ 1 callersMethodrandom_crop_flip
(self, results)
mmocr/datasets/pipelines/transforms.py:806
↓ 1 callersMethodrandom_sample_ratio
Randomly sample an img_scale when ``ratio_range`` is specified. A ratio will be randomly sampled from the range specified by ``ratio_
mmdetection-2.11.0/mmdet/datasets/pipelines/transforms.py:144
↓ 1 callersMethodrandom_select
Randomly select an img_scale from given candidates. Args: img_scales (list[tuple]): Images scales for selection. Returns
mmdetection-2.11.0/mmdet/datasets/pipelines/transforms.py:99
↓ 1 callersFunctionreadme
()
setup.py:6
↓ 1 callersFunctionreadme
()
mmdetection-2.11.0/setup.py:10
↓ 1 callersFunctionreduce_loss
Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum".
mmdetection-2.11.0/mmdet/models/losses/utils.py:7
↓ 1 callersMethodreg_forward
(self, reg_x)
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:286
↓ 1 callersMethodregion_targets
See :func:`StageCascadeRPNHead.get_targets`.
mmdetection-2.11.0/mmdet/models/dense_heads/cascade_rpn_head.py:230
↓ 1 callersFunctionregister_torch_optimizers
()
mmocr/core/optimizer/builder.py:14
↓ 1 callersMethodregress_by_class
Regress the bbox for the predicted class. Used in Cascade R-CNN. Args: rois (Tensor): shape (n, 4) or (n, 5) label (T
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:549
↓ 1 callersFunctionremove_single
Remove isolated text components. This code was partially adapted from https://github.com/GXYM/DRRG licensed under the MIT license. Args:
mmocr/models/textdet/postprocess/wrapper.py:645
↓ 1 callersMethodresample_polygon
Resample one polygon with n points on its boundary. Args: polygon (list[float]): The input polygon. n (int): The numb
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:106
↓ 1 callersMethodresponsible_flags
Generate responsible anchor flags of grid cells in multiple scales. Args: featmap_sizes (list(tuple)): List of feature map sizes
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:667
↓ 1 callersMethodresults2txt
Dump the detection results to a txt file. Args: results (list[list | tuple]): Testing results of the dataset.
mmdetection-2.11.0/mmdet/datasets/cityscapes.py:107
↓ 1 callersFunctionretrieve_data_cfg
(config_path, skip_type, cfg_options)
mmdetection-2.11.0/tools/misc/browse_dataset.py:47
↓ 1 callersMethodrotate
Rotate the BitmapMasks. Args: out_shape (tuple[int]): Shape for output mask, format (h, w). angle (int | float): Rota
mmdetection-2.11.0/mmdet/core/mask/structures.py:457
↓ 1 callersMethodrotate_bbox
(boxes, chars, angle, center, img_box)
mmocr/datasets/pipelines/ocr_transforms.py:376
↓ 1 callersMethodrotate_img
(self, img, angle, canvas_size)
mmocr/datasets/pipelines/transforms.py:574
↓ 1 callersMethodrotate_point
(point, angle, center)
mmocr/datasets/pipelines/ocr_transforms.py:404
↓ 1 callersMethodsample_angle
(max_angle)
mmocr/datasets/pipelines/transforms.py:186
↓ 1 callersMethodsample_angle
(self, max_angle)
mmocr/datasets/pipelines/transforms.py:570
↓ 1 callersMethodsample_via_interval
Sample according to the iou interval. Args: max_overlaps (torch.Tensor): IoU between bounding boxes and ground tr
mmdetection-2.11.0/mmdet/core/bbox/samplers/iou_balanced_neg_sampler.py:46
↓ 1 callersFunctionsave_results
Save predicted results to txt file. Args: img_paths (list[str]) pred_labels (list[str]) gt_labels (list[str]) res
tools/ocr_test_imgs.py:20
↓ 1 callersMethodscore_samples
(self, loss)
mmdetection-2.11.0/tests/test_models/test_dense_heads/test_paa_head.py:24
↓ 1 callersMethodscore_voting
Implementation of score voting method works on each remaining boxes after NMS procedure. Args: det_bboxes (Tensor): Remai
mmdetection-2.11.0/mmdet/models/dense_heads/paa_head.py:606
↓ 1 callersFunctionseg2boundary
Convert a segmentation mask to a text boundary. Args: seg (ndarray): The segmentation mask. text_repr_type (str): Text instance e
mmocr/core/mask.py:53
↓ 1 callersMethodseg_loss
(self, out_head, gt_kernels)
mmocr/models/textrecog/losses/seg_loss.py:37
↓ 1 callersFunctionselect_top_boundary
Select poly boundaries with scores >= score_thr. Args: boundaries_list (list[list[list[float]]]): List of boundaries. The 1st
mmocr/core/evaluation/utils.py:431
↓ 1 callersFunctionself_attention
Compute 'Scale Dot Product Attention'
mmocr/models/textrecog/decoders/master_decoder.py:58
↓ 1 callersMethodset_extra_property
Set user-defined new property.
mmdetection-2.11.0/mmdet/core/bbox/assigners/assign_result.py:55
↓ 1 callersFunctionset_recall_param
Check proposal_nums and iou_thrs and set correct format.
mmdetection-2.11.0/mmdet/core/evaluation/recall.py:43
↓ 1 callersFunctionsetup
(app)
mmdetection-2.11.0/docs/conf.py:89
↓ 1 callersFunctionsetup
(app)
docs/conf.py:104
↓ 1 callersMethodshear
Shear the BitmapMasks. Args: out_shape (tuple[int]): Shape for output mask, format (h, w). magnitude (int | float): T
mmdetection-2.11.0/mmdet/core/mask/structures.py:422
↓ 1 callersFunctionshow_feature
Visualize a list of feature maps. Args: features (list(ndarray)): The feature map list. names (list(str)): The visualized title l
mmocr/core/visualize.py:38
↓ 1 callersMethodshrink_char_quad
Shrink char box in style of quadrangle. Args: char_quad (list[float]): Char box with format [x1, y1, x2, y2, x3,
mmocr/datasets/pipelines/ocr_seg_targets.py:47
↓ 1 callersMethodshrink_char_rect
Shrink char box in style of rectangle. Args: char_rect (list[float]): Char box with format [x_min, y_min, x_max,
mmocr/datasets/pipelines/ocr_seg_targets.py:88
↓ 1 callersMethodside_aware_feature_extractor
Refine and extract side-aware features without split them.
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:226
↓ 1 callersMethodsimple_test
(self, img, img_metas, **kwargs)
mmdetection-2.11.0/mmdet/models/detectors/base.py:88
↓ 1 callersMethodsimple_test
Test function without test time augmentation. Args: imgs (list[torch.Tensor]): List of multiple images img_metas (lis
mmdetection-2.11.0/mmdet/models/detectors/rpn.py:96
↓ 1 callersMethodsimple_test
(self, img, img_metas, **kwargs)
mmocr/models/textrecog/recognizer/base.py:44
↓ 1 callersMethodsingle_level_grid_anchors
Generate grid anchors of a single level. Note: This function is usually called by method ``self.grid_anchors``. Args:
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:233
↓ 1 callersMethodsingle_level_responsible_flags
Generate the responsible flags of anchor in a single feature map. Args: featmap_size (tuple[int]): The size of feature maps.
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:692
↓ 1 callersMethodsingle_level_valid_flags
Generate the valid flags of anchor in a single feature map. Args: featmap_size (tuple[int]): The size of feature maps.
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:299
↓ 1 callersMethodslice_as
Slice ``src`` as ``dst`` Note: ``src`` should have the same or larger size than ``dst``. Args: src (torch.Te
mmdetection-2.11.0/mmdet/models/necks/fpn_carafe.py:211
↓ 1 callersMethodspatial_pool
(self, x)
mmocr/models/textrecog/layers/context_block.py:56
↓ 1 callersMethodsquare_pad
(self, img)
mmocr/datasets/pipelines/transforms.py:677
↓ 1 callersMethodsquare_pad_mask
(self, points, offset)
mmocr/datasets/pipelines/transforms.py:699
↓ 1 callersMethodstar_dcn_offset
Compute the star deformable conv offsets. Args: bbox_pred (Tensor): Predicted bbox distance offsets (l, r, t, b). gra
mmdetection-2.11.0/mmdet/models/dense_heads/vfnet_head.py:275
↓ 1 callersMethodstr2tensor
Convert text-string into tensor. Args: strings (list[str]): ['hello', 'world'] Returns: dict (str: Te
mmocr/models/textrecog/convertors/attn.py:74
↓ 1 callersMethodstr2tensor
Convert text-string to input tensor. Args: strings (list[str]): ['hello', 'world']. Returns: tensors (list[to
mmocr/models/textrecog/convertors/base.py:79
↓ 1 callersFunctiontblr2bboxes
Decode tblr outputs to prediction boxes. The process includes 3 steps: 1) De-normalize tblr coordinates by multiplying it with `normalizer`;
mmdetection-2.11.0/mmdet/core/bbox/coder/tblr_bbox_coder.py:123
↓ 1 callersMethodtensor2idx
Convert output tensor to text-index Args: outputs (tensor): model outputs with size: N * T * C img_metas (lis
mmocr/models/textrecog/convertors/attn.py:109
↓ 1 callersMethodtensor2idx
Convert model output tensor to character indexes and scores. Args: output (tensor): The model outputs with size: N * T * C
mmocr/models/textrecog/convertors/base.py:106
↓ 1 callersMethodtensor2str
Convert model output tensor to string labels. Args: output (tensor): Model outputs with size: N * C * H * W img_metas
mmocr/models/textrecog/convertors/seg.py:54
↓ 1 callersMethodtensor_add
Add tensors ``a`` and ``b`` that might have different sizes.
mmdetection-2.11.0/mmdet/models/necks/fpn_carafe.py:231
↓ 1 callersFunctiontest
(model, data_loader, show=False, out_dir=None)
tools/kie_test_imgs.py:18
↓ 1 callersFunctiontext_model_inference
Inference text(s) with the entity recognizer. Args: model (nn.Module): The loaded recognizer. input_sentence (str): A text entere
mmocr/apis/inference.py:133
↓ 1 callersFunctiontextsnake_decode
Decoding predictions of TextSnake to instances. This was partially adapted from https://github.com/princewang1994/TextSnake.pytorch. Args:
mmocr/models/textdet/postprocess/wrapper.py:306
↓ 1 callersFunctiontile_image
Combined multiple images to one vertically. Args: images (list[np.ndarray]): Images to be combined.
mmocr/core/visualize.py:296
↓ 1 callersFunctiontrace_boundary
Trace the boundary point of text. Args: char_boxes (list[ndarray]): The char boxes for one text. Each element is 4x2 ndarray.
tools/data/textdet/synthtext_converter.py:15
↓ 1 callersFunctiontrain_detector
(model, dataset, cfg, distributed=False,
mmdetection-2.11.0/mmdet/apis/train.py:37
↓ 1 callersFunctiontrain_detector
(model, dataset, cfg, distributed=False,
mmocr/apis/train.py:17
↓ 1 callersMethodtransform_bbox_targets
Transform bbox_targets (x1, y1, x2, y2) into (l, t, r, b) format. Args: decoded_bboxes (list[Tensor]): Regression targets of each
mmdetection-2.11.0/mmdet/models/dense_heads/vfnet_head.py:765
↓ 1 callersMethodtranslate
Translate the BitmapMasks. Args: out_shape (tuple[int]): Shape for output mask, format (h, w). offset (int | float):
mmdetection-2.11.0/mmdet/core/mask/structures.py:372
↓ 1 callersFunctiontruncate_cls_channel
(val, num_classes=81)
mmdetection-2.11.0/tools/model_converters/upgrade_model_version.py:67
↓ 1 callersFunctiontruncate_reg_channel
(val, num_classes=81)
mmdetection-2.11.0/tools/model_converters/upgrade_model_version.py:89
↓ 1 callersFunctionunclip
(box, unclip_ratio=1.5)
mmocr/models/textdet/postprocess/wrapper.py:168
↓ 1 callersMethodupdate_dict
(self)
mmocr/models/textrecog/convertors/master.py:48
↓ 1 callersMethodupdate_dict
(self)
mmocr/models/textrecog/convertors/attn.py:47
↓ 1 callersMethodupdate_dict
(self)
mmocr/models/textrecog/convertors/ctc.py:40
↓ 1 callersMethodupdate_dict
(self)
mmocr/models/textrecog/convertors/seg.py:39
↓ 1 callersMethodupdate_hyperparameters
Update hyperparameters like IoU thresholds for assigner and beta for SmoothL1 loss based on the training statistics. Returns:
mmdetection-2.11.0/mmdet/models/roi_heads/dynamic_roi_head.py:133
↓ 1 callersFunctionvarifocal_loss
`Varifocal Loss <https://arxiv.org/abs/2008.13367>`_ Args: pred (torch.Tensor): The prediction with shape (N, C), C is the nu
mmdetection-2.11.0/mmdet/models/losses/varifocal_loss.py:10
← previousnext →1,101–1,200 of 2,851, ranked by callers