Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Yuliang-Liu/MonkeyOCR
/ functions
Functions
485 in github.com/Yuliang-Liu/MonkeyOCR
⨍
Functions
485
◇
Types & classes
66
↳
Endpoints
7
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
Function
add_lines_to_block
(b)
magic_pdf/pdf_parse_union_core_v2_llm.py:433
Method
apply
Apply callable method which. Args: proc (Callable): invoke proc as follows: proc(pipeline_result, *args, **kwargs
magic_pdf/operators/pipes_llm.py:181
Method
apply
Apply callable method which. Args: proc (Callable): invoke proc as follows: proc(inference_result, *args, **kwarg
magic_pdf/operators/__init__.py:50
Method
batch_inference
(self, images, questions)
magic_pdf/model/custom_model.py:207
Method
batch_inference
(self, images: List[Union[str, Image.Image]], questions: List[str])
magic_pdf/model/custom_model.py:320
Method
batch_inference
(self, images: List[Union[str, Image.Image]], questions: List[str])
magic_pdf/model/custom_model.py:477
Method
batch_inference
Synchronous batch inference
magic_pdf/model/custom_model.py:796
Method
batch_inference
Synchronous batch inference
magic_pdf/model/custom_model.py:1158
Method
batch_inference
(self, images: List[str], questions: List[str])
magic_pdf/model/async_vllm.py:111
Method
batch_predict
(self, images: List[Union[np.ndarray, Image.Image]], batch_size: int)
magic_pdf/model/sub_modules/layout/paddlex_layout/PaddleXLayoutModel.py:95
Function
bbox2points
(bbox)
magic_pdf/model/sub_modules/reading_oreder/layoutreader/xycut.py:125
Method
bounded
(img: str, q: str, idx: int)
magic_pdf/model/async_vllm.py:90
Function
box_area
(bbox)
magic_pdf/libs/boxbase.py:386
Function
check_duplicate
(a: List[int])
magic_pdf/model/sub_modules/reading_oreder/layoutreader/helpers.py:172
Method
classify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:121
Method
classify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:210
Method
classify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:291
Method
classify
classify the dataset Returns: SupportedPdfParseMethod: _description_
magic_pdf/data/dataset.py:446
Function
cleanup_images
()
api/main.py:415
Function
clear_all
Clear all inputs and outputs
demo/demo_gradio.py:368
Method
clone
clone this dataset
magic_pdf/data/dataset.py:130
Method
clone
clone this dataset
magic_pdf/data/dataset.py:218
Method
clone
clone this dataset
magic_pdf/data/dataset.py:299
Method
clone
clone this dataset
magic_pdf/data/dataset.py:454
Function
create_dataset_sync
()
api/main.py:164
Function
create_dir_safe
(path)
api/main.py:140
Function
create_writers
()
api/main.py:209
Function
create_zip_sync
()
api/main.py:507
Function
custom_openapi
()
api/main.py:640
Method
data_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:169
Method
data_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:253
Method
data_bits
The pdf bits used to create this dataset.
magic_pdf/data/dataset.py:408
Method
decompress_json
Decode the base64 string and decompress the json object
magic_pdf/libs/json_compressor.py:19
Function
detect_invalid_chars_by_pymupdf
(src_pdf_bytes: bytes)
magic_pdf/libs/pdf_check.py:60
Function
doc_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
Function
download_layout_pdf
()
demo/demo_gradio.py:305
Function
download_markdown_zip
()
demo/demo_gradio.py:310
Function
draw_char_bbox
(pdf_bytes, out_path, filename)
magic_pdf/libs/draw_bbox.py:409
Method
draw_line_sort
Draw line sort. Args: file_path (str): The file location of line sort result file
magic_pdf/operators/pipes_llm.py:160
Method
draw_model
Draw model inference result. Args: file_path (str): the output file path
magic_pdf/operators/models_llm.py:27
Method
draw_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
Method
dump_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
Method
dump_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
Method
dump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:184
Method
dump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:268
Method
dump_to_file
Dump the file Args: file_path (str): the file path
magic_pdf/data/dataset.py:423
Function
extract_formula
Extract formulas from image or PDF
api/main.py:95
Function
extract_table
Extract tables from image or PDF
api/main.py:100
Method
file_info
Get information about each file in the dataset. Returns: list[dict]: List of file information dictionaries containing:
magic_pdf/data/dataset.py:460
Function
find_bottom_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:276
Function
find_left_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:299
Function
find_right_nearest_text_bbox
(pymu_blocks, obj_bbox)
magic_pdf/libs/boxbase.py:322
← previous
next →
301–400 of 485, ranked by callers