Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chatdoc-com/OCRFlux
/ functions
Functions
141 in github.com/chatdoc-com/OCRFlux
⨍
Functions
141
◇
Types & classes
18
↓ 8 callers
Function
parallel_process
A parallel version of the map function with a progress bar. Args: array (array-like): An array to iterate over.
eval/parallel.py:4
↓ 6 callers
Function
process_task
(args, worker_id, task_name, task_args)
ocrflux/pipeline.py:193
↓ 4 callers
Function
table_matrix2html
(matrix_table)
ocrflux/table_format.py:9
↓ 4 callers
Method
track_work
Update the state count for a specific worker. Args: worker_id (int): The ID of the worker. work_item_id (str
ocrflux/metrics.py:90
↓ 3 callers
Function
build_element_merge_detect_prompt
(text_list_1,text_list_2)
ocrflux/prompts.py:33
↓ 3 callers
Function
build_html_table_merge_prompt
(table1,table2)
ocrflux/prompts.py:43
↓ 3 callers
Function
build_page_to_markdown_prompt
()
ocrflux/prompts.py:52
↓ 3 callers
Function
build_qwen2_5_vl_prompt
(question)
ocrflux/inference.py:10
↓ 3 callers
Function
get_page_image
(pdf_path, page_number, target_longest_image_dim=None, image_rotation=0)
ocrflux/image_utils.py:8
↓ 3 callers
Function
process_task
(args, task_name, task_args)
ocrflux/client.py:147
↓ 2 callers
Method
_compute_workgroup_hash
Compute a deterministic hash for a group of paths. Args: work_paths: List of paths (local or S3) Returns:
ocrflux/work_queue.py:96
↓ 2 callers
Function
build_page_to_markdown_query
(file_path: str, page_number: int, target_longest_image_dim: int = 1024, image_rotation: int = 0)
ocrflux/inference.py:18
↓ 2 callers
Function
check_poppler_version
()
ocrflux/check.py:9
↓ 2 callers
Function
check_vllm_version
()
ocrflux/check.py:21
↓ 2 callers
Method
load_html_tree
Converts HTML tree to the format required by apted
eval/eval_table_to_html_nanonets.py:110
↓ 2 callers
Method
load_html_tree
Converts HTML tree to the format required by apted
eval/eval_table_to_html.py:78
↓ 2 callers
Method
load_html_tree
Converts HTML tree to the format required by apted
eval/eval_table_to_html_olmocr.py:79
↓ 2 callers
Method
load_html_tree
Converts HTML tree to the format required by apted
eval/eval_html_table_merge.py:78
↓ 2 callers
Method
populate_queue
Add new items to the work queue (local version). Args: work_paths: Each individual path (local in this context)
ocrflux/work_queue.py:195
↓ 2 callers
Function
read_stream
(stream)
ocrflux/pipeline.py:628
↓ 1 callers
Method
add_metrics
Adds metrics to the keeper. Args: **kwargs: Arbitrary keyword arguments representing metric names and their values.
ocrflux/metrics.py:21
↓ 1 callers
Function
apost
(url, json_data)
ocrflux/client.py:87
↓ 1 callers
Function
apost
(url, json_data)
ocrflux/pipeline.py:133
↓ 1 callers
Method
batch_evaluate
Computes TEDS score between the prediction and the ground truth of a batch of samples @params pred_json: {'FILENAME': 'HTML C
eval/eval_table_to_html_nanonets.py:164
↓ 1 callers
Method
batch_evaluate
Computes TEDS score between the prediction and the ground truth of a batch of samples @params pred_json: {'FILENAME': 'HTML C
eval/eval_table_to_html.py:130
↓ 1 callers
Method
batch_evaluate
Computes TEDS score between the prediction and the ground truth of a batch of samples @params pred_json: {'FILENAME': 'HTML C
eval/eval_table_to_html_olmocr.py:133
↓ 1 callers
Method
batch_evaluate
Computes TEDS score between the prediction and the ground truth of a batch of samples @params pred_json: {'FILENAME': 'HTML C
eval/eval_html_table_merge.py:130
↓ 1 callers
Function
build_document_text
(page_to_markdown_result, element_merge_detect_result, html_table_merge_result)
ocrflux/client.py:203
↓ 1 callers
Function
build_document_text
(page_to_markdown_result, element_merge_detect_result, html_table_merge_result)
ocrflux/pipeline.py:302
↓ 1 callers
Function
build_document_text
(page_to_markdown_result, element_merge_detect_result, html_table_merge_result)
ocrflux/inference.py:49
↓ 1 callers
Function
build_element_merge_detect_query
(args,text_list_1,text_list_2)
ocrflux/client.py:39
↓ 1 callers
Function
build_element_merge_detect_query
(args,text_list_1,text_list_2)
ocrflux/pipeline.py:85
↓ 1 callers
Function
build_element_merge_detect_query
(text_list_1,text_list_2)
ocrflux/inference.py:29
↓ 1 callers
Function
build_html_table_merge_query
(args,text_1,text_2)
ocrflux/client.py:61
↓ 1 callers
Function
build_html_table_merge_query
(args,text_1,text_2)
ocrflux/pipeline.py:107
↓ 1 callers
Function
build_html_table_merge_query
(text_1,text_2)
ocrflux/inference.py:39
↓ 1 callers
Function
build_page_to_markdown_query
(args, file_path: str, page_number: int, target_longest_image_dim: int = 1024, image_rotation: int = 0)
ocrflux/client.py:17
↓ 1 callers
Function
build_page_to_markdown_query
(args, pdf_path: str, page_number: int, target_longest_image_dim: int, image_rotation: int = 0)
ocrflux/pipeline.py:63
↓ 1 callers
Function
check_torch_gpu_available
(min_gpu_memory: int = 20 * 1024**3)
ocrflux/check.py:27
↓ 1 callers
Method
clear_work
(self, worker_id: int)
ocrflux/metrics.py:86
↓ 1 callers
Function
download_model
(model_name_or_path: str)
ocrflux/pipeline.py:703
↓ 1 callers
Function
evaluate
(pred, gt)
eval/eval_page_to_markdown_olmocr.py:73
↓ 1 callers
Function
evaluate
(pred, gt)
eval/eval_page_to_markdown.py:9
↓ 1 callers
Function
evaluate
(pred, gt)
eval/eval_page_to_markdown_nanonets.py:77
↓ 1 callers
Function
evaluate
(pred, gt)
eval/eval_element_merge_detect.py:9
↓ 1 callers
Method
evaluate
Computes TEDS score between the prediction and the ground truth of a given sample
eval/eval_table_to_html_nanonets.py:135
↓ 1 callers
Method
evaluate
Computes TEDS score between the prediction and the ground truth of a given sample
eval/eval_table_to_html.py:103
↓ 1 callers
Method
evaluate
Computes TEDS score between the prediction and the ground truth of a given sample
eval/eval_table_to_html_olmocr.py:104
↓ 1 callers
Method
evaluate
Computes TEDS score between the prediction and the ground truth of a given sample
eval/eval_html_table_merge.py:103
↓ 1 callers
Method
get_status_table
Generate a formatted table of the current status of all workers. Returns: str: A string representation of the workers' s
ocrflux/metrics.py:102
↓ 1 callers
Method
get_work
Get the next available work item that isn't completed or locked. Args: worker_lock_timeout_secs: Number of seconds befor
ocrflux/work_queue.py:65
↓ 1 callers
Method
initialize_queue
Load the work queue from the local index file and initialize it for processing. Removes already completed work items and randomizes t
ocrflux/work_queue.py:251
↓ 1 callers
Method
is_completed
Check if a work item has been completed locally by seeing if output_{work_hash}.jsonl is present in the results directory. A
ocrflux/work_queue.py:280
↓ 1 callers
Function
is_html_table
(text)
ocrflux/table_format.py:5
↓ 1 callers
Function
is_image
(file_path)
ocrflux/image_utils.py:45
↓ 1 callers
Function
main
()
eval/eval_table_to_html_nanonets.py:246
↓ 1 callers
Function
main
()
eval/eval_page_to_markdown_olmocr.py:78
↓ 1 callers
Function
main
()
eval/eval_page_to_markdown.py:14
↓ 1 callers
Function
main
()
eval/eval_table_to_html.py:174
↓ 1 callers
Function
main
()
eval/eval_page_to_markdown_nanonets.py:82
↓ 1 callers
Function
main
()
eval/gen_html_table_merge_data.py:5
↓ 1 callers
Function
main
()
eval/eval_element_merge_detect.py:17
↓ 1 callers
Function
main
()
eval/gen_element_merge_detect_data.py:5
↓ 1 callers
Function
main
()
eval/eval_table_to_html_olmocr.py:177
↓ 1 callers
Function
main
()
eval/eval_html_table_merge.py:174
↓ 1 callers
Function
main
()
ocrflux/pipeline.py:718
↓ 1 callers
Function
main
()
ocrflux/jsonl_to_markdown.py:4
↓ 1 callers
Method
mark_done
Mark a work item as done by removing its lock file or performing any other cleanup. Args: work_item: The WorkIte
ocrflux/work_queue.py:79
↓ 1 callers
Method
maximum
Get maximum possible value
eval/eval_table_to_html_nanonets.py:67
↓ 1 callers
Method
maximum
Get maximum possible value
eval/eval_table_to_html.py:35
↓ 1 callers
Method
maximum
Get maximum possible value
eval/eval_table_to_html_olmocr.py:36
↓ 1 callers
Method
maximum
Get maximum possible value
eval/eval_html_table_merge.py:35
↓ 1 callers
Function
metrics_reporter
(work_queue)
ocrflux/pipeline.py:710
↓ 1 callers
Method
normalized_distance
Get distance from 0 to 1
eval/eval_table_to_html_nanonets.py:72
↓ 1 callers
Method
normalized_distance
Get distance from 0 to 1
eval/eval_table_to_html.py:40
↓ 1 callers
Method
normalized_distance
Get distance from 0 to 1
eval/eval_table_to_html_olmocr.py:41
↓ 1 callers
Method
normalized_distance
Get distance from 0 to 1
eval/eval_html_table_merge.py:40
↓ 1 callers
Function
parse
(llm,file_path,skip_cross_page_merge=False,max_page_retries=0)
ocrflux/inference.py:72
↓ 1 callers
Function
postprocess_markdown_text
(args, response_text, pdf_path, page_number)
ocrflux/pipeline.py:292
↓ 1 callers
Function
process_json
(args, worker_id: int, json_path: str)
ocrflux/pipeline.py:469
↓ 1 callers
Function
process_line
(line)
ocrflux/pipeline.py:597
↓ 1 callers
Function
process_pdf
(args, worker_id: int, pdf_path: str)
ocrflux/pipeline.py:325
↓ 1 callers
Function
replace_double_dollar
(markdown_text)
eval/eval_table_to_html_nanonets.py:35
↓ 1 callers
Function
replace_double_dollar
(markdown_text)
eval/eval_page_to_markdown_olmocr.py:31
↓ 1 callers
Function
replace_double_dollar
(markdown_text)
eval/eval_page_to_markdown_nanonets.py:31
↓ 1 callers
Function
replace_single_dollar
(markdown_text)
eval/eval_table_to_html_nanonets.py:24
↓ 1 callers
Function
replace_single_dollar
(markdown_text)
eval/eval_page_to_markdown_olmocr.py:20
↓ 1 callers
Function
replace_single_dollar
(markdown_text)
eval/eval_page_to_markdown_nanonets.py:20
↓ 1 callers
Function
request
(args, file_path: str)
ocrflux/client.py:226
↓ 1 callers
Function
simplify_html_table
(html_table)
eval/eval_table_to_html_nanonets.py:208
↓ 1 callers
Function
simplify_html_table
(html_table)
eval/eval_page_to_markdown_olmocr.py:40
↓ 1 callers
Function
simplify_html_table
(html_table)
eval/eval_page_to_markdown_nanonets.py:40
↓ 1 callers
Function
timeout_task
()
ocrflux/pipeline.py:639
↓ 1 callers
Method
tokenize
Tokenizes table cells
eval/eval_table_to_html_nanonets.py:97
↓ 1 callers
Method
tokenize
Tokenizes table cells
eval/eval_table_to_html.py:65
↓ 1 callers
Method
tokenize
Tokenizes table cells
eval/eval_table_to_html_olmocr.py:66
↓ 1 callers
Method
tokenize
Tokenizes table cells
eval/eval_html_table_merge.py:65
↓ 1 callers
Function
turn_header_to_h1
(line)
eval/eval_table_to_html_nanonets.py:15
↓ 1 callers
Function
turn_header_to_h1
(line)
eval/eval_page_to_markdown_olmocr.py:11
↓ 1 callers
Function
turn_header_to_h1
(line)
eval/eval_page_to_markdown_nanonets.py:11
next →
1–100 of 141, ranked by callers