From 66f0ab4822bed318ff6c7b77beb433ed752774bc Mon Sep 17 00:00:00 2001 From: "d.transposed" Date: Wed, 24 Jul 2019 15:39:03 +0200 Subject: [PATCH] Update export_2d_annotations_as_json.py Since there are tokens in your dataset with contain empty visibility strings, please include them in your default list. Otherwise the user receives empty .json file. I know that this is just a copy from NuScenes repo, but some people who do not have experience with this API may be super confused. --- python-sdk/nuscenes/scripts/export_2d_annotations_as_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-sdk/nuscenes/scripts/export_2d_annotations_as_json.py b/python-sdk/nuscenes/scripts/export_2d_annotations_as_json.py index 105fbf9..cd2741f 100755 --- a/python-sdk/nuscenes/scripts/export_2d_annotations_as_json.py +++ b/python-sdk/nuscenes/scripts/export_2d_annotations_as_json.py @@ -191,7 +191,7 @@ def main(args): parser.add_argument('--dataroot', type=str, default='/data/sets/nuscenes', help="Path where nuScenes is saved.") parser.add_argument('--version', type=str, default='v1.0-trainval', help='Dataset version.') parser.add_argument('--filename', type=str, default='image_annotations.json', help='Output filename.') - parser.add_argument('--visibilities', type=str, default=['1', '2', '3', '4'], + parser.add_argument('--visibilities', type=str, default=['','1', '2', '3', '4'], help='Visibility bins, the higher the number the higher the visibility.', nargs='+') args = parser.parse_args()