Repository Analysis

RapidAI/RapidOCR

📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

13.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of RapidAI/RapidOCR, a Python project with 7,150 GitHub stars. SynthScan v2.0 examined 21,947 lines of code across 128 source files, recording 238 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 13.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

13.1
Adjusted Score
13.1
Raw Score
100%
Time Factor
2026-07-09
Last Push
7.2K
Stars
Python
Language
21.9K
Lines of Code
128
Files
238
Pattern Hits
2026-07-14
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 3MEDIUM 10LOW 225

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 238 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers57 hits · 59 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_prepare_wheel_assets.py65def test_select_model_info_supports_default_model_specs(CODE
LOWpython/tests/test_input.py135def test_invalid_init_parameters(params):CODE
LOWpython/tests/test_input.py142def test_nested_init_parameters():CODE
LOWpython/tests/test_input.py149def test_input_three_ndim_two_channel(engine):CODE
LOWpython/tests/test_input.py159def test_input_three_ndim_one_channel(engine):CODE
LOWpython/tests/test_engine_config.py50def test_onnxruntime_provider_config_uses_cpu_by_default(monkeypatch):CODE
LOWpython/tests/test_engine_config.py61def test_onnxruntime_provider_config_prefers_cuda_when_available(monkeypatch):CODE
LOWpython/tests/test_engine_config.py76def test_onnxruntime_provider_config_falls_back_when_cuda_unavailable(monkeypatch):CODE
LOWpython/tests/test_engine_config.py88def test_onnxruntime_provider_config_prefers_directml_on_windows(monkeypatch):CODE
LOWpython/tests/test_engine_config.py104def test_onnxruntime_provider_config_skips_directml_on_non_windows(monkeypatch):CODE
LOWpython/tests/test_engine_config.py116def test_onnxruntime_provider_config_adds_cann_when_available(monkeypatch):CODE
LOWpython/tests/test_engine_config.py130def test_onnxruntime_provider_config_adds_coreml_on_darwin(monkeypatch):CODE
LOWpython/tests/test_engine_config.py145def test_onnxruntime_provider_config_rejects_empty_session_providers(monkeypatch):CODE
LOWpython/tests/test_engine_config.py157def test_openvino_cpu_config_omits_defaults():CODE
LOWpython/tests/test_engine_config.py171def test_openvino_cpu_config_maps_non_default_values(monkeypatch):CODE
LOWpython/tests/test_engine_config.py194def test_openvino_cpu_config_ignores_invalid_thread_count(monkeypatch):CODE
LOWpython/tests/test_default_config.py48def test_default_global_config(default_cfg):CODE
LOWpython/tests/test_default_config.py64def test_default_onnxruntime_engine_config(default_cfg):CODE
LOWpython/tests/test_default_config.py90def test_default_openvino_engine_config(default_cfg):CODE
LOWpython/tests/test_default_config.py102def test_default_other_engine_configs(default_cfg):CODE
LOWpython/tests/test_default_config.py226def test_default_cls_model_config(default_cfg):CODE
LOWpython/tests/test_default_config.py238def test_default_engine_runtime_config(default_engine):CODE
LOWpython/tests/test_default_config.py255def test_default_engine_real_full_pipeline(default_engine):CODE
LOWpython/tests/test_default_config.py263def test_default_engine_real_rec_only(default_engine):CODE
LOWpython/tests/test_tensorrt.py25def install_fake_tensorrt_modules(monkeypatch):CODE
LOWpython/tests/test_tensorrt.py114def test_tensorrt_cache_dir_initializes_model_root_dir_for_build(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py142def test_tensorrt_default_cache_dir_uses_model_root_dir(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py173def test_tensorrt_explicit_model_path_skips_download(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py207def test_tensorrt_loads_cached_engine_without_rebuild(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py234def test_tensorrt_force_rebuild_ignores_cached_engine(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py274def test_tensorrt_falls_back_to_rebuild_when_cached_engine_load_fails(CODE
LOWpython/tests/test_tensorrt.py313def test_tensorrt_context_creation_failure_raises_tensorrt_error(monkeypatch, tmp_path):CODE
LOWpython/tests/test_tensorrt.py345def test_tensorrt_get_dict_key_url_uses_fallback_engines(monkeypatch):CODE
LOWpython/tests/test_return_word.py76def test_en_return_single_char_box(engine):CODE
LOWpython/tests/test_cli.py78def test_check_required_files_missing(monkeypatch, tmp_path):CODE
LOWpython/tests/test_cli.py86def test_cli_check_validates_required_files_before_engine(monkeypatch):CODE
LOWpython/tests/test_cli.py130def test_cli_lang_type_passed_to_engine(monkeypatch):CODE
LOWpython/tests/test_cli.py147def test_cli_vis_empty_result(monkeypatch, tmp_path):CODE
LOWpython/tests/test_cli.py166def test_cli_word_vis_empty_result(monkeypatch, tmp_path):CODE
LOWpython/tests/test_model_resolver.py46def test_list_supported_langs_can_filter_by_model_type():CODE
LOWpython/tests/test_model_resolver.py58def test_resolve_model_key_returns_none_for_unrouted_versions():CODE
LOWpython/rapidocr/cal_rec_boxes/main.py202 def reverse_rotate_crop_image(CODE
LOWpython/rapidocr/utils/process_img.py107def resize_image_within_bounds(CODE
LOWpython/rapidocr/utils/download_file.py44 def _ensure_parent_dir_exists(path: Path):CODE
LOWpython/rapidocr/utils/download_file.py78 def _save_response_with_progress(CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py345 def _create_execution_context(self, engine_path: Path) -> trt.IExecutionContext:CODE
LOW…docr/inference_engine/pytorch/networks/necks/db_fpn.py571 def _convert_dilated_to_nondilated(kernel, dilate_rate):CODE
LOW…docr/inference_engine/pytorch/networks/necks/db_fpn.py587 def _merge_dilated_into_large_kernel(large_kernel, dilated_kernel, dilated_r):CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py193 def get_inst_idx_to_tensor_position_map(inst_idx_list):CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py275 def collect_active_inst_idx_list(CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py297 def collect_hypothesis_and_scores(inst_dec_beams, n_best):CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py358 def generate_square_subsequent_mask(self, sz):CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py816 def get_the_best_score_and_idx(self):CODE
LOW…pytorch/networks/transforms/tps_spatial_transformer.py55def build_output_control_points(num_control_points, margins):CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py389 def get_equivalent_kernel_bias(self):CODE
LOW…ce_engine/pytorch/networks/backbones/rec_donut_swin.py710 def set_shift_and_window_size(self, input_resolution):CODE
LOWpython/rapidocr/ch_ppocr_cls/utils.py55 def restore_image_orientation(CODE
Unused Imports58 hits · 58 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py7CODE
LOWpython/rapidocr/__init__.py10CODE
LOWpython/rapidocr/__init__.py11CODE
LOWpython/rapidocr/__init__.py12CODE
LOWpython/rapidocr/__init__.py13CODE
LOWpython/rapidocr/ch_ppocr_rec/__init__.py4CODE
LOWpython/rapidocr/ch_ppocr_rec/__init__.py5CODE
LOWpython/rapidocr/ch_ppocr_rec/__init__.py5CODE
LOWpython/rapidocr/cal_rec_boxes/__init__.py4CODE
LOWpython/rapidocr/ch_ppocr_det/__init__.py4CODE
LOWpython/rapidocr/ch_ppocr_det/__init__.py5CODE
LOW…thon/rapidocr/inference_engine/onnxruntime/__init__.py4CODE
LOW…thon/rapidocr/inference_engine/onnxruntime/__init__.py4CODE
LOWpython/rapidocr/inference_engine/paddle/__init__.py4CODE
LOWpython/rapidocr/inference_engine/paddle/__init__.py4CODE
LOWpython/rapidocr/inference_engine/openvino/__init__.py4CODE
LOWpython/rapidocr/inference_engine/openvino/__init__.py4CODE
LOWpython/rapidocr/inference_engine/mnn/__init__.py4CODE
LOWpython/rapidocr/inference_engine/mnn/__init__.py4CODE
LOWpython/rapidocr/inference_engine/tensorrt/__init__.py4CODE
LOWpython/rapidocr/inference_engine/tensorrt/__init__.py4CODE
LOWpython/rapidocr/inference_engine/pytorch/__init__.py4CODE
LOWpython/rapidocr/inference_engine/pytorch/__init__.py4CODE
LOW…erence_engine/pytorch/networks/heads/rec_multi_head.py6CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py21CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py22CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py22CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py25CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py26CODE
LOW…cr/inference_engine/pytorch/networks/transforms/stn.py5CODE
LOW…cr/inference_engine/pytorch/networks/transforms/stn.py6CODE
LOW…cr/inference_engine/pytorch/networks/transforms/stn.py7CODE
LOW…cr/inference_engine/pytorch/networks/transforms/tps.py1CODE
LOW…cr/inference_engine/pytorch/networks/transforms/tps.py2CODE
LOW…cr/inference_engine/pytorch/networks/transforms/tps.py3CODE
LOW…ference_engine/pytorch/networks/transforms/__init__.py19CODE
LOW…ference_engine/pytorch/networks/transforms/__init__.py20CODE
LOW…ference_engine/pytorch/networks/transforms/__init__.py21CODE
LOW…ference_engine/pytorch/networks/transforms/__init__.py22CODE
LOW…pytorch/networks/transforms/tps_spatial_transformer.py5CODE
LOW…pytorch/networks/transforms/tps_spatial_transformer.py6CODE
LOW…pytorch/networks/transforms/tps_spatial_transformer.py7CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py19CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py19CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py19CODE
LOW…rence_engine/pytorch/networks/backbones/rec_pplcnet.py27CODE
LOW…rence_engine/pytorch/networks/backbones/rec_pplcnet.py27CODE
LOW…rence_engine/pytorch/networks/backbones/rec_pplcnet.py27CODE
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv3.py15CODE
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv3.py15CODE
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv3.py15CODE
LOWpython/rapidocr/ch_ppocr_cls/__init__.py4CODE
LOWpython/rapidocr/ch_ppocr_cls/__init__.py5CODE
Excessive Try-Catch Wrapping24 hits · 28 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/utils/process_img.py145 except Exception as exc:CODE
LOWpython/rapidocr/utils/process_img.py175 except Exception as exc:CODE
LOWpython/rapidocr/utils/load_image.py74 except Exception as e:CODE
LOWpython/rapidocr/utils/utils.py98 except Exception as e:CODE
LOWpython/rapidocr/ch_ppocr_det/utils.py107 except Exception as exc:CODE
LOWpython/rapidocr/inference_engine/onnxruntime/main.py99 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/paddle/main.py92 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/openvino/main.py72 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/mnn/main.py79 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py64 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py71 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py78 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py81 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py123 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py183 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py275 except Exception as e:CODE
LOWpython/rapidocr/inference_engine/tensorrt/main.py378 except Exception as e:CODE
MEDIUMpython/rapidocr/inference_engine/tensorrt/main.py169def _get_max_profile_size(self) -> int:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py160 except Exception:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py167 except Exception:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py202 except Exception:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py218 except Exception:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py226 except Exception:CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py271 except Exception:CODE
Over-Commented Block24 hits · 24 pts
SeverityFileLineSnippetContext
LOWpython/tests/__init__.py1# -*- encoding: utf-8 -*-COMMENT
LOWpython/rapidocr/ch_ppocr_rec/main.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWpython/rapidocr/utils/__init__.py1# -*- encoding: utf-8 -*-COMMENT
LOWpython/rapidocr/ch_ppocr_det/main.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWpython/rapidocr/inference_engine/__init__.py1# -*- encoding: utf-8 -*-COMMENT
LOW…rapidocr/inference_engine/pytorch/networks/__init__.py1# -*- encoding: utf-8 -*-COMMENT
LOW…cr/inference_engine/pytorch/networks/necks/__init__.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…ence_engine/pytorch/networks/architectures/__init__.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…ce_engine/pytorch/networks/heads/multiheadAttention.py81 q = self._in_proj_q(query)COMMENT
LOW…r/inference_engine/pytorch/networks/transforms/tsrn.py1# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…ference_engine/pytorch/networks/transforms/__init__.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…/inference_engine/pytorch/networks/transforms/tbsrn.py1# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py1# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py841#COMMENT
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py861# N, C, _, _ = x.shapeCOMMENT
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py881#COMMENT
LOW…nference_engine/pytorch/networks/backbones/__init__.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…rence_engine/pytorch/networks/backbones/rec_pplcnet.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv3.py1# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOW…ce_engine/pytorch/networks/backbones/rec_donut_swin.py1# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.COMMENT
LOWpython/rapidocr/ch_ppocr_cls/utils.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWpython/rapidocr/ch_ppocr_cls/main.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
Decorative Section Separators8 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUM…docr/inference_engine/pytorch/networks/necks/db_fpn.py460# ============================================================================COMMENT
MEDIUM…docr/inference_engine/pytorch/networks/necks/db_fpn.py462# ============================================================================COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py22# ---------------------------------------------------------------------------COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py24# ---------------------------------------------------------------------------COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py166# ---------------------------------------------------------------------------COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py168# ---------------------------------------------------------------------------COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py534# ---------------------------------------------------------------------------COMMENT
MEDIUM…rence_engine/pytorch/networks/backbones/rec_lcnetv4.py536# ---------------------------------------------------------------------------COMMENT
AI Structural Patterns19 hits · 19 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/main.py95CODE
LOW…apidocr/inference_engine/pytorch/networks/necks/rnn.py77CODE
LOW…apidocr/inference_engine/pytorch/networks/necks/rnn.py199CODE
LOW…ce_engine/pytorch/networks/heads/multiheadAttention.py147CODE
LOW…ce_engine/pytorch/networks/heads/multiheadAttention.py155CODE
LOW…ce_engine/pytorch/networks/heads/multiheadAttention.py163CODE
LOW…inference_engine/pytorch/networks/heads/det_db_head.py106CODE
LOW…ference_engine/pytorch/networks/heads/rec_nrtr_head.py34CODE
LOW…r/inference_engine/pytorch/networks/transforms/tsrn.py34CODE
LOW…/inference_engine/pytorch/networks/transforms/tbsrn.py140CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py69CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py1330CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py20CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py52CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py130CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py199CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py404CODE
LOW…ce_engine/pytorch/networks/backbones/rec_donut_swin.py465CODE
LOW…ce_engine/pytorch/networks/backbones/rec_donut_swin.py46CODE
Deep Nesting16 hits · 16 pts
SeverityFileLineSnippetContext
LOWpython/tools/prepare_wheel_assets.py146CODE
LOWpython/tools/prepare_wheel_assets.py296CODE
LOW…n/rapidocr/inference_engine/tensorrt/engine_builder.py86CODE
LOW…hon/rapidocr/inference_engine/tensorrt/memory_utils.py171CODE
LOW…n/rapidocr/inference_engine/pytorch/networks/common.py51CODE
LOW…docr/inference_engine/pytorch/networks/necks/db_fpn.py480CODE
LOW…apidocr/inference_engine/pytorch/networks/necks/rnn.py139CODE
LOW…ce_engine/pytorch/networks/architectures/base_model.py66CODE
LOW…erence_engine/pytorch/networks/heads/rec_multi_head.py24CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py737CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py775CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py565CODE
LOW…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py1425CODE
LOW…rence_engine/pytorch/networks/backbones/rec_svtrnet.py573CODE
LOW…ference_engine/pytorch/networks/backbones/rec_hgnet.py227CODE
LOW…rence_engine/pytorch/networks/backbones/rec_lcnetv3.py243CODE
Modern Structural Boilerplate16 hits · 16 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/__init__.py34__all__ = [CODE
LOWpython/rapidocr/ch_ppocr_rec/__init__.py7__all__ = ["TextRecognizer", "TextRecInput", "TextRecOutput"]CODE
LOWpython/rapidocr/cal_rec_boxes/__init__.py6__all__ = ["CalRecBoxes"]CODE
LOWpython/rapidocr/ch_ppocr_det/__init__.py7__all__ = ["TextDetector", "TextDetOutput"]CODE
LOW…thon/rapidocr/inference_engine/onnxruntime/__init__.py6__all__ = ["ONNXRuntimeError", "OrtInferSession"]CODE
LOWpython/rapidocr/inference_engine/paddle/__init__.py6__all__ = ["PaddleInferError", "PaddleInferSession"]CODE
LOWpython/rapidocr/inference_engine/openvino/__init__.py6__all__ = ["OpenVINOError", "OpenVINOInferSession"]CODE
LOWpython/rapidocr/inference_engine/mnn/__init__.py6__all__ = ["MNNError", "MNNInferSession"]CODE
LOWpython/rapidocr/inference_engine/tensorrt/__init__.py6__all__ = ["TensorRTError", "TRTInferSession"]CODE
LOWpython/rapidocr/inference_engine/pytorch/__init__.py6__all__ = ["TorchInferError", "TorchInferSession"]CODE
LOW…cr/inference_engine/pytorch/networks/necks/__init__.py15__all__ = ["build_neck"]CODE
LOW…ence_engine/pytorch/networks/architectures/__init__.py17__all__ = ["build_model"]CODE
LOW…cr/inference_engine/pytorch/networks/heads/__init__.py15__all__ = ["build_head"]CODE
LOW…ference_engine/pytorch/networks/transforms/__init__.py15__all__ = ["build_transform"]CODE
LOW…nference_engine/pytorch/networks/backbones/__init__.py15__all__ = ["build_backbone"]CODE
LOWpython/rapidocr/ch_ppocr_cls/__init__.py7__all__ = ["TextClassifier", "TextClsOutput"]CODE
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpython/rapidocr/inference_engine/tensorrt/main.py88Run inference on input data. This method executes the TensorRT engine on the provided input. It uses prSTRING
HIGH…hon/rapidocr/inference_engine/tensorrt/memory_utils.py57Allocate host and device buffers for TensorRT inference. This function allocates memory buffers for all input and oSTRING
HIGH…nce_engine/pytorch/networks/backbones/rec_pphgnetv2.py570use 'handle_func' to modify the sub-layer(s) specified by 'layer_name_pattern'. Args: layer_name_paSTRING
Verbosity Indicators6 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/ch_ppocr_det/main.py89 # Step 1: Stable sort by y (top to bottom)COMMENT
LOWpython/rapidocr/ch_ppocr_det/main.py95 # Step 2: Assign line IDs based on adjacent y differencesCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py109 # Step 1: Set input shape for dynamic dimensionsCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py112 # Step 2: Copy input data to GPUCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py115 # Step 3: Execute inferenceCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py118 # Step 4: Copy output back to CPUCOMMENT
Structural Annotation Overuse6 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/rapidocr/ch_ppocr_det/main.py89 # Step 1: Stable sort by y (top to bottom)COMMENT
LOWpython/rapidocr/ch_ppocr_det/main.py95 # Step 2: Assign line IDs based on adjacent y differencesCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py109 # Step 1: Set input shape for dynamic dimensionsCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py112 # Step 2: Copy input data to GPUCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py115 # Step 3: Execute inferenceCOMMENT
LOWpython/rapidocr/inference_engine/tensorrt/main.py118 # Step 4: Copy output back to CPUCOMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM…ce_engine/pytorch/networks/architectures/base_model.py23 # if you make model differently, you can use transfrom in det and clsCOMMENT