From cea9b92580e841d92ca5f9aacbfe2781f80d8321 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Fri, 23 Jul 2021 16:59:20 -0400 Subject: [PATCH] Update for deprecated types. --- argoverse/evaluation/detection/utils.py | 4 ++-- argoverse/utils/make_att_files.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/argoverse/evaluation/detection/utils.py b/argoverse/evaluation/detection/utils.py index 53f5daad..494a9332 100644 --- a/argoverse/evaluation/detection/utils.py +++ b/argoverse/evaluation/detection/utils.py @@ -412,8 +412,8 @@ def calc_ap(gt_ranked: np.ndarray, recalls_interp: np.ndarray, ninst: int) -> Tu """ tp = gt_ranked - cumulative_tp = np.cumsum(tp, dtype=np.int) - cumulative_fp = np.cumsum(~tp, dtype=np.int) + cumulative_tp = np.cumsum(tp, dtype=int) + cumulative_fp = np.cumsum(~tp, dtype=int) cumulative_fn = ninst - cumulative_tp precisions = cumulative_tp / (cumulative_tp + cumulative_fp + np.finfo(float).eps) diff --git a/argoverse/utils/make_att_files.py b/argoverse/utils/make_att_files.py index 279e4023..65236d44 100644 --- a/argoverse/utils/make_att_files.py +++ b/argoverse/utils/make_att_files.py @@ -115,7 +115,7 @@ def save_bev_img( ) cv2.line(img, p1, p2, color=color) - kernel = np.ones((5, 5), np.float) + kernel = np.ones((5, 5), float) img = cv2.dilate(img, kernel, iterations=1) cv2.putText( img,