The dataset viewer is not available for this subset.
Exception: SplitsNotFoundError Message: The split names could not be parsed from the dataset config. Traceback: Traceback (most recent call last): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 299, in get_dataset_config_info for split_generator in builder._split_generators( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 83, in _split_generators raise ValueError( ValueError: The TAR archives of the dataset should be in WebDataset format, but the files in the archive don't share the same prefix or the same types. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 65, in compute_split_names_from_streaming_response for split in get_dataset_split_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 353, in get_dataset_split_names info = get_dataset_config_info( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 304, in get_dataset_config_info raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
This is the official data repository for RadIR: A Scalable Framework for Multi-Grained Medical Image Retrieval via Radiology Report Mining.
If you try to build RadIR with the data we provide, please refer to this repo.
We mine image-paired report to extract findings on diverse anatomy structures, and quantify the multi-grained image-image relevance via RaTEScore. Specifically, we have extended two public datasets for multi-grained medical image retrieval task:
- MIMIC-IR is extended from MIMIC-CXR, containing 377,110 images and 90 anatomy structures.
- CTRATE-IR is extended from CTRATE, containing 25,692 images and 48 anatomy structures.
Note: For the MIMIC-IR dataset, you need to manually merge and decompress the files.
After downloading all split parts (from MIMIC-IR.tar.gz.part00
to MIMIC-IR.tar.gz.part08
), execute the following commands in the same directory:
cat MIMIC-IR.tar.gz.part* > MIMIC-IR.tar.gz
tar xvzf MIMIC-IR.tar.gz
This example demonstrates how to read data from either the MIMIC-IR or CTRATE-IR datasets. You can switch between datasets by commenting/uncommenting the relevant sections.
import pandas as pd
import numpy as np
# CTRATE-IR
anatomy_condition = 'bone'
sample_A_idx = 10
sample_B_idx = 20
df = pd.read_csv(f'CTRATE-IR/anatomy/train_entity/{anatomy_condition}.csv')
id_ls = df.iloc[:,0].tolist()
findings_ls = df.iloc[:,1].tolist()
simi_tab = np.load(f'CTRATE-IR/anatomy/train_ratescore/{anatomy_condition}.npy')
# # MIMIC-IR
# anatomy_condition = 'lungs'
# sample_A_idx = 10
# sample_B_idx = 20
# df = pd.read_csv(f'MIMIC-IR/anatomy/train_caption/{anatomy_condition}.csv')
# id_ls = df.iloc[:,0].tolist()
# findings_ls = df.iloc[:,1].tolist()
# simi_tab = np.load(f'MIMIC-IR/anatomy/train_ratescore/{anatomy_condition}.npy')
print(f'Sample {id_ls[sample_A_idx]} findings on {anatomy_condition}: {findings_ls[sample_A_idx]}')
print(f'Sample {id_ls[sample_B_idx]} findings on {anatomy_condition}: {findings_ls[sample_B_idx]}')
print(f'Relevance score: {simi_tab[sample_A_idx, sample_B_idx]}')
Note: the score have been normalized to 0~100 and stored in uint8.
We also provide the whole image-level relevance quantified based on their entire reports:
import os
import json
import numpy as np
sample_A_idx = 10
sample_B_idx = 20
# CTRATE-IR
with open('CTRATE-IR/train_filtered.jsonl', 'r') as f:
data = f.readlines()
data = [json.loads(l) for l in data]
simi_tab = np.load(f'CTRATE-IR/CT_train_ratescore.npy')
sample_A_id = os.path.basename(data[sample_A_idx]['img_path'])
sample_B_id = os.path.basename(data[sample_B_idx]['img_path'])
sample_A_report = os.path.basename(data[sample_A_idx]['text'])
sample_B_report = os.path.basename(data[sample_B_idx]['text'])
# # MIMIC-IR
# data = pd.read_csv('MIMIC-IR/val_caption.csv')
# simi_tab = np.load('MIMIC-IR/val_ratescore.npy')
# sample_A_id = data.iloc[sample_A_idx]['File Path']
# sample_B_id = data.iloc[sample_B_idx]['File Path']
# sample_A_report = data.iloc[sample_A_idx]['Findings']
# sample_B_report = data.iloc[sample_B_idx]['Findings']
print(f'Sample {sample_A_id} reports: {sample_A_report}\n')
print(f'Sample {sample_B_id} reports: {sample_B_report}\n')
print(f'Whole image relevance score: {simi_tab[sample_A_idx, sample_B_idx]}')
For raw image data, you can download them from CTRATE (or RadGenome-ChestCT) and MIMIC-CXR. We keep all the sample id consistent so you can easily find them.
Citation
If you find our data useful, please cite our work:
@article{zhang2025radir,
title={RadIR: A Scalable Framework for Multi-Grained Medical Image Retrieval via Radiology Report Mining},
author={Zhang, Tengfei and Zhao, Ziheng and Wu, Chaoyi and Zhou, Xiao and Zhang, Ya and Wang, Yangfeng and Xie, Weidi},
journal={arXiv preprint arXiv:2503.04653},
year={2025}
}
- Downloads last month
- 45