fixed old np.bool with bool

pull/39/head
Denis 2023-03-21 13:15:21 -07:00 committed by GitHub
parent 703f046d5c
commit c9c759168b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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