MCPcopy Create free account

hub / github.com/WenjinW/LATIN-Prompt / functions

Functions83 in github.com/WenjinW/LATIN-Prompt

↓ 16 callersMethodload_and_save
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:145
↓ 8 callersMethodload_and_count
(self, split="val")
metric/anls.py:24
↓ 6 callersMethodcompute_and_save
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:153
↓ 4 callersMethod_ls_multiple
(self, pred, answers)
metric/anls.py:21
↓ 2 callersFunctionbox4point_to_box2point
(box4point)
utils/docvqa.py:49
↓ 2 callersFunctionboxes_sort
From left top to right bottom Params: boxes: [[x1, y1, x2, y2], [x1, y1, x2, y2], ...]
utils/util.py:479
↓ 2 callersMethodcompute_and_save_docvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:96
↓ 2 callersMethodload_and_save_docvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:33
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/claude_infographicvqa.py:93
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/vllm_docvqa_due_azure.py:95
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/claude_docvqa_due_azure.py:133
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/claude_docvqa.py:137
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/llama_docvqa.py:84
↓ 2 callersMethodspace_layout
(self, texts, boxes)
examples/llama_docvqa_due_azure.py:92
↓ 2 callersFunctiontruncation
(tokenizer, prompts)
examples/vllm_docvqa_due_azure.py:152
↓ 1 callersMethod_ls
(self, s1, s2)
metric/anls.py:13
↓ 1 callersMethodcompute_and_save_mpdocvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:120
↓ 1 callersFunctionconceptnet_get
(token="WHERE", num=10)
utils/util.py:202
↓ 1 callersFunctioncreate_new_ent
(ent_tokens, ent_label, ent_box, fake: Faker)
utils/util.py:282
↓ 1 callersFunctionis_same_line
Params: box1: [x1, y1, x2, y2] box2: [x1, y1, x2, y2]
utils/util.py:443
↓ 1 callersMethodload_and_save_mpdocvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:64
↓ 1 callersFunctionload_image
(image_path)
utils/docvqa.py:12
↓ 1 callersFunctionmain
()
examples/claude_infographicvqa.py:153
↓ 1 callersFunctionmain
()
examples/vllm_docvqa_due_azure.py:167
↓ 1 callersFunctionmain
()
examples/claude_docvqa_due_azure.py:196
↓ 1 callersFunctionmain
()
examples/claude_docvqa.py:207
↓ 1 callersFunctionmain
()
examples/claude_mpdocvqa.py:124
↓ 1 callersFunctionmain
()
examples/llama_docvqa.py:145
↓ 1 callersFunctionmain
()
examples/llama_docvqa_due_azure.py:149
↓ 1 callersFunctionopenai_chat_completion
(prompt, model_name="gpt-35", max_tokens_to_sample: int = 200, stop="\n\n", temperature=0)
utils/openai_api.py:72
↓ 1 callersFunctionopenai_completion
(prompt, model_name="gpt-35", max_tokens_to_sample: int = 200, stop="\n\n", temperature=0)
utils/openai_api.py:14
↓ 1 callersFunctionspace_layout
(texts, boxes)
utils/space_layout.py:8
↓ 1 callersMethodspace_layout
(self, texts, boxes)
examples/claude_mpdocvqa.py:81
↓ 1 callersFunctionunion_box
Params: box1: [x1, y1, x2, y2] box2: [x1, y1, x2, y2]
utils/util.py:429
Method__call__
(self, example)
examples/claude_infographicvqa.py:97
Method__call__
(self, features)
examples/vllm_docvqa_due_azure.py:99
Method__call__
(self, features)
examples/claude_docvqa_due_azure.py:142
Method__call__
(self, features)
examples/claude_docvqa.py:141
Method__call__
(self, features)
examples/claude_mpdocvqa.py:85
Method__call__
(self, features)
examples/llama_docvqa.py:88
Method__call__
(self, features)
examples/llama_docvqa_due_azure.py:96
Method__init__
BuilderConfig for DocVQA. Args: **kwargs: keyword arguments forwarded to super.
utils/docvqa.py:59
Method__init__
BuilderConfig for CORD. Args: **kwargs: keyword arguments forwarded to super.
utils/docvqa_due_azure.py:63
Method__init__
(self, result_dir, exp_name, dataset_name)
metric/anls.py:7
Method__init__
(self, prompt_type, two_stage=False)
examples/claude_infographicvqa.py:88
Method__init__
(self, prompt_type, two_stage=False)
examples/vllm_docvqa_due_azure.py:91
Method__init__
(self, prompt_type)
examples/claude_docvqa_due_azure.py:129
Method__init__
(self, prompt_type)
examples/claude_docvqa.py:131
Method__init__
(self, prompt_type, two_stage=False)
examples/claude_mpdocvqa.py:76
Method__init__
(self, prompt_type, two_stage=False)
examples/llama_docvqa.py:79
Method__init__
(self, prompt_type, two_stage=False)
examples/llama_docvqa_due_azure.py:87
Method__post_init__
(self)
examples/claude_infographicvqa.py:83
Method__post_init__
(self)
examples/vllm_docvqa_due_azure.py:85
Method__post_init__
(self)
examples/claude_docvqa_due_azure.py:124
Method__post_init__
(self)
examples/claude_docvqa.py:126
Method__post_init__
(self)
examples/claude_mpdocvqa.py:71
Method__post_init__
(self)
examples/llama_docvqa.py:73
Method__post_init__
(self)
examples/llama_docvqa_due_azure.py:81
Method_generate_examples
(self, dirpath, filepath)
utils/docvqa.py:125
Method_generate_examples
(self, doc_path, content_path, split)
utils/docvqa_due_azure.py:135
Method_info
(self)
utils/docvqa.py:72
Method_info
(self)
utils/docvqa_due_azure.py:75
Method_split_generators
Returns SplitGenerators.
utils/docvqa.py:90
Method_split_generators
Returns SplitGenerators.
utils/docvqa_due_azure.py:95
Functionbox4point_to_box2point
(box4point)
utils/docvqa_due_azure.py:51
Functioncluade_completion
( prompt, model_name="claude-v1.3", max_tokens_to_sample: int = 200, temperature=0.0, )
utils/claude.py:9
Functioncompute_l2_dist
compute l2 dist Params: q: N1xd L: N2xd
utils/util.py:17
Functioncos_sim
Params: feat1: P1 x D, the features of current documents feat2: P2 x D, the features of candidate reference documents
utils/util.py:47
Functioncreate_aug_data
( train_dataset, text_column_name, num=10, org_nums=0, id2label=None, features=None,
utils/util.py:225
Functioncreate_aug_data_new
( train_dataset, text_column_name, num=10, org_nums=0, id2label=None, features=None,
utils/util.py:313
Functiondocument_sim
Params: feat1: B1 x L1 x D, the features of current documents feat2: B2 x L2 x D, the features of candidate reference documents
utils/util.py:62
Functiongen
(examples)
utils/util.py:265
Methodget_line_bbox
(self, bboxs)
utils/docvqa.py:115
Methodget_line_bbox
(self, bboxs)
utils/docvqa_due_azure.py:125
Functionget_token_layout_masks
Params: rel 2d pos: B x H x L x L labels: B x L
utils/util.py:145
Functionis_adj_line
Params: box1: [x1, y1, x2, y2] box2: [x1, y1, x2, y2]
utils/util.py:459
Functionload_image
(image_path)
utils/docvqa_due_azure.py:13
Functionnormalize_bbox
(bbox, size)
utils/docvqa.py:18
Functionnormalize_bbox
(bbox, size)
utils/docvqa_due_azure.py:19
Functionquad_to_box
(quad)
utils/docvqa.py:27
Functionquad_to_box
(quad)
utils/docvqa_due_azure.py:28
Functionsearch_reference_label
Params: feat1: B x L1 x D, the features of current documents feat2: B x L2 x D, the features of candidate reference documents
utils/util.py:168
Functiontoken_sim
Params: feat1: P1 x L1 x D, the features of current tokens feat2: P1 x L2 x D, the features of candidate reference tokens
utils/util.py:97