Proposal
Add a CheXlocalize_Dataset loader for CheXlocalize (Saporta et al., Nature Machine Intelligence 2022, https://doi.org/10.1038/s42256-022-00536-x): the official CheXpert validation/test images and labels, plus radiologist ground-truth segmentation masks for 10 pathologies — one of the contribution areas explicitly called out in CONTRIBUTING.md ("segmentation masks").
Why not CheX_Dataset
CheX_Dataset can't load this data as-is:
- It assumes
Sex/Age/Frontal-Lateral/AP-PA columns exist. CheXlocalize's blinded official test_labels.csv omits them to prevent re-identification of the test set — loading it with CheX_Dataset raises KeyError: 'Frontal/Lateral' (confirmed against the real download).
- Even with those columns present, it infers the train/valid split by string-matching
'train'/'valid' in the CSV path, and raises a bare NotImplementedError otherwise — which also fails on CheXlocalize's test_labels.csv.
Planned implementation
A new CheXlocalize_Dataset(Dataset) class, mirroring CheX_Dataset's constructor/label conventions but:
- synthesizing safe defaults for the missing demographic/view columns instead of assuming they exist,
- extracting patient IDs/views without depending on the split name,
- normalizing CheXlocalize's path quirks (
CheXpert-v1.0/ prefix, valid/ CSV prefix vs. val/ directory on disk),
- adding
pathology_masks=True + segmentation_jsonpath=... support for CheXlocalize's ground-truth segmentation JSON (COCO RLE via pycocotools), following the same pattern as SIIM_Pneumothorax_Dataset.get_pathology_mask_dict.
I already have this implemented and verified (including against a real CheXlocalize download — test/val sample counts match the documented patient counts, and decoded masks match the CSV labels for spot-checked patients). Opening this issue per CONTRIBUTING.md before the PR; PR is up at #191.
Proposal
Add a
CheXlocalize_Datasetloader for CheXlocalize (Saporta et al., Nature Machine Intelligence 2022, https://doi.org/10.1038/s42256-022-00536-x): the official CheXpert validation/test images and labels, plus radiologist ground-truth segmentation masks for 10 pathologies — one of the contribution areas explicitly called out in CONTRIBUTING.md ("segmentation masks").Why not
CheX_DatasetCheX_Datasetcan't load this data as-is:Sex/Age/Frontal-Lateral/AP-PAcolumns exist. CheXlocalize's blinded officialtest_labels.csvomits them to prevent re-identification of the test set — loading it withCheX_DatasetraisesKeyError: 'Frontal/Lateral'(confirmed against the real download).'train'/'valid'in the CSV path, and raises a bareNotImplementedErrorotherwise — which also fails on CheXlocalize'stest_labels.csv.Planned implementation
A new
CheXlocalize_Dataset(Dataset)class, mirroringCheX_Dataset's constructor/label conventions but:CheXpert-v1.0/prefix,valid/CSV prefix vs.val/directory on disk),pathology_masks=True+segmentation_jsonpath=...support for CheXlocalize's ground-truth segmentation JSON (COCO RLE viapycocotools), following the same pattern asSIIM_Pneumothorax_Dataset.get_pathology_mask_dict.I already have this implemented and verified (including against a real CheXlocalize download — test/val sample counts match the documented patient counts, and decoded masks match the CSV labels for spot-checked patients). Opening this issue per CONTRIBUTING.md before the PR; PR is up at #191.