Repository Analysis

mindee/doctr

docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning. Ongoing development and maintenance by t2k.

15.8 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of mindee/doctr, a Python project with 6,323 GitHub stars. SynthScan v2.0 examined 51,969 lines of code across 300 source files, recording 622 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 15.8 places this repository in the Moderate 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).

15.8
Adjusted Score
15.8
Raw Score
100%
Time Factor
2026-08-28
Last Push
6.3K
Stars
Python
Language
52.0K
Lines of Code
300
Files
622
Pattern Hits
2026-08-29
Scan Date
0.16
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 49MEDIUM 8LOW 565

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 622 distinct pattern matches across 15 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.

Cross-File Repetition46 hits · 230 pts
SeverityFileLineSnippetContext
HIGHreferences/classification/train_orientation.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/classification/train_character.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/layout/train.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/table/train.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/recognition/train.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/detection/train.py0gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocrSTRING
HIGHreferences/classification/utils.py0display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/cSTRING
HIGHreferences/layout/utils.py0display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/cSTRING
HIGHreferences/detection/utils.py0display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/cSTRING
HIGHreferences/recognition/utils.py0display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/cSTRING
HIGHdoctr/models/classification/mobilenet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/vip/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/starnet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/vit_det/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/resnet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/vit/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/textnet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/classification/vgg/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/layout/lw_detr/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/table_structure/tablecenternet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/crnn/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/vitstr/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/viptr/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/master/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/sar/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/parseq/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGH…odels/detection/differentiable_binarization/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/detection/linknet/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/detection/fast/pytorch.py0load pretrained parameters onto the model args: path_or_url: the path or url to the model parameters (checkpoint) **kwarSTRING
HIGHdoctr/models/recognition/core.py0encode a list of gts sequences into a np array and gives the corresponding* sequence lengths. args: gts: list of ground-STRING
HIGHdoctr/models/recognition/vitstr/base.py0encode a list of gts sequences into a np array and gives the corresponding* sequence lengths. args: gts: list of ground-STRING
HIGHdoctr/models/recognition/master/base.py0encode a list of gts sequences into a np array and gives the corresponding* sequence lengths. args: gts: list of ground-STRING
HIGHdoctr/models/recognition/parseq/base.py0encode a list of gts sequences into a np array and gives the corresponding* sequence lengths. args: gts: list of ground-STRING
HIGHdoctr/models/recognition/core.py0abstract class to postprocess the raw output of the model args: vocab: string containing the ordered sequence of supportSTRING
HIGHdoctr/models/recognition/vitstr/base.py0abstract class to postprocess the raw output of the model args: vocab: string containing the ordered sequence of supportSTRING
HIGHdoctr/models/recognition/master/base.py0abstract class to postprocess the raw output of the model args: vocab: string containing the ordered sequence of supportSTRING
HIGHdoctr/models/recognition/parseq/base.py0abstract class to postprocess the raw output of the model args: vocab: string containing the ordered sequence of supportSTRING
HIGHdoctr/models/recognition/vitstr/pytorch.py0compute categorical cross-entropy loss for the model. sequences are masked after the eos character. args: gt: the encodeSTRING
HIGHdoctr/models/recognition/sar/pytorch.py0compute categorical cross-entropy loss for the model. sequences are masked after the eos character. args: gt: the encodeSTRING
HIGHdoctr/models/recognition/master/pytorch.py0compute categorical cross-entropy loss for the model. sequences are masked after the eos character. args: gt: the encodeSTRING
HIGH…r/models/detection/differentiable_binarization/base.py0expand a polygon (points) by a factor unclip_ratio, and returns a polygon args: points: the first parameter. returns: a STRING
HIGHdoctr/models/detection/linknet/base.py0expand a polygon (points) by a factor unclip_ratio, and returns a polygon args: points: the first parameter. returns: a STRING
HIGHdoctr/models/detection/fast/base.py0expand a polygon (points) by a factor unclip_ratio, and returns a polygon args: points: the first parameter. returns: a STRING
HIGH…r/models/detection/differentiable_binarization/base.py0compute boxes from a bitmap/pred_map: find connected components then filter boxes args: pred: pred map from differentiabSTRING
HIGHdoctr/models/detection/linknet/base.py0compute boxes from a bitmap/pred_map: find connected components then filter boxes args: pred: pred map from differentiabSTRING
HIGHdoctr/models/detection/fast/base.py0compute boxes from a bitmap/pred_map: find connected components then filter boxes args: pred: pred map from differentiabSTRING
Hyper-Verbose Identifiers220 hits · 216 pts
SeverityFileLineSnippetContext
LOWreferences/detection/train.py39def convert_to_multiclass_targets(targets: list) -> list[dict[str, np.ndarray]]:CODE
LOWtests/conftest.py87def mock_artefact_image_stream():CODE
LOWtests/common/test_utils_fonts.py26def test_get_font_respects_size():CODE
LOWtests/common/test_utils_fonts.py33def test_get_font_explicit_family():CODE
LOWtests/common/test_utils_fonts.py46def test_get_font_resolution_is_cached():CODE
LOWtests/common/test_models_builder.py194def test_documentbuilder_layout():CODE
LOWtests/common/test_models_builder.py269def test_documentbuilder_tables():CODE
LOWtests/common/test_models_builder.py366def test_kiedocumentbuilder_layout():CODE
LOWtests/common/test_models_builder.py482def test_documentbuilder_tables_straight_geometry():CODE
LOWtests/common/test_models_builder.py529def test_documentbuilder_argument_length_validation():CODE
LOWtests/common/test_models_builder.py561def test_sort_boxes_degenerate_heights():CODE
LOWtests/common/test_models_builder.py569def test_documentbuilder_tables_empty_cells():CODE
LOWtests/common/test_models_builder.py588def test_documentbuilder_keep_reading_order():CODE
LOWtests/common/test_models_builder.py655def test_documentbuilder_keep_reading_order_rotated():CODE
LOWtests/common/test_models_builder.py722def test_documentbuilder_keep_reading_order_all_flag_combinations():CODE
LOWtests/common/test_models_builder.py743def test_documentbuilder_keep_reading_order_without_resolve_lines():CODE
LOWtests/common/test_models_builder.py754def test_documentbuilder_keep_reading_order_prefers_layout_furniture():CODE
LOWtests/common/test_models_builder.py779def test_documentbuilder_keep_reading_order_without_resolve_lines_rotated():CODE
LOWtests/common/test_models_builder.py804def test_documentbuilder_keep_reading_order_no_double_sort_across_exports():CODE
LOWtests/common/test_models_builder.py838def test_documentbuilder_tables_multi_word_cells():CODE
LOWtests/common/test_models_builder.py871def test_documentbuilder_tables_nearest_cell_fallback():CODE
LOWtests/common/test_models_builder.py896def test_documentbuilder_tables_rotated_geometry():CODE
LOWtests/common/test_models_builder.py933def test_documentbuilder_tables_without_words():CODE
LOWtests/common/test_models_builder.py950def test_documentbuilder_sort_boxes_mixed_rotation():CODE
LOWtests/common/test_models_builder.py967def test_documentbuilder_tables_skips_empty_grids():CODE
LOWtests/common/test_utils_geometry.py81def test_resolve_enclosing_bbox():CODE
LOWtests/common/test_utils_geometry.py87def test_resolve_enclosing_rbbox():CODE
LOWtests/common/test_utils_geometry.py186def test_remove_image_padding():CODE
LOWtests/common/test_utils_geometry.py226def test_convert_to_relative_coords(abs_geoms, img_size, rel_geoms):CODE
LOWtests/common/test_utils_geometry.py333def test_straighten_page_inverse(angle, shape):CODE
LOWtests/common/test_utils_geometry.py362def test_straighten_page_projected_corner_clamp():CODE
LOWtests/common/test_datasets_utils.py24def test_translate_unknown_vocab():CODE
LOWtests/common/test_datasets_utils.py46def test_encode_string_unknown_char():CODE
LOWtests/common/test_datasets_utils.py51def test_encode_string_duplicate_vocab_chars():CODE
LOWtests/common/test_datasets_utils.py108def test_convert_target_to_relative(target, mock_image_stream):CODE
LOWtests/common/test_datasets_utils.py125def test_crop_bboxes_from_image(geoms, mock_image_path):CODE
LOWtests/common/test_models_reading_order.py35def test_detect_text_direction(texts, language, expected):CODE
LOWtests/common/test_models_reading_order.py39def test_normalize_layout_label():CODE
LOWtests/common/test_models_reading_order.py69def test_sort_reading_order_basic():CODE
LOWtests/common/test_models_reading_order.py81def test_sort_reading_order_columns():CODE
LOWtests/common/test_models_reading_order.py95def test_sort_reading_order_input_formats():CODE
LOWtests/common/test_models_reading_order.py108def test_sort_reading_order_vertical():CODE
LOWtests/common/test_models_reading_order.py118def test_sort_reading_order_labels():CODE
LOWtests/common/test_models_reading_order.py147def test_sort_reading_order_degenerate_geometries():CODE
LOWtests/common/test_models_reading_order.py154def test_resolve_reading_segments():CODE
LOWtests/common/test_models_reading_order.py171def test_assign_layout_labels():CODE
LOWtests/common/test_models_reading_order.py184def test_reading_order_predictor():CODE
LOWtests/common/test_models_reading_order.py214def test_sort_reading_order_rotated_pages():CODE
LOWtests/common/test_models_reading_order.py229def test_deskew_reading_geometries():CODE
LOWtests/common/test_models_reading_order.py251def test_reading_order_predictor_rotated():CODE
LOWtests/common/test_models_reading_order.py258def test_deskew_strong_rotation_non_square_page():CODE
LOWtests/common/test_models_reading_order.py280def test_sort_reading_order_fragmented_columns():CODE
LOWtests/common/test_models_reading_order.py295def test_fragmented_row_with_merged_column_components():CODE
LOWtests/common/test_models_reading_order.py309def test_sort_reading_order_keeps_key_value_rows_together():CODE
LOWtests/common/test_models_reading_order.py326def test_sort_reading_order_follows_columns_when_a_gutter_exists():CODE
LOWtests/common/test_models_detection.py65def test_linknet_postprocessor():CODE
LOWtests/common/test_utils_data.py22def test_download_from_url_customizing_cache_dir(mkdir_mock, urlretrieve_mock):CODE
LOWtests/common/test_utils_data.py29def test_download_from_url_error_creating_directory(mkdir_mock, caplog):CODE
LOWtests/common/test_utils_data.py41def test_download_from_url_error_creating_directory_with_env_var(mkdir_mock, caplog):CODE
LOWtests/common/test_io.py103def test_read_img_as_numpy_exif_orientation(tmpdir_factory):CODE
160 more matches not shown…
Unused Imports131 hits · 129 pts
SeverityFileLineSnippetContext
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py1CODE
LOWdoctr/__init__.py2CODE
LOWdoctr/datasets/__init__.py1CODE
LOWdoctr/datasets/__init__.py2CODE
LOWdoctr/datasets/__init__.py3CODE
LOWdoctr/datasets/__init__.py4CODE
LOWdoctr/datasets/__init__.py5CODE
LOWdoctr/datasets/__init__.py6CODE
LOWdoctr/datasets/__init__.py7CODE
LOWdoctr/datasets/__init__.py8CODE
LOWdoctr/datasets/__init__.py9CODE
LOWdoctr/datasets/__init__.py10CODE
LOWdoctr/datasets/__init__.py11CODE
LOWdoctr/datasets/__init__.py12CODE
LOWdoctr/datasets/__init__.py13CODE
LOWdoctr/datasets/__init__.py14CODE
LOWdoctr/datasets/__init__.py15CODE
LOWdoctr/datasets/__init__.py16CODE
LOWdoctr/datasets/__init__.py17CODE
LOWdoctr/datasets/__init__.py18CODE
LOWdoctr/datasets/__init__.py19CODE
LOWdoctr/datasets/__init__.py20CODE
LOWdoctr/datasets/__init__.py21CODE
LOWdoctr/datasets/__init__.py22CODE
LOWdoctr/datasets/__init__.py23CODE
LOWdoctr/datasets/__init__.py24CODE
LOWdoctr/datasets/datasets/__init__.py1CODE
LOWdoctr/datasets/generator/__init__.py1CODE
LOWdoctr/io/__init__.py1CODE
LOWdoctr/io/__init__.py2CODE
LOWdoctr/io/__init__.py3CODE
LOWdoctr/io/__init__.py4CODE
LOWdoctr/io/__init__.py5CODE
LOWdoctr/io/__init__.py6CODE
LOWdoctr/io/exporters.py18CODE
LOWdoctr/io/exporters.py18CODE
LOWdoctr/io/image/__init__.py1CODE
LOWdoctr/io/image/__init__.py2CODE
LOWdoctr/utils/__init__.py1CODE
LOWdoctr/utils/__init__.py2CODE
LOWdoctr/utils/__init__.py3CODE
LOWdoctr/utils/__init__.py4CODE
LOWdoctr/models/__init__.py1CODE
LOWdoctr/models/__init__.py2CODE
LOWdoctr/models/__init__.py3CODE
LOWdoctr/models/__init__.py4CODE
LOWdoctr/models/__init__.py5CODE
LOWdoctr/models/__init__.py6CODE
LOWdoctr/models/__init__.py7CODE
LOWdoctr/models/classification/__init__.py1CODE
LOWdoctr/models/classification/__init__.py2CODE
LOWdoctr/models/classification/__init__.py3CODE
LOWdoctr/models/classification/__init__.py4CODE
LOWdoctr/models/classification/__init__.py5CODE
LOWdoctr/models/classification/__init__.py6CODE
71 more matches not shown…
Modern Structural Boilerplate116 hits · 116 pts
SeverityFileLineSnippetContext
LOWdoctr/file_utils.py9__all__ = ["requires_package", "CLASS_NAME"]CODE
LOWdoctr/file_utils.py11logger = logging.getLogger(__name__)CODE
LOWdoctr/datasets/recognition.py13__all__ = ["RecognitionDataset"]CODE
LOWdoctr/datasets/synthtext.py18__all__ = ["SynthText"]CODE
LOWdoctr/datasets/detection.py17__all__ = ["DetectionDataset"]CODE
LOWdoctr/datasets/coco_text.py17__all__ = ["COCOTEXT"]CODE
LOWdoctr/datasets/orientation.py13__all__ = ["OrientationDataset"]CODE
LOWdoctr/datasets/table_structure.py19__all__ = ["TableStructureDataset"]CODE
LOWdoctr/datasets/layout.py15__all__ = ["LayoutDataset"]CODE
LOWdoctr/datasets/cord.py17__all__ = ["CORD"]CODE
LOWdoctr/datasets/mjsynth.py13__all__ = ["MJSynth"]CODE
LOWdoctr/datasets/wildreceipt.py17__all__ = ["WILDRECEIPT"]CODE
LOWdoctr/datasets/doc_artefacts.py14__all__ = ["DocArtefacts"]CODE
LOWdoctr/datasets/svhn.py16__all__ = ["SVHN"]CODE
LOWdoctr/datasets/iiit5k.py17__all__ = ["IIIT5K"]CODE
LOWdoctr/datasets/imgur5k.py20__all__ = ["IMGUR5K"]CODE
LOWdoctr/datasets/ic13.py17__all__ = ["IC13"]CODE
LOWdoctr/datasets/ocr.py15__all__ = ["OCRDataset"]CODE
LOWdoctr/datasets/ic03.py16__all__ = ["IC03"]CODE
LOWdoctr/datasets/utils.py22__all__ = [CODE
LOWdoctr/datasets/vocabs.py9__all__ = ["VOCABS"]CODE
LOWdoctr/datasets/funsd.py17__all__ = ["FUNSD"]CODE
LOWdoctr/datasets/sroie.py17__all__ = ["SROIE"]CODE
LOWdoctr/datasets/iiithws.py14__all__ = ["IIITHWS"]CODE
LOWdoctr/datasets/svt.py16__all__ = ["SVT"]CODE
LOWdoctr/datasets/datasets/pytorch.py18__all__ = ["AbstractDataset", "VisionDataset"]CODE
LOWdoctr/datasets/datasets/base.py15__all__ = ["_AbstractDataset", "_VisionDataset"]CODE
LOWdoctr/datasets/generator/pytorch.py8__all__ = ["CharacterGenerator", "WordGenerator"]CODE
LOWdoctr/io/elements.py22__all__ = [CODE
LOWdoctr/io/html.py8__all__ = ["read_html"]CODE
LOWdoctr/io/pdf.py13__all__ = ["read_pdf"]CODE
LOWdoctr/io/reader.py18__all__ = ["DocumentFile"]CODE
LOWdoctr/io/exporters.py20__all__ = [CODE
LOWdoctr/io/image/pytorch.py15__all__ = ["tensor_from_pil", "read_img_as_tensor", "decode_img_as_tensor", "tensor_from_numpy", "get_img_shape"]CODE
LOWdoctr/io/image/base.py13__all__ = ["read_img_as_numpy"]CODE
LOWdoctr/utils/metrics.py12__all__ = [CODE
LOWdoctr/utils/common_types.py12__all__ = ["Point2D", "BoundingBox", "Polygon4P", "Polygon", "Bbox", "Sample"]CODE
LOWdoctr/utils/visualization.py17__all__ = ["visualize_page", "visualize_kie_page", "draw_boxes"]CODE
LOWdoctr/utils/repr.py9__all__ = ["NestedObject"]CODE
LOWdoctr/utils/geometry.py13__all__ = [CODE
LOWdoctr/utils/reconstitution.py16__all__ = ["synthesize_page", "synthesize_kie_page"]CODE
LOWdoctr/utils/reconstitution.py18logger = logging.getLogger(__name__)CODE
LOWdoctr/utils/fonts.py12__all__ = ["get_font"]CODE
LOWdoctr/utils/fonts.py14logger = logging.getLogger(__name__)CODE
LOWdoctr/utils/data.py18__all__ = ["download_from_url"]CODE
LOWdoctr/utils/data.py20logger = logging.getLogger(__name__)CODE
LOWdoctr/utils/multithreading.py15__all__ = ["multithread_exec"]CODE
LOWdoctr/models/zoo.py15__all__ = ["ocr_predictor", "kie_predictor"]CODE
LOWdoctr/models/core.py11__all__ = ["BaseModel"]CODE
LOWdoctr/models/builder.py35__all__ = ["DocumentBuilder"]CODE
LOWdoctr/models/_utils.py17__all__ = [CODE
LOWdoctr/models/classification/zoo.py14__all__ = ["crop_orientation_predictor", "page_orientation_predictor"]CODE
LOWdoctr/models/classification/magc_resnet/pytorch.py19__all__ = ["magc_resnet31"]CODE
LOWdoctr/models/classification/mobilenet/pytorch.py19__all__ = [CODE
LOWdoctr/models/classification/vip/pytorch.py26__all__ = ["VIPNet", "vip_tiny", "vip_base"]CODE
LOWdoctr/models/classification/vip/layers/pytorch.py13__all__ = [CODE
LOWdoctr/models/classification/starnet/pytorch.py21__all__ = ["StarNet", "starnet_s3"]CODE
LOWdoctr/models/classification/vit_det/pytorch.py20__all__ = ["VisionDetectionTransformer", "vit_det_s", "vit_det_m"]CODE
LOWdoctr/models/classification/vit_det/layers/pytorch.py12__all__ = ["PatchEmbed", "MLP", "AttentionWithCAE", "WindowedCAETransformerBlock"]CODE
LOWdoctr/models/classification/resnet/pytorch.py23__all__ = ["ResNet", "resnet18", "resnet31", "resnet34", "resnet50", "resnet34_wide", "resnet_stage"]CODE
56 more matches not shown…
Deep Nesting58 hits · 58 pts
SeverityFileLineSnippetContext
LOWdemo/app.py20CODE
LOWreferences/layout/utils.py40CODE
LOWreferences/recognition/train.py193CODE
LOWreferences/recognition/evaluate.py27CODE
LOWreferences/detection/utils.py12CODE
LOWreferences/detection/train.py174CODE
LOWreferences/detection/train.py213CODE
LOWtests/common/test_models_detection_utils.py29CODE
LOWtests/common/test_headers.py7CODE
LOWtests/common/test_io_elements.py566CODE
LOWtests/common/test_io_elements.py610CODE
LOWdoctr/datasets/synthtext.py51CODE
LOWdoctr/datasets/coco_text.py47CODE
LOWdoctr/datasets/cord.py52CODE
LOWdoctr/datasets/wildreceipt.py50CODE
LOWdoctr/datasets/svhn.py51CODE
LOWdoctr/datasets/iiit5k.py45CODE
LOWdoctr/datasets/imgur5k.py54CODE
LOWdoctr/datasets/ic13.py46CODE
LOWdoctr/datasets/ic03.py50CODE
LOWdoctr/datasets/funsd.py44CODE
LOWdoctr/datasets/sroie.py51CODE
LOWdoctr/datasets/svt.py42CODE
LOWdoctr/io/exporters.py114CODE
LOWdoctr/utils/metrics.py731CODE
LOWdoctr/utils/visualization.py155CODE
LOWdoctr/utils/visualization.py308CODE
LOWdoctr/utils/repr.py32CODE
LOWdoctr/utils/reconstitution.py571CODE
LOWdoctr/utils/data.py28CODE
LOWdoctr/models/builder.py424CODE
LOWdoctr/models/builder.py829CODE
LOWdoctr/models/_utils.py42CODE
LOWdoctr/models/classification/vit_det/pytorch.py231CODE
LOWdoctr/models/layout/lw_detr/pytorch.py269CODE
LOWdoctr/models/layout/lw_detr/base.py89CODE
LOWdoctr/models/layout/lw_detr/base.py216CODE
LOWdoctr/models/reading_order/base.py83CODE
LOWdoctr/models/reading_order/base.py180CODE
LOWdoctr/models/table_structure/tablecenternet/base.py295CODE
LOWdoctr/models/table_structure/tablecenternet/base.py112CODE
LOWdoctr/models/recognition/sar/pytorch.py113CODE
LOWdoctr/models/recognition/parseq/pytorch.py125CODE
LOWdoctr/models/recognition/parseq/pytorch.py323CODE
LOWdoctr/models/predictor/base.py257CODE
LOWdoctr/models/detection/_utils/base.py12CODE
LOW…r/models/detection/differentiable_binarization/base.py270CODE
LOWdoctr/models/detection/linknet/base.py159CODE
LOWdoctr/models/detection/fast/base.py156CODE
LOWdoctr/models/factory/hub.py192CODE
LOWdoctr/cli/main.py95CODE
LOWdoctr/cli/main.py279CODE
LOWdoctr/contrib/artefacts.py68CODE
LOWdoctr/transforms/modules/pytorch.py97CODE
LOWscripts/evaluate_kie.py23CODE
LOWscripts/collect_env.py167CODE
LOWscripts/evaluate.py23CODE
LOWapi/tests/routes/test_ocr.py5CODE
AI Structural Patterns20 hits · 20 pts
SeverityFileLineSnippetContext
LOWdoctr/models/zoo.py18CODE
LOWdoctr/models/zoo.py100CODE
LOWdoctr/models/zoo.py184CODE
LOWdoctr/models/zoo.py250CODE
LOWdoctr/models/classification/starnet/pytorch.py95CODE
LOWdoctr/models/classification/vit_det/pytorch.py164CODE
LOWdoctr/models/kie_predictor/pytorch.py45CODE
LOWdoctr/models/layout/lw_detr/pytorch.py269CODE
LOWdoctr/models/layout/lw_detr/layers/pytorch.py372CODE
LOWdoctr/models/layout/lw_detr/layers/pytorch.py500CODE
LOWdoctr/models/reading_order/base.py460CODE
LOWdoctr/models/table_structure/tablecenternet/pytorch.py157CODE
LOWdoctr/models/recognition/master/pytorch.py54CODE
LOWdoctr/models/recognition/sar/pytorch.py180CODE
LOWdoctr/models/recognition/parseq/pytorch.py125CODE
LOWdoctr/models/predictor/pytorch.py50CODE
LOW…odels/detection/differentiable_binarization/pytorch.py111CODE
LOWdoctr/models/detection/linknet/pytorch.py85CODE
LOWdoctr/models/detection/fast/pytorch.py117CODE
LOWdoctr/transforms/functional/pytorch.py41CODE
Excessive Try-Catch Wrapping11 hits · 11 pts
SeverityFileLineSnippetContext
LOWdoctr/utils/reconstitution.py37 except Exception: # pragma: no coverCODE
LOWdoctr/utils/reconstitution.py168 except Exception: # pragma: no coverCODE
LOWdoctr/utils/reconstitution.py172 except Exception:CODE
LOWdoctr/utils/reconstitution.py250 except Exception: # pragma: no cover - a bitmap font may not measure a spaceCODE
LOWdoctr/utils/reconstitution.py562 except Exception as exc:CODE
LOWdoctr/utils/reconstitution.py603 except Exception as exc:CODE
LOWdoctr/utils/reconstitution.py667 except Exception as exc:CODE
LOWdoctr/models/table_structure/tablecenternet/base.py270 except Exception:CODE
LOWdoctr/cli/main.py122 except Exception as e:CODE
LOWdoctr/cli/main.py289 except Exception as e:CODE
LOWdoctr/cli/main.py310 except Exception as e:CODE
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtests/common/test_io_exporters.py812 doc.render(page_break=" || ") == "left col\n\nright col\n\nPage 1 of 2 || left col\n\nright col\n\nPage 1 of 2"CODE
HIGHdocs/source/conf.py133 function gtag(){{dataLayer.push(arguments);}}CODE
Self-Referential Comments6 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtests/pytorch/test_models_zoo_pt.py26# Create a dummy callbackCOMMENT
MEDIUMdoctr/models/builder.py168 # Define a mean y-center for the lineCOMMENT
MEDIUMdoctr/models/layout/lw_detr/layers/pytorch.py116 """This module implements the self-attention mechanism used in LW-DETR.STRING
MEDIUMdoctr/models/layout/lw_detr/layers/pytorch.py196 """This module implements MultiScaleDeformableAttention from Deformable DETR.STRING
MEDIUMdoctr/models/layout/lw_detr/layers/pytorch.py358 """This module implements a single decoder layer of LW-DETR,STRING
MEDIUMdoctr/models/layout/lw_detr/layers/pytorch.py485 """This module implements the decoder of LW-DETR,STRING
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/pytorch/test_transforms_pt.py666# ----------------------------------------------------------------------------COMMENT
MEDIUMtests/pytorch/test_transforms_pt.py668# ----------------------------------------------------------------------------COMMENT
Slop Phrases4 hits · 6 pts
SeverityFileLineSnippetContext
LOWdoctr/models/recognition/vitstr/pytorch.py153 # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]!COMMENT
LOWdoctr/models/recognition/vitstr/pytorch.py153 # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]!COMMENT
LOWdoctr/models/recognition/master/pytorch.py144 # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]!COMMENT
LOWdoctr/models/recognition/master/pytorch.py144 # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]!COMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdoctr/utils/multithreading.py19Execute a given function in parallel for each element of a given sequence >>> from doctr.utils.multithreading imporSTRING
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py321 # third = np.array([[51], [46], [112], [110], [103]], dtype=np.int16) # 3.pngCOMMENT
LOWtests/pytorch/test_models_layout.py181COMMENT
LOWdocs/source/conf.py1# Copyright (C) 2021-2026, Mindee.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdoctr/utils/geometry.py623 # Add the crop to the list of cropsCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdoctr/models/factory/hub.py126### Example usage:COMMENT