Skip to content

Commit 64c7a28

Browse files
committed
Add label for BBoxLoader
1 parent 6a8f31b commit 64c7a28

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

aperturedb/BBoxLoader.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,14 @@ def generate_batch(self, bbox_data):
136136
}
137137

138138
if "properties" in data:
139-
ai["AddBoundingBox"]["properties"] = data[CSVParser.PROPERTIES]
139+
props = data[CSVParser.PROPERTIES]
140+
if "_label" in props:
141+
ai["AddBoundingBox"]["label"] = props["_label"]
142+
props.pop("_label")
143+
144+
# Check if props is not empty after removing "_label"
145+
if props:
146+
ai["AddBoundingBox"]["properties"] = props
140147

141148
q.append(ai)
142149

0 commit comments

Comments
 (0)