Practical overview
When it fits
Use CheXbert when a local Python workflow needs to assign the repository’s 14 observation labels to chest radiology report impressions.
Who it is for
- Researchers preparing structured labels from chest radiology report datasets.
- Teams training or evaluating medical-imaging models with labeled report text.
Documented uses
- Turn report impressions in a CSV into structured observation labels.
- Prepare labeled train and development data for fine-tuning a report-labeling model.
Requirements & limits
- Inference requires a downloaded PyTorch checkpoint as well as the installed Python dependencies.
- Input reports must use the “Report Impression” CSV column, and text is truncated at 512 tokens.
- Training requires labeled train and development reports and a separate tokenization step.
- The README links to separate licensing information for commercial purposes.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Label report impressions from a CSV
Generate a CSV of CheXbert labels from chest radiology report impressions.
Before you start
- Python 3.7 or higher
- Install dependencies with pip or create the documented Conda environment
- A reports CSV containing a column named “Report Impression”
- A downloaded PyTorch model checkpoint
Steps
Install requirements with the command below, or create the environment with
conda env create -f environment.ymland activate it usingconda activate chexbert.pip install -r requirements.txtPrepare the input CSV with report text under the “Report Impression” column.
Run the command below.
python label.py -d={path to reports} -o={path to output dir} -c={path to checkpoint}
Expected outcome
The output directory contains `labeled_reports.csv` with labels for the supported observations.
Guide limitations
- Reports are automatically cut off at 512 tokens.
- The documented checkpoint can use available GPUs in parallel; without a GPU, the CPU is used.
Prepare labeled data for model training
Tokenize train and development report impressions and provide the resulting lists to the training workflow.
Before you start
- Train and development CSV files with a “Report Impression” column
- Corresponding label columns for all 14 conditions, using the repository’s label convention
- Python environment and dependencies configured as described in the repository
Steps
Run the command below for the report impressions.
python bert_tokenizer.py -d={path to train/dev reports csv} -o={path to output list}Use the saved tokenized impression lists as the train and development impression-list inputs to the documented
run_bert.pytraining command.
Expected outcome
Tokenized report impression lists are prepared for the repository’s training stage.
Guide limitations
- The repository documents training as a separate stage requiring train and development labels; this guide covers preparation and handoff to that stage.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- stanfordmlgroup/CheXbert · Official homepage title · retained in its source language

