[Bug] Fix TypeError bug (#1868)

* 'message'

* revert dict files

---------

Co-authored-by: gaotongxiao <gaotongxiao@gmail.com>
pull/1922/head
frankstorming 2023-04-25 09:50:58 +08:00 committed by GitHub
parent 1e696887b9
commit e9a31ddd70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -154,9 +154,9 @@ def generate_ann(root_path, split, image_infos, preserve_vertical):
dst_image_root = osp.join(root_path, 'crops', split) dst_image_root = osp.join(root_path, 'crops', split)
ignore_image_root = osp.join(root_path, 'ignores', split) ignore_image_root = osp.join(root_path, 'ignores', split)
if split == 'training': if split == 'training':
dst_label_file = osp.join(root_path, f'train_label.{format}') dst_label_file = osp.join(root_path, 'train_label.json')
elif split == 'val': elif split == 'val':
dst_label_file = osp.join(root_path, f'val_label.{format}') dst_label_file = osp.join(root_path, 'val_label.json')
mmengine.mkdir_or_exist(dst_image_root) mmengine.mkdir_or_exist(dst_image_root)
mmengine.mkdir_or_exist(ignore_image_root) mmengine.mkdir_or_exist(ignore_image_root)