vidore-benchmark

illuin-techMIT活跃维护

ViDoRe 是评估视觉文档检索的基准与评测代码,配套 ColPali 论文,用于衡量多模态检索模型在图文文档上的检索效果。

Vision Document Retrieval (ViDoRe): Benchmark. Evaluation code for the ColPali paper.

v5.0.0发布于 2025-02-19 10:02 UTC278star42fork同步于 2026-11-10 12:03 UTC

怎么上手

由 README 提炼,执行前请确认
pip install vidore-benchmark
硬件要求按 README 说明

README 未说明具体显存或 GPU 型号要求,仅建议在 pipeline 描述中补充硬件信息以便社区参考延迟。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在 ViDoRe v3 视觉文档检索基准上评测端到端检索流水线的框架

ViDoRe 是评估视觉文档检索的基准与评测代码,配套 ColPali 论文,用于衡量多模态检索模型在图文文档上的检索效果。

核心能力

  • 继承 BasePipeline 实现 index 与 search 即可接入自定义流水线
  • 支持多阶段检索、混合稠密稀疏、OCR 分块等任意检索逻辑
  • 用 pytrec_eval 计算 ndcg、recall、map 等检索指标
  • CLI 支持单数据集评测与 evaluate-all 批量跑全部数据集
  • 可返回 infos 附带成本、耗时、GPU 数等追踪信息

容易踩的坑

