Test csv on CheX_Dataset
matteoguarrera opened this issue · 2 comments
matteoguarrera commented
torchxrayvision/torchxrayvision/datasets.py
Line 888 in 7e53f06
It seems that CheX_Dataset was designed only for loading the train.csv
I've tried to use it also with valid.csv but I got an error, since it split the path using the constant string "train/".
The following lines should fix the problem!
# patientid
if 'train' in csvpath:
patientid = self.csv.Path.str.split("train/", expand=True)[1]
elif 'valid' in csvpath:
patientid = self.csv.Path.str.split("valid/", expand=True)[1]
else:
raise NotImplemented
Thank you so much!
ieee8023 commented
Thanks! Do you want to submit a full request so you show up on the repo history? Otherwise I can make the edit. Let me know!
matteoguarrera commented
I have submitted the request! I'm glad to help in this project