Datasets¶
FairMedFM evaluates fairness on medical imaging datasets that record patient attributes. Several datasets require an application to their provider, so FairMedFM cannot redistribute them; the repository provides the preprocessing scripts instead.
Classification¶
--dataset |
Dataset | Modality | Sensitive attributes | Access |
|---|---|---|---|---|
CXP |
CheXpert (demographics) | Chest X-ray | Sex, Age, Race | Application |
MIMIC_CXR |
MIMIC-CXR | Chest X-ray | Sex, Age, Race | Credentialed (PhysioNet) |
HAM10000 |
HAM10000 | Dermoscopy | Sex, Age | Preprocessed download |
PAPILA |
PAPILA | Fundus | Sex, Age | Preprocessed download |
FairVLMed10k |
FairVLMed10k | Fundus (SLO) | Sex, Age, Race, Language | Provider |
GF3300 |
Harvard-GF (GF3300) | Fundus | Sex, Age, Race, Language | Provider |
BREST |
BRSET | Fundus | Sex, Age | Provider |
COVID_CT_MD |
COVID-CT-MD | CT | Sex, Age | Public |
ADNI |
ADNI 1.5T | Brain MRI | Sex | Application |
Use --sensitive_name with one of the dataset's attributes (Sex, Age, Race or Language).
Segmentation¶
--dataset |
Dataset | Modality |
|---|---|---|
TUSC |
TUSC | Thyroid ultrasound |
HAM10000-Seg |
HAM10000 | Dermoscopy |
FairSeg |
Harvard-FairSeg | Fundus (SLO) |
montgomery |
Montgomery County X-ray | Chest X-ray |
TUSC has a packaged config and records sex; the other segmentation datasets need a config in ./configs/datasets/ (see
Run experiments). The paper also covers 3D segmentation datasets (KiTS2023,
IRCADb, CANDI and SPIDER), whose preprocessing scripts are in the repository.
Preparing data¶
- Download the data from the provider (or the preprocessed archive, where available) into
data/<dataset>/in your working directory. - Run the dataset's preprocessing notebook from
pre-processing/. The notebooks preprocess images where needed, extract the sensitive attributes, and for classification create train/test splits with balanced subgroups. - Check that the paths in the dataset config match your files, or override the config in
./configs/datasets/.
Using your own dataset¶
To measure fairness on your own data with your own model, you do not need a dataset config: export predictions
and use fairmedfm score.