Skip to content

Commit 42b42ca

Browse files
committed
fix two bugs for classification
fix two bugs for classification
1 parent 42feb23 commit 42b42ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymic/net_run/agent_cls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def infer(self):
308308
csv_writer = csv.writer(csv_file, delimiter=',',
309309
quotechar='"',quoting=csv.QUOTE_MINIMAL)
310310
head = ['image', 'label']
311-
if(len(out_lab_list[0]) > 1):
311+
if(len(out_lab_list[0]) > 2):
312312
head = ['image'] + ['label{0:}'.format(i) for i in range(class_num)]
313313
csv_writer.writerow(head)
314314
for item in out_lab_list:

pymic/util/evaluation_cls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def binary_evaluation(config):
6262
for i in range(len(gt_items)):
6363
assert(gt_items.iloc[i, 0] == prob_items.iloc[i, 0])
6464

65-
gt_data = np.asarray(gt_items.iloc[:, 1])
65+
gt_data = np.asarray(gt_items.iloc[:, -1])
6666
prob_data = np.asarray(prob_items.iloc[:, 1:])
6767
score_list = []
6868
for metric in metric_list:

0 commit comments

Comments
 (0)