MCPcopy Create free account

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

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

↓ 89 callersMethodto
Change the device of the data inplace. Example: >>> self = SamplingResult.random() >>> print(f'self = {self.to(None)}
mmdetection-2.11.0/mmdet/core/bbox/samplers/sampling_result.py:56
↓ 69 callersMethodcuda
Since teacher_model is registered as a plain object, it is necessary to put the teacher model to cuda when calling cuda function.
mmdetection-2.11.0/mmdet/models/detectors/kd_one_stage.py:75
↓ 65 callersFunctionbuild_loss
Build loss.
mmdetection-2.11.0/mmdet/models/builder.py:62
↓ 50 callersFunctionmulti_apply
Apply function to a list of arguments. Note: This function applies the ``func`` to multiple inputs and map the multiple outputs o
mmdetection-2.11.0/mmdet/core/utils/misc.py:10
↓ 49 callersFunctionbbox2roi
Convert a list of bboxes to roi format. Args: bbox_list (list[Tensor]): a list of bboxes corresponding to a batch of images.
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:58
↓ 48 callersMethodformat
(self, outputs, targets_dict)
mmocr/models/textrecog/losses/ce_loss.py:27
↓ 44 callersMethodto_ndarray
See :func:`BaseInstanceMasks.to_ndarray`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:494
↓ 42 callersMethodassign
Assign gt to bboxes. The assignment is done in following steps 1. compute iou between all bbox (bbox of all pyramid levels) and gt
mmdetection-2.11.0/mmdet/core/bbox/assigners/atss_assigner.py:33
↓ 42 callersMethoddecode
Decode the predicted bboxes according to prediction and base boxes.
mmdetection-2.11.0/mmdet/core/bbox/coder/base_bbox_coder.py:15
↓ 41 callersFunctionimages_to_levels
Convert targets by image to targets by feature level. [target_img0, target_img1] -> [target_level0, target_level1, ...]
mmdetection-2.11.0/mmdet/core/anchor/utils.py:4
↓ 40 callersMethodexpand
See :func:`BaseInstanceMasks.expand`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:360
↓ 40 callersMethodforward
(self, *args, **kwargs)
mmdetection-2.11.0/tests/test_onnx/utils.py:26
↓ 37 callersFunctionbuild_detector
Build detector.
mmdetection-2.11.0/mmdet/models/builder.py:67
↓ 34 callersMethodrandom
Generate random bitmap masks for demo / testing purposes. Example: >>> from mmdet.core.mask.structures import BitmapMasks
mmdetection-2.11.0/mmdet/core/mask/structures.py:503
↓ 33 callersFunctionunmap
Unmap a subset of item (data) back to the original set of items (of size count)
mmdetection-2.11.0/mmdet/core/utils/misc.py:32
↓ 32 callersMethodloss
Compute losses of the head. Args: cls_scores (list[Tensor]): Cls and quality scores for each scale level has shap
mmdetection-2.11.0/mmdet/models/dense_heads/ld_head.py:185
↓ 31 callersFunctiondigit_version
(version_str)
mmdetection-2.11.0/mmdet/__init__.py:6
↓ 30 callersMethodeval
Calculate accumulated score.
mmocr/models/textrecog/decoders/sar_decoder_with_bs.py:27
↓ 26 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/base_sampler.py:34
↓ 26 callersMethodtrain
Convert the model into training mode will keeping the normalization layer freezed.
mmdetection-2.11.0/mmdet/models/backbones/hrnet.py:529
↓ 25 callersFunctiondummy_raw_bitmap_masks
Args: size (tuple): expected shape of dummy masks, (H, W) or (N, H, W) Return: ndarray: dummy mask
mmdetection-2.11.0/tests/test_utils/test_masks.py:8
↓ 23 callersMethodencode
Encode deltas between bboxes and ground truth boxes.
mmdetection-2.11.0/mmdet/core/bbox/coder/base_bbox_coder.py:11
↓ 22 callersFunctiondummy_raw_polygon_masks
Args: size (tuple): expected shape of dummy masks, (N, H, W) Return: list[list[ndarray]]: dummy mask
mmdetection-2.11.0/tests/test_utils/test_masks.py:19
↓ 22 callersMethodinit_weights
Initialize the weights of FPN module.
mmdetection-2.11.0/mmdet/models/necks/fpn.py:163
↓ 21 callersFunctionbuild_dataset
(cfg, default_args=None)
mmdetection-2.11.0/mmdet/datasets/builder.py:53
↓ 21 callersFunctionbuild_head
Build head.
mmdetection-2.11.0/mmdet/models/builder.py:57
↓ 20 callersMethodforward
(self, x, A, knn_inds)
mmocr/models/textdet/modules/gcn.py:54
↓ 19 callersFunctionbbox_overlaps
Calculate the ious between each bbox of bboxes1 and bboxes2. Args: bboxes1(ndarray): shape (n, 4) bboxes2(ndarray): shape (k, 4)
mmdetection-2.11.0/mmdet/core/evaluation/bbox_overlaps.py:4
↓ 19 callersFunctionmulticlass_nms
NMS for multi-class bboxes. Args: multi_bboxes (Tensor): shape (n, #class*4) or (n, 4) multi_scores (Tensor): shape (n, #class),
mmdetection-2.11.0/mmdet/core/post_processing/bbox_nms.py:7
↓ 18 callersFunctionbbox2result
Convert detection results to a list of numpy arrays. Args: bboxes (torch.Tensor | np.ndarray): shape (n, 5) labels (torch.Tensor
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:99
↓ 18 callersFunctionbuild_sampler
Builder of box sampler.
mmdetection-2.11.0/mmdet/core/bbox/builder.py:13
↓ 18 callersFunctiondistance2bbox
Decode distance prediction to bounding box. Args: points (Tensor): Shape (B, N, 2) or (N, 2). distance (Tensor): Distance from th
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:119
↓ 18 callersMethodgrid_anchors
Generate grid anchors in multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:207
↓ 18 callersFunctionmodel_inference
Inference image(s) with the detector. Args: model (nn.Module): The loaded detector. imgs (str/ndarray or list[str/ndarray] or tup
mmocr/apis/inference.py:27
↓ 17 callersMethodflip
See :func:`BaseInstanceMasks.flip`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:285
↓ 17 callersMethodloss
Loss function of DIIHead, get loss of all images. Args: cls_score (Tensor): Classification prediction results of
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/dii_head.py:191
↓ 16 callersFunctionaccuracy
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class)
mmdetection-2.11.0/mmdet/models/losses/accuracy.py:6
↓ 16 callersFunctionbuild_assigner
Builder of box assigner.
mmdetection-2.11.0/mmdet/core/bbox/builder.py:8
↓ 15 callersMethodforward_plugin
(self, x, plugin_names)
mmdetection-2.11.0/mmdet/models/backbones/resnet.py:239
↓ 15 callersFunctioninit_detector
Initialize a detector from config file. Args: config (str or :obj:`mmcv.Config`): Config file path or the config object.
mmdetection-2.11.0/mmdet/apis/inference.py:16
↓ 15 callersMethodshow_result
Draw `result` on `img`. Args: img (str or tensor): The image to be displayed. result (dict): The results to draw on `
mmocr/models/kie/extractors/sdmgr.py:99
↓ 14 callersFunction_demo_mm_inputs
Create a superset of inputs needed to run test or train batches. Args: input_shape (tuple): input batch dimensions n
mmdetection-2.11.0/tests/test_models/test_forward.py:326
↓ 14 callersMethodget_anchors
Get anchors according to feature map sizes. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes. img_met
mmdetection-2.11.0/mmdet/models/dense_heads/anchor_head.py:145
↓ 14 callersMethodget_targets
Get targets for PAA head. This method is almost the same as `AnchorHead.get_targets()`. We direct return the results from _get_target
mmdetection-2.11.0/mmdet/models/dense_heads/paa_head.py:401
↓ 14 callersMethodget_targets
Calculate the ground truth for all samples in a batch according to the sampling_results. Almost the same as the implementation in bbo
mmdetection-2.11.0/mmdet/models/roi_heads/bbox_heads/dii_head.py:348
↓ 14 callersFunctionlist_from_file
Load a text file and parse the content as a list of strings. The trailing "\\r" and "\\n" of each line will be removed. Note: This wi
mmocr/utils/fileio.py:26
↓ 14 callersMethodtrain
Convert the model into training mode while keep normalization layer freezed.
mmocr/models/common/backbones/unet.py:489
↓ 13 callersFunctionbuild_anchor_generator
(cfg, default_args=None)
mmdetection-2.11.0/mmdet/core/anchor/builder.py:6
↓ 13 callersMethodextract_feat
Extract features. Args: img (torch.Tensor): Image tensor with shape (n, c, h ,w). Returns: list[torch.Tensor
mmdetection-2.11.0/mmdet/models/detectors/rpn.py:44
↓ 13 callersMethodinfo
dict: a dictionary of info about the object
mmdetection-2.11.0/mmdet/core/bbox/assigners/assign_result.py:65
↓ 13 callersMethodrandom_sample
Randomly sample an img_scale when ``multiscale_mode=='range'``. Args: img_scales (list[tuple]): Images scale range for sampling.
mmdetection-2.11.0/mmdet/datasets/pipelines/transforms.py:117
↓ 13 callersFunctionreduce_mean
Obtain the mean of tensor on different GPUs.
mmdetection-2.11.0/mmdet/core/utils/dist_utils.py:63
↓ 12 callersMethod_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
mmdetection-2.11.0/mmdet/models/detectors/base.py:185
↓ 12 callersFunction_print
(result, ap=1, iouThr=None, areaRng='all', maxDets=100)
mmdetection-2.11.0/tools/analysis_tools/robustness_eval.py:10
↓ 12 callersMethodget_bboxes
(self, det_bboxes, grid_pred, img_metas)
mmdetection-2.11.0/mmdet/models/roi_heads/mask_heads/grid_head.py:294
↓ 12 callersMethodget_seg_masks
Get segmentation masks from mask_pred and bboxes. Args: mask_pred (Tensor or ndarray): shape (n, #class, h, w). F
mmdetection-2.11.0/mmdet/models/roi_heads/mask_heads/fcn_mask_head.py:169
↓ 12 callersFunctionis_block
Check if is ResNet building block.
mmdetection-2.11.0/tests/test_models/test_backbones/utils.py:10
↓ 12 callersFunctionort_validate
Validate the output of the onnxruntime backend is the same as the output generated by torch. Args: model (nn.Module): the model to be
mmdetection-2.11.0/tests/test_onnx/utils.py:30
↓ 11 callersFunctionbbox_mapping
Map bboxes from the original image scale to testing scale.
mmdetection-2.11.0/mmdet/core/bbox/transforms.py:34
↓ 11 callersMethodevaluate
(self, results, logger=None)
mmdetection-2.11.0/tests/test_runtime/test_eval_hook.py:37
↓ 11 callersMethodget_bboxes
Transform network output for a batch into bbox predictions. Args: cls_scores (list[Tensor]): Box scores for each scale level
mmdetection-2.11.0/mmdet/models/dense_heads/atss_head.py:317
↓ 11 callersFunctionreplace_ImageToTensor
Replace the ImageToTensor transform in a data pipeline to DefaultFormatBundle, which is normally useful in batch inference. Args: pip
mmdetection-2.11.0/mmdet/datasets/utils.py:13
↓ 10 callersFunction_get_detector_cfg
Grab configs necessary to create a detector. These are deep copied to allow for safe modification of parameters without influencing other tes
mmdetection-2.11.0/tests/test_models/test_forward.py:34
↓ 10 callersMethod_make_layers
Initialize conv sequential for CornerHead.
mmdetection-2.11.0/mmdet/models/dense_heads/corner_head.py:144
↓ 10 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdetection-2.11.0/mmdet/models/roi_heads/scnet_roi_head.py:143
↓ 10 callersMethodrandom_choice
Random select some elements from the gallery. If `gallery` is a Tensor, the returned indices will be a Tensor; If `gallery` is a ndar
mmdetection-2.11.0/mmdet/core/bbox/samplers/random_sampler.py:31
↓ 10 callersMethodrescale
See :func:`BaseInstanceMasks.rescale`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:260
↓ 10 callersMethodresize
See :func:`BaseInstanceMasks.resize`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:273
↓ 10 callersMethodto_ndarray
Convert masks to the format of ndarray.
mmdetection-2.11.0/mmdet/core/mask/structures.py:871
↓ 9 callersMethod__init__
(self, num_hidden_layers=12, initializer_range=0.02, vocab_
mmocr/models/ner/utils/bert.py:36
↓ 9 callersMethod_bbox_forward
Box forward function used in both training and testing.
mmdetection-2.11.0/mmdet/models/roi_heads/pisa_roi_head.py:86
↓ 9 callersMethodassign
Assign gt to bboxes. This method assign a gt bbox to every bbox (proposal/anchor), each bbox will be assigned with -1, or a semi-posi
mmdetection-2.11.0/mmdet/core/bbox/assigners/max_iou_assigner.py:60
↓ 9 callersFunctionbuild_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
mmdetection-2.11.0/mmdet/datasets/builder.py:76
↓ 9 callersFunctionbuild_roi_extractor
Build roi extractor.
mmdetection-2.11.0/mmdet/models/builder.py:47
↓ 9 callersFunctionget_root_logger
Get root logger. Args: log_file (str, optional): File path of log. Defaults to None. log_level (int, optional): The level of logg
mmdetection-2.11.0/mmdet/utils/logger.py:6
↓ 9 callersMethodnorm1
nn.Module: the normalization layer named "norm1"
mmdetection-2.11.0/mmdet/models/backbones/hrnet.py:348
↓ 8 callersFunction_build_demo_runner
()
mmdetection-2.11.0/tests/test_data/test_datasets/test_common.py:306
↓ 8 callersFunctionbuild_bbox_coder
Builder of box coder.
mmdetection-2.11.0/mmdet/core/bbox/builder.py:18
↓ 8 callersFunctioncheck_shear
(results, results_sheared)
mmdetection-2.11.0/tests/test_data/test_pipelines/test_transform/test_shear.py:51
↓ 8 callersFunctionfpn_config
Return the class containing the corresponding attributes according to the test_step_names.
mmdetection-2.11.0/tests/test_onnx/test_neck.py:31
↓ 8 callersMethodgenerate_kernels
Generate char instance kernels for one shrink ratio. Args: resize_shape (tuple(int, int)): Image size (height, width)
mmocr/datasets/pipelines/ocr_seg_targets.py:109
↓ 8 callersMethodget_points
Get points according to feature map sizes. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes. img_meta
mmdetection-2.11.0/mmdet/models/dense_heads/reppoints_head.py:295
↓ 8 callersFunctioninference_detector
Inference image(s) with the detector. Args: model (nn.Module): The loaded detector. imgs (str/ndarray or list[str/ndarray] or tup
mmdetection-2.11.0/mmdet/apis/inference.py:89
↓ 8 callersFunctionlist_to_file
Write a list of strings to a text file. Args: filename (str): The output filename. It will be created/overwritten. lines (list(st
mmocr/utils/fileio.py:6
↓ 8 callersMethodpad
See :func:`BaseInstanceMasks.pad`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:298
↓ 8 callersMethodstr2idx
Convert strings to indexes. Args: strings (list[str]): ['hello', 'world']. Returns: indexes (list[list[int]])
mmocr/models/textrecog/convertors/base.py:52
↓ 8 callersFunctionweight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights.
mmdetection-2.11.0/mmdet/models/losses/utils.py:28
↓ 7 callersMethod__init__
(self, embed_dims, feedforward_channels, num_fcs=2,
mmdetection-2.11.0/mmdet/models/utils/transformer.py:120
↓ 7 callersFunction_get_detector_cfg
Grab configs necessary to create a detector. These are deep copied to allow for safe modification of parameters without influencing other tes
tests/test_models/test_detector.py:118
↓ 7 callersFunctionbuild
Build a module. Args: cfg (dict, list[dict]): The config of modules, is is either a dict or a list of configs. regist
mmdetection-2.11.0/mmdet/models/builder.py:15
↓ 7 callersMethodbuild_trans
(self, cfg, in_channels, out_channels, **extra_args)
mmdetection-2.11.0/mmdet/models/necks/fpg.py:302
↓ 7 callersFunctioncheck_rotate
(results, results_rotated)
mmdetection-2.11.0/tests/test_data/test_pipelines/test_transform/test_rotate.py:50
↓ 7 callersMethodcrop
See :func:`BaseInstanceMasks.crop`.
mmdetection-2.11.0/mmdet/core/mask/structures.py:309
↓ 7 callersFunctioneval_hmean
Evaluation in hmean metric. Args: results (list[dict]): Each dict corresponds to one image, containing the following keys: bo
mmocr/core/evaluation/hmean.py:76
↓ 7 callersMethodextract_feat
Extract features from images.
mmocr/models/textrecog/recognizer/base.py:24
↓ 7 callersMethodgenerate_effective_mask
Generate effective mask by setting the ineffective regions to 0 and effective regions to 1. Args: mask_size (tuple): The
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:139
↓ 7 callersMethodloss
Compute the loss for text detection. Args: pred_maps (tensor): The input score maps of NxCxHxW. Returns: los
mmocr/models/textdet/dense_heads/head_mixin.py:66
↓ 7 callersFunctionmask2ndarray
Convert Mask to ndarray.. Args: mask (:obj:`BitmapMasks` or :obj:`PolygonMasks` or torch.Tensor or np.ndarray): The mask to be co
mmdetection-2.11.0/mmdet/core/utils/misc.py:45
↓ 7 callersFunctionmerge_aug_masks
Merge augmented mask prediction. Args: aug_masks (list[ndarray]): shape (n, #class, h, w) img_shapes (list[ndarray]): shape (3, )
mmdetection-2.11.0/mmdet/core/post_processing/merge_augs.py:120
↓ 7 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strip specific version information. Args: fname (str): Path to requi
setup.py:27
next →1–100 of 2,851, ranked by callers