mist-medical / MIST

MIST: A simple, scalable, and end-to-end framework for 3D medical imaging segmentation.
Apache License 2.0
21 stars 12 forks source link

Crash occurs during analysis if dataset has a patient with invalid label set on most recent version #37

Open evanmlim opened 6 hours ago

evanmlim commented 6 hours ago

Describe the bug Patients with an invalid label set should be excluded from the final dataset during analysis. To test, I purposely added an extra patient to the CHAOS dataset with a labels [0, 2] instead of [0, 1] when the defined labels are [0, 1]. However, the analysis crashed instead of excluding the erroneous patient. I presume it's any invalid patient, not just patients with an invalid label set.

To Reproduce Run mist_analyze on any dataset with at least 1 patient with a set of labels that isn't a subset of the labels described in the --data .json file.

Screenshots The crash log is as follows: image

aecelaya commented 3 hours ago

Thanks for finding that bug!

I know that the exclusion of bad cases works. Try running it on the raw LiTS dataset, and you'll see that it excludes two cases for header mismatches. I think this specific corner case might cause a crash somewhere.