单模型检索器评测已迁移到 MTEB 框架,本仓库只专注流水线评测;提交排行榜结果需用 --language english 跑 ViDoRe v3 英文切分;数据集需从 HuggingFace 加载,首次运行要联网下载。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v5.0.0
  1. v5.0.0v5.0.0: Package restructure最新正式版2025-02-19 · 2025-02-19 10:02 UTC

    Description

    This release is an extensive package restructure, making vidore-benchmark faster and easier to use. Among the main new features:

    ⚡ Faster eval with optimized data loading 💽 Support for BEIR format 🖥️ A cleaner, more intuitive CLI 🐍 Evaluate vision retrieval straight from the Python API

    🚨 This releases introduces many breaking changes, thus it is NOT backward-compatible with previous versions.

    Features

    Added

    • Add CLI eval support for ColQwen2, DSEQwen2, Cohere, ColIdefics3 API embedding models
    • Add Pydantic models for storing the ViDoRe benchmark results and metadata (includes vidore-benchmark version)
    • Add option to create an EvalManager instance from ViDoReBenchmarkResults
    • Add num_workers argument when using dataloaders
    • Allow the creation of a VisionRetriever instance using a PyTorch model and a processor that implements a process_images and a process_queries methods, similarly to the ColVision processors
    • Add dataloader_prebatch_query and dataloader_prebatch_passage arguments to avoid loading the entire datasets in memory (used to cause RAM spikes when loading large image datasets)
    • Add QA-to-BEIR dataset format conversion script
    • Add support for the BEIR dataset format with ViDoReEvaluatorBEIR

    Changed

    • [Breaking] Change the CLI argument names
    • Add option to load a specific checkpoint for Hf models with pretrained_model_name_or_path
    • Improve soft dependency handling in retriever classes (the colpali-engine is now optional)
    • [Breaking] Change the get_scores signature
    • [Breaking] Rename forward_documents to forward_passages to match the literature and reduce confusion
    • [Breaking] Rename DSERetriever into DSEQwen2Retriever
    • [Breaking] Rename args in the CLI script
    • When available, use processor.get_scores instead of custom scoring snippet
    • [Breaking] Rename ColQwenRetriever to ColQwen2Retriever
    • [Breaking] Rename BiQwenRetriever to BiQwen2Retriever
    • [Breaking] Revamp the evaluate module. Evaluation is now handled by the ViDoReEvaluatorQA class
    • [Breaking] Rename ViDoReEvaluator into BaseViDoReEvaluator. The new ViDoReEvaluator class allows to create retrievers using the Python API.
    • Set default num_workers to 0 in retrievers
    • Update default checkpoints for ColPali and ColQwen2 retrievers

    Fixed

    • Fix evaluate_dataset when used with the BM25 retriever
    • Fix issue when no pretrained_model_name_or_path = None in load_vision_retriever_from_registry
    • Fix DummyRetriever's get_scores method
    • Fix processor output not being sent to the correct device in ColQwen2Retriever
    • Fix bugs in BiQwen2Retriever
    • Fix try-catch block for soft dep check in SigLIPRetriever

    Removed

    • Remove experimental quantization module
    • Remove the interpretability module. The interpretability code has been moved and improved as part of the colpali-engine==0.3.2 release.
    • [Breaking] Remove support for token pooling. This feature will be re-introduced in colpali-engine>0.3.9
    • Replace loguru with built-in logging module
    • Remove the retrieve_on_dataset and retrieve_on_pdfs entrypoint scripts
    • Remove the pdf_utils module
    • Remove the get_top_k method from the evaluate module
    • Remove the plot_utils and test_utils modules
    • Remove the experiments directory

    Tests

    • Add tests for all built-in vision retrievers
    • Add fixtures in retriever tests to speed up testing
    • Add tests for ViDoReBenchmarkResults
    • Add tests for EvalManager
    • Add tests and E2E tests for cli command evaluate-retriever
    • Add tests for ViDoReEvaluatorBEIR

    Full Changelog: https://github.com/illuin-tech/vidore-benchmark/compare/v4.0.2...v5.0.0

  2. v4.0.22024-10-17 · 2024-10-17 09:27 UTC
    查看更新说明

    Features

    Deprecated

    • Deprecate the interpretability module

    Build

    • Fix and update conflicts for package dependencies
  3. v4.0.12024-10-07 · 2024-10-07 21:48 UTC
    查看更新说明

    Features

    Changed

    • Rename ColPali model alias to match model name (use --model-name vidore/colpali instead of --model-name vidore/colpali-v1.2 with the vidore-benchmark evaluate-retriever CLI)
    • Use the ColPali model name to load ColPaliProcessor instead of the PaliGemma one

    Fixed

    • Add missing model.eval() to all vision retrievers to make results deterministic

    Full Changelog: https://github.com/illuin-tech/vidore-benchmark/compare/v4.0.0...v4.0.1

  4. v4.0.02024-09-21 · 2024-09-21 10:23 UTC
    查看更新说明

    Description

    🚨 This release is breaking as it leverages the restructured colpali-engine package. In particular, the duplicate code logic was removed. Thus, it is NOT backward-compatible with previous versions.

    Features

    Added

    Changed

    • Remove unused deps from pyproject
    • Clean pyproject
    • Bump colpali-engine to v0.3.0 and adapt code for the new API
    • Replace black with ruff linter
    • Add better ColPali model loading

    Removed

    • Remove duplicate code with colpali-engine (e.g. remove ColPaliProcessor, ColPaliScorer...)

    Fixed

    • Change typing to support Python 3.9
    • Fix the generate_similarity_maps CLI
    • Various fixes

    Full Changelog: https://github.com/illuin-tech/vidore-benchmark/compare/v3.4.2...v4.0.0

  5. v3.4.22024-09-09 · 2024-09-09 13:00 UTC
    查看更新说明

    Features

    Fixed

    • Fix typo when making model_name configurable in previous release
    • Fix wrong image processing for ColPali

    Full Changelog: https://github.com/illuin-tech/vidore-benchmark/compare/v3.4.1...v3.4.2

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ViDoRe Pipeline Evaluation Framework 🔍

    arXiv GitHub Hugging Face

    Test Version Downloads


    [!IMPORTANT]

    🔄 Repository Focus Change

    This repository is now focused on pipeline evaluation for visual document retrieval tasks.

    All other functionalities (vision retriever evaluation, legacy benchmarks) are kept for reproducibility purposes but are deprecated and no longer actively maintained.


    Evaluating single-model retrievers on ViDoRe v1–v3 with MTEB

    We shifted from in-house evaluations to the general MTEB evaluation framework for retrieval models by moving to MTEB.

    Here are the main steps to evaluate and submit your retriever to the ViDoRe V1-V3 leaderboards ; see the MTEB official documentation for full details. This section covers mteb leaderboards only; for our in-house pipeline leaderboard, see the section below.

    1. Create your model implementation file (if it does not exist already) here, then open a PR to the MTEB repository with your changes; examples for Colpali-like models can be found in this file.

    2. Evaluate your model:

    import mteb
    from mteb.models.model_implementations.my_custom_model import MyCustomModel
    
    my_model = MyCustomModel(my_args)
    tasks = mteb.get_tasks(["ViDoRe (v3)"])
    
    results = mteb.evaluate(my_model, tasks=tasks)
    
    1. Open a PR on the mteb_results_repo with the generated results file to submit your results to the leaderboard

    2. To evaluate on private sets, once all this is done you can ask the MTEB team to evaluate your model on private ViDoRe v3 sets by opening a dedicated issue on their repo

    Evaluating a complex pipeline

    Pipeline evaluation allows you to evaluate complete end-to-end retrieval systems on the ViDoRe v3 benchmark datasets. Unlike traditional retriever evaluation that focuses on individual model components, pipeline evaluation lets you test:

    • Multi-stage retrieval systems (e.g., retrieve + rerank)
    • Hybrid approaches (e.g., dense + sparse retrieval fusion)
    • Custom preprocessing pipelines (e.g., OCR → chunking → embedding)
    • Arbitrary retrieval logic that goes beyond standard dense/sparse retrievers

    📊 Results Repository & Submission Guidelines

    This repository serves as the primary community results repository for visual document retrieval benchmarks using complex pipelines. We encourage researchers and practitioners to submit their pipeline evaluation results to create a centralized location where the community can compare different approaches and track progress on ViDoRe v3 datasets.

    How to Submit Your Results

    To contribute your pipeline results to the leaderboard:

    1. Run evaluations using this framework on the ViDoRe v3 datasets english splits (--language english in cli). It tracks raw scores as well as indexing and search computing times.

    2. Open a Pull Request with the following:

      • Results files: Add your JSON result files to the results/metrics folder, organized as:
        results/metrics/your_pipeline_name/
        ├── vidore_v3_hr.json
        ├── vidore_v3_finance_en.json
        ├── vidore_v3_industrial.json
        └── ... (other datasets)
        
      • Pipeline description: Include a description.json file in the same PR that describes the architecture used. A pipeline is represented as a graph of a set of modules (OCR, retriever, reranker, mcp server... linked together via edges) Some pipeline descriptions files example are written in results/pipeline_descriptions

      We encourage adding as much hardware information as possible in the description to enable the community to get a feel about the latency of each pipeline.

    Installation

    pip install vidore-benchmark
    

    List Available Datasets

    List all ViDoRe v3 datasets:

    vidore-benchmark pipeline list-datasets
    

    Available datasets:

    • vidore/vidore_v3_hr - Human Resources documents
    • vidore/vidore_v3_finance_en - Financial documents (English)
    • vidore/vidore_v3_industrial - Industrial documents
    • vidore/vidore_v3_pharmaceuticals - Pharmaceutical documents
    • vidore/vidore_v3_computer_science - Computer Science documents
    • vidore/vidore_v3_energy - Energy sector documents
    • vidore/vidore_v3_physics - Physics documents
    • vidore/vidore_v3_finance_fr - Financial documents (French)

    Evaluate a Pipeline

    You can evaluate any pipeline that inherits from BasePipeline:

    Some pipelines are already implemented in the pipeline_implementations folder.

    Custom Pipeline

    Evaluate your own pipeline implementation:

    vidore-benchmark pipeline evaluate \
        --dataset-name vidore/vidore_v3_hr \
        --module-path path/to/my_pipeline.py \
        --class-name MyCustomPipeline \
        --language english \
        --pipeline-args '{"model_name": "my-model"}'
    

    Your pipeline file (my_pipeline.py):

    from vidore_benchmark.pipeline_evaluation import BasePipeline
    
    class MyCustomPipeline(BasePipeline):
        def __init__(self, model_name):
            self.model_name = model_name
            # Initialize your model here
    
        def index(self, corpus_ids, corpus_images, corpus_texts, dataset_name: str = None):
            # Indexing function to process corpus, should store anything
            # relevant as class attributes
            self.corpus_ids = corpus_ids
            ...
    
        def search(self, query_ids, queries):
            # Your search logic, returns scores dict (see BasePipeline file for description)
            return {query_id: {corpus_id: score}}
    

    Language Filtering

    Some datasets contain multilingual queries. You can filter by language:

    vidore-benchmark pipeline evaluate \
        --dataset-name vidore/vidore_v3_hr \
        --pipeline-type random \
        --language english
    

    Evaluate on All Datasets

    Evaluate your pipeline on all ViDoRe v3 datasets:

    With built-in pipeline:

    vidore-benchmark pipeline evaluate-all \
        --pipeline-type random \
        --pipeline-args '{"seed": 42}' \
        --output-dir results/
    

    With custom pipeline:

    vidore-benchmark pipeline evaluate-all \
        --module-path my_pipeline.py \
        --class-name MyCustomPipeline \
        --output-dir results/
    

    Python API

    Implementing Your Own Pipeline

    To evaluate a custom pipeline, inherit from BasePipeline and implement the index() and search() methods:

    Running Evaluation

    from path_to_pipeline import MyCustomPipeline
    from vidore_benchmark.pipeline_evaluation import (
        load_vidore_dataset,
        evaluate_retrieval,
        aggregate_results,
    )
    
    # Load dataset
    query_ids, queries, corpus_ids, corpus_images, corpus_texts, qrels = load_vidore_dataset(
        dataset_name="vidore/vidore_v3_hr",
        split="test"
    )
    
    # Initialize your pipeline
    pipeline = MyCustomPipeline(retriever=my_retriever, reranker=my_reranker)
    
    # Run evaluation
    results = evaluate_retrieval(
        pipeline=pipeline,
        query_ids=query_ids,
        queries=queries,
        corpus_ids=corpus_ids,
        corpus_images=corpus_images,
        corpus_texts=corpus_texts,
        qrels=qrels,
        metrics=["ndcg_cut_10", "recall_10"]
    )
    
    # Get aggregate scores
    aggregated = aggregate_results(results)
    print(f"NDCG@10: {aggregated['ndcg_cut_10']:.4f}")
    

    Some examples of pipeline implementations can be found in the pipeline_implementations folder

    Advanced Usage

    Tracking Additional Metrics (Optional)

    Pipelines can optionally return additional tracking information alongside retrieval results. This is useful for monitoring costs, timing, resource usage, or other custom metrics:

    from typing import Dict, List, Any, Optional, Tuple
    
    class PipelineWithMetrics(BasePipeline):
        def index(
            self,
            corpus_ids: List[str],
            corpus_images: List[Any],
            corpus_texts: List[str],
        ) -> None:
            # Indexing logic
            ...
    
        def search(
            self,
            query_ids: List[str],
            queries: List[str],
        ) -> Tuple[Dict[str, Dict[str, float]], Optional[Dict[str, Any]]]:
            """
            Return both retrieval results and optional tracking metrics.
            
            Returns:
                Tuple of (results, infos) where infos can contain:
                - Cost tracking (e.g., API costs, GPU hours)
                - Granular timing information
                - Resource usage (num_gpus, memory, etc.)
                - Model-specific metadata
            """
            # Your retrieval logic here
            results = {...}
            
            # Optional: track additional metrics
            infos = {
                "estimated_cost_usd": 0.05,
                "num_gpus": 1,
                "total_time_ms": 1234.5,
                "model_name": "my-model-v1",
            }
            
            return results, infos
    

    The infos dictionary will be stored in the evaluation results under the _infos key. This is completely optional - pipelines can still return just the results dictionary for backward compatibility:

    class SimplePipeline(BasePipeline):
        def search(...) -> Dict[str, Dict[str, float]]:
            # Just return results, no tracking needed
            return results
    

    See example_pipelines/pipeline_with_metrics.py for a complete example.

    Dataset Information

    from vidore_benchmark.pipeline_evaluation import (
        load_vidore_dataset,
        print_dataset_info,
        get_available_datasets,
    )
    
    # List available datasets
    datasets = get_available_datasets()
    print(datasets)
    
    # Load and inspect a dataset
    query_ids, queries, corpus_ids, corpus, qrels = load_vidore_dataset(
        "vidore/vidore_v3_industrial"
    )
    
    print_dataset_info(
        dataset_name="vidore/vidore_v3_industrial",
        query_ids=query_ids,
        queries=queries,
        corpus_ids=corpus_ids,
        corpus=corpus,
        qrels=qrels,
    )
    

    Custom Metrics

    You can specify custom metrics to evaluate if you want to:

    results = evaluate_retrieval(
        pipeline=pipeline,
        query_ids=query_ids,
        queries=queries,
        corpus_ids=corpus_ids,
        corpus=corpus,
        qrels=qrels,
        metrics=[
            "ndcg_cut_5",
            "ndcg_cut_10",
            "recall_5",
            "recall_10",
            "map",
        ]
    )
    

    All metrics supported by pytrec_eval are available.

    Architecture

    The pipeline evaluation framework consists of:

    1. BasePipeline: Abstract base class for implementing custom pipelines
    2. Dataset Loaders: Functions to load ViDoRe v3 datasets from HuggingFace
    3. Evaluator: Uses pytrec_eval to compute retrieval metrics
    4. CLI: Commands for evaluating any custom pipeline
    vidore_benchmark/
    ├── pipeline_evaluation/
    │   ├── base_pipeline.py          # BasePipeline abstract class
    │   ├── dataset_loader.py          # ViDoRe v3 dataset loading
    │   ├── evaluator.py               # Evaluation orchestration
    │   ├── utils.py                   # Helper utilities
    └── cli/
        └── pipeline_evaluation.py     # CLI for pipeline evaluation
    

    Reproducibility & Legacy Features

    This repository previously focused on evaluating vision retrievers on the ViDoRe benchmarks v1 and v2. All code related to these functionalities is still available but deprecated:

    • Vision Retriever Evaluation: See README_OLD.md
    • ViDoRe Benchmarks v1/v2: Now maintained in MTEB
    • Model Implementations: Available in src/vidore_benchmark/retrievers/ (for reference only)

    ⚠️ For new projects, we recommend:

    • Using MTEB for vision retriever evaluation on ViDoRe v1/v2
    • Using this framework for pipeline evaluation on ViDoRe v3

    For reproducibility of published results, see REPRODUCIBILITY.md.

    Contributing

    We welcome contributions for:

    • New example pipelines
    • Additional evaluation results
    • Dataset utilities
    • Documentation improvements

    Please open an issue or PR on GitHub.

    Citation

    If you use this framework or the ViDoRe benchmark in your research, please cite:

    ColPali: Efficient Document Retrieval with Vision Language Models

    @misc{faysse2024colpaliefficientdocumentretrieval,
          title={ColPali: Efficient Document Retrieval with Vision Language Models}, 
          author={Manuel Faysse and Hugues Sibille and Tony Wu and Bilel Omrani and Gautier Viaud and Céline Hudelot and Pierre Colombo},
          year={2024},
          eprint={2407.01449},
          archivePrefix={arXiv},
          primaryClass={cs.IR},
          url={https://arxiv.org/abs/2407.01449}, 
    }
    

    ViDoRe Benchmark V2: Raising the Bar for Visual Retrieval

    @misc{macé2025vidorebenchmarkv2raising,
          title={ViDoRe Benchmark V2: Raising the Bar for Visual Retrieval}, 
          author={Quentin Macé and António Loison and Manuel Faysse},
          year={2025},
          eprint={2505.17166},
          archivePrefix={arXiv},
          primaryClass={cs.IR},
          url={https://arxiv.org/abs/2505.17166}, 
    }
    

    ViDoRe V3: A Comprehensive Evaluation of Retrieval Augmented Generation in Complex Real-World Scenarios

    @misc{loison2026vidore,
          title={ViDoRe V3: A Comprehensive Evaluation of Retrieval Augmented Generation in Complex Real-World Scenarios},
          author={Loison, Ant{\'o}nio and Mac{\'e}, Quentin and Edy, Antoine and Xing, Victor and Balough, Tom and Moreira, Gabriel and Liu, Bo and Faysse, Manuel and Hudelot, C{\'e}line and Viaud, Gautier},
          journal={arXiv preprint arXiv:2601.08620},
          year={2026}
    }
    

    License

    This project is licensed under the MIT License - see the LICENSE file for details.

    Links