From c9c759168b7a30a8c01e3bb8c63df48225fd8ec3 Mon Sep 17 00:00:00 2001 From: Denis <62305993+gudovskiyd@users.noreply.github.com> Date: Tue, 21 Mar 2023 13:15:21 -0700 Subject: [PATCH] fixed old np.bool with bool --- train.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/train.py b/train.py index 51fbbc7..65c31f4 100644 --- a/train.py +++ b/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