Dataset Viewer
The dataset viewer is not available for this subset.
Cannot get the split names for the config 'default' of the dataset.
Exception:    SplitsNotFoundError
Message:      The split names could not be parsed from the dataset config.
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.9/tarfile.py", line 190, in nti
                  s = nts(s, "ascii", "strict")
                File "/usr/local/lib/python3.9/tarfile.py", line 174, in nts
                  return s.decode(encoding, errors)
              UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 1: ordinal not in range(128)
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.9/tarfile.py", line 2588, in next
                  tarinfo = self.tarinfo.fromtarfile(self)
                File "/usr/local/lib/python3.9/tarfile.py", line 1292, in fromtarfile
                  obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
                File "/usr/local/lib/python3.9/tarfile.py", line 1234, in frombuf
                  chksum = nti(buf[148:156])
                File "/usr/local/lib/python3.9/tarfile.py", line 193, in nti
                  raise InvalidHeaderError("invalid header")
              tarfile.InvalidHeaderError: invalid header
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 298, 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 81, in _split_generators
                  first_examples = list(islice(pipeline, self.NUM_EXAMPLES_FOR_FEATURES_INFERENCE))
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 32, in _get_pipeline_from_tar
                  for filename, f in tar_iterator:
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/track.py", line 50, in __iter__
                  for x in self.generator(*self.args):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 1342, in _iter_from_urlpath
                  yield from cls._iter_tar(f)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 1293, in _iter_tar
                  stream = tarfile.open(fileobj=f, mode="r|*")
                File "/usr/local/lib/python3.9/tarfile.py", line 1822, in open
                  t = cls(name, filemode, stream, **kwargs)
                File "/usr/local/lib/python3.9/tarfile.py", line 1703, in __init__
                  self.firstmember = self.next()
                File "/usr/local/lib/python3.9/tarfile.py", line 2600, in next
                  raise ReadError(str(e))
              tarfile.ReadError: invalid header
              
              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 352, in get_dataset_split_names
                  info = get_dataset_config_info(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 303, 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.

ROCOv2: Radiology Object in COntext version 2

Introduction

ROCOv2 is a multimodal dataset consisting of radiological images and associated medical concepts and captions extracted from the PMC Open Access Subset. It is an updated version of the ROCO dataset, adding 35,705 new images and improving concept extraction and filtering.

Dataset Overview

The ROCOv2 dataset contains 79,789 radiological images, each with a corresponding caption and medical concepts. The images are sourced from openly available publications in the PMC Open Access Subset, licensed under CC BY or CC BY-NC.

Dataset Statistics

  • 79,789 radiological images
  • 59,958 images in the training set
  • 9,904 images in the validation set
  • 9,927 images in the test set
  • 1,947 unique CUIs overall
  • 1,947 CUIs in the training set
  • 1,760 CUIs in the validation set
  • 1,754 CUIs in the test set

Dataset Creation

The dataset was created by downloading the full PMC Open Access Subset via FTP, extracting the images and captions, and filtering the images using two binary classification models. The models achieved accuracies of about 90% and 98.6%, respectively.

Filtering Steps

  1. Non-compound image filtering: removed 15,315,657 images
  2. Radiological image filtering: removed 64,831 images
  3. License filtering: removed 10,392 images from papers not licensed under CC BY or CC BY-NC
  4. Duplicate removal: removed 2,056 duplicates
  5. Caption filtering: removed 1,528 images with non-English captions and very short captions without relevant information

Transformers Dataset generation

The dataset hosted in Hugging Face hub was generated with this notebook
All the source images and code can be found on our GitHub repo

Dataset Labels and Concepts

The dataset labels and concepts were generated using the Medical Concept Annotation Toolkit v1.10.0 (MedCAT) and manually curated concepts for modality (all images), body region (X-ray only), and directionality (X-ray only).

Labeling and Concept Generation Workflow

The labeling and concept generation workflow consisted of the following steps:

  1. Image caption extraction
  2. Concept extraction using MedCAT
  3. Manual curation of concepts for modality, body region, and directionality
  4. Combination of automatically generated and manually curated concepts

Use Cases

The ROCOv2 dataset can be used for various applications, including:

  • Training image annotation models based on image-caption pairs
  • Multi-label image classification using UMLS concepts
  • Pre-training of medical domain models
  • Evaluation of deep learning models for multi-task learning
  • Image retrieval and caption generation tasks

Citation

If you use the ROCOv2 dataset in your research, please cite the following paper:

Pelka, O., Menze, B. H., & Rexhausen, S. E. (2023). Radiology Objects in COntext version 2 (ROCOv2): A multimodal dataset for medical image analysis. arXiv preprint arXiv:2405.10004.

@misc {ronan_l.m._2024,
    author       = { {Ronan L.M.} },
    title        = { ROCOv2-radiology (Revision 5d66908) },
    year         = 2024,
    url          = { https://huggingface.co/datasets/eltorio/ROCOv2-radiology },
    doi          = { 10.57967/hf/3489 },
    publisher    = { Hugging Face }
}

License

The ROCOv2 dataset is licensed under the CC BY-NC-SA 4.0 license.

Acknowledgments

We acknowledge the National Library of Medicine (NLM) for providing access to the PMC Open Access Subset. We also acknowledge the creators of the Medical Concept Annotation Toolkit (MedCAT) for providing a valuable tool for concept extraction and annotation.

Downloads last month
73