diff --git a/detectron/datasets/json_dataset.py b/detectron/datasets/json_dataset.py index 7fc351613..bc1b26e49 100644 --- a/detectron/datasets/json_dataset.py +++ b/detectron/datasets/json_dataset.py @@ -145,7 +145,7 @@ def _prep_roidb_entry(self, entry): entry['gt_overlaps'] = scipy.sparse.csr_matrix( np.empty((0, self.num_classes), dtype=np.float32) ) - entry['is_crowd'] = np.empty((0), dtype=np.bool) + entry['is_crowd'] = np.empty((0), dtype=bool) # 'box_to_gt_ind_map': Shape is (#rois). Maps from each roi to the index # in the list of rois that satisfy np.where(entry['gt_classes'] > 0) entry['box_to_gt_ind_map'] = np.empty((0), dtype=np.int32) diff --git a/detectron/datasets/voc_eval.py b/detectron/datasets/voc_eval.py index 1497305de..d4cee7cfd 100644 --- a/detectron/datasets/voc_eval.py +++ b/detectron/datasets/voc_eval.py @@ -148,7 +148,7 @@ def voc_eval(detpath, for imagename in imagenames: R = [obj for obj in recs[imagename] if obj['name'] == classname] bbox = np.array([x['bbox'] for x in R]) - difficult = np.array([x['difficult'] for x in R]).astype(np.bool) + difficult = np.array([x['difficult'] for x in R]).astype(bool) det = [False] * len(R) npos = npos + sum(~difficult) class_recs[imagename] = {'bbox': bbox,