UCSD-AI4H/COVID-CT

Covid is labeled 0 and NonCovid is labeled 1?

LXYTSOS opened this issue · 1 comments

according to your code

self.classes = ['CT_COVID', 'CT_NonCOVID']
self.num_cls = len(self.classes)
self.img_list = []
for c in range(self.num_cls):
    cls_list = [[os.path.join(self.root_dir,self.classes[c],item), c] for item in read_txt(self.txt_path[c])]
    self.img_list += cls_list
self.transform = transform

the label of 'CT_COVID' is 0 and 'CT_NonCOVID' is 1, but when you calculate the metrics,like TP, your code is

TP = ((predlist == 1) & (targetlist == 1)).sum()

I think this is wrong since 'CT_COVID' is positive and its label is 0, we hope the model detect CT_COVID more accurate than CT_NonCOVID, so in this circumstance TP should be?

TP = ((predlist == 0) & (targetlist == 0)).sum()
jkooy commented

You can reorder the directory or class if you want.