Repository navigation
Add Pneumothorax dataset - #93
Conversation
| # ------------------ | ||
| CONCEPTS = [ | ||
| "a chest x-ray with a visible pleural line", | ||
| "a chest x-ray with absent peripheral lung markings", |
There was a problem hiding this comment.
we might want to avoid using "absent" in CLIP prompts as it tends to avoid it and invert the labels. Could you have posive sentences only?
There was a problem hiding this comment.
Okay,I have removed the "absent" sentences
|
|
||
|
|
||
| def _patient_grouped_split(patient_ids, val_size, test_size, seed): | ||
| """Assign whole patients to one split, preventing patient leakage.""" |
There was a problem hiding this comment.
My understanding is that, in SIIM-ACR, PatientID is an anonymized ID unique to each image (12,047 IDs for 12,047 images). So the patient-grouped split is effectively per image and can't prevent patient leakage. Would this then be equivalent to a random split?
There was a problem hiding this comment.
Yes ,I missed it and you are correct ,it is equivalent to the random split,I have updated the description and also have removed the custom function and it now uses the RandomSplitter itself
| class PneumothoraxDataModule(ConceptDataModule): | ||
| """DataModule for SIIM-ACR Pneumothorax chest radiographs. | ||
|
|
||
| The competition test images have no labels, so SIIM-ACR does not provide |
There was a problem hiding this comment.
My understanding is that the competition test images do have labels: stage_2_train.csv labels the stage-1 test images, and 1,372 of the 12,047 images in this dataset come from dicom-images-test right?
do we need rephrasing this ?
| an official labeled train/validation/test split. The default split groups | ||
| all images from a DICOM ``PatientID`` into the same partition. If a source | ||
| file omits that field, the dataset falls back to grouping that image by its | ||
| own ID. In that case, patient separation cannot be guaranteed. |
There was a problem hiding this comment.
If indeed on SIIM the IDs are per image, then patient separation is never guaranteed and this sentence "In that case" might need rewording.
|
shall we also need to add "kagglehub" and "pydicom" under the "data" optional dependencies in pyproject.toml? These seem to be necessary to download the dataset. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…on more accurate ,also added the imports in the file
|
@gdefe I have also added the kagglehub and the pydicom as optional dependencies in the pyproject file in the latest commit. |
Add the Pneumothorax dataset, patient-grouped datamodule, and a CLIP concept-generation example.
Tested on the ~12k labeled Stage 2 images and ran the relevant PyC tests.