Skip to content

Commit 2f0fe36

Browse files
authored
sort frame shapes by z_order (#1258)
1 parent 3ab6ca1 commit 2f0fe36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cvat/apps/annotation/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def _get_frame(annotations, shape):
322322

323323
annotations = {}
324324
data_manager = DataManager(self._annotation_ir)
325-
for shape in data_manager.to_shapes(self._db_task.size):
325+
for shape in sorted(data_manager.to_shapes(self._db_task.size), key=lambda s: s.get("z_order", 0)):
326326
_get_frame(annotations, shape).labeled_shapes.append(self._export_labeled_shape(shape))
327327

328328
for tag in self._annotation_ir.tags:

0 commit comments

Comments
 (0)