Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WenjinW/LATIN-Prompt
/ functions
Functions
83 in github.com/WenjinW/LATIN-Prompt
⨍
Functions
83
◇
Types & classes
19
↓ 16 callers
Method
load_and_save
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:145
↓ 8 callers
Method
load_and_count
(self, split="val")
metric/anls.py:24
↓ 6 callers
Method
compute_and_save
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:153
↓ 4 callers
Method
_ls_multiple
(self, pred, answers)
metric/anls.py:21
↓ 2 callers
Function
box4point_to_box2point
(box4point)
utils/docvqa.py:49
↓ 2 callers
Function
boxes_sort
From left top to right bottom Params: boxes: [[x1, y1, x2, y2], [x1, y1, x2, y2], ...]
utils/util.py:479
↓ 2 callers
Method
compute_and_save_docvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:96
↓ 2 callers
Method
load_and_save_docvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:33
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/claude_infographicvqa.py:93
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/vllm_docvqa_due_azure.py:95
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/claude_docvqa_due_azure.py:133
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/claude_docvqa.py:137
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/llama_docvqa.py:84
↓ 2 callers
Method
space_layout
(self, texts, boxes)
examples/llama_docvqa_due_azure.py:92
↓ 2 callers
Function
truncation
(tokenizer, prompts)
examples/vllm_docvqa_due_azure.py:152
↓ 1 callers
Method
_ls
(self, s1, s2)
metric/anls.py:13
↓ 1 callers
Method
compute_and_save_mpdocvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:120
↓ 1 callers
Function
conceptnet_get
(token="WHERE", num=10)
utils/util.py:202
↓ 1 callers
Function
create_new_ent
(ent_tokens, ent_label, ent_box, fake: Faker)
utils/util.py:282
↓ 1 callers
Function
is_same_line
Params: box1: [x1, y1, x2, y2] box2: [x1, y1, x2, y2]
utils/util.py:443
↓ 1 callers
Method
load_and_save_mpdocvqa
(self, qids, questions, predictions, references=None, split="val")
metric/anls.py:64
↓ 1 callers
Function
load_image
(image_path)
utils/docvqa.py:12
↓ 1 callers
Function
main
()
examples/claude_infographicvqa.py:153
↓ 1 callers
Function
main
()
examples/vllm_docvqa_due_azure.py:167
↓ 1 callers
Function
main
()
examples/claude_docvqa_due_azure.py:196
↓ 1 callers
Function
main
()
examples/claude_docvqa.py:207
↓ 1 callers
Function
main
()
examples/claude_mpdocvqa.py:124
↓ 1 callers
Function
main
()
examples/llama_docvqa.py:145
↓ 1 callers
Function
main
()
examples/llama_docvqa_due_azure.py:149
↓ 1 callers
Function
openai_chat_completion
(prompt, model_name="gpt-35", max_tokens_to_sample: int = 200, stop="\n\n", temperature=0)
utils/openai_api.py:72
↓ 1 callers
Function
openai_completion
(prompt, model_name="gpt-35", max_tokens_to_sample: int = 200, stop="\n\n", temperature=0)
utils/openai_api.py:14
↓ 1 callers
Function
space_layout
(texts, boxes)
utils/space_layout.py:8
↓ 1 callers
Method
space_layout
(self, texts, boxes)
examples/claude_mpdocvqa.py:81
↓ 1 callers
Function
union_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
Function
box4point_to_box2point
(box4point)
utils/docvqa_due_azure.py:51
Function
cluade_completion
( prompt, model_name="claude-v1.3", max_tokens_to_sample: int = 200, temperature=0.0, )
utils/claude.py:9
Function
compute_l2_dist
compute l2 dist Params: q: N1xd L: N2xd
utils/util.py:17
Function
cos_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
Function
create_aug_data
( train_dataset, text_column_name, num=10, org_nums=0, id2label=None, features=None,
utils/util.py:225
Function
create_aug_data_new
( train_dataset, text_column_name, num=10, org_nums=0, id2label=None, features=None,
utils/util.py:313
Function
document_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
Function
gen
(examples)
utils/util.py:265
Method
get_line_bbox
(self, bboxs)
utils/docvqa.py:115
Method
get_line_bbox
(self, bboxs)
utils/docvqa_due_azure.py:125
Function
get_token_layout_masks
Params: rel 2d pos: B x H x L x L labels: B x L
utils/util.py:145
Function
is_adj_line
Params: box1: [x1, y1, x2, y2] box2: [x1, y1, x2, y2]
utils/util.py:459
Function
load_image
(image_path)
utils/docvqa_due_azure.py:13
Function
normalize_bbox
(bbox, size)
utils/docvqa.py:18
Function
normalize_bbox
(bbox, size)
utils/docvqa_due_azure.py:19
Function
quad_to_box
(quad)
utils/docvqa.py:27
Function
quad_to_box
(quad)
utils/docvqa_due_azure.py:28
Function
search_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
Function
token_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