Merge pull request #3515 from LDOUBLEV/fix_qa_bugs

Fix qa bugs
This commit is contained in:
Double_V 2021-08-03 14:52:31 +08:00 committed by GitHub
commit 3ec9e56994
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -53,9 +53,11 @@ class DetLabelEncode(object):
txt_tags.append(True)
else:
txt_tags.append(False)
if len(boxes) == 0:
return None
boxes = self.expand_points_num(boxes)
#boxes = np.array(boxes, dtype=np.float32)
#txt_tags = np.array(txt_tags, dtype=np.bool)
boxes = np.array(boxes, dtype=np.float32)
txt_tags = np.array(txt_tags, dtype=np.bool)
data['polys'] = boxes
data['texts'] = txts