MCPcopy Create free account

hub / github.com/Yuliang-Liu/MonkeyOCR / functions

Functions485 in github.com/Yuliang-Liu/MonkeyOCR

Method__init__
(self, model_list: list, docs: Dataset)
magic_pdf/model/magic_model.py:116
Method__init__
(self, model_path, tp=1)
magic_pdf/model/async_vllm.py:11
Method__init__
(self, model)
magic_pdf/model/batch_analyze_llm.py:14
Method__init__
(self, config, num_category: int = 8)
magic_pdf/model/sub_modules/reading_oreder/layoutreader/helpers.py:16
Method__init__
(self, model_name: str, device: str, model_dir: str = None)
magic_pdf/model/sub_modules/layout/paddlex_layout/PaddleXLayoutModel.py:15
Method__init__
(self, weight, device)
magic_pdf/model/sub_modules/layout/doclayout_yolo/DocLayoutYOLO.py:5
Method__init__
Initialize the dataset, which wraps the pymudoc documents. Args: bits (bytes): the bytes of the pdf
magic_pdf/data/dataset.py:137
Method__init__
Initialize the dataset, which wraps the pymudoc documents. Args: bits (bytes): the bytes of the photo which will be converted to
magic_pdf/data/dataset.py:225
Method__init__
Initialize the dataset with multiple files (PDFs and images). Args: file_bytes_list (list[bytes]): list of file bytes (PDF or ima
magic_pdf/data/dataset.py:306
Method__init__
(self, doc: fitz.Page)
magic_pdf/data/dataset.py:510
Method__init__
s3 reader client. Args: bucket (str): bucket name ak (str): access key sk (str): secret key e
magic_pdf/data/io/s3.py:8
Method__init__
s3 reader client. Args: bucket (str): bucket name ak (str): access key sk (str): secret key e
magic_pdf/data/io/s3.py:75
Method__init__
Initialized with parent_dir. Args: parent_dir (str, optional): the parent directory that may be used within methods. Defaults to
magic_pdf/data/data_reader_writer/filebase.py:7
Method__init__
Initialized with parent_dir. Args: parent_dir (str, optional): the parent directory that may be used within methods. Defaults to
magic_pdf/data/data_reader_writer/filebase.py:39
Method__init__
s3 writer client. Args: default_prefix_without_bucket: prefix that not contains bucket bucket (str): bucket name
magic_pdf/data/data_reader_writer/s3.py:42
Method__init__
Initialized with multiple s3 configs. Args: default_prefix (str): the default prefix of the relative path. for example, {some_buc
magic_pdf/data/data_reader_writer/multi_bucket_s3.py:11
Method__init__
(self, message='Page SVGs are too many')
magic_pdf/filter/pdf_meta_scan.py:251
Method__init__
(self, path)
magic_pdf/config/exceptions.py:4
Method__init__
(self, msg)
magic_pdf/config/exceptions.py:12
Method__init__
(self, msg)
magic_pdf/config/exceptions.py:20
Method__init__
(self, msg)
magic_pdf/config/exceptions.py:28
Method__init__
(self, msg)
magic_pdf/config/exceptions.py:35
Function__is_list_group
(text_blocks_group)
magic_pdf/post_proc/para_split_v3.py:306
Function__is_list_group_llm
(text_blocks_group)
magic_pdf/post_proc/para_split_v3.py:313
Method__iter__
Yield the page data.
magic_pdf/data/dataset.py:68
Method__iter__
Yield the page doc object.
magic_pdf/data/dataset.py:157
Method__iter__
Yield the page object.
magic_pdf/data/dataset.py:241
Method__iter__
Yield the page object.
magic_pdf/data/dataset.py:396
Method__len__
The length of the dataset.
magic_pdf/data/dataset.py:63
Method__len__
The page number of the pdf.
magic_pdf/data/dataset.py:153
Method__len__
The length of the dataset.
magic_pdf/data/dataset.py:237
Method__len__
The length of the dataset.
magic_pdf/data/dataset.py:392
Method__new__
(cls)
magic_pdf/model/model_manager.py:13
Method__new__
(cls, *args, **kwargs)
magic_pdf/model/sub_modules/model_init.py:58
Function__replace_STX_ETX
Replace \u0002 and \u0003, as these characters become garbled when extracted using pymupdf. In fact, they were originally quotation marks. Drawbac
magic_pdf/pdf_parse_union_core_v2_llm.py:34
Method__str__
(self)
magic_pdf/config/exceptions.py:7
Method__str__
(self)
magic_pdf/config/exceptions.py:15
Method__str__
(self)
magic_pdf/config/exceptions.py:23
Method__str__
(self)
magic_pdf/config/exceptions.py:31
Method__str__
(self)
magic_pdf/config/exceptions.py:38
Method_background_processor
Background thread: continuously process request queue
magic_pdf/model/custom_model.py:583
Method_background_processor
Background thread: continuously process request queue
magic_pdf/model/custom_model.py:934
Function_is_bottom_full_overlap
(box1, box2, y_tolerance=2)
magic_pdf/libs/boxbase.py:96
Function_is_in_or_part_overlap_with_area_ratio
(box1, box2, area_ratio_
magic_pdf/libs/boxbase.py:17
Function_is_left_overlap
( box1, box2, )
magic_pdf/libs/boxbase.py:113
Function_is_vertical_full_overlap
(box1, box2, x_tolerance=2)
magic_pdf/libs/boxbase.py:81
Function_left_intersect
(left_box, right_box)
magic_pdf/libs/boxbase.py:59
Function_right_intersect
(left_box, right_box)
magic_pdf/libs/boxbase.py:70
Functionadd_lines_to_block
(b)
magic_pdf/pdf_parse_union_core_v2_llm.py:433
Methodapply
Apply callable method which. Args: proc (Callable): invoke proc as follows: proc(pipeline_result, *args, **kwargs
magic_pdf/operators/pipes_llm.py:181
Methodapply
Apply callable method which. Args: proc (Callable): invoke proc as follows: proc(inference_result, *args, **kwarg
magic_pdf/operators/__init__.py:50
Methodbatch_inference
(self, images, questions)
magic_pdf/model/custom_model.py:207
Methodbatch_inference
(self, images: List[Union[str, Image.Image]], questions: List[str])
magic_pdf/model/custom_model.py:320
Methodbatch_inference
(self, images: List[Union[str, Image.Image]], questions: List[str])
magic_pdf/model/custom_model.py:477
Methodbatch_inference
Synchronous batch inference
magic_pdf/model/custom_model.py:796
Methodbatch_inference
Synchronous batch inference
magic_pdf/model/custom_model.py:1158
Methodbatch_inference
(self, images: List[str], questions: List[str])
magic_pdf/model/async_vllm.py:111
Methodbatch_predict
(self, images: List[Union[np.ndarray, Image.Image]], batch_size: int)
magic_pdf/model/sub_modules/layout/paddlex_layout/PaddleXLayoutModel.py:95
Functionbbox2points
(bbox)
magic_pdf/model/sub_modules/reading_oreder/layoutreader/xycut.py:125
Methodbounded
(img: str, q: str, idx: int)
magic_pdf/model/async_vllm.py:90
Functionbox_area
(bbox)
magic_pdf/libs/boxbase.py:386
Functioncheck_duplicate
(a: List[int])
magic_pdf/model/sub_modules/reading_oreder/layoutreader/helpers.py:172
Methodclassify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:121
Methodclassify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:210
Methodclassify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:291
Methodclassify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:446
Functioncleanup_images
()
api/main.py:415
Functionclear_all
Clear all inputs and outputs
demo/demo_gradio.py:368
Methodclone
clone this dataset
magic_pdf/data/dataset.py:130
Methodclone
clone this dataset
magic_pdf/data/dataset.py:218
Methodclone
clone this dataset
magic_pdf/data/dataset.py:299
Methodclone
clone this dataset
magic_pdf/data/dataset.py:454
Functioncreate_dataset_sync
()
api/main.py:164
Functioncreate_dir_safe
(path)
api/main.py:140
Functioncreate_writers
()
api/main.py:209
Functioncreate_zip_sync
()
api/main.py:507
Functioncustom_openapi
()
api/main.py:640
Methoddata_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:169
Methoddata_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:253
Methoddata_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:408
Methoddecompress_json
Decode the base64 string and decompress the json object
magic_pdf/libs/json_compressor.py:19
Functiondetect_invalid_chars_by_pymupdf
(src_pdf_bytes: bytes)
magic_pdf/libs/pdf_check.py:60
Functiondoc_analyze_llm
( dataset: Dataset, MonkeyOCR_model, start_page_id=0, end_page_id=None, split_pages=False,
magic_pdf/model/doc_analyze_by_custom_model_llm.py:12
Functiondownload_layout_pdf
()
demo/demo_gradio.py:305
Functiondownload_markdown_zip
()
demo/demo_gradio.py:310
Functiondraw_char_bbox
(pdf_bytes, out_path, filename)
magic_pdf/libs/draw_bbox.py:409
Methoddraw_line_sort
Draw line sort. Args: file_path (str): The file location of line sort result file
magic_pdf/operators/pipes_llm.py:160
Methoddraw_model
Draw model inference result. Args: file_path (str): the output file path
magic_pdf/operators/models_llm.py:27
Methoddraw_rect
draw rectangle. Args: rect_coords (list[float]): four elements array contain the top-left and bottom-right coordinates, [x0, y0,
magic_pdf/data/dataset.py:35
Methoddump_model
Dump model inference result to file. Args: writer (DataWriter): writer handle file_path (str): the location of target
magic_pdf/operators/__init__.py:31
Methoddump_model
Dump model inference result to file. Args: writer (DataWriter): writer handle file_path (str): the location of target
magic_pdf/operators/models_llm.py:41
Methoddump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:184
Methoddump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:268
Methoddump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:423
Functionextract_formula
Extract formulas from image or PDF
api/main.py:95
Functionextract_table
Extract tables from image or PDF
api/main.py:100
Methodfile_info
Get information about each file in the dataset. Returns: list[dict]: List of file information dictionaries containing:
magic_pdf/data/dataset.py:460
Functionfind_bottom_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:276
Functionfind_left_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:299
Functionfind_right_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:322
← previousnext →301–400 of 485, ranked by callers