Fix numpy.bool deprecation problem (#9404)

pull/9449/head
Jiang Yuwei 2023-03-14 09:47:43 +08:00 committed by GitHub
parent 15d7ef5765
commit 9c22490f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ class DetLabelEncode(object):
return None
boxes = self.expand_points_num(boxes)
boxes = np.array(boxes, dtype=np.float32)
txt_tags = np.array(txt_tags, dtype=np.bool)
txt_tags = np.array(txt_tags, dtype=bool)
data['polys'] = boxes
data['texts'] = txts
@ -218,7 +218,7 @@ class E2ELabelEncodeTest(BaseRecLabelEncode):
else:
txt_tags.append(False)
boxes = np.array(boxes, dtype=np.float32)
txt_tags = np.array(txt_tags, dtype=np.bool)
txt_tags = np.array(txt_tags, dtype=bool)
data['polys'] = boxes
data['ignore_tags'] = txt_tags
temp_texts = []
@ -254,7 +254,7 @@ class E2ELabelEncodeTrain(object):
else:
txt_tags.append(False)
boxes = np.array(boxes, dtype=np.float32)
txt_tags = np.array(txt_tags, dtype=np.bool)
txt_tags = np.array(txt_tags, dtype=bool)
data['polys'] = boxes
data['texts'] = txts