Add a message when annotation is empty (#165)

Signed-off-by: lizz <lizz@sensetime.com>
pull/166/head
lizz 2021-05-11 16:38:30 +08:00 committed by GitHub
parent 85b821ab79
commit 6a1d1020f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ class KIEDataset(BaseDataset):
"""
assert utils.is_type_list(annotations, dict)
assert len(annotations) > 0, 'Please remove data with empty annotation'
assert 'box' in annotations[0]
assert 'text' in annotations[0]