wentaozhu / deep-mil-for-whole-mammogram-classification

Zhu, Wentao, Qi Lou, Yeeleng Scott Vang, and Xiaohui Xie. "Deep Multi-instance Networks with Sparse Label Assignment for Whole Mammogram Classification." MICCAI 2017.
MIT License
113 stars 36 forks source link

Labels.txt has non-binary labeling #1

Closed yala closed 7 years ago

yala commented 7 years ago

Hello!

I was looking over the dataset and noticed label.txt has markings 0, 1 and 2. However, the paper mentions you are treating this as a binary classification problem.

What do the labels mean?

Thanks!

wentaozhu commented 7 years ago

Hi Adam,

Please see inbreast.py for details.

def readlabel(): '''read the label as a dict from labelfile''' mydict = {} with open(labelfile, 'r') as f: flines = f.readlines() for line in flines: data = line.split() if int(data[1]) == 0: mydict[data[0]] = int(data[1]) else: assert(int(data[1])==2 or int(data[1])==1) mydict[data[0]] = int(data[1])-1 return mydict

Thanks, Wentao

yala commented 7 years ago

Thanks!