docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning. Ongoing development and maintenance by t2k.
This report summarizes scanner evidence for mindee/doctr, a Python project with 6,386 GitHub stars. SynthScan examined 57,459 lines of code across 306 source files, recording 801 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 21.0 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 394 finding(s).
Are imports declared and package/API names verified? 168 finding(s).
Are wrappers, guards, and repeated structures necessary? 559 finding(s).
Which changes need focused human review? 801 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 801 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | references/classification/train_orientation.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/classification/train_character.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/layout/train.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/table/train.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/recognition/train.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/detection/train.py | 0 | gridsearch the optimal learning rate for the training. adapted from https://github.com/frgfm/holocron/blob/master/holocr | STRING |
| HIGH | references/classification/utils.py | 0 | display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/c | STRING |
| HIGH | references/layout/utils.py | 0 | display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/c | STRING |
| HIGH | references/detection/utils.py | 0 | display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/c | STRING |
| HIGH | references/recognition/utils.py | 0 | display the results of the lr grid search. adapted from https://github.com/frgfm/holocron/blob/master/holocron/trainer/c | STRING |
| HIGH | references/classification/utils.py | 0 | turn a cli device spec (none, "cpu", "mps", "cuda", "cuda:1", 0) into a torch device. with `none`, pick cuda if availabl | STRING |
| HIGH | references/layout/utils.py | 0 | turn a cli device spec (none, "cpu", "mps", "cuda", "cuda:1", 0) into a torch device. with `none`, pick cuda if availabl | STRING |
| HIGH | references/table/utils.py | 0 | turn a cli device spec (none, "cpu", "mps", "cuda", "cuda:1", 0) into a torch device. with `none`, pick cuda if availabl | STRING |
| HIGH | references/recognition/utils.py | 0 | turn a cli device spec (none, "cpu", "mps", "cuda", "cuda:1", 0) into a torch device. with `none`, pick cuda if availabl | STRING |
| HIGH | references/detection/utils.py | 0 | turn a cli device spec (none, "cpu", "mps", "cuda", "cuda:1", 0) into a torch device. with `none`, pick cuda if availabl | STRING |
| HIGH | references/classification/utils.py | 0 | device holding the parameters of a model (works through ddp wrappers). | STRING |
| HIGH | references/layout/utils.py | 0 | device holding the parameters of a model (works through ddp wrappers). | STRING |
| HIGH | references/table/utils.py | 0 | device holding the parameters of a model (works through ddp wrappers). | STRING |
| HIGH | references/recognition/utils.py | 0 | device holding the parameters of a model (works through ddp wrappers). | STRING |
| HIGH | references/detection/utils.py | 0 | device holding the parameters of a model (works through ddp wrappers). | STRING |
| HIGH | references/classification/utils.py | 0 | save the model weights as `<output_dir>/<name>.pt`. args: model: the model to save (unwrapped from ddp if needed) output | STRING |
| HIGH | references/layout/utils.py | 0 | save the model weights as `<output_dir>/<name>.pt`. args: model: the model to save (unwrapped from ddp if needed) output | STRING |
| HIGH | references/table/utils.py | 0 | save the model weights as `<output_dir>/<name>.pt`. args: model: the model to save (unwrapped from ddp if needed) output | STRING |
| HIGH | references/recognition/utils.py | 0 | save the model weights as `<output_dir>/<name>.pt`. args: model: the model to save (unwrapped from ddp if needed) output | STRING |
| HIGH | references/detection/utils.py | 0 | save the model weights as `<output_dir>/<name>.pt`. args: model: the model to save (unwrapped from ddp if needed) output | STRING |
| HIGH | references/classification/utils.py | 0 | write the run metadata as `<output_dir>/<name>.json`. the metadata (architecture, task settings such as class names or v | STRING |
| HIGH | references/layout/utils.py | 0 | write the run metadata as `<output_dir>/<name>.json`. the metadata (architecture, task settings such as class names or v | STRING |
| HIGH | references/table/utils.py | 0 | write the run metadata as `<output_dir>/<name>.json`. the metadata (architecture, task settings such as class names or v | STRING |
| HIGH | references/recognition/utils.py | 0 | write the run metadata as `<output_dir>/<name>.json`. the metadata (architecture, task settings such as class names or v | STRING |
| HIGH | references/detection/utils.py | 0 | write the run metadata as `<output_dir>/<name>.json`. the metadata (architecture, task settings such as class names or v | STRING |
| HIGH | references/classification/utils.py | 0 | common run description written next to every checkpoint: versions, git revision and the full arguments. | STRING |
| HIGH | references/layout/utils.py | 0 | common run description written next to every checkpoint: versions, git revision and the full arguments. | STRING |
| HIGH | references/table/utils.py | 0 | common run description written next to every checkpoint: versions, git revision and the full arguments. | STRING |
| HIGH | references/recognition/utils.py | 0 | common run description written next to every checkpoint: versions, git revision and the full arguments. | STRING |
| HIGH | references/detection/utils.py | 0 | common run description written next to every checkpoint: versions, git revision and the full arguments. | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | whether a process group with more than one rank is active | STRING |
| HIGH | references/table/ddp_utils.py | 0 | whether a process group with more than one rank is active | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | whether a process group with more than one rank is active | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | whether a process group with more than one rank is active | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | whether this process is rank 0 (always true when not distributed) | STRING |
| HIGH | references/table/ddp_utils.py | 0 | whether this process is rank 0 (always true when not distributed) | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | whether this process is rank 0 (always true when not distributed) | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | whether this process is rank 0 (always true when not distributed) | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | sum a short list of scalars across all ranks. no-op when not distributed | STRING |
| HIGH | references/table/ddp_utils.py | 0 | sum a short list of scalars across all ranks. no-op when not distributed | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | sum a short list of scalars across all ranks. no-op when not distributed | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | sum a short list of scalars across all ranks. no-op when not distributed | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | concatenate a per-rank list into the full list, in rank order | STRING |
| HIGH | references/table/ddp_utils.py | 0 | concatenate a per-rank list into the full list, in rank order | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | concatenate a per-rank list into the full list, in rank order | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | concatenate a per-rank list into the full list, in rank order | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | merge per-rank validation state so `summary()` reflects the whole validation set args: val_metric: the metric instance t | STRING |
| HIGH | references/table/ddp_utils.py | 0 | merge per-rank validation state so `summary()` reflects the whole validation set args: val_metric: the metric instance t | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | merge per-rank validation state so `summary()` reflects the whole validation set args: val_metric: the metric instance t | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | merge per-rank validation state so `summary()` reflects the whole validation set args: val_metric: the metric instance t | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | context manager that lets rank 0 populate the doctr cache before the others read it | STRING |
| HIGH | references/table/ddp_utils.py | 0 | context manager that lets rank 0 populate the doctr cache before the others read it | STRING |
| HIGH | references/recognition/ddp_utils.py | 0 | context manager that lets rank 0 populate the doctr cache before the others read it | STRING |
| HIGH | references/detection/ddp_utils.py | 0 | context manager that lets rank 0 populate the doctr cache before the others read it | STRING |
| HIGH | references/layout/ddp_utils.py | 0 | split a dataset across ranks without padding, so no sample is evaluated twice | STRING |
| 38 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | references/detection/train.py | 66 | def convert_to_multiclass_targets(targets: list) -> list[dict[str, np.ndarray]]: | CODE |
| LOW | tests/conftest.py | 106 | def mock_artefact_image_stream(): | CODE |
| LOW | tests/common/test_utils_fonts.py | 26 | def test_get_font_respects_size(): | CODE |
| LOW | tests/common/test_utils_fonts.py | 33 | def test_get_font_explicit_family(): | CODE |
| LOW | tests/common/test_utils_fonts.py | 46 | def test_get_font_resolution_is_cached(): | CODE |
| LOW | tests/common/test_utils_fonts.py | 70 | def test_get_font_candidates_only_lists_installed_fonts(): | CODE |
| LOW | tests/common/test_utils_fonts.py | 79 | def test_get_font_candidates_skips_missing(monkeypatch): | CODE |
| LOW | tests/common/test_models_builder.py | 194 | def test_documentbuilder_layout(): | CODE |
| LOW | tests/common/test_models_builder.py | 269 | def test_documentbuilder_tables(): | CODE |
| LOW | tests/common/test_models_builder.py | 366 | def test_kiedocumentbuilder_layout(): | CODE |
| LOW | tests/common/test_models_builder.py | 482 | def test_documentbuilder_tables_straight_geometry(): | CODE |
| LOW | tests/common/test_models_builder.py | 529 | def test_documentbuilder_argument_length_validation(): | CODE |
| LOW | tests/common/test_models_builder.py | 561 | def test_sort_boxes_degenerate_heights(): | CODE |
| LOW | tests/common/test_models_builder.py | 569 | def test_documentbuilder_table_cell_scores(): | CODE |
| LOW | tests/common/test_models_builder.py | 601 | def test_documentbuilder_tables_empty_cells(): | CODE |
| LOW | tests/common/test_models_builder.py | 620 | def test_documentbuilder_keep_reading_order(): | CODE |
| LOW | tests/common/test_models_builder.py | 678 | def test_documentbuilder_keep_reading_order_keeps_figures(): | CODE |
| LOW | tests/common/test_models_builder.py | 716 | def test_documentbuilder_keep_reading_order_rotated(): | CODE |
| LOW | tests/common/test_models_builder.py | 783 | def test_documentbuilder_keep_reading_order_all_flag_combinations(): | CODE |
| LOW | tests/common/test_models_builder.py | 804 | def test_documentbuilder_keep_reading_order_without_resolve_lines(): | CODE |
| LOW | tests/common/test_models_builder.py | 815 | def test_documentbuilder_keep_reading_order_prefers_layout_furniture(): | CODE |
| LOW | tests/common/test_models_builder.py | 840 | def test_documentbuilder_keep_reading_order_without_resolve_lines_rotated(): | CODE |
| LOW | tests/common/test_models_builder.py | 865 | def test_documentbuilder_keep_reading_order_no_double_sort_across_exports(): | CODE |
| LOW | tests/common/test_models_builder.py | 899 | def test_documentbuilder_tables_multi_word_cells(): | CODE |
| LOW | tests/common/test_models_builder.py | 932 | def test_documentbuilder_tables_nearest_cell_fallback(): | CODE |
| LOW | tests/common/test_models_builder.py | 957 | def test_documentbuilder_tables_rotated_geometry(): | CODE |
| LOW | tests/common/test_models_builder.py | 994 | def test_documentbuilder_tables_without_words(): | CODE |
| LOW | tests/common/test_models_builder.py | 1011 | def test_documentbuilder_sort_boxes_mixed_rotation(): | CODE |
| LOW | tests/common/test_models_builder.py | 1028 | def test_documentbuilder_tables_skips_empty_grids(): | CODE |
| LOW | tests/common/test_utils_geometry.py | 81 | def test_resolve_enclosing_bbox(): | CODE |
| LOW | tests/common/test_utils_geometry.py | 87 | def test_resolve_enclosing_rbbox(): | CODE |
| LOW | tests/common/test_utils_geometry.py | 186 | def test_remove_image_padding(): | CODE |
| LOW | tests/common/test_utils_geometry.py | 226 | def test_convert_to_relative_coords(abs_geoms, img_size, rel_geoms): | CODE |
| LOW | tests/common/test_utils_geometry.py | 333 | def test_straighten_page_inverse(angle, shape): | CODE |
| LOW | tests/common/test_utils_geometry.py | 362 | def test_straighten_page_projected_corner_clamp(): | CODE |
| LOW | tests/common/test_io_figures.py | 100 | def test_figure_encoder_validation(tmp_path): | CODE |
| LOW⚡ | tests/common/test_io_figures.py | 126 | def test_figure_encoder_modes(tmp_path): | CODE |
| LOW | tests/common/test_io_figures.py | 163 | def test_figure_encoder_does_not_pin_pages(): | CODE |
| LOW | tests/common/test_io_figures.py | 181 | def test_figure_encoder_releases_its_sources(): | CODE |
| LOW | tests/common/test_io_figures.py | 199 | def test_referenced_figures_of_several_documents_share_a_directory(tmp_path): | CODE |
| LOW | tests/common/test_io_figures.py | 223 | def test_figure_encoder_path_prefix_defaults_to_image_dir(tmp_path, monkeypatch, image_dir, expected): | CODE |
| LOW | tests/common/test_io_figures.py | 253 | def test_figure_encoder_path_prefix_is_portable(tmp_path, path_prefix, expected): | CODE |
| LOW | tests/common/test_datasets_utils.py | 24 | def test_translate_unknown_vocab(): | CODE |
| LOW | tests/common/test_datasets_utils.py | 46 | def test_encode_string_unknown_char(): | CODE |
| LOW | tests/common/test_datasets_utils.py | 51 | def test_encode_string_duplicate_vocab_chars(): | CODE |
| LOW | tests/common/test_datasets_utils.py | 108 | def test_convert_target_to_relative(target, mock_image_stream): | CODE |
| LOW | tests/common/test_datasets_utils.py | 125 | def test_crop_bboxes_from_image(geoms, mock_image_path): | CODE |
| LOW | tests/common/test_datasets_utils.py | 142 | def test_pre_transform_multiclass(): | CODE |
| LOW | tests/common/test_datasets.py | 14 | def test_synthesize_text_img_rejects_inkless_text(text): | CODE |
| LOW | tests/common/test_datasets.py | 20 | def test_synthesize_text_img_keeps_the_whole_glyph(text): | CODE |
| LOW | tests/common/test_datasets.py | 35 | def test_renders_char_smoke_on_a_real_font(): | CODE |
| LOW | tests/common/test_datasets.py | 41 | def test_renders_char_rejects_blank_and_notdef(monkeypatch): | CODE |
| LOW⚡ | tests/common/test_datasets.py | 54 | def test_fonts_per_char_falls_back_to_system_fonts(monkeypatch): | CODE |
| LOW⚡ | tests/common/test_datasets.py | 64 | def test_fonts_per_char_accepts_whitespace(): | CODE |
| LOW⚡ | tests/common/test_datasets.py | 68 | def test_fonts_per_char_raises_when_no_font_renders(monkeypatch): | CODE |
| LOW⚡ | tests/common/test_datasets.py | 76 | def test_resolve_fonts_raises_when_font_is_missing(): | CODE |
| LOW | tests/common/test_models_reading_order.py | 35 | def test_detect_text_direction(texts, language, expected): | CODE |
| LOW | tests/common/test_models_reading_order.py | 39 | def test_normalize_layout_label(): | CODE |
| LOW | tests/common/test_models_reading_order.py | 69 | def test_sort_reading_order_basic(): | CODE |
| LOW | tests/common/test_models_reading_order.py | 81 | def test_sort_reading_order_columns(): | CODE |
| 238 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 1 | CODE | |
| LOW | doctr/__init__.py | 2 | CODE | |
| LOW | doctr/datasets/__init__.py | 1 | CODE | |
| LOW | doctr/datasets/__init__.py | 2 | CODE | |
| LOW | doctr/datasets/__init__.py | 3 | CODE | |
| LOW | doctr/datasets/__init__.py | 4 | CODE | |
| LOW | doctr/datasets/__init__.py | 5 | CODE | |
| LOW | doctr/datasets/__init__.py | 6 | CODE | |
| LOW | doctr/datasets/__init__.py | 7 | CODE | |
| LOW | doctr/datasets/__init__.py | 8 | CODE | |
| LOW | doctr/datasets/__init__.py | 9 | CODE | |
| LOW | doctr/datasets/__init__.py | 10 | CODE | |
| LOW | doctr/datasets/__init__.py | 11 | CODE | |
| LOW | doctr/datasets/__init__.py | 12 | CODE | |
| LOW | doctr/datasets/__init__.py | 13 | CODE | |
| LOW | doctr/datasets/__init__.py | 14 | CODE | |
| LOW | doctr/datasets/__init__.py | 15 | CODE | |
| LOW | doctr/datasets/__init__.py | 16 | CODE | |
| LOW | doctr/datasets/__init__.py | 17 | CODE | |
| LOW | doctr/datasets/__init__.py | 18 | CODE | |
| LOW | doctr/datasets/__init__.py | 19 | CODE | |
| LOW | doctr/datasets/__init__.py | 20 | CODE | |
| LOW | doctr/datasets/__init__.py | 21 | CODE | |
| LOW | doctr/datasets/__init__.py | 22 | CODE | |
| LOW | doctr/datasets/__init__.py | 23 | CODE | |
| LOW | doctr/datasets/__init__.py | 24 | CODE | |
| LOW | doctr/datasets/datasets/__init__.py | 1 | CODE | |
| LOW | doctr/datasets/generator/__init__.py | 1 | CODE | |
| LOW | doctr/io/__init__.py | 1 | CODE | |
| LOW | doctr/io/__init__.py | 2 | CODE | |
| LOW | doctr/io/__init__.py | 3 | CODE | |
| LOW | doctr/io/__init__.py | 4 | CODE | |
| LOW | doctr/io/__init__.py | 5 | CODE | |
| LOW | doctr/io/__init__.py | 6 | CODE | |
| LOW | doctr/io/__init__.py | 7 | CODE | |
| LOW | doctr/io/figures.py | 20 | CODE | |
| LOW | doctr/io/figures.py | 20 | CODE | |
| LOW | doctr/io/exporters.py | 20 | CODE | |
| LOW | doctr/io/exporters.py | 20 | CODE | |
| LOW | doctr/io/image/__init__.py | 1 | CODE | |
| LOW | doctr/io/image/__init__.py | 2 | CODE | |
| LOW | doctr/utils/__init__.py | 1 | CODE | |
| LOW | doctr/utils/__init__.py | 2 | CODE | |
| LOW | doctr/utils/__init__.py | 3 | CODE | |
| LOW | doctr/utils/__init__.py | 4 | CODE | |
| LOW | doctr/models/__init__.py | 1 | CODE | |
| LOW | doctr/models/__init__.py | 2 | CODE | |
| LOW | doctr/models/__init__.py | 3 | CODE | |
| LOW | doctr/models/__init__.py | 4 | CODE | |
| LOW | doctr/models/__init__.py | 5 | CODE | |
| LOW | doctr/models/__init__.py | 6 | CODE | |
| LOW | doctr/models/__init__.py | 7 | CODE | |
| LOW | doctr/models/classification/__init__.py | 1 | CODE | |
| LOW | doctr/models/classification/__init__.py | 2 | CODE | |
| LOW | doctr/models/classification/__init__.py | 3 | CODE | |
| 74 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | references/layout/ddp_utils.py | 13 | __all__ = [ | CODE |
| LOW | references/table/ddp_utils.py | 13 | __all__ = [ | CODE |
| LOW | references/recognition/ddp_utils.py | 13 | __all__ = [ | CODE |
| LOW | references/detection/ddp_utils.py | 13 | __all__ = [ | CODE |
| LOW | doctr/file_utils.py | 9 | __all__ = ["requires_package", "CLASS_NAME"] | CODE |
| LOW | doctr/file_utils.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | doctr/datasets/recognition.py | 13 | __all__ = ["RecognitionDataset"] | CODE |
| LOW | doctr/datasets/synthtext.py | 18 | __all__ = ["SynthText"] | CODE |
| LOW | doctr/datasets/detection.py | 18 | __all__ = ["DetectionDataset"] | CODE |
| LOW | doctr/datasets/coco_text.py | 17 | __all__ = ["COCOTEXT"] | CODE |
| LOW | doctr/datasets/orientation.py | 13 | __all__ = ["OrientationDataset"] | CODE |
| LOW | doctr/datasets/table_structure.py | 19 | __all__ = ["TableStructureDataset"] | CODE |
| LOW | doctr/datasets/layout.py | 16 | __all__ = ["LayoutDataset"] | CODE |
| LOW | doctr/datasets/cord.py | 17 | __all__ = ["CORD"] | CODE |
| LOW | doctr/datasets/mjsynth.py | 13 | __all__ = ["MJSynth"] | CODE |
| LOW | doctr/datasets/wildreceipt.py | 17 | __all__ = ["WILDRECEIPT"] | CODE |
| LOW | doctr/datasets/doc_artefacts.py | 14 | __all__ = ["DocArtefacts"] | CODE |
| LOW | doctr/datasets/svhn.py | 16 | __all__ = ["SVHN"] | CODE |
| LOW | doctr/datasets/iiit5k.py | 17 | __all__ = ["IIIT5K"] | CODE |
| LOW | doctr/datasets/imgur5k.py | 20 | __all__ = ["IMGUR5K"] | CODE |
| LOW | doctr/datasets/ic13.py | 17 | __all__ = ["IC13"] | CODE |
| LOW | doctr/datasets/ocr.py | 15 | __all__ = ["OCRDataset"] | CODE |
| LOW | doctr/datasets/ic03.py | 16 | __all__ = ["IC03"] | CODE |
| LOW | doctr/datasets/utils.py | 22 | __all__ = [ | CODE |
| LOW | doctr/datasets/vocabs.py | 9 | __all__ = ["VOCABS"] | CODE |
| LOW | doctr/datasets/funsd.py | 17 | __all__ = ["FUNSD"] | CODE |
| LOW | doctr/datasets/sroie.py | 17 | __all__ = ["SROIE"] | CODE |
| LOW | doctr/datasets/iiithws.py | 14 | __all__ = ["IIITHWS"] | CODE |
| LOW | doctr/datasets/svt.py | 16 | __all__ = ["SVT"] | CODE |
| LOW | doctr/datasets/datasets/pytorch.py | 18 | __all__ = ["AbstractDataset", "VisionDataset"] | CODE |
| LOW | doctr/datasets/datasets/base.py | 15 | __all__ = ["_AbstractDataset", "_VisionDataset"] | CODE |
| LOW | doctr/datasets/generator/pytorch.py | 8 | __all__ = ["CharacterGenerator", "WordGenerator"] | CODE |
| LOW | doctr/io/elements.py | 22 | __all__ = [ | CODE |
| LOW | doctr/io/html.py | 8 | __all__ = ["read_html"] | CODE |
| LOW | doctr/io/pdf.py | 13 | __all__ = ["read_pdf"] | CODE |
| LOW | doctr/io/reader.py | 18 | __all__ = ["DocumentFile"] | CODE |
| LOW | doctr/io/figures.py | 22 | __all__ = [ | CODE |
| LOW | doctr/io/exporters.py | 22 | __all__ = [ | CODE |
| LOW | doctr/io/image/pytorch.py | 15 | __all__ = ["tensor_from_pil", "read_img_as_tensor", "decode_img_as_tensor", "tensor_from_numpy", "get_img_shape"] | CODE |
| LOW | doctr/io/image/base.py | 13 | __all__ = ["read_img_as_numpy"] | CODE |
| LOW | doctr/utils/metrics.py | 12 | __all__ = [ | CODE |
| LOW | doctr/utils/common_types.py | 12 | __all__ = ["Point2D", "BoundingBox", "Polygon4P", "Polygon", "Bbox", "Sample"] | CODE |
| LOW | doctr/utils/visualization.py | 17 | __all__ = ["visualize_page", "visualize_kie_page", "draw_boxes"] | CODE |
| LOW | doctr/utils/repr.py | 9 | __all__ = ["NestedObject"] | CODE |
| LOW | doctr/utils/geometry.py | 13 | __all__ = [ | CODE |
| LOW | doctr/utils/reconstitution.py | 16 | __all__ = ["synthesize_page", "synthesize_kie_page"] | CODE |
| LOW | doctr/utils/reconstitution.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | doctr/utils/fonts.py | 12 | __all__ = ["get_font", "get_font_candidates"] | CODE |
| LOW | doctr/utils/fonts.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | doctr/utils/data.py | 18 | __all__ = ["download_from_url"] | CODE |
| LOW | doctr/utils/data.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | doctr/utils/multithreading.py | 15 | __all__ = ["multithread_exec"] | CODE |
| LOW | doctr/models/zoo.py | 16 | __all__ = ["ocr_predictor", "kie_predictor"] | CODE |
| LOW | doctr/models/core.py | 11 | __all__ = ["BaseModel"] | CODE |
| LOW | doctr/models/builder.py | 35 | __all__ = ["DocumentBuilder"] | CODE |
| LOW | doctr/models/_utils.py | 18 | __all__ = [ | CODE |
| LOW | doctr/models/classification/zoo.py | 14 | __all__ = ["crop_orientation_predictor", "page_orientation_predictor"] | CODE |
| LOW | doctr/models/classification/magc_resnet/pytorch.py | 19 | __all__ = ["magc_resnet31"] | CODE |
| LOW | doctr/models/classification/mobilenet/pytorch.py | 19 | __all__ = [ | CODE |
| LOW | doctr/models/classification/vip/pytorch.py | 26 | __all__ = ["VIPNet", "vip_tiny", "vip_base"] | CODE |
| 61 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/app.py | 20 | CODE | |
| LOW | references/layout/utils.py | 46 | CODE | |
| LOW | references/recognition/train.py | 223 | CODE | |
| LOW | references/recognition/evaluate.py | 34 | CODE | |
| LOW | references/detection/utils.py | 19 | CODE | |
| LOW | references/detection/train.py | 199 | CODE | |
| LOW | references/detection/train.py | 246 | CODE | |
| LOW | tests/common/test_models_detection_utils.py | 29 | CODE | |
| LOW | tests/common/test_headers.py | 7 | CODE | |
| LOW | tests/common/test_io_elements.py | 576 | CODE | |
| LOW | tests/common/test_io_elements.py | 620 | CODE | |
| LOW | doctr/datasets/synthtext.py | 51 | CODE | |
| LOW | doctr/datasets/coco_text.py | 47 | CODE | |
| LOW | doctr/datasets/cord.py | 52 | CODE | |
| LOW | doctr/datasets/wildreceipt.py | 50 | CODE | |
| LOW | doctr/datasets/svhn.py | 51 | CODE | |
| LOW | doctr/datasets/iiit5k.py | 45 | CODE | |
| LOW | doctr/datasets/imgur5k.py | 54 | CODE | |
| LOW | doctr/datasets/ic13.py | 46 | CODE | |
| LOW | doctr/datasets/ic03.py | 50 | CODE | |
| LOW | doctr/datasets/funsd.py | 44 | CODE | |
| LOW | doctr/datasets/sroie.py | 51 | CODE | |
| LOW | doctr/datasets/svt.py | 42 | CODE | |
| LOW | doctr/io/exporters.py | 134 | CODE | |
| LOW | doctr/utils/metrics.py | 731 | CODE | |
| LOW | doctr/utils/visualization.py | 155 | CODE | |
| LOW | doctr/utils/visualization.py | 308 | CODE | |
| LOW | doctr/utils/repr.py | 32 | CODE | |
| LOW | doctr/utils/reconstitution.py | 571 | CODE | |
| LOW | doctr/utils/data.py | 28 | CODE | |
| LOW | doctr/models/builder.py | 424 | CODE | |
| LOW | doctr/models/builder.py | 831 | CODE | |
| LOW | doctr/models/_utils.py | 123 | CODE | |
| LOW | doctr/models/classification/vit_det/pytorch.py | 231 | CODE | |
| LOW | doctr/models/layout/lw_detr/pytorch.py | 269 | CODE | |
| LOW | doctr/models/layout/lw_detr/base.py | 89 | CODE | |
| LOW | doctr/models/layout/lw_detr/base.py | 216 | CODE | |
| LOW | doctr/models/reading_order/base.py | 85 | CODE | |
| LOW | doctr/models/reading_order/base.py | 182 | CODE | |
| LOW | doctr/models/table_structure/tablecenternet/base.py | 295 | CODE | |
| LOW | doctr/models/table_structure/tablecenternet/base.py | 112 | CODE | |
| LOW | doctr/models/recognition/sar/pytorch.py | 114 | CODE | |
| LOW | doctr/models/recognition/parseq/pytorch.py | 127 | CODE | |
| LOW | doctr/models/recognition/parseq/pytorch.py | 326 | CODE | |
| LOW | doctr/models/predictor/base.py | 260 | CODE | |
| LOW | doctr/models/detection/_utils/base.py | 12 | CODE | |
| LOW | …r/models/detection/differentiable_binarization/base.py | 270 | CODE | |
| LOW | doctr/models/detection/linknet/base.py | 159 | CODE | |
| LOW | doctr/models/detection/fast/base.py | 156 | CODE | |
| LOW | doctr/models/factory/hub.py | 192 | CODE | |
| LOW | doctr/cli/main.py | 98 | CODE | |
| LOW | doctr/cli/main.py | 318 | CODE | |
| LOW | doctr/contrib/artefacts.py | 68 | CODE | |
| LOW | doctr/transforms/modules/pytorch.py | 100 | CODE | |
| LOW | scripts/evaluate_kie.py | 23 | CODE | |
| LOW | scripts/collect_env.py | 167 | CODE | |
| LOW | scripts/evaluate.py | 23 | CODE | |
| LOW | api/tests/routes/test_ocr.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/common/test_io_figures.py | 121 | encoder = FigureEncoder("placeholder") | CODE |
| LOW⚡ | tests/common/test_io_figures.py | 123 | assert "placeholder" in repr(encoder) | CODE |
| LOW⚡ | tests/common/test_io_figures.py | 132 | assert FigureEncoder("placeholder").source(page, region, 1) is None | CODE |
| LOW⚡ | tests/common/test_io_figures.py | 133 | assert FigureEncoder("placeholder").enabled and not FigureEncoder("placeholder").materializes | CODE |
| LOW | tests/common/test_models_recognition_utils.py | 68 | ("lorem ipsum dolorX", "Xipsvm dolor sit", 0.7, "lorem ipsum dolor sit"), | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1307 | placeholder = page.export_as_markdown(images="placeholder") | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1310 | for images in ("none", "placeholder", "embedded"): | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1315 | assert page.export_as_markdown(images="placeholder", include_furniture=False).count("<!-- image -->") == 1 | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1415 | placeholder = page.export_as_markdown(images="placeholder", escape=escape) | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1442 | assert page.export_as_markdown(images="placeholder").count("<!-- image -->") == 2 | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1444 | for images in ("none", "placeholder", "embedded"): | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1469 | for images, markers in (("placeholder", "<!-- image -->"), ("embedded", "![")): | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1472 | assert ("tick" in exported) is (images == "placeholder") | CODE |
| LOW⚡ | tests/common/test_io_exporters.py | 1476 | assert ("tick" in exported) is (images == "placeholder" and not in_furniture) | CODE |
| LOW | tests/common/test_io_exporters.py | 1352 | markdown = page.export_as_markdown(images="placeholder") | CODE |
| LOW | tests/common/test_cli.py | 117 | assert args.images == "placeholder" | CODE |
| LOW | tests/common/test_cli.py | 299 | assert cli._export_kwargs("html", _args())["images"].mode == "placeholder" | CODE |
| LOW | tests/pytorch/test_models_zoo_pt.py | 413 | exports = {images: page.export_as_markdown(images=images) for images in ("none", "placeholder", "embedded")} | CODE |
| LOW | tests/pytorch/test_models_zoo_pt.py | 430 | assert exports["placeholder"].count("<!-- image -->") == 1 | CODE |
| LOW | tests/pytorch/test_models_zoo_pt.py | 431 | assert exports["placeholder"].replace("<!-- image -->\n\n", "") == exports["none"] | CODE |
| LOW | doctr/io/figures.py | 33 | IMAGE_MODES = ("none", "placeholder", "embedded", "referenced") | CODE |
| LOW | doctr/io/figures.py | 196 | mode: one of 'none', 'placeholder', 'embedded' or 'referenced' | STRING |
| LOW | doctr/io/figures.py | 206 | mode: str = "placeholder", | CODE |
| LOW | doctr/io/exporters.py | 589 | images: "str | FigureEncoder | None" = "placeholder", | CODE |
| LOW | doctr/io/exporters.py | 599 | images: how to render the figures: 'none', 'placeholder', 'embedded', or a | STRING |
| LOW | doctr/io/exporters.py | 1359 | images: "str | FigureEncoder | None" = "placeholder", | CODE |
| LOW | doctr/io/exporters.py | 1367 | images: how to render the figures: 'none', 'placeholder', 'embedded', or a | STRING |
| LOW | doctr/io/exporters.py | 1386 | images: "str | FigureEncoder | None" = "placeholder", | CODE |
| LOW | doctr/io/exporters.py | 1395 | images: how to render the figures: 'none', 'placeholder', 'embedded', or a | STRING |
| LOW | doctr/io/exporters.py | 1413 | images: "str | FigureEncoder | None" = "placeholder", | CODE |
| LOW | doctr/io/exporters.py | 1420 | images: how to render the figures: 'none', 'placeholder', 'embedded', or a | STRING |
| LOW | doctr/cli/main.py | 543 | default="placeholder", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doctr/models/zoo.py | 19 | CODE | |
| LOW | doctr/models/zoo.py | 107 | CODE | |
| LOW | doctr/models/zoo.py | 198 | CODE | |
| LOW | doctr/models/zoo.py | 270 | CODE | |
| LOW | doctr/models/classification/starnet/pytorch.py | 95 | CODE | |
| LOW | doctr/models/classification/vit_det/pytorch.py | 164 | CODE | |
| LOW | doctr/models/kie_predictor/pytorch.py | 45 | CODE | |
| LOW | doctr/models/layout/lw_detr/pytorch.py | 269 | CODE | |
| LOW | doctr/models/layout/lw_detr/layers/pytorch.py | 372 | CODE | |
| LOW | doctr/models/layout/lw_detr/layers/pytorch.py | 500 | CODE | |
| LOW | doctr/models/reading_order/base.py | 547 | CODE | |
| LOW | doctr/models/reading_order/base.py | 647 | CODE | |
| LOW | doctr/models/table_structure/tablecenternet/pytorch.py | 157 | CODE | |
| LOW | doctr/models/recognition/master/pytorch.py | 57 | CODE | |
| LOW | doctr/models/recognition/sar/pytorch.py | 182 | CODE | |
| LOW | doctr/models/recognition/parseq/pytorch.py | 127 | CODE | |
| LOW | doctr/models/predictor/pytorch.py | 50 | CODE | |
| LOW | …odels/detection/differentiable_binarization/pytorch.py | 113 | CODE | |
| LOW | doctr/models/detection/linknet/pytorch.py | 85 | CODE | |
| LOW | doctr/models/detection/linknet/pytorch.py | 105 | CODE | |
| LOW | doctr/models/detection/fast/pytorch.py | 119 | CODE | |
| LOW | doctr/transforms/functional/pytorch.py | 50 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | references/classification/utils.py | 195 | except Exception: | CODE |
| LOW | references/layout/utils.py | 286 | except Exception: | CODE |
| LOW | references/table/utils.py | 257 | except Exception: | CODE |
| LOW | references/recognition/utils.py | 195 | except Exception: | CODE |
| LOW | references/detection/utils.py | 206 | except Exception: | CODE |
| LOW | doctr/utils/reconstitution.py | 37 | except Exception: # pragma: no cover | CODE |
| LOW | doctr/utils/reconstitution.py | 168 | except Exception: # pragma: no cover | CODE |
| LOW | doctr/utils/reconstitution.py | 172 | except Exception: | CODE |
| LOW | doctr/utils/reconstitution.py | 250 | except Exception: # pragma: no cover - a bitmap font may not measure a space | CODE |
| LOW | doctr/utils/reconstitution.py | 562 | except Exception as exc: | CODE |
| LOW | doctr/utils/reconstitution.py | 603 | except Exception as exc: | CODE |
| LOW | doctr/utils/reconstitution.py | 667 | except Exception as exc: | CODE |
| LOW | doctr/models/table_structure/tablecenternet/base.py | 270 | except Exception: | CODE |
| LOW | doctr/cli/main.py | 125 | except Exception as e: | CODE |
| LOW | doctr/cli/main.py | 329 | except Exception as e: | CODE |
| LOW | doctr/cli/main.py | 353 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/common/test_io_exporters.py | 833 | 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 |
| HIGH | docs/source/conf.py | 133 | function gtag(){{dataLayer.push(arguments);}} | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/pytorch/test_models_zoo_pt.py | 27 | # Create a dummy callback | COMMENT |
| MEDIUM | doctr/models/builder.py | 168 | # Define a mean y-center for the line | COMMENT |
| MEDIUM | doctr/models/layout/lw_detr/layers/pytorch.py | 116 | """This module implements the self-attention mechanism used in LW-DETR. | STRING |
| MEDIUM | doctr/models/layout/lw_detr/layers/pytorch.py | 196 | """This module implements MultiScaleDeformableAttention from Deformable DETR. | STRING |
| MEDIUM | doctr/models/layout/lw_detr/layers/pytorch.py | 358 | """This module implements a single decoder layer of LW-DETR, | STRING |
| MEDIUM | doctr/models/layout/lw_detr/layers/pytorch.py | 485 | """This module implements the decoder of LW-DETR, | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | doctr/datasets/generator/base.py | 96 | Generate a synthetic text image Args: text: the text to render as an image font_size: the size of t | STRING |
| HIGH | doctr/utils/multithreading.py | 19 | Execute a given function in parallel for each element of a given sequence >>> from doctr.utils.multithreading impor | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | doctr/io/elements.py | 19 | except ModuleNotFoundError: # pragma: no cover | CODE |
| HIGH | doctr/io/exporters.py | 130 | except AttributeError: # pragma: no cover | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/pytorch/test_transforms_pt.py | 737 | # ---------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/pytorch/test_transforms_pt.py | 739 | # ---------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doctr/models/recognition/vitstr/pytorch.py | 156 | # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]! | COMMENT |
| LOW | doctr/models/recognition/vitstr/pytorch.py | 156 | # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]! | COMMENT |
| LOW | doctr/models/recognition/master/pytorch.py | 148 | # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]! | COMMENT |
| LOW | doctr/models/recognition/master/pytorch.py | 148 | # Compute loss: don't forget to shift gt! Otherwise the model learns to output the gt[t-1]! | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 341 | # labels: label is also ascii | COMMENT |
| LOW | docs/source/conf.py | 1 | # Copyright (C) 2021-2026, Mindee. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doctr/utils/geometry.py | 623 | # Add the crop to the list of crops | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doctr/models/factory/hub.py | 126 | ### Example usage: | COMMENT |