Repository Analysis

PaddlePaddle/PaddleOCR

Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between images/PDFs and LLMs. Supports 100+ languages.

6.8 Low AI signal View on GitHub
6.8
Adjusted Score
6.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
78,997
Stars
Python
Language
426,767
Lines of Code
1819
Files
2524
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 5HIGH 71MEDIUM 41LOW 2407

Pattern Findings

2524 matches across 15 categories. Click a row to expand file-level details.

Unused Imports1290 hits · 1212 pts
SeverityFileLineSnippet
LOWbenchmark/analysis.py15
LOWbenchmark/PaddleOCR_DBNet/post_processing/__init__.py5
LOWbenchmark/PaddleOCR_DBNet/tools/export_model.py8
LOWbenchmark/PaddleOCR_DBNet/tools/infer.py24
LOWbenchmark/PaddleOCR_DBNet/tools/infer.py27
LOWbenchmark/PaddleOCR_DBNet/utils/compute_mean_std.py7
LOWbenchmark/PaddleOCR_DBNet/utils/util.py8
LOWbenchmark/PaddleOCR_DBNet/utils/__init__.py4
LOWbenchmark/PaddleOCR_DBNet/utils/__init__.py5
LOWbenchmark/PaddleOCR_DBNet/utils/__init__.py6
LOWbenchmark/PaddleOCR_DBNet/utils/__init__.py7
LOWbenchmark/PaddleOCR_DBNet/utils/__init__.py8
LOWbenchmark/PaddleOCR_DBNet/utils/cal_recall/__init__.py4
LOWbenchmark/PaddleOCR_DBNet/utils/ocr_metric/__init__.py4
LOW…PaddleOCR_DBNet/utils/ocr_metric/icdar2015/__init__.py5
LOW…DBNet/utils/ocr_metric/icdar2015/detection/mtwi2018.py4
LOW…BNet/utils/ocr_metric/icdar2015/detection/icdar2013.py3
LOW…BNet/utils/ocr_metric/icdar2015/detection/icdar2013.py4
LOW…_DBNet/utils/ocr_metric/icdar2015/detection/deteval.py3
LOW…_DBNet/utils/ocr_metric/icdar2015/detection/deteval.py4
LOWbenchmark/PaddleOCR_DBNet/models/__init__.py5
LOWbenchmark/PaddleOCR_DBNet/models/__init__.py6
LOWbenchmark/PaddleOCR_DBNet/models/losses/__init__.py5
LOWbenchmark/PaddleOCR_DBNet/models/head/__init__.py4
LOWbenchmark/PaddleOCR_DBNet/models/neck/__init__.py4
LOWbenchmark/PaddleOCR_DBNet/models/backbone/__init__.py5
LOWbenchmark/PaddleOCR_DBNet/models/backbone/resnet.py1
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py4
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py5
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py6
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py6
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py7
LOW…chmark/PaddleOCR_DBNet/data_loader/modules/__init__.py8
LOWbenchmark/PaddleOCR_DBNet/base/base_dataset.py6
LOWbenchmark/PaddleOCR_DBNet/base/base_trainer.py7
LOWbenchmark/PaddleOCR_DBNet/base/__init__.py1
LOWbenchmark/PaddleOCR_DBNet/base/__init__.py2
LOWbenchmark/PaddleOCR_DBNet/trainer/__init__.py4
LOWtools/export_model.py22
LOWtools/infer_kie_token_ser_re.py15
LOWtools/infer_kie_token_ser_re.py16
LOWtools/infer_kie_token_ser_re.py17
LOWtools/infer_kie_token_ser_re.py34
LOWtools/infer_kie_token_ser_re.py34
LOWtools/infer_kie_token_ser_re.py40
LOWtools/infer_sr.py15
LOWtools/infer_sr.py16
LOWtools/infer_sr.py17
LOWtools/infer_sr.py23
LOWtools/export_center.py15
LOWtools/export_center.py16
LOWtools/export_center.py17
LOWtools/export_center.py31
LOWtools/infer_det.py15
LOWtools/infer_det.py16
LOWtools/infer_det.py17
LOWtools/infer_table.py15
LOWtools/infer_table.py16
LOWtools/infer_table.py17
LOWtools/infer_table.py32
1230 more matches not shown…
Over-Commented Block490 hits · 490 pts
SeverityFileLineSnippet
LOWmkdocs.yml221 # Home: トップページ
LOWsetup.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWbenchmark/analysis.py1# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
LOWbenchmark/PaddleOCR_DBNet/tools/__init__.py1# -*- coding: utf-8 -*-
LOWbenchmark/PaddleOCR_DBNet/tools/infer.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWbenchmark/PaddleOCR_DBNet/utils/profiler.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
LOWbenchmark/PaddleOCR_DBNet/trainer/__init__.py1# -*- coding: utf-8 -*-
LOWtools/export_model.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_kie_token_ser_re.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_sr.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/export_center.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_det.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_table.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_cls.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/__init__.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_kie.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_kie_token_ser.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/test_hubserving.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/naive_sync_bn.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_e2e.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer_rec.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/train.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/program.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWtools/eval.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/end2end/draw_html.py1# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
LOWtools/end2end/eval_end2end.py1# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
LOWtools/end2end/convert_ppocr_label.py1# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_sr.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/utility.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_rec.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_e2e.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_cls.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_system.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWtools/infer/predict_det.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/__init__.py1# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/det_metric.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/cls_metric.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/vqa_token_ser_metric.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/kie_metric.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/bleu.py1# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/__init__.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/sr_metric.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/rec_metric.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/e2e_metric.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/ct_metric.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/metrics/distillation_metric.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/table_metric.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/metrics/vqa_token_re_metric.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWppocr/losses/rec_parseq_loss.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_vl_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/basic_loss.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_satrn_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/e2e_pg_loss.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_ctc_loss.py1# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_pren_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_multi_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/distillation_loss.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_rfl_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/det_fce_loss.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
LOWppocr/losses/rec_srn_loss.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
430 more matches not shown…
Hyper-Verbose Identifiers294 hits · 310 pts
SeverityFileLineSnippet
LOWbenchmark/PaddleOCR_DBNet/utils/util.py161def order_points_clockwise_list(pts):
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py321def validate_point_inside_bounds(x, y, imWidth, imHeight):
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py334def validate_clockwise_points(points):
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py362def get_tl_line_values_from_file_contents(
LOWbenchmark/PaddleOCR_DBNet/utils/cal_recall/script.py9def default_evaluation_params():
LOWbenchmark/PaddleOCR_DBNet/utils/cal_recall/script.py117 def get_intersection_over_union(pD, pG):
LOW…DBNet/utils/ocr_metric/icdar2015/detection/mtwi2018.py24 def get_intersection_over_union(pD, pG):
LOW…BNet/utils/ocr_metric/icdar2015/detection/icdar2013.py30 def get_intersection_over_union(pD, pG):
LOW…eOCR_DBNet/utils/ocr_metric/icdar2015/detection/iou.py43 def get_intersection_over_union(pD, pG):
LOW…_DBNet/utils/ocr_metric/icdar2015/detection/deteval.py30 def get_intersection_over_union(pD, pG):
LOW…addleOCR_DBNet/data_loader/modules/random_crop_data.py105 def region_wise_random_select(self, regions, max_size):
LOWtools/naive_sync_bn.py36def differentiable_all_reduce(input):
LOWtools/infer/predict_rec.py427 def resize_norm_img_cppd_padding(
LOWtools/infer/predict_e2e.py98 def filter_tag_det_res_only_clip(self, dt_boxes, image_shape):
LOWtools/infer/predict_det.py223 def filter_tag_det_res_only_clip(self, dt_boxes, image_shape):
LOWppocr/metrics/eval_det_iou.py22 def get_intersection_over_union(pD, pG):
LOWppocr/metrics/table_metric.py99 def prepare_bbox_metric_input(self, pred_label):
LOWppocr/utils/export_model.py33def represent_dictionary_order(self, dict_data):
LOWppocr/utils/network.py33def download_with_progressbar(url, save_path):
LOWppocr/utils/e2e_metric/polygon_fast.py35def approx_area_of_intersection(det_x, det_y, gt_x, gt_y):
LOWppocr/utils/e2e_utils/extract_textpoint_fast.py92def instance_ctc_greedy_decoder(
LOWppocr/utils/e2e_utils/extract_textpoint_fast.py209def sort_and_expand_with_direction(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_fast.py470def sort_by_direction_with_image_id_deprecated(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_fast.py485def sort_by_direction_with_image_id(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py157def instance_ctc_greedy_decoder(gather_info, logits_map, keep_blank_in_idxs=True):
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py236def sort_and_expand_with_direction(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py345def generate_pivot_list_curved(
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py409def generate_pivot_list_horizontal(
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py533def sort_by_direction_with_image_id_deprecated(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py548def sort_by_direction_with_image_id(pos_list, f_direction):
LOWppocr/utils/e2e_utils/extract_textpoint_slow.py589def generate_pivot_list_tt_inference(
LOWppocr/utils/e2e_utils/visual.py73def resize_image_for_totaltext(im, max_side_len=512):
LOWppocr/modeling/heads/rec_satrn_head.py138 def _get_sinusoid_encoding_table(self, n_position, d_hid):
LOWppocr/modeling/heads/rec_satrn_head.py338 def _get_sinusoid_encoding_table(self, n_position, d_hid):
LOWppocr/modeling/heads/local_graph.py29def normalize_adjacent_matrix(A):
LOWppocr/modeling/heads/local_graph.py43def euclidean_distance_matrix(A, B):
LOWppocr/modeling/heads/proposal_local_graph.py162 def propose_comps_and_attribs(
LOWppocr/modeling/heads/rec_visionlan_head.py38 def _get_sinusoid_encoding_table(self, n_position, d_hid):
LOWppocr/modeling/heads/rec_nrtr_head.py200 def get_inst_idx_to_tensor_position_map(inst_idx_list):
LOWppocr/modeling/heads/rec_nrtr_head.py271 def collect_active_inst_idx_list(
LOWppocr/modeling/heads/rec_nrtr_head.py293 def collect_hypothesis_and_scores(inst_dec_beams, n_best):
LOWppocr/modeling/heads/rec_nrtr_head.py352 def generate_square_subsequent_mask(self, sz):
LOWppocr/modeling/heads/rec_nrtr_head.py683 def get_the_best_score_and_idx(self):
LOWppocr/modeling/heads/rec_unimernet_head.py878 def prepare_inputs_for_generation(
LOWppocr/modeling/heads/rec_unimernet_head.py1253def _scaled_dot_product_attention(
LOWppocr/modeling/heads/rec_unimernet_head.py1321def multi_head_attention_forward(
LOWppocr/modeling/heads/rec_unimernet_head.py2137 def _get_decoder_start_token_id(
LOWppocr/modeling/heads/rec_unimernet_head.py2158 def _prepare_decoder_input_ids_for_generation(
LOWppocr/modeling/heads/rec_unimernet_head.py2227 def prepare_inputs_for_generation_mbart(
LOWppocr/modeling/heads/rec_unimernet_head.py2255 def prepare_inputs_for_generation(
LOWppocr/modeling/heads/rec_unimernet_head.py2282 def prepare_inputs_for_generation_export(
LOWppocr/modeling/heads/rec_unimernet_head.py2297 def _extract_past_from_model_output(
LOWppocr/modeling/heads/rec_unimernet_head.py2310 def _update_model_kwargs_for_generation(
LOWppocr/modeling/heads/rec_ppformulanet_head.py123 def _make_causal_mask_parallel(
LOWppocr/modeling/heads/rec_ppformulanet_head.py809 def prepare_inputs_for_generation(
LOWppocr/modeling/heads/rec_ppformulanet_head.py835 def _extract_past_from_model_output(
LOWppocr/modeling/heads/rec_ppformulanet_head.py847 def _update_model_kwargs_for_generation(
LOWppocr/modeling/heads/rec_ppformulanet_head.py906 def stopping_criteria_parallel(self, input_ids):
LOWppocr/modeling/heads/rec_ppformulanet_head.py968 def _prepare_decoder_input_ids_for_generation(
LOWppocr/modeling/transforms/tps_spatial_transformer.py77def build_output_control_points(num_control_points, margins):
234 more matches not shown…
Cross-File Repetition54 hits · 270 pts
SeverityFileLineSnippet
HIGHbenchmark/PaddleOCR_DBNet/utils/util.py0recursively visualize a dict and indenting acrrording by the relationship of keys.
HIGHppocr/utils/utility.py0recursively visualize a dict and indenting acrrording by the relationship of keys.
HIGHtest_tipc/supplementary/utils.py0recursively visualize a dict and indenting acrrording by the relationship of keys.
HIGH…PaddleOCR_DBNet/data_loader/modules/make_shrink_map.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…PaddleOCR_DBNet/data_loader/modules/make_border_map.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…nchmark/PaddleOCR_DBNet/data_loader/modules/augment.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…nchmark/PaddleOCR_DBNet/data_loader/modules/augment.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…nchmark/PaddleOCR_DBNet/data_loader/modules/augment.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…nchmark/PaddleOCR_DBNet/data_loader/modules/augment.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…nchmark/PaddleOCR_DBNet/data_loader/modules/augment.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGH…addleOCR_DBNet/data_loader/modules/random_crop_data.py0从scales中随机选择一个尺度,对图片和文本框进行缩放 :param data: {'img':,'text_polys':,'texts':,'ignore_tags':} :return:
HIGHtools/program.py0merge config into global config. args: config (dict): config to be merged. returns: global config
HIGH…/rec/multi_language/generate_multi_language_configs.py0merge config into global config. args: config (dict): config to be merged. returns: global config
HIGHtest_tipc/supplementary/config.py0merge config into global config. args: config (dict): config to be merged. returns: global config
HIGHppocr/losses/det_pse_loss.py0this code is refer from: https://github.com/whai362/psenet/blob/python3/models/head/psenet_head.py
HIGHppocr/modeling/heads/det_pse_head.py0this code is refer from: https://github.com/whai362/psenet/blob/python3/models/head/psenet_head.py
HIGHppocr/postprocess/pse_postprocess/pse_postprocess.py0this code is refer from: https://github.com/whai362/psenet/blob/python3/models/head/psenet_head.py
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0f_direction: h x w x 2 pos_list: [[y, x], [y, x], [y, x] ...]
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0transfer vertical point_pairs into poly point in clockwise.
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0transfer vertical point_pairs into poly point in clockwise.
HIGHppocr/utils/e2e_utils/visual.py0transfer vertical point_pairs into poly point in clockwise.
HIGHppocr/postprocess/sast_postprocess.py0transfer vertical point_pairs into poly point in clockwise.
HIGHppocr/utils/e2e_utils/extract_textpoint_fast.py0return center point and end point of tcl instance; filter with the char maps;
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0return center point and end point of tcl instance; filter with the char maps;
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0return center point and end point of tcl instance; filter with the char maps;
HIGHppocr/utils/e2e_utils/extract_textpoint_slow.py0return center point and end point of tcl instance; filter with the char maps;
HIGHppocr/modeling/heads/sr_rensnet_transformer.py0generate a square mask for the sequence. the masked positions are filled with float('-inf'). unmasked positions are fill
HIGHppocr/modeling/heads/rec_abinet_head.py0generate a square mask for the sequence. the masked positions are filled with float('-inf'). unmasked positions are fill
HIGHppocr/modeling/heads/rec_nrtr_head.py0generate a square mask for the sequence. the masked positions are filled with float('-inf'). unmasked positions are fill
HIGHppocr/modeling/backbones/rec_resnetv2.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_svtrv2.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_vit.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_vit_parseq.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_svtrnet.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_donut_swin.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks).
HIGHppocr/modeling/backbones/rec_svtrv2.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks). the original name is misleading
HIGHppocr/modeling/backbones/rec_vit.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks). the original name is misleading
HIGHppocr/modeling/backbones/rec_vit_parseq.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks). the original name is misleading
HIGHppocr/modeling/backbones/rec_svtrnet.py0drop paths (stochastic depth) per sample (when applied in main path of residual blocks). the original name is misleading
HIGHppocr/data/imaug/east_process.py0check so that the text poly is in the same direction, and also filter some invalid polygons :param polys: :param tags: :
HIGHppocr/data/imaug/sast_process.py0check so that the text poly is in the same direction, and also filter some invalid polygons :param polys: :param tags: :
HIGHppocr/data/imaug/pg_process.py0check so that the text poly is in the same direction, and also filter some invalid polygons :param polys: :param tags: :
HIGHdeploy/hubserving/structure_system/module.py0get the chinese texts in the predicted images. args: images (list(numpy.ndarray)): images data, shape of each is [h, w,
HIGHdeploy/hubserving/kie_ser_re/module.py0get the chinese texts in the predicted images. args: images (list(numpy.ndarray)): images data, shape of each is [h, w,
HIGHdeploy/hubserving/ocr_system/module.py0get the chinese texts in the predicted images. args: images (list(numpy.ndarray)): images data, shape of each is [h, w,
HIGHdeploy/hubserving/kie_ser/module.py0get the chinese texts in the predicted images. args: images (list(numpy.ndarray)): images data, shape of each is [h, w,
HIGHdeploy/hubserving/structure_table/module.py0get the chinese texts in the predicted images. args: images (list(numpy.ndarray)): images data, shape of each is [h, w,
Deep Nesting226 hits · 218 pts
SeverityFileLineSnippet
LOWoverrides/hooks/expiry.py5
LOWoverrides/hooks/expiry.py8
LOWbenchmark/analysis.py110
LOWbenchmark/analysis.py159
LOWbenchmark/analysis.py192
LOWbenchmark/PaddleOCR_DBNet/utils/util.py23
LOWbenchmark/PaddleOCR_DBNet/utils/util.py170
LOWbenchmark/PaddleOCR_DBNet/utils/util.py251
LOWbenchmark/PaddleOCR_DBNet/utils/util.py339
LOWbenchmark/PaddleOCR_DBNet/utils/profiler.py59
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py25
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py54
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py86
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py175
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py403
LOWbenchmark/PaddleOCR_DBNet/utils/cal_recall/script.py60
LOW…dleOCR_DBNet/utils/ocr_metric/icdar2015/quad_metric.py31
LOW…DBNet/utils/ocr_metric/icdar2015/detection/mtwi2018.py20
LOW…BNet/utils/ocr_metric/icdar2015/detection/icdar2013.py26
LOW…eOCR_DBNet/utils/ocr_metric/icdar2015/detection/iou.py39
LOW…_DBNet/utils/ocr_metric/icdar2015/detection/deteval.py26
LOWbenchmark/PaddleOCR_DBNet/models/backbone/resnet.py167
LOWbenchmark/PaddleOCR_DBNet/data_loader/__init__.py48
LOWbenchmark/PaddleOCR_DBNet/data_loader/dataset.py43
LOWbenchmark/PaddleOCR_DBNet/data_loader/dataset.py86
LOWbenchmark/PaddleOCR_DBNet/base/base_dataset.py61
LOWbenchmark/PaddleOCR_DBNet/trainer/trainer.py147
LOWtools/infer_sr.py43
LOWtools/infer_det.py57
LOWtools/infer_cls.py40
LOWtools/infer_kie.py126
LOWtools/test_hubserving.py75
LOWtools/test_hubserving.py100
LOWtools/infer_e2e.py102
LOWtools/check_docs_github_links.py23
LOWtools/infer_rec.py41
LOWtools/train.py46
LOWtools/program.py88
LOWtools/program.py118
LOWtools/program.py180
LOWtools/program.py200
LOWtools/program.py661
LOWtools/program.py773
LOWtools/program.py825
LOWtools/eval.py35
LOWtools/end2end/eval_end2end.py70
LOWtools/end2end/convert_ppocr_label.py27
LOWtools/infer/utility.py177
LOWtools/infer/utility.py520
LOWtools/infer/utility.py1006
LOWtools/infer/predict_rec.py40
LOWtools/infer/predict_rec.py580
LOWtools/infer/predict_system.py185
LOWtools/infer/predict_det.py37
LOWtools/infer/predict_det.py241
LOWtools/infer/predict_det.py307
LOWppocr/metrics/eval_det_iou.py18
LOWppocr/metrics/e2e_metric.py41
LOWppocr/metrics/vqa_token_re_metric.py79
LOWppocr/losses/rec_multi_loss.py41
166 more matches not shown…
Excessive Try-Catch Wrapping109 hits · 122 pts
SeverityFileLineSnippet
LOWoverrides/hooks/expiry.py24 except Exception:
LOWbenchmark/analysis.py146 except Exception as exc:
LOWbenchmark/analysis.py350 except Exception:
LOWbenchmark/PaddleOCR_DBNet/tools/infer.py127 except Exception as E:
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py153 except Exception as e:
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py431 except Exception as e:
LOW…ddleOCR_DBNet/utils/cal_recall/rrc_evaluation_funcs.py492 except Exception as e:
LOWtools/train.py263 except Exception as e:
LOWtools/program.py176 except Exception as e:
LOWtools/infer/predict_sr.py164 except Exception as E:
LOWtools/infer/utility.py346 except Exception as E:
LOWtools/infer/predict_rec.py900 except Exception as E:
LOWtools/infer/predict_cls.py156 except Exception as E:
LOWppocr/utils/network.py71 except Exception as e: # requests.exceptions.ConnectionError
LOWppocr/data/latexocr_dataset.py147 except Exception as E:
LOWppocr/data/pgnet_dataset.py95 except Exception as e:
LOWppocr/data/imaug/ct_process.py97 except Exception as e:
LOWdeploy/hubserving/ocr_cls/module.py135 except Exception as e:
LOWdeploy/hubserving/ocr_rec/module.py135 except Exception as e:
LOWdeploy/paddleocr_vl_docker/hps/gateway/app.py153 except Exception:
LOWdeploy/paddleocr_vl_docker/hps/gateway/app.py211 except Exception as e:
LOWdeploy/paddleocr_vl_docker/hps/gateway/app.py290 except Exception:
LOWpaddleocr/_cli.py203 except Exception as e:
MEDIUMpaddleocr/_cli.py111def _install_genai_server_deps(args):
LOWpaddleocr/_api_client/cli.py221 except Exception as e:
MEDIUMpaddleocr/_api_client/cli.py222 print(f"Error: {e}", file=sys.stderr)
LOWpaddleocr/_api_client/cli.py314 except Exception as e:
MEDIUMpaddleocr/_api_client/cli.py315 print(f"Error: {e}", file=sys.stderr)
LOWpaddleocr/_api_client/async_client.py136 except Exception as e:
LOWpaddleocr/_api_client/async_client.py451 except Exception:
LOWpaddleocr/_api_client/async_client.py458 except Exception as e:
MEDIUMpaddleocr/_api_client/async_client.py455def _response_data(self, resp) -> dict:
LOWpaddleocr/_doc2md/core.py55 except Exception as e:
LOWpaddleocr/_doc2md/converters/docx.py106 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py111 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py120 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py128 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1539 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1551 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1561 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1566 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1575 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1580 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1583 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py70 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py75 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py88 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py93 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py187 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py210 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py442 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py558 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py896 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py994 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1135 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1169 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1218 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1234 except Exception:
LOWpaddleocr/_doc2md/converters/docx.py1526 except Exception:
LOWpaddleocr/_doc2md/converters/xlsx.py71 except Exception:
49 more matches not shown…
Hallucination Indicators5 hits · 75 pts
SeverityFileLineSnippet
CRITICALppocr/optimizer/optimizer.py89 mlm = model._layers.head.MLM_VRM.MLM.parameters()
CRITICALppocr/optimizer/optimizer.py91 model._layers.head.MLM_VRM.Prediction.pp_share.parameters()
CRITICALppocr/optimizer/optimizer.py94 model._layers.head.MLM_VRM.Prediction.w_share.parameters()
CRITICALppocr/optimizer/optimizer.py98 pre_mlm_pp = model.head.MLM_VRM.Prediction.pp_share.parameters()
CRITICALppocr/optimizer/optimizer.py99 pre_mlm_w = model.head.MLM_VRM.Prediction.w_share.parameters()
Magic Placeholder Names12 hits · 75 pts
SeverityFileLineSnippet
HIGHdocs/version3.x/pipeline_usage/PP-DocTranslation.en.md696paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --qianfan_api_key your_api_key
HIGHdocs/version3.x/pipeline_usage/PP-DocTranslation.en.md705paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --qianfan_api_key your_api_key \
HIGHdocs/version3.x/pipeline_usage/PP-DocTranslation.md693paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --qianfan_api_key your_api_key
HIGHdocs/version3.x/pipeline_usage/PP-DocTranslation.md702paddleocr pp_doctranslation -i vehicle_certificate-1.png --target_language en --qianfan_api_key your_api_key \
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.en.md985paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.en.md988paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key --invoke_mllm True --p
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.en.md997paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key \
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.md874paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.md877paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key --invoke_mllm True --p
HIGHdocs/version3.x/pipeline_usage/PP-ChatOCRv4.md886paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key \
HIGHdocs/version3.x/integrations/mcp_server.md287 "PADDLEOCR_MCP_QIANFAN_API_KEY": "<your-api-key>"
HIGHdocs/version3.x/integrations/mcp_server.en.md294 "PADDLEOCR_MCP_QIANFAN_API_KEY": "<your-api-key>"
Decorative Section Separators20 hits · 72 pts
SeverityFileLineSnippet
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py19# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py21# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py30# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py32# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py118# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py120# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py147# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py149# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py231# =============================================================================
MEDIUMskills/paddleocr-text-recognition/scripts/lib.py233# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py19# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py21# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py30# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py32# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py119# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py121# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py149# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py151# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py235# =============================================================================
MEDIUMskills/paddleocr-doc-parsing/scripts/lib.py237# =============================================================================
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippet
HIGHppocr/modeling/backbones/rec_pphgnetv2.py569use 'handle_func' to modify the sub-layer(s) specified by 'layer_name_pattern'. Args: layer_name_pa
HIGHpaddleocr/_doc2md/core.py30 Convert an office document to Markdown. Args: source: Path to the source file. output: Optiona
HIGHskills/paddleocr-text-recognition/scripts/lib.py155 Make PaddleOCR API request. Args: api_url: API endpoint URL token: Access token params
HIGHskills/paddleocr-doc-parsing/scripts/lib.py157 Make PaddleOCR document parsing API request. Args: api_url: API endpoint URL token: Access tok
HIGHppstructure/recovery/table_process.py72Remove white space from a string. Args: string(str): The string to remove white space from. leading(
Slop Phrases5 hits · 12 pts
SeverityFileLineSnippet
MEDIUMppocr/modeling/architectures/base_model.py40 # if you make model differently, you can use transform in det and cls
LOWppocr/data/imaug/ct_process.py226 # make sure to crop the text region
LOWppocr/data/imaug/random_crop_data.py207 # make sure to crop the text region
MEDIUM…/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_enhanced_ctc_loss.yml66 # you can also try to add ace loss on your own dataset
MEDIUMconfigs/kie/vi_layoutxlm/ser_vi_layoutxlm_xfund_zh.yml17 # you can use the following config
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMppocr/modeling/heads/rec_aster_head.py238 # Initialize return variables given different types
MEDIUMtests/test_iaa_augment.py27 # Create a 100x100 pixel dummy image with 3 color channels (RGB)
MEDIUMtests/test_french_accents.py81 # Create a mock selection array (all characters are valid)
MEDIUMlangchain-paddleocr/scripts/lint_imports.sh5# Initialize a variable to keep track of errors
AI Slop Vocabulary3 hits · 8 pts
SeverityFileLineSnippet
MEDIUMppocr/modeling/heads/rec_ppformulanet_head.py976 # 1. Check whether the user has defined `decoder_input_ids` manually. To facilitate in terms of input naming,
MEDIUMppocr/postprocess/rec_postprocess.py118 ): # grouping word with '-', such as 'state-of-the-art'
MEDIUMppocr/data/imaug/abinet_aug.py253 # TODO: more robust way to crop image
Redundant / Tautological Comments4 hits · 7 pts
SeverityFileLineSnippet
LOWdeploy/paddleocr_vl_docker/hps/gateway/app.py178 # Check if required models are ready
LOWpaddleocr/_pipelines/pp_chatocrv4_doc.py743 # Print the result to stdout
LOWpaddleocr/_doc2md/converters/docx.py1548 # Check if the document uses different odd/even page headers/footers
LOWtests/test_french_accents.py104 # Check if words match
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippet
LOWbenchmark/PaddleOCR_DBNet/test_tipc/benchmark_train.sh5# Usage:
LOWtest_tipc/compare_results.py112 # Usage:
LOWtest_tipc/benchmark_train.sh5# Usage: