MCPcopy Create free account

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

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

↓ 2 callersFunctiongen_gaussian_target
Generate 2D gaussian heatmap. Args: heatmap (Tensor): Input heatmap, the gaussian kernel will cover on it and maintain the ma
mmdetection-2.11.0/mmdet/models/utils/gaussian_target.py:30
↓ 2 callersMethodgen_grid_from_reg
Base on the previous bboxes and regression values, we compute the regressed bboxes and generate the grids on the bboxes. :param reg:
mmdetection-2.11.0/mmdet/models/dense_heads/reppoints_head.py:216
↓ 2 callersMethodgen_single_level_base_anchors
Generate base anchors of a single level. Args: base_size (int | float): Basic size of an anchor. scales (torch.Tensor
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:142
↓ 2 callersFunctiongen_target_path
Gen target file path. Args: target_root_path (str): The target root path. src_name (str): The source file name. suffix (s
tools/test_imgs.py:16
↓ 2 callersMethodgenerate_center_mask_attrib_maps
Generate text center region mask and geometric attribute maps. Args: img_size (tuple): The image size of (height, width).
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:339
↓ 2 callersMethodgenerate_crop_target
Generate crop target and make sure not to crop the polygon instances. Args: image (ndarray): The image waited to be crop.
mmocr/datasets/pipelines/transforms.py:930
↓ 2 callersMethodgenerate_kernels
Generate text instance kernels for one shrink ratio. Args: img_size (tuple(int, int)): The image size of (height, width).
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:87
↓ 2 callersMethodgenerate_rand_comp_attribs
Generate random text components and their attributes to ensure the the number of text components in an image is larger than k_hop1, which
mmocr/datasets/pipelines/textdet_targets/drrg_targets.py:237
↓ 2 callersMethodgenerate_thr_map
Generate threshold map. Args: img_size (tuple(int)): The image size (h,w) polygons (list(ndarray)): The polygon list.
mmocr/datasets/pipelines/textdet_targets/dbnet_targets.py:106
↓ 2 callersMethodget_anchors
Get squares according to feature map sizes and guided anchors. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes.
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:291
↓ 2 callersMethodget_anchors
Get squares according to feature map sizes and guided anchors. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes.
mmdetection-2.11.0/mmdet/models/dense_heads/sabl_retina_head.py:198
↓ 2 callersMethodget_ann_info
Get annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified index.
mmdetection-2.11.0/mmdet/datasets/custom.py:118
↓ 2 callersMethodget_bboxes
get_bboxes() is implemented in StageCascadeRPNHead.
mmdetection-2.11.0/mmdet/models/dense_heads/cascade_rpn_head.py:708
↓ 2 callersFunctionget_dataset_name_classes
(dataset)
mmdetection-2.11.0/tests/test_runtime/test_config.py:33
↓ 2 callersMethodget_extra_property
Get user-defined property.
mmdetection-2.11.0/mmdet/core/bbox/assigners/assign_result.py:60
↓ 2 callersFunctionget_gt_masks
Get ground truth masks and ignored masks. Args: ann_infos (list[dict]): Each dict contains annotation infos of one image, con
mmocr/core/evaluation/hmean.py:43
↓ 2 callersMethodget_item
(self, data_ret, index)
mmocr/datasets/utils/parser.py:104
↓ 2 callersFunctionget_loading_pipeline
Only keep loading image and annotations related configuration. Args: pipeline (list[dict]): Data pipeline configs. Returns:
mmdetection-2.11.0/mmdet/datasets/utils.py:73
↓ 2 callersFunctionget_pad_mask
(seq, pad_idx)
mmocr/models/textrecog/layers/transformer_layer.py:220
↓ 2 callersMethodget_sampled_approxs
Get sampled approxs and inside flags according to feature map sizes. Args: featmap_sizes (list[tuple]): Multi-level feature map s
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:241
↓ 2 callersFunctionget_subsequent_mask
For masking out the subsequent info.
mmocr/models/textrecog/layers/transformer_layer.py:224
↓ 2 callersMethodget_targets
Compute corresponding GT box and classification targets for proposals. Args: proposals_list (list[list]): Multi level poi
mmdetection-2.11.0/mmdet/models/dense_heads/reppoints_head.py:446
↓ 2 callersMethodget_targets
Compute semantic segmentation targets for each image. Args: segm_pred (Tensor): Predicted semantic segmentation map
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:545
↓ 2 callersMethodgrid_points
(self, featmap_size, stride=16, device='cuda')
mmdetection-2.11.0/mmdet/core/anchor/point_generator.py:17
↓ 2 callersMethodhard_mining
(self, inds, num_expected, bboxes, labels, feats)
mmdetection-2.11.0/mmdet/core/bbox/samplers/ohem_sampler.py:30
↓ 2 callersMethodignore_texts
Ignore gt masks and gt_labels while padding gt_masks_ignore in results given ignore_tags. Args: results (dict): Result fo
mmocr/datasets/pipelines/textdet_targets/dbnet_targets.py:75
↓ 2 callersMethodinit_weights
Init module weights. We do nothing in this function because all modules we used (ConvModule, BasicBlock and etc.) have default initia
mmdetection-2.11.0/mmdet/models/backbones/hourglass.py:164
↓ 2 callersMethodinit_weights
Init weights.
mmdetection-2.11.0/mmdet/models/dense_heads/cascade_rpn_head.py:74
↓ 2 callersMethodinit_weights
Initialize the weights of recognizer.
mmocr/models/textrecog/recognizer/encode_decode_recognizer.py:61
↓ 2 callersMethodinit_weights
Initialize the weights of recognizer.
mmocr/models/textrecog/recognizer/seg_recognizer.py:53
↓ 2 callersMethodinit_weights
(self)
mmocr/models/textdet/necks/fpn_unet.py:67
↓ 2 callersFunctionis_located_in
Are points located in bboxes. Args: points (Tensor): Points, shape: (m, 2). bboxes (Tensor): Bounding boxes, shape: (n, 4). Retu
mmdetection-2.11.0/mmdet/core/bbox/assigners/center_region_assigner.py:36
↓ 2 callersMethodl2_dist_two_points
(self, p1, p2)
mmocr/datasets/pipelines/ocr_seg_targets.py:153
↓ 2 callersFunctionlmdb_converter
(img_list_file, output, batch_size=1000, coding='utf-8')
mmocr/utils/lmdb_util.py:11
↓ 2 callersFunctionload_mat_info
Load the information of one ground truth in .mat format. Args: img_info(dict): The dict of only the image information gt_file(str
tools/data/textdet/totaltext_converter.py:141
↓ 2 callersMethodloss
(self, cls_scores, bbox_preds, shape_preds, loc_preds,
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:642
↓ 2 callersMethodloss
A combination of the func:``AnchorHead.loss`` and func:``SSDHead.loss``. When ``self.use_ohem == True``, it functions like ``SSDHead.
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:139
↓ 2 callersMethodloss
Compute loss of the head. Args: segm_pred (list[Tensor]): Predicted semantic segmentation map with shape (N, num_
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:512
↓ 2 callersMethodloss
Compute loss of the head. Args: mask_pred (list[Tensor]): Predicted prototypes with shape (num_classes, H, W).
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:730
↓ 2 callersMethodloss
Compute loss of the head. Args: cls_scores (list[Tensor]): Box scores for each scale level Has shape (N, num_poin
mmdetection-2.11.0/mmdet/models/dense_heads/fsaf_head.py:177
↓ 2 callersMethodloss
(self, cls_scores, bbox_preds, gt_bboxes, gt_labels,
mmdetection-2.11.0/mmdet/models/dense_heads/sabl_retina_head.py:469
↓ 2 callersMethodmake_mask
Make mask for self attention. :param src: [b, c, h, l_src] :param tgt: [b, l_tgt] :return:
mmocr/models/textrecog/decoders/master_decoder.py:140
↓ 2 callersMethodmake_res_layer
Pack all blocks in a stage into a ``ResLayer``.
mmdetection-2.11.0/mmdet/models/backbones/resnet.py:515
↓ 2 callersFunctionmakebarplot
(rs, ps, outDir, class_name, iou_type)
mmdetection-2.11.0/tools/analysis_tools/coco_error_analysis.py:72
↓ 2 callersFunctionmakeplot
(rs, ps, outDir, class_name, iou_type)
mmdetection-2.11.0/tools/analysis_tools/coco_error_analysis.py:12
↓ 2 callersMethodmapper
Dictionary mapper. Renames keys according to keymap provided. Args: d (dict): old dict keymap (dict): {'old_key':'new
mmdetection-2.11.0/mmdet/datasets/pipelines/transforms.py:1312
↓ 2 callersMethodmay_augment_poly
(self, aug, img_shape, target_shape, poly)
mmocr/datasets/pipelines/dbnet_transforms.py:108
↓ 2 callersFunctionnorm2
(point1, point2)
mmocr/models/textdet/postprocess/wrapper.py:675
↓ 2 callersMethodnorm2
nn.Module: normalization layer after the second convolution layer
mmdetection-2.11.0/mmdet/models/backbones/resnet.py:251
↓ 2 callersMethodoffset_to_pts
Change from point offset to point coordinate.
mmdetection-2.11.0/mmdet/models/dense_heads/reppoints_head.py:353
↓ 2 callersMethodohem_batch
OHEM sampling for a batch of imgs. Args: text_scores (Tensor): The text scores of size NxHxW. gt_texts (Tensor): The
mmocr/models/textdet/losses/pan_loss.py:304
↓ 2 callersMethodpad
padding has no effect on polygons`
mmdetection-2.11.0/mmdet/core/mask/structures.py:692
↓ 2 callersFunctionparse_require_file
(fpath)
setup.py:75
↓ 2 callersFunctionparse_require_file
(fpath)
mmdetection-2.11.0/setup.py:102
↓ 2 callersFunctionpoint_distance
(p1, p2)
mmocr/core/evaluation/utils.py:359
↓ 2 callersFunctionpoints_center
(points)
mmocr/core/evaluation/utils.py:350
↓ 2 callersMethodpre_pipeline
Prepare results dict for pipeline.
mmdetection-2.11.0/mmdet/datasets/custom.py:142
↓ 2 callersMethodpre_pipeline
(self, results)
mmocr/datasets/ocr_seg_dataset.py:9
↓ 2 callersMethodpre_pipeline
(self, results)
mmocr/datasets/kie_dataset.py:58
↓ 2 callersMethodprepare_test_img
Get testing data from pipeline. Args: idx (int): Index of data. Returns: dict: Testing data after pipeline w
mmocr/datasets/base_dataset.py:104
↓ 2 callersMethodprocess_polygons
Convert polygons to list of ndarray and filter invalid polygons. Args: polygons (list[list]): Polygons of one instance.
mmocr/datasets/pipelines/loading.py:29
↓ 2 callersFunctionprofile_time
Print time spent by CPU and GPU. Useful as a temporary context manager to find sweet spots of code suitable for async implementation.
mmdetection-2.11.0/mmdet/utils/profiling.py:10
↓ 2 callersFunctionrandom_boxes
Simple version of ``kwimage.Boxes.random`` Returns: Tensor: shape (n, 4) in x1, y1, x2, y2 format. References: https://gitla
mmdetection-2.11.0/mmdet/core/bbox/demodata.py:7
↓ 2 callersMethodrandom_select
(self, axis, max_size)
mmocr/datasets/pipelines/dbnet_transforms.py:205
↓ 2 callersMethodrefine_bboxes
Refine bboxes through stages.
mmdetection-2.11.0/mmdet/models/dense_heads/cascade_rpn_head.py:526
↓ 2 callersMethodreg_pred
Predict bucketing estimation (cls_pred) and fine regression (offset pred) with side-aware features.
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/sabl_head.py:247
↓ 2 callersMethodregion_wise_random_select
(self, regions)
mmocr/datasets/pipelines/dbnet_transforms.py:213
↓ 2 callersFunctionreorder_cls_channel
(val, num_classes=81)
mmdetection-2.11.0/tools/model_converters/upgrade_model_version.py:45
↓ 2 callersMethodresample_line
Resample n points on a line. Args: line (ndarray): The points composing a line. n (int): The resampled points number.
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:200
↓ 2 callersMethodrescale
see :func:`BaseInstanceMasks.rescale`
mmdetection-2.11.0/mmdet/core/mask/structures.py:611
↓ 2 callersMethodresize_img
(self, img, keep_ratio=True)
mmocr/datasets/pipelines/transforms.py:667
↓ 2 callersMethodrfp_forward
The forward function that also takes the RFP features as input.
mmdetection-2.11.0/mmdet/models/backbones/detectors_resnet.py:66
↓ 2 callersMethodroi_rescale
Scale RoI coordinates by scale factor. Args: rois (torch.Tensor): RoI (Region of Interest), shape (n, 5) scale_factor
mmdetection-2.11.0/mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py:57
↓ 2 callersMethodrotate
(self, center, points, theta, center_shift=(0, 0))
mmocr/datasets/pipelines/transforms.py:537
↓ 2 callersMethodrotate_img
(img, angle)
mmocr/datasets/pipelines/transforms.py:191
↓ 2 callersMethodsample_crop_box
Generate crop box and make sure not to crop the polygon instances. Args: img_size (tuple(int)): The image size (h, w).
mmocr/datasets/pipelines/transforms.py:413
↓ 2 callersMethodsample_valid_start_end
(self, valid_array, min_len, max_start, min_end)
mmocr/datasets/pipelines/transforms.py:385
↓ 2 callersMethodsanitize_coordinates
Sanitizes the input coordinates so that x1 < x2, x1 != x2, x1 >= 0, and x2 <= image_size. Also converts from relative to absolute coor
mmdetection-2.11.0/mmdet/models/dense_heads/yolact_head.py:897
↓ 2 callersFunctionsave_2darray
Save 2d array to txt file. Args: mat (ndarray): 2d-array of shape (n, m). file_name (str): The output file name.
tools/test_imgs.py:33
↓ 2 callersMethodsimple_test
Test function with test time augmentation. Args: imgs (torch.Tensor): Image input tensor. img_metas (list[dict]): Lis
mmocr/models/textrecog/recognizer/encode_decode_recognizer.py:120
↓ 2 callersMethodsimple_test
Test function without test time augmentation. Args: imgs (torch.Tensor): Image input tensor. img_metas (list[dict]):
mmocr/models/textrecog/recognizer/seg_recognizer.py:103
↓ 2 callersFunctionsmooth_l1_loss
Smooth L1 loss. Args: pred (torch.Tensor): The prediction. target (torch.Tensor): The learning target of the prediction.
mmdetection-2.11.0/mmdet/models/losses/smooth_l1_loss.py:11
↓ 2 callersFunctionsort_vertex8
Sort vertex with 8 points [x1 y1 x2 y2 x3 y3 x4 y4]
mmocr/datasets/pipelines/box_utils.py:49
↓ 2 callersMethodsplit_regions
(self, axis)
mmocr/datasets/pipelines/dbnet_transforms.py:195
↓ 2 callersFunctiontest_order
()
mmdetection-2.11.0/tests/test_models/test_utils/test_transformer.py:222
↓ 2 callersMethodto_bitmap
convert polygon masks to bitmap masks.
mmdetection-2.11.0/mmdet/core/mask/structures.py:831
↓ 2 callersMethodto_tensor
See :func:`BaseInstanceMasks.to_tensor`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:881
↓ 2 callersMethodto_tuple_if_list
(self, obj)
mmocr/datasets/pipelines/dbnet_transforms.py:42
↓ 2 callersMethodvector_angle
(self, vec1, vec2)
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:35
↓ 2 callersMethodvector_cos
(self, vec)
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:55
↓ 2 callersMethodvector_sin
(self, vec)
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:51
↓ 2 callersFunctionvoc_classes
()
mmdetection-2.11.0/mmdet/core/evaluation/class_names.py:8
↓ 2 callersFunctionyolo_config
YoloV3 Head Config.
mmdetection-2.11.0/tests/test_onnx/test_head.py:134
↓ 1 callersMethodGaussianMixture
(self, *args, **kwargs)
mmdetection-2.11.0/tests/test_models/test_dense_heads/test_paa_head.py:14
↓ 1 callersMethod_2d_attention
(self, y_prev, feat, holistic_feat,
mmocr/models/textrecog/decoders/sar_decoder.py:307
↓ 1 callersMethod__init__
(self, strides, ratios, scales=None, base_
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:58
↓ 1 callersMethod__init__
(self, dataloader, start=None, interval=1,
mmdetection-2.11.0/mmdet/core/evaluation/eval_hooks.py:49
↓ 1 callersMethod__init__
(self, num_scales, in_channels, out_channels,
mmdetection-2.11.0/mmdet/models/necks/yolo_neck.py:85
↓ 1 callersMethod__init__
(self, rfp_steps, rfp_backbone, aspp_out_channels,
mmdetection-2.11.0/mmdet/models/necks/rfp.py:75
↓ 1 callersMethod__init__
(self, input_size, depth, with_last_pool=False,
mmdetection-2.11.0/mmdet/models/backbones/ssd_vgg.py:38
← previousnext →401–500 of 2,851, ranked by callers