Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Alibaba-NLP/ViDoRAG
/ functions
Functions
79 in github.com/Alibaba-NLP/ViDoRAG
⨍
Functions
79
◇
Types & classes
12
↓ 9 callers
Method
embed_text
(self, text)
llms/vl_embedding.py:142
↓ 9 callers
Method
search
(self, query)
search_engine.py:169
↓ 8 callers
Function
nodes2dict
(nodes)
utils/format_converter.py:6
↓ 7 callers
Method
generate
(self,**kwargs)
llms/llm.py:78
↓ 6 callers
Method
run
(self, query=None, images_path=None, feedback=None)
vidorag_agents.py:21
↓ 5 callers
Method
embed_img
(self, img_path)
llms/vl_embedding.py:113
↓ 3 callers
Function
concat_images_with_bbox
将一组图片按照指定排布拼接,并对最终图片进行缩放,同时在每张图片之间添加分隔线。 现在我有bbox列表,List[List[[y_min,x_min,y_max,x_max]]],0<=y_min<y_max<=1,0<=x_min<x_max<=1,表示在图片的相对位置,请在拼接
utils/image_preprosser.py:6
↓ 3 callers
Function
extract_json
(select_response)
utils/parse_tool.py:19
↓ 3 callers
Function
gmm
(recall_result: list[NodeWithScore], input_length: int=20, max_valid_length: int=10, min_valid_length: int=5)
search_engine.py:21
↓ 2 callers
Function
dcg
(scores)
utils/overall_evaluator.py:29
↓ 2 callers
Function
eval_search
(examples)
utils/overall_evaluator.py:66
↓ 2 callers
Method
llm_eval
(self, query, reference_answer, generated_answer)
llms/evaluator.py:48
↓ 2 callers
Method
load_node_postprocessors
(self)
search_engine.py:161
↓ 2 callers
Function
nodefile2node
(input_file)
utils/format_converter.py:17
↓ 2 callers
Method
run_agent
(self, query, images_path)
vidorag_agents.py:175
↓ 2 callers
Function
transform_idp2markdown
(response_json: dict)
utils/format_converter.py:44
↓ 2 callers
Function
weighted_mean_pooling
(hidden, attention_mask)
llms/vl_embedding.py:20
↓ 1 callers
Function
_encode_image
(image_path)
llms/llm.py:10
↓ 1 callers
Function
arg_parse
()
eval.py:163
↓ 1 callers
Function
build_option
Build FastDeploy runtime options based on backend and device.
scripts/ocr_triditional.py:87
↓ 1 callers
Function
calculate_spaces_and_newlines
Calculate the number of spaces and newlines between two text boxes.
scripts/ocr_triditional.py:48
↓ 1 callers
Function
decode_image
Decode the image from the given path.
scripts/ocr_triditional.py:34
↓ 1 callers
Function
draw_boxes
(img_path, boxes)
scripts/ocr_vlms.py:38
↓ 1 callers
Method
eval_dataset
(self)
eval.py:98
↓ 1 callers
Method
eval_overall
(self)
eval.py:145
↓ 1 callers
Method
eval_overall_type_wise
(self)
eval.py:154
↓ 1 callers
Function
eval_search_type_wise
(examples)
utils/overall_evaluator.py:117
↓ 1 callers
Method
evaluate
(self, query, reference_answer, generated_answer)
llms/evaluator.py:71
↓ 1 callers
Function
hit_rate_at_k
(relevant_docs, retrieved_docs, k)
utils/overall_evaluator.py:19
↓ 1 callers
Method
ingestion_example
(self, input_file, output_file)
ingestion.py:63
↓ 1 callers
Method
ingestion_multi_session
(self)
ingestion.py:76
↓ 1 callers
Method
load_nodes
(self)
search_engine.py:120
↓ 1 callers
Method
load_query_engine
(self)
search_engine.py:146
↓ 1 callers
Method
load_retriever_embed
(self, nodes)
search_engine.py:164
↓ 1 callers
Function
main
(img_name)
scripts/ocr_triditional.py:148
↓ 1 callers
Function
mrr_at_k
(relevant_docs, retrieved_docs, k)
utils/overall_evaluator.py:47
↓ 1 callers
Function
ndcg_at_k
(relevant_docs, retrieved_docs, k)
utils/overall_evaluator.py:28
↓ 1 callers
Function
ocr
(img_path)
scripts/ocr_vlms.py:50
↓ 1 callers
Function
recall_at_k
(relevant_docs, retrieved_docs, k)
utils/overall_evaluator.py:7
↓ 1 callers
Method
score
(self, image_embeddings, text_embeddings)
llms/vl_embedding.py:240
↓ 1 callers
Method
search_example
(self,example)
search_engine.py:195
↓ 1 callers
Function
tostr_layout_preserving
Convert OCR results into a layout-preserving merged string.
scripts/ocr_triditional.py:61
Method
__call__
(self, nodes, **kwargs)
llms/vl_embedding.py:210
Method
__init__
(self, dataset='ExampleDataset', query_file='rag_dataset.json',
eval.py:19
Method
__init__
(self,dataset, node_dir_prefix=None,embed_model_name='BAAI/bge-m3')
search_engine.py:62
Method
__init__
(self, dataset, node_dir_prefix_vl = None, node_dir_prefix_
search_engine.py:220
Method
__init__
(self, dataset_dir,input_prefix='ppocr',output_prefix='bge_ingestion',embed_model_name='BAAI/bge-m3')
ingestion.py:18
Method
__init__
(self, vlm)
vidorag_agents.py:13
Method
__init__
(self, vlm)
vidorag_agents.py:66
Method
__init__
(self, vlm)
vidorag_agents.py:135
Method
__init__
(self, vlm)
vidorag_agents.py:170
Method
__init__
(self, model_name="Qwen/Qwen2.5-VL-7B-Instruct")
llms/llm.py:22
Method
__init__
(self,model_name)
llms/llm.py:70
Method
__init__
(self)
llms/evaluator.py:44
Method
__init__
( self, model: str = "vidore/colqwen2-v1.0", dimensions: Optional[int] = 1024,
llms/vl_embedding.py:60
Method
_aget_image_embedding
(self, img_file_path)
llms/vl_embedding.py:207
Method
_aget_query_embedding
Get query embedding.
llms/vl_embedding.py:196
Method
_aget_text_embedding
Get text embedding.
llms/vl_embedding.py:200
Method
_get_image_embedding
(self, img_file_path)
llms/vl_embedding.py:204
Method
_get_query_embedding
Get query embedding.
llms/vl_embedding.py:179
Method
_get_text_embedding
Get text embedding.
llms/vl_embedding.py:183
Method
_get_text_embeddings
Get text embeddings.
llms/vl_embedding.py:187
Method
class_name
(cls)
llms/vl_embedding.py:110
Function
documentfile2document
(input_file)
utils/format_converter.py:65
Function
eval_sample
(example)
utils/overall_evaluator.py:60
Method
generate
(self,query, images)
llms/llm.py:29
Function
idpfile2document
(input_file)
utils/format_converter.py:72
Function
idpfile2text
(input_file)
utils/format_converter.py:85
Function
onlchunkfile2node
(input_file)
utils/format_converter.py:28
Method
online_search
(self,query,node_list,topk=9)
search_engine.py:107
Method
parse_file
(file,node_dir)
search_engine.py:133
Function
parse_tool_output
(output)
utils/parse_tool.py:5
Method
retrieval_infer
(self,sample)
eval.py:70
Method
run
(self, query, images_path)
vidorag_agents.py:77
Method
run
(self, query, candidate_answer, ref_images)
vidorag_agents.py:143
Method
search
(self,query)
search_engine.py:237
Method
search_multi_session
(self,output_file='search_result.json')
search_engine.py:201
Function
text2document
(input_file)
utils/format_converter.py:79
Method
vidorag
(self,sample)
eval.py:76