diff --git a/plugins/annotation/__init__.py b/plugins/annotation/__init__.py index c97d86ad..dc3de527 100644 --- a/plugins/annotation/__init__.py +++ b/plugins/annotation/__init__.py @@ -394,6 +394,10 @@ def _build_label_schema(label_schema_fields): field_type = d.get("type", None) classes = d.get("classes", None) or None attributes = d.get("attributes", None) or None + if isinstance(attributes, list) and len(attributes) == 1: + attributes = attributes[0] + if "name" in attributes: + attributes = {attributes["name"]: attributes} if not field_name or not field_type: return