Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

s,np.bool\b,bool, #1047

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion detectron/datasets/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion detectron/datasets/voc_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down