|
--- |
|
license: mit |
|
--- |
|
## **Dataset Structure Overview** |
|
M-BEIR dataset comprises two main components: Query Data and Candidate Pool. |
|
Each of these sections consists of structured entries in JSONL format (JSON Lines), meaning each line is a valid JSON object. Below is a detailed breakdown of the components and their respective fields: |
|
|
|
Query Data (JSONL File) |
|
Each line in the Query Data file represents a unique query. The structure of each query JSON object is as follows:: |
|
```json |
|
{ |
|
"qid": "A unique identifier formatted as {dataset_id}:{query_id}", |
|
"query_txt": "The text component of the query", |
|
"query_img_path": "The file path to the associated query image", |
|
"query_modality": "The modality type of the query (text, image or text,image)", |
|
"query_src_content": "Additional content from the original dataset, presented as a string by json.dumps()", |
|
"pos_cand_list": [ |
|
{ |
|
"did": "A unique identifier formatted as {dataset_id}:{doc_id}" |
|
} |
|
// ... more positive candidates |
|
], |
|
"neg_cand_list": [ |
|
{ |
|
"did": "A unique identifier formatted as {dataset_id}:{doc_id}" |
|
} |
|
// ... more negative candidates |
|
] |
|
} |
|
``` |
|
|
|
Candidate Pool (JSONL File) |
|
The Candidate Pool contains potential matching documents for the queries. The structure of each candidate JSON object in this file is as follows:: |
|
```json |
|
{ |
|
"did": "A unique identifier for the document, formatted as {dataset_id}:{doc_id}", |
|
"txt": "The text content of the candidate document", |
|
"img_path": "The file path to the candidate document's image", |
|
"modality": "The modality type of the candidate (e.g., text, image or text,image)", |
|
"src_content": "Additional content from the original dataset, presented as a string by json.dumps()" |
|
} |
|
``` |
|
|
|
## **How to Use** |
|
### Downloading the M-BEIR Dataset |
|
Download the dataset files directly from the page. |
|
|
|
### Decompressing M-BEIR Images |
|
After downloading, you will need to decompress the image files. Follow these steps in your terminal: |
|
```bash |
|
# Navigate to the M-BEIR directory |
|
cd path/to/M-BEIR |
|
|
|
# Combine the split tar.gz files into one |
|
sh -c 'cat mbeir_images.tar.gz.part-00 mbeir_images.tar.gz.part-01 mbeir_images.tar.gz.part-02 mbeir_images.tar.gz.part-03 > mbeir_images.tar.gz' |
|
|
|
# Extract the images from the tar.gz file |
|
tar -xzf mbeir_images.tar.gz |
|
``` |
|
|
|
## **Citation** |
|
|
|
Please cite our paper if you use our data, model or code. |
|
|
|
``` |
|
@article{wei2023uniir, |
|
title={UniIR: Training and Benchmarking Universal Multimodal Information Retrievers}, |
|
author={Wei, Cong and Chen, Yang and Chen, Haonan and Hu, Hexiang and Zhang, Ge and Fu, Jie and Ritter, Alan and Chen, Wenhu}, |
|
journal={arXiv preprint arXiv:2311.17136}, |
|
year={2023} |
|
} |
|
``` |
|
|