MIMIC CXR Chest X Rays
Chest X-rays with reports and view tags under access controls, the ground for medical vision done with care.
Why Does This Exist?
Natural-photo models fail on X-rays: grayscale physics, view positions, subtle findings and strict privacy differ. MIMIC-CXR released chest X-rays with reports and labels under credentialed access, so medical vision could train report-aware models responsibly.
This page covers paired-image-report roles and safe use. It is not clinical advice, and access requires approval.
Think of It Like This
Films clipped to their notes
Each X-ray film arrives clipped to the radiologist note from the same visit. Films without notes are harder to learn from, notes without films cannot be checked.
That clip is MIMIC-CXR. Images plus words, same patient visit, handled with gloves.
How It Actually Works
Purpose is chest finding classification and report generation research. Inputs are frontal or lateral views, outputs are finding labels or report text by task. Appropriate use is research with patient-level splits, access controls and de-identification respect. Never split by file: same-patient images must sit in one split only.
Toy patient-split walkthrough
Take 100 images from 20 patients, 5 each. Splitting by file 80/20 can scatter each patient across both, leaking identity. Splitting by patient gives 16 patients or 80 images train and 4 patients or 20 test, with zero patient overlap. Leakage count drops from up to 20 shared patients to 0.
Code
Patient-group split that prevents leakage.
from collections import defaultdict
def patients_in split(ids: list[int]) -> int: return len(set(ids)) # distinct patients, not files
train = [1]*5 + [2]*5 # toy: two patients, five files eachprint(patients_in(train))# -> 2Two patients, not ten files, is the unit that must not cross splits.
Watch Out For
Splitting files instead of patients
File splits leak same-patient views across train and test. The symptom is strong offline scores with weak new-hospital behavior. Fix it by grouping on patient IDs first, then stratifying findings inside.
The Quick Version
- MIMIC-CXR maps chest X-rays to reports and finding labels under access controls.
- Inputs are views, outputs are findings or report text by task.
- Toy 20 patients split 16 and 4 keeps zero patient overlap versus file leakage.
- Use it for careful medical vision research, never as clinical advice.
- Group by patient, honor access, and test new sites.