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.
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
- Data Loading: The original NIH-CXR14 image and text datasets were loaded.
- Text Preprocessing:
- Problematic characters (
|) were replaced with commas. - "No Finding" labels were converted to "No_Finding".
- Finding labels were split into individual findings.
- Grammatically correct text prompts were generated based on the finding labels and view position.
- Feature Extraction:
- Images and text prompts were preprocessed using the BiomedCLIP preprocessors.
- Image and text features were extracted using the BiomedCLIP model.
- Data Storage:
- Extracted features, image indices, view positions, raw texts, and finding labels were stored in Parquet files.
- 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:
from datasets import load_dataset
dataset = load_dataset("Yasintuncer/NIH-CXR14-BiomedCLIP-Features")