CoolFace
Datasetpublic

Yasintuncer/NIH-CXR14-BiomedCLIP-Features

NIH-CXR14-BiomedCLIP-Features Dataset This dataset is derived from the NIH Chest X-ray Dataset (NIH-CXR14) and processed using the BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 model from Microsoft. It contains image and text features extracted from chest X-ray images and their corresponding textual findings. Dataset Description The original NIH-CXR14 dataset comprises 112,120 chest X-ray images with disease labels from 30,805 unique patients. This processed… See the full description on the dataset page: https://huggingface.co/datasets/Yasintuncer/NIH-CXR14-BiomedCLIP-Features.

sourceHugging Facecc-by-4.0updated 1y agoView on Hugging Face
2likes93downloads
Dataset Card

NIH-CXR14-BiomedCLIP-Features Dataset

This dataset is derived from the NIH Chest X-ray Dataset (NIH-CXR14) and processed using the BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 model from Microsoft. It contains image and text features extracted from chest X-ray images and their corresponding textual findings.

Dataset Description

The original NIH-CXR14 dataset comprises 112,120 chest X-ray images with disease labels from 30,805 unique patients. This processed dataset includes:

  • Image Features: Extracted using the vision encoder of BiomedCLIP (512 dimensions).
  • Text Features: Extracted using the text encoder of BiomedCLIP (512 dimensions).
  • Finding Labels: The original disease labels, processed and converted into a multi-label format.
  • Image Index: Unique identifiers for each image.
  • View Position: The view position of the X-ray (e.g., PA, AP).
  • Processed Text: A grammatically correct text prompt generated from the finding labels, designed for use with the BiomedCLIP model.

Processing Steps

  1. 1.Data Loading: The original NIH-CXR14 image and text datasets were loaded.
  2. 2.Text Preprocessing:
  3. 3.Problematic characters (|) were replaced with commas.
  4. 4."No Finding" labels were converted to "No_Finding".
  5. 5.Finding labels were split into individual findings.
  6. 6.Grammatically correct text prompts were generated based on the finding labels and view position.
  7. 7.Feature Extraction:
  8. 8.Images and text prompts were preprocessed using the BiomedCLIP preprocessors.
  9. 9.Image and text features were extracted using the BiomedCLIP model.
  10. 10.Data Storage:
  11. 11.Extracted features, image indices, view positions, raw texts, and finding labels were stored in Parquet files.
  12. 12.The dataset was chunked into multiple Parquet files for efficient storage and retrieval.

Dataset Structure

The dataset is organized into Parquet files, each containing the following columns:

  • Image Index: String, unique identifier for each image.
  • Image Features: List of floats, image features extracted by BiomedCLIP.
  • Text Features: List of floats, text features extracted by BiomedCLIP.
  • View Position: String, view position of the X-ray.
  • Texts: String, processed text prompts.
  • [Finding Label]: Integer (0 or 1), multi-label representation of each finding.

Usage

This dataset can be used for various tasks, including:

  • Multi-label classification: Using the extracted features to predict disease findings.
  • Retrieval: Retrieving relevant X-ray images based on text queries or vice versa.
  • Fine-tuning: Fine-tuning models for medical image analysis tasks.

Installation

To load the dataset, you can use the datasets library from Hugging Face:

python
from datasets import load_dataset

dataset = load_dataset("Yasintuncer/NIH-CXR14-BiomedCLIP-Features")