fixed old np.bool with bool
parent
703f046d5c
commit
c9c759168b
6
train.py
6
train.py
|
@ -329,11 +329,11 @@ def train(c):
|
|||
super_mask = score_mask.max() - score_mask
|
||||
# calculate detection AUROC
|
||||
score_label = np.max(super_mask, axis=(1, 2))
|
||||
gt_label = np.asarray(gt_label_list, dtype=np.bool)
|
||||
gt_label = np.asarray(gt_label_list, dtype=bool)
|
||||
det_roc_auc = roc_auc_score(gt_label, score_label)
|
||||
_ = det_roc_obs.update(100.0*det_roc_auc, epoch)
|
||||
# calculate segmentation AUROC
|
||||
gt_mask = np.squeeze(np.asarray(gt_mask_list, dtype=np.bool), axis=1)
|
||||
gt_mask = np.squeeze(np.asarray(gt_mask_list, dtype=bool), axis=1)
|
||||
seg_roc_auc = roc_auc_score(gt_mask.flatten(), super_mask.flatten())
|
||||
save_best_seg_weights = seg_roc_obs.update(100.0*seg_roc_auc, epoch)
|
||||
if save_best_seg_weights and c.action_type != 'norm-test':
|
||||
|
@ -352,7 +352,7 @@ def train(c):
|
|||
pros_std = []
|
||||
threds = []
|
||||
fprs = []
|
||||
binary_score_maps = np.zeros_like(super_mask, dtype=np.bool)
|
||||
binary_score_maps = np.zeros_like(super_mask, dtype=bool)
|
||||
for step in range(max_step):
|
||||
thred = max_th - step * delta
|
||||
# segmentation
|
||||
|
|
Loading…
Reference in New Issue