A lightweight LMM-based Document Parsing Model
This report summarizes scanner evidence for Yuliang-Liu/MonkeyOCR, a Python project with 6,651 GitHub stars. SynthScan examined 14,478 lines of code across 109 source files, recording 278 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 28.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? 152 finding(s).
Are imports declared and package/API names verified? 18 finding(s).
Are wrappers, guards, and repeated structures necessary? 156 finding(s).
Which changes need focused human review? 278 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 278 distinct pattern matches across 13 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 |
|---|---|---|---|---|
| MEDIUM | parse.py | 328 | print(f"Error while saving results for file '{file_name}'. Skipping this file's outputs.", file=sys.stde | CODE |
| LOW | parse.py | 114 | except Exception as e: | CODE |
| LOW | parse.py | 137 | except Exception as e: | CODE |
| LOW | parse.py | 205 | except Exception as e: | CODE |
| LOW | parse.py | 326 | except Exception: | CODE |
| LOW | parse.py | 381 | except Exception as e: | CODE |
| LOW | parse.py | 423 | except Exception as cleanup_error: | CODE |
| LOW | parse.py | 426 | except Exception as e: | CODE |
| LOW | parse.py | 477 | except Exception as e: | CODE |
| LOW | parse.py | 526 | except Exception as cleanup_error: | CODE |
| LOW | parse.py | 531 | except Exception as e: | CODE |
| LOW | parse.py | 792 | except Exception as e: | STRING |
| LOW | parse.py | 810 | except Exception as cleanup_error: | STRING |
| LOW | magic_pdf/utils/load_image.py | 36 | except Exception as error: | CODE |
| LOW | magic_pdf/utils/load_image.py | 92 | except Exception as error: | CODE |
| LOW | magic_pdf/libs/pdf_check.py | 28 | except Exception as e: | CODE |
| MEDIUM | magic_pdf/model/custom_model.py | 173 | def __init__(self, model_path, dp=1, tp=1): | CODE |
| MEDIUM | magic_pdf/model/custom_model.py | 520 | def __init__(self, model_path, dp=1, tp=1, max_batch_size=32, queue_timeout=0.1, | CODE |
| MEDIUM | magic_pdf/model/custom_model.py | 885 | def __init__(self, model_path, tp=1, max_batch_size=64, queue_timeout=0.1, max_q | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 665 | except Exception as e: | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 674 | except Exception: | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 677 | except Exception as e: | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 1027 | except Exception as e: | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 1036 | except Exception: | CODE |
| LOW⚡ | magic_pdf/model/custom_model.py | 1039 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 294 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 338 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 345 | except Exception as single_e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 464 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 503 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 599 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 695 | except Exception as set_error: | CODE |
| LOW | magic_pdf/model/custom_model.py | 733 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 767 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 822 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 861 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 870 | except Exception: | CODE |
| LOW | magic_pdf/model/custom_model.py | 950 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1057 | except Exception as set_error: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1095 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1129 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1184 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1223 | except Exception as e: | CODE |
| LOW | magic_pdf/model/custom_model.py | 1232 | except Exception: | CODE |
| LOW | magic_pdf/model/async_vllm.py | 79 | except Exception as abort_err: | CODE |
| LOW | magic_pdf/model/async_vllm.py | 95 | except Exception as e: | CODE |
| LOW | magic_pdf/model/async_vllm.py | 131 | except Exception as e: | CODE |
| LOW | magic_pdf/filter/pdf_classify_by_type.py | 340 | except Exception as e: | CODE |
| LOW | magic_pdf/data/read_api.py | 111 | except Exception as e: | CODE |
| LOW | magic_pdf/data/dataset.py | 350 | except Exception: | CODE |
| LOW | demo/demo_gradio.py | 138 | except Exception as e: | STRING |
| LOW | demo/demo_gradio.py | 213 | except Exception: | STRING |
| LOW | demo/demo_gradio.py | 267 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/fix_qwen2_5_vl_awq.py | 16 | print(f"Error: calibrate.py file not found, expected path: {calibrate_file}") | CODE |
| MEDIUM⚡ | tools/fix_qwen2_5_vl_awq.py | 19 | print("Error: lmdeploy is not installed in current environment") | CODE |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 28 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/fix_qwen2_5_vl_awq.py | 29 | print(f"Error: Failed to read file - {e}") | CODE |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 57 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/fix_qwen2_5_vl_awq.py | 58 | print(f"Error: Failed to write file - {e}") | CODE |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 74 | except Exception as e: | CODE |
| 25 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | magic_pdf/operators/pipes_llm.py | 0 | apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any: | STRING |
| HIGH | magic_pdf/operators/__init__.py | 0 | apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any: | STRING |
| HIGH | magic_pdf/operators/models_llm.py | 0 | apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any: | STRING |
| HIGH | magic_pdf/data/dataset.py | 0 | apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any: | STRING |
| HIGH | magic_pdf/data/data_reader_writer/filebase.py | 0 | read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with paren | STRING |
| HIGH | magic_pdf/data/io/s3.py | 0 | read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with paren | STRING |
| HIGH | magic_pdf/data/io/base.py | 0 | read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with paren | STRING |
| HIGH | magic_pdf/data/data_reader_writer/filebase.py | 0 | write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_di | STRING |
| HIGH | magic_pdf/data/io/http.py | 0 | write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_di | STRING |
| HIGH | magic_pdf/data/io/s3.py | 0 | write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_di | STRING |
| HIGH | magic_pdf/data/io/base.py | 0 | write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_di | STRING |
| HIGH | magic_pdf/data/data_reader_writer/base.py | 0 | read the file. args: path (str): file path to read returns: bytes: the content of the file | STRING |
| HIGH | magic_pdf/data/io/http.py | 0 | read the file. args: path (str): file path to read returns: bytes: the content of the file | STRING |
| HIGH | magic_pdf/data/io/s3.py | 0 | read the file. args: path (str): file path to read returns: bytes: the content of the file | STRING |
| HIGH | magic_pdf/data/io/base.py | 0 | read the file. args: path (str): file path to read returns: bytes: the content of the file | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | parse.py | 20 | CODE | |
| LOW | parse.py | 166 | CODE | |
| LOW | parse.py | 339 | CODE | |
| LOW | parse.py | 431 | CODE | |
| LOW | parse.py | 639 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 67 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 132 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 180 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 351 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 392 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 538 | CODE | |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 565 | CODE | |
| LOW | magic_pdf/post_proc/para_split_v3.py | 66 | CODE | |
| LOW | magic_pdf/post_proc/para_split_v3.py | 254 | CODE | |
| LOW | magic_pdf/post_proc/para_split_v3.py | 320 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 7 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 44 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 67 | CODE | |
| LOW | magic_pdf/pre_proc/remove_bbox_overlap.py | 42 | CODE | |
| LOW | magic_pdf/pre_proc/cut_image.py | 8 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 115 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 135 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 163 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 191 | CODE | |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 212 | CODE | |
| LOW | magic_pdf/dict2md/ocr_mkcontent.py | 53 | CODE | |
| LOW | magic_pdf/dict2md/ocr_mkcontent.py | 129 | CODE | |
| LOW | magic_pdf/dict2md/ocr_mkcontent.py | 181 | CODE | |
| LOW | magic_pdf/dict2md/ocr_mkcontent.py | 244 | CODE | |
| LOW | magic_pdf/utils/load_image.py | 15 | CODE | |
| LOW | magic_pdf/utils/load_image.py | 52 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 71 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 201 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 289 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 359 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 409 | CODE | |
| LOW | magic_pdf/libs/draw_bbox.py | 211 | CODE | |
| LOW | magic_pdf/libs/boxbase.py | 356 | CODE | |
| LOW | magic_pdf/model/batch_analyze_llm.py | 17 | CODE | |
| LOW | magic_pdf/model/batch_analyze_llm.py | 171 | CODE | |
| LOW | magic_pdf/model/doc_analyze_by_custom_model_llm.py | 12 | CODE | |
| LOW | magic_pdf/model/custom_model.py | 23 | CODE | |
| LOW | magic_pdf/model/custom_model.py | 320 | CODE | |
| LOW | magic_pdf/model/custom_model.py | 621 | CODE | |
| LOW | magic_pdf/model/custom_model.py | 972 | CODE | |
| LOW | magic_pdf/model/magic_model.py | 78 | CODE | |
| LOW | magic_pdf/model/magic_model.py | 142 | CODE | |
| LOW | magic_pdf/model/magic_model.py | 215 | CODE | |
| LOW | magic_pdf/model/magic_model.py | 543 | CODE | |
| LOW | magic_pdf/model/magic_model.py | 596 | CODE | |
| LOW | magic_pdf/model/sub_modules/model_utils.py | 27 | CODE | |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 60 | CODE | |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 178 | CODE | |
| LOW | magic_pdf/filter/pdf_classify_by_type.py | 316 | CODE | |
| LOW | magic_pdf/data/read_api.py | 53 | CODE | |
| LOW | magic_pdf/data/read_api.py | 76 | CODE | |
| LOW | magic_pdf/data/read_api.py | 119 | CODE | |
| LOW | magic_pdf/data/dataset.py | 306 | CODE | |
| LOW | magic_pdf/data/utils.py | 35 | CODE | |
| LOW | demo/demo_gradio.py | 39 | CODE | |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | parse.py | 166 | def create_file_groups_by_page_count(file_paths, max_pages_per_group): | CODE |
| LOW | parse.py | 339 | def single_task_recognition_multi_file_group(file_paths, output_dir, MonkeyOCR_model, task, base_folder_path): | CODE |
| LOW | magic_pdf/operators/pipes_llm.py | 173 | def get_compress_pdf_mid_data(self): | CODE |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 7 | def remove_overlaps_low_confidence_spans(spans): | CODE |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 36 | def check_chars_is_overlap_in_span(chars): | CODE |
| LOW | magic_pdf/pre_proc/ocr_span_list_modify.py | 44 | def remove_overlaps_min_spans(spans): | CODE |
| LOW | magic_pdf/pre_proc/ocr_dict_merge.py | 6 | def line_sort_spans_by_left_to_right(lines): | CODE |
| LOW | magic_pdf/pre_proc/remove_bbox_overlap.py | 5 | def _remove_overlap_between_bbox(bbox1, bbox2): | CODE |
| LOW | magic_pdf/pre_proc/remove_bbox_overlap.py | 42 | def _remove_overlap_between_bboxes(arr): | CODE |
| LOW | magic_pdf/pre_proc/remove_bbox_overlap.py | 79 | def remove_overlap_between_bbox_for_span(spans): | CODE |
| LOW | magic_pdf/pre_proc/remove_bbox_overlap.py | 91 | def remove_overlap_between_bbox_for_block(all_bboxes): | CODE |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 115 | def find_blocks_under_footnote(all_bboxes, footnote_blocks): | CODE |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 135 | def fix_interline_equation_overlap_text_blocks_with_hi_iou(all_bboxes): | CODE |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 163 | def fix_text_overlap_title_blocks(all_bboxes): | CODE |
| LOW | magic_pdf/pre_proc/ocr_detect_all_bboxes.py | 212 | def remove_overlaps_min_blocks(all_bboxes): | CODE |
| LOW | magic_pdf/dict2md/ocr_mkcontent.py | 26 | def ocr_mk_mm_markdown_with_para_and_pagination(pdf_info_dict: list, | CODE |
| LOW | magic_pdf/libs/config_reader.py | 14 | def get_current_file_parent_parent_dir(): | CODE |
| LOW | magic_pdf/libs/config_reader.py | 67 | def get_local_layoutreader_model_dir(): | CODE |
| LOW | magic_pdf/libs/pdf_check.py | 56 | def count_replacement_characters(text: str) -> int: | CODE |
| LOW | magic_pdf/libs/pdf_check.py | 60 | def detect_invalid_chars_by_pymupdf(src_pdf_bytes: bytes) -> bool: | CODE |
| LOW | magic_pdf/libs/markdown_utils.py | 2 | def ocr_escape_special_markdown_char(content): | CODE |
| LOW | magic_pdf/libs/language.py | 15 | def remove_invalid_surrogates(text): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 17 | def _is_in_or_part_overlap_with_area_ratio(box1, | CODE |
| LOW | magic_pdf/libs/boxbase.py | 81 | def _is_vertical_full_overlap(box1, box2, x_tolerance=2): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 136 | def __is_overlaps_y_exceeds_threshold(bbox1, | CODE |
| LOW | magic_pdf/libs/boxbase.py | 216 | def get_minbox_if_overlap_by_ratio(bbox1, bbox2, ratio): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 247 | def find_top_nearest_text_bbox(pymu_blocks, obj_bbox): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 276 | def find_bottom_nearest_text_bbox(pymu_blocks, obj_bbox): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 299 | def find_left_nearest_text_bbox(pymu_blocks, obj_bbox): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 322 | def find_right_nearest_text_bbox(pymu_blocks, obj_bbox): | CODE |
| LOW | magic_pdf/libs/boxbase.py | 404 | def calculate_vertical_projection_overlap_ratio(block1, block2): | CODE |
| LOW | magic_pdf/model/magic_model.py | 66 | def __fix_by_remove_low_confidence(self): | CODE |
| LOW | magic_pdf/model/magic_model.py | 78 | def __fix_by_remove_high_iou_and_low_confidence(self): | CODE |
| LOW | magic_pdf/model/sub_modules/model_utils.py | 27 | def get_res_list_from_layout_res(layout_res): | CODE |
| LOW | magic_pdf/model/sub_modules/model_init.py | 8 | def doclayout_yolo_model_init(weight, device='cpu'): | CODE |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 15 | def calculate_max_image_area_per_page(result: list, page_width_pts, page_height_pts): | CODE |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 178 | def get_pdf_text_layout_per_page(doc: fitz.Document): | CODE |
| LOW | magic_pdf/filter/pdf_classify_by_type.py | 229 | def classify_by_img_narrow_strips(page_width, page_height, img_sz_list): | CODE |
| LOW | demo/demo_gradio.py | 39 | def render_latex_table_to_image(latex_content, temp_dir): | CODE |
| LOW | demo/demo_gradio.py | 142 | async def parse_pdf_and_return_results(pdf_file): | STRING |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 6 | def find_lmdeploy_calibrate_file(): | CODE |
| LOW | api/main.py | 202 | async def process_inference_results_async(infer_result, output_dir, name_without_suff, | CODE |
| LOW | api/main.py | 237 | async def process_single_page_async(page_infer_result, page_idx, output_dir, name_without_suff, monkey_ocr_model): | CODE |
| LOW | api/main.py | 285 | async def process_single_result_async(infer_result, name_without_suff, local_image_dir, local_md_dir, image_dir, monkey_ | CODE |
| LOW | api/main.py | 309 | async def async_single_task_recognition(input_file_path: str, output_dir: str, task: str): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | parse.py | 35 | # Check if folder exists | COMMENT |
| LOW | parse.py | 194 | # Check if adding this file would exceed the limit | COMMENT |
| LOW | parse.py | 444 | # Check if input file exists | COMMENT |
| LOW | parse.py | 546 | # Check if input file exists | COMMENT |
| LOW | parse.py | 564 | # Read file content | COMMENT |
| LOW | parse.py | 581 | # Check if infer_result is a list type | COMMENT |
| LOW | parse.py | 742 | # Check if input path is a directory or file | STRING |
| LOW | magic_pdf/pdf_parse_union_core_v2_llm.py | 68 | # Check if char in span is empty | COMMENT |
| LOW | magic_pdf/model/batch_analyze_llm.py | 64 | # Check if split_pages is True and handle pages without valid cids | COMMENT |
| LOW | magic_pdf/model/batch_analyze_llm.py | 71 | # Check if this page has any valid cids | COMMENT |
| LOW | magic_pdf/model/custom_model.py | 706 | # Add request to queue | COMMENT |
| LOW | magic_pdf/model/custom_model.py | 1068 | # Add request to queue | COMMENT |
| LOW | magic_pdf/filter/pdf_classify_by_type.py | 75 | # Check if the image can be merged with the last image | COMMENT |
| LOW | demo/demo_gradio.py | 109 | # Check if PDF file is generated | STRING |
| LOW | demo/demo_gradio.py | 184 | # Check if contains \begin{tabular} | STRING |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 24 | # Read file content | COMMENT |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 32 | # Check if already patched | COMMENT |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 67 | # Check if backup exists | COMMENT |
| LOW⚡ | tools/fix_qwen2_5_vl_awq.py | 86 | # Check if file is in patched state | COMMENT |
| LOW | tools/lmdeploy_patcher.py | 116 | # Read file content | COMMENT |
| LOW | tools/lmdeploy_patcher.py | 126 | # Check if already modified | COMMENT |
| LOW | docker/download_models.sh | 26 | # Check if models already exist | COMMENT |
| LOW | docker/download_models.sh | 84 | # Check if download script exists | COMMENT |
| LOW | api/main.py | 155 | # Read file content in thread pool | COMMENT |
| LOW | api/main.py | 214 | # Check if infer_result is a list (split pages) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | magic_pdf/model/custom_model.py | 870 | except Exception: | CODE |
| HIGH | magic_pdf/model/custom_model.py | 1232 | except Exception: | CODE |
| HIGH | magic_pdf/model/custom_model.py | 674 | except Exception: | CODE |
| HIGH | magic_pdf/model/custom_model.py | 1036 | except Exception: | CODE |
| HIGH | api/main.py | 143 | except FileExistsError: | CODE |
| HIGH | api/main.py | 252 | except FileExistsError: | CODE |
| HIGH | api/main.py | 334 | except FileExistsError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | magic_pdf/utils/annotations.py | 7 | CODE | |
| LOW | magic_pdf/model/custom_model.py | 5 | CODE | |
| LOW | …del/sub_modules/layout/doclayout_yolo/DocLayoutYOLO.py | 2 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 1 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 3 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 5 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 7 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 9 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 10 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 11 | CODE | |
| LOW | magic_pdf/data/data_reader_writer/__init__.py | 12 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 2 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 2 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 3 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 3 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 4 | CODE | |
| LOW | magic_pdf/data/io/__init__.py | 4 | CODE | |
| LOW | api/main.py | 356 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | magic_pdf/libs/draw_bbox.py | 17 | rect_coords = fitz.Rect(x0, y0, x1, y1) * page.derotation_matrix # Define the rectangle | CODE |
| MEDIUM | magic_pdf/libs/draw_bbox.py | 46 | rect_coords = fitz.Rect(x0, y0, x1, y1) * page.derotation_matrix # Define the rectangle | CODE |
| MEDIUM | magic_pdf/model/batch_analyze_llm.py | 92 | # Create a single result covering the whole page | COMMENT |
| MEDIUM | magic_pdf/model/sub_modules/model_utils.py | 13 | # Create a white background with an additional width and height of 50 | COMMENT |
| MEDIUM | magic_pdf/data/dataset.py | 326 | # Create a new PDF document | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | magic_pdf/data/read_api.py | 16 | Read the jsonl file and return the list of PymuDocDataset. Args: s3_path_or_local (str): local file or s3 p | STRING |
| HIGH | magic_pdf/data/read_api.py | 77 | Read ms-office file (ppt, pptx, doc, docx) from path or directory. Args: path (str): ms-office file or dire | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | model_configs.yaml | 21 | COMMENT | |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 221 | # dir_value = line['dir'] | COMMENT |
| LOW | magic_pdf/filter/pdf_meta_scan.py | 361 | # "D:/project/20231108code-clean/pdf_cost_time/scihub/scihub_18600000/libgen.scimag18645000-18645999.zip_10.1021/om3 | COMMENT |
| LOW | magic_pdf/filter/pdf_classify_by_type.py | 101 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | magic_pdf/pdf_parse_union_core_v2_llm.py | 131 | # Use more robust center point coordinate judgment | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | magic_pdf/operators/models_llm.py | 114 | CODE | |
| LOW | magic_pdf/utils/load_image.py | 44 | CODE | |
| LOW | magic_pdf/libs/json_compressor.py | 27 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | magic_pdf/data/io/__init__.py | 6 | __all__ = ['IOReader', 'IOWriter', 'HttpReader', 'HttpWriter', 'S3Reader', 'S3Writer'] | CODE |