Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JiaquanYe/MASTER-mmocr
/ functions
Functions
2,851 in github.com/JiaquanYe/MASTER-mmocr
⨍
Functions
2,851
◇
Types & classes
489
↳
Endpoints
22
↓ 1 callers
Function
convert_stem
(model_key, model_weight, state_dict, converted_names)
mmdetection-2.11.0/tools/model_converters/regnet2mmdet.py:7
↓ 1 callers
Method
convert_text2id
Convert characters to ids. If the input is uppercase, convert to lowercase first. Args: text (list[char]): An
mmocr/models/ner/convertors/ner_convertor.py:76
↓ 1 callers
Function
count_matches
Count the various match number for metric calculation. Args: pred_texts (list[str]): Predicted text string. gt_texts (list[str]):
mmocr/core/evaluation/ocr_metric.py:28
↓ 1 callers
Function
create_frame_by_matplotlib
Create gif frame image through matplotlib. Args: image_dir (str): Root directory of result images nrows (int): Number of rows dis
mmdetection-2.11.0/demo/create_result_gif.py:57
↓ 1 callers
Function
create_gif
Create gif through imageio. Args: frames (list[ndarray]): Image frames gif_name (str): Saved gif name duration (int): Dis
mmdetection-2.11.0/demo/create_result_gif.py:42
↓ 1 callers
Method
crop_area
(self, img, polys)
mmocr/datasets/pipelines/dbnet_transforms.py:224
↓ 1 callers
Method
crop_bboxes
(self, bboxes, canvas_bbox)
mmocr/datasets/pipelines/transforms.py:85
↓ 1 callers
Method
crop_img
(self, img, bbox)
mmocr/datasets/pipelines/transforms.py:460
↓ 1 callers
Function
cvt_annotations
(image_infos, out_json_name)
mmdetection-2.11.0/tools/dataset_converters/cityscapes.py:84
↓ 1 callers
Function
cvt_to_coco_json
(annotations)
mmdetection-2.11.0/tools/dataset_converters/pascal_voc.py:95
↓ 1 callers
Method
decode
Apply transformation `pred_bboxes` to `boxes`. Args: boxes (torch.Tensor): Basic boxes, e.g. anchors. pred_bboxes (to
mmdetection-2.11.0/mmdet/core/bbox/coder/yolo_bbox_coder.py:61
↓ 1 callers
Function
delta2bbox
Apply deltas to shift/scale base boxes. Typically the rois are anchor or proposed bounding boxes and the deltas are network outputs used to s
mmdetection-2.11.0/mmdet/core/bbox/coder/delta_xywh_bbox_coder.py:134
↓ 1 callers
Function
det_and_recog_inference
(args, det_model, recog_model)
demo/ocr_image_demo.py:11
↓ 1 callers
Method
diff_binarize
(self, prob_map, thr_map, k)
mmocr/models/textdet/dense_heads/db_head.py:67
↓ 1 callers
Function
diou_loss
r"""`Implementation of Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression, https://arxiv.org/abs/1911.08287`_. Code is
mmdetection-2.11.0/mmdet/models/losses/iou_loss.py:107
↓ 1 callers
Function
disable_text_recog_aug_test
Remove aug_test from test pipeline of text recognition. Args: cfg (mmcv.Config): Input config. Returns: cfg (mmcv.Config): Ou
mmocr/apis/inference.py:10
↓ 1 callers
Function
distribution_focal_loss
r"""Distribution Focal Loss (DFL) is from `Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection
mmdetection-2.11.0/mmdet/models/losses/gfocal_loss.py:56
↓ 1 callers
Method
draw_border_map
Generate threshold map for one polygon. Args: polygon(ndarray): The polygon boundary ndarray. canvas(ndarray): The ge
mmocr/datasets/pipelines/textdet_targets/dbnet_targets.py:126
↓ 1 callers
Method
draw_center_region_maps
Draw attributes on text center region. Args: top_line (ndarray): The points composing top curved sideline of text
mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py:285
↓ 1 callers
Method
draw_center_region_maps
Draw attributes of text components on text center regions. Args: top_line (ndarray): The points composing the top side lines of t
mmocr/datasets/pipelines/textdet_targets/drrg_targets.py:81
↓ 1 callers
Function
draw_polygons
Draw polygons on image. Args: img (np.ndarray): The original image. polys (list[list[float]]): Detected polygons. Return:
mmocr/core/visualize.py:441
↓ 1 callers
Function
draw_texts
Draw boxes and texts on empty img. Args: img (np.ndarray): The original image. boxes (list[list[float]]): Detected bounding boxes
mmocr/core/visualize.py:484
↓ 1 callers
Function
drrg_decode
Merge text components and construct boundaries of text instances. Args: edges (ndarray): The edge array of shape N * 2, each row is a nod
mmocr/models/textdet/postprocess/wrapper.py:834
↓ 1 callers
Function
dummy_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_misc.py:10
↓ 1 callers
Function
eval_ner_f1
Evaluate for ner task. Args: results (list): Predict results of entities. gt_infos (list[dict]): Ground-truth infomation which co
mmocr/core/evaluation/ner_metric.py:91
↓ 1 callers
Method
evaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
mmdetection-2.11.0/mmdet/datasets/custom.py:266
↓ 1 callers
Method
evaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
mmocr/datasets/base_dataset.py:159
↓ 1 callers
Method
evaluate
Evaluate the hmean metric. Args: results (list[dict]): Testing results of the dataset. metric (str | list[str]): Metr
mmocr/datasets/icdar_dataset.py:117
↓ 1 callers
Method
evaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
mmocr/datasets/ner_dataset.py:33
↓ 1 callers
Method
evaluate
(self, results, metric='macro_f1', metric_options=dict(macr
mmocr/datasets/kie_dataset.py:130
↓ 1 callers
Method
evaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
mmocr/datasets/text_det_dataset.py:79
↓ 1 callers
Method
evaluate_and_show
Evaluate and show results. Args: dataset (Dataset): A PyTorch dataset. results (list): Det results from test results
mmdetection-2.11.0/tools/analysis_tools/analyze_results.py:89
↓ 1 callers
Method
expand
TODO: Add expand for polygon
mmdetection-2.11.0/mmdet/core/mask/structures.py:696
↓ 1 callers
Function
extract_boundary
Extract boundaries and their scores from result. Args: result (dict): The detection result with the key 'boundary_result' of
mmocr/core/mask.py:79
↓ 1 callers
Method
extract_feat
Extract features from images.
mmdetection-2.11.0/mmdet/models/detectors/base.py:48
↓ 1 callers
Function
fast_nms
Fast NMS in `YOLACT <https://arxiv.org/abs/1904.02689>`_. Fast NMS allows already-removed detections to suppress other detections so that eve
mmdetection-2.11.0/mmdet/core/post_processing/bbox_nms.py:96
↓ 1 callers
Function
filter_2dlist_result
Find out detected results whose score > score_thr. Args: results (list[list[float]]): The result list. score (list): The score li
mmocr/core/evaluation/utils.py:385
↓ 1 callers
Method
fit
(self, loss)
mmdetection-2.11.0/tests/test_models/test_dense_heads/test_paa_head.py:17
↓ 1 callers
Function
fix_corner
Add corner points to predicted side lines. This code was partially adapted from https://github.com/GXYM/DRRG licensed under the MIT license.
mmocr/models/textdet/postprocess/wrapper.py:739
↓ 1 callers
Method
format
(self, outputs, targets_dict)
mmocr/models/textrecog/losses/ce_loss.py:55
↓ 1 callers
Method
format
(self, outputs, targets_dict)
mmocr/models/textrecog/losses/ce_loss.py:82
↓ 1 callers
Method
format_results
Format the results to txt (standard format for Cityscapes evaluation). Args: results (list): Testing results of the datas
mmdetection-2.11.0/mmdet/datasets/cityscapes.py:173
↓ 1 callers
Method
forward
(self, feats)
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:238
↓ 1 callers
Method
forward
Forward features from the upstream network. Args: feats (tuple[Tensor]): Features from the upstream network, each is
mmdetection-2.11.0/mmdet/models/dense_heads/ssd_head.py:99
↓ 1 callers
Method
forward
Forward features from the upstream network. Args: feats (tuple[Tensor]): Features from the upstream network, each is
mmdetection-2.11.0/mmdet/models/dense_heads/gfl_head.py:152
↓ 1 callers
Method
forward
(self, feats)
mmdetection-2.11.0/mmdet/models/dense_heads/sabl_retina_head.py:195
↓ 1 callers
Method
forward
(self, inputs)
mmocr/models/textdet/necks/fpn_cat.py:99
↓ 1 callers
Method
forward_dummy
Dummy forward function.
mmdetection-2.11.0/mmdet/models/detectors/rpn.py:59
↓ 1 callers
Method
forward_test
Args: imgs (List[Tensor]): the outer list indicates test-time augmentations and inner Tensor should have a shape
mmdetection-2.11.0/mmdet/models/detectors/base.py:125
↓ 1 callers
Method
forward_test
(self, feat, out_enc, img_metas)
mmocr/models/textrecog/decoders/master_decoder.py:191
↓ 1 callers
Method
forward_test
Args: imgs (tensor | list[tensor]): Tensor should have shape NxCxHxW, which contains all images in the batch.
mmocr/models/textrecog/recognizer/base.py:69
↓ 1 callers
Method
forward_train
Args: img (list[Tensor]): List of tensors of shape (1, C, H, W). Typically these should be mean centered and std
mmdetection-2.11.0/mmdet/models/detectors/base.py:65
↓ 1 callers
Method
forward_train
(self, feat, out_enc, targets_dict, img_metas)
mmocr/models/textrecog/decoders/crnn_decoder.py:34
↓ 1 callers
Method
forward_train
(self, feat, out_enc, targets_dict, img_metas=None)
mmocr/models/textrecog/decoders/sar_decoder.py:356
↓ 1 callers
Method
forward_train
(self, feat, out_enc, targets_dict, img_metas=None)
mmocr/models/textrecog/decoders/master_decoder.py:177
↓ 1 callers
Method
forward_train
Args: img (tensor): tensors with shape (N, C, H, W). Typically should be mean centered and std scaled.
mmocr/models/textrecog/recognizer/base.py:29
↓ 1 callers
Method
forward_train
Args: img (tensor): Input images of shape (N, C, H, W). Typically these should be mean centered and std scaled.
mmocr/models/textrecog/recognizer/encode_decode_recognizer.py:84
↓ 1 callers
Method
forward_train
Args: img (tensor): Input images of shape (N, C, H, W). Typically these should be mean centered and std scaled.
mmocr/models/textrecog/recognizer/seg_recognizer.py:76
↓ 1 callers
Function
fourier2poly
Inverse Fourier transform Args: fourier_coeff (ndarray): Fourier coefficients shaped (n, 2k+1), with n and k bein
mmocr/models/textdet/postprocess/wrapper.py:490
↓ 1 callers
Method
fuse
(self, fuse_dict)
mmdetection-2.11.0/mmdet/models/necks/fpg.py:315
↓ 1 callers
Method
ga_loc_targets
Compute location targets for guided anchoring. Each feature map is divided into positive, negative and ignore regions. - positive reg
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:376
↓ 1 callers
Method
ga_shape_targets
Compute guided anchoring targets. Args: approx_list (list[list]): Multi level approxs of each image. inside_flag_list
mmdetection-2.11.0/mmdet/models/dense_heads/guided_anchor_head.py:541
↓ 1 callers
Function
gaussian2D
Generate 2D gaussian kernel. Args: radius (int): Radius of gaussian kernel. sigma (int): Sigma of gaussian function. Default: 1.
mmdetection-2.11.0/mmdet/models/utils/gaussian_target.py:6
↓ 1 callers
Function
gaussian_focal_loss
`Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian distribution. Args: pred (torch.Tensor): The prediction.
mmdetection-2.11.0/mmdet/models/losses/gaussian_focal_loss.py:10
↓ 1 callers
Function
gaussian_radius
r"""Generate 2D gaussian radius. This function is modified from the `official github repo <https://github.com/princeton-vl/CornerNet-Lite/blo
mmdetection-2.11.0/mmdet/models/utils/gaussian_target.py:66
↓ 1 callers
Method
gen_base_anchors
Generate base anchors. Returns: list(torch.Tensor): Base anchors of a feature grid in multiple \ feature levels.
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:435
↓ 1 callers
Method
gen_base_anchors
Generate base anchors. Returns: list(torch.Tensor): Base anchors of a feature grid in multiple \ feature levels.
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:622
↓ 1 callers
Function
gen_line_dict_file
(out_path, imgid2imgname, imgid2anno, img_size=False)
tools/data/textrecog/seg_synthtext_converter.py:49
↓ 1 callers
Function
gen_line_dict_file
(out_path, imgid2imgname, imgid2anno)
tools/data/textdet/coco_to_line_dict.py:34
↓ 1 callers
Function
gen_packages_items
()
setup.py:83
↓ 1 callers
Function
gen_packages_items
()
mmdetection-2.11.0/setup.py:110
↓ 1 callers
Method
gen_single_level_base_anchors
Generate base anchors of a single level. Args: base_sizes_per_level (list[tuple[int, int]]): Basic sizes of ancho
mmdetection-2.11.0/mmdet/core/anchor/anchor_generator.py:639
↓ 1 callers
Function
generat_buckets
Generate buckets w.r.t bucket number and scale factor of proposals. Args: proposals (Tensor): Shape (n, 4) num_buckets (int): Num
mmdetection-2.11.0/mmdet/core/bbox/coder/bucketing_bbox_coder.py:95
↓ 1 callers
Method
generate_center_mask_attrib_maps
Generate text center region masks and geometric attribute maps. Args: img_size (tuple): The image size (height, width).
mmocr/datasets/pipelines/textdet_targets/drrg_targets.py:157
↓ 1 callers
Method
generate_center_region_mask
Generate text center region mask. Args: img_size (tuple): The image size of (height, width). text_polys (list[list[nd
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:46
↓ 1 callers
Method
generate_comp_attribs
Generate text component attributes. Args: center_lines (list[ndarray]): The list of text center lines . text_mask (nd
mmocr/datasets/pipelines/textdet_targets/drrg_targets.py:367
↓ 1 callers
Method
generate_fourier_maps
Generate Fourier coefficient maps. Args: img_size (tuple): The image size of (height, width). text_polys (list[list[n
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:221
↓ 1 callers
Method
generate_gcn_input
Generate graph convolution network input data. Args: node_feat_batch (List[Tensor]): The batched graph node features.
mmocr/models/textdet/modules/local_graph.py:114
↓ 1 callers
Function
generate_inputs_and_wrap_model
Prepare sample input and wrap model for ONNX export. The ONNX export API only accept args, and all inputs should be torch.Tensor or correspon
mmdetection-2.11.0/mmdet/core/export/pytorch2onnx.py:9
↓ 1 callers
Method
generate_level_targets
Generate ground truth target on each level. Args: img_size (list[int]): Shape of input image. text_polys (list[list[n
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:265
↓ 1 callers
Method
generate_local_graphs
Generate local graphs and graph convolution network input data. Args: sorted_dist_inds (ndarray): The node indices sorted accordi
mmocr/models/textdet/modules/proposal_local_graph.py:237
↓ 1 callers
Method
generate_local_graphs
Generate local graphs for GCN to predict which instance a text component belongs to. Args: sorted_dist_inds (ndarray): Th
mmocr/models/textdet/modules/local_graph.py:46
↓ 1 callers
Method
generate_mask
(gt_mask, type)
mmocr/datasets/pipelines/transforms.py:110
↓ 1 callers
Method
generate_regnet
Generates per block width from RegNet parameters. Args: initial_width ([int]): Initial width of the backbone width_sl
mmdetection-2.11.0/mmdet/models/backbones/regnet.py:221
↓ 1 callers
Method
generate_targets
(self, results)
mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py:163
↓ 1 callers
Method
generate_targets
Generate the ground truth targets for FCENet. Args: results (dict): The input result dictionary. Returns: re
mmocr/datasets/pipelines/textdet_targets/fcenet_targets.py:331
↓ 1 callers
Method
generate_targets
Generate the gt targets for DBNet. Args: results (dict): The input result dictionary. Returns: results (dict
mmocr/datasets/pipelines/textdet_targets/dbnet_targets.py:191
↓ 1 callers
Function
get_GiB
return x GiB.
mmdetection-2.11.0/tools/deployment/onnx2tensorrt.py:17
↓ 1 callers
Method
get_atss_targets
A wrapper for computing ATSS targets for points in multiple images. Args: cls_scores (list[Tensor]): Box iou-aware scores for eac
mmdetection-2.11.0/mmdet/models/dense_heads/vfnet_head.py:690
↓ 1 callers
Function
get_bbox_nums_by_text
(text)
mmocr/datasets/utils/parser.py:130
↓ 1 callers
Method
get_bboxes
Transform network output for a batch into bbox predictions.
mmdetection-2.11.0/mmdet/models/dense_heads/base_dense_head.py:18
↓ 1 callers
Method
get_bboxes_single
(self, cls_scores, bbox_cls_preds,
mmdetection-2.11.0/mmdet/models/dense_heads/sabl_retina_head.py:557
↓ 1 callers
Method
get_boundary
Compute text boundaries via post processing. Args: edges (ndarray): The edge array of shape N * 2, each row is a pair
mmocr/models/textdet/dense_heads/drrg_head.py:185
↓ 1 callers
Method
get_classes
Get class names of current dataset. Args: classes (Sequence[str] | str | None): If classes is None, use default C
mmdetection-2.11.0/mmdet/datasets/custom.py:237
↓ 1 callers
Function
get_cls_results
Get det results and gt information of a certain class. Args: det_results (list[list]): Same as `eval_map()`. annotations (list[di
mmdetection-2.11.0/mmdet/core/evaluation/mean_ap.py:240
↓ 1 callers
Function
get_coco_style_results
(filename, task='bbox', metric=None,
mmdetection-2.11.0/tools/analysis_tools/robustness_eval.py:34
↓ 1 callers
Function
get_contours
Get the contours and words for each ground_truth file. Args: gt_path(str): The relative path of the ground_truth mat file split(s
tools/data/textdet/totaltext_converter.py:90
↓ 1 callers
Function
get_distortions_from_results
(eval_output)
mmdetection-2.11.0/tools/analysis_tools/robustness_eval.py:190
↓ 1 callers
Method
get_fcos_targets
Compute FCOS regression and classification targets for points in multiple images. Args: points (list[Tensor]): Points of
mmdetection-2.11.0/mmdet/models/dense_heads/vfnet_head.py:664
↓ 1 callers
Function
get_gt_area_group_numbers
(cocoEval)
mmdetection-2.11.0/tools/analysis_tools/coco_error_analysis.py:107
← previous
next →
801–900 of 2,851, ranked by callers