diff --git a/t4_devkit/tier4.py b/t4_devkit/tier4.py index 54dde33..eba797f 100644 --- a/t4_devkit/tier4.py +++ b/t4_devkit/tier4.py @@ -186,11 +186,12 @@ def __make_reverse_index__(self, verbose: bool) -> None: record.category_name = category.name for record in self.object_ann: - instance: Instance = self.get("instance", record.instance_token) - category: Category = self.get("category", instance.category_token) + category: Category = self.get("category", record.category_token) record.category_name = category.name for record in self.surface_ann: + if record.category_token == "": # NOTE: Some database contains this case + continue category: Category = self.get("category", record.category_token) record.category_name = category.name