diff --git a/ppdet/data/transform/batch_operators.py b/ppdet/data/transform/batch_operators.py index f111adda45bef1265af76e1b5c5316e47f64f966..aaf4d18e24b7190ee387751ba71926263ab77b45 100644 --- a/ppdet/data/transform/batch_operators.py +++ b/ppdet/data/transform/batch_operators.py @@ -785,7 +785,7 @@ class Gt2Solov2Target(BaseOperator): ins_label = [] grid_order = [] cate_label = np.zeros([num_grid, num_grid], dtype=np.int64) - ins_ind_label = np.zeros([num_grid**2], dtype=np.bool) + ins_ind_label = np.zeros([num_grid**2], dtype=np.bool_) if num_ins == 0: ins_label = np.zeros( diff --git a/ppdet/modeling/assigners/simota_assigner.py b/ppdet/modeling/assigners/simota_assigner.py index 92fe84d7f1b58e6c206270226f0a329251030bc5..abc055d29e3405174753e03501b40817accb583b 100644 --- a/ppdet/modeling/assigners/simota_assigner.py +++ b/ppdet/modeling/assigners/simota_assigner.py @@ -236,7 +236,7 @@ class SimOTAAssigner(object): )] = match_fg_mask_inmatrix assigned_gt_inds[match_fg_mask_inall.astype( - np.bool)] = match_gt_inds_to_fg + 1 + np.bool_)] = match_gt_inds_to_fg + 1 pos_inds, neg_inds, pos_gt_bboxes, pos_assigned_gt_inds \ = self.get_sample(assigned_gt_inds, gt_bboxes.numpy())