From e04a43f32f95cc04394e1450bac1bbe60aeb66a3 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Fri, 21 Dec 2018 10:43:07 +0300 Subject: [PATCH] revert track id attribute in dump file --- cvat/apps/engine/annotation.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cvat/apps/engine/annotation.py b/cvat/apps/engine/annotation.py index b5dc93a0567..79f4f126f35 100644 --- a/cvat/apps/engine/annotation.py +++ b/cvat/apps/engine/annotation.py @@ -472,6 +472,7 @@ def to_box_paths(self): group_id=box.group_id, boxes=[box0, box1], attributes=box.attributes, + client_id=box.client_id, ) paths.append(path) @@ -491,6 +492,7 @@ def _to_poly_paths(self, iter_attr_name): stop_frame=shape.frame + 1, group_id=shape.group_id, shapes=[shape0, shape1], + client_id=shape.client_id, attributes=shape.attributes, ) paths.append(path) @@ -2080,10 +2082,14 @@ def _flip_shape(shape, im_w, im_h): im_w = im_meta_data['original_size'][0]['width'] im_h = im_meta_data['original_size'][0]['height'] + counter = 0 for shape_type in ["boxes", "polygons", "polylines", "points"]: path_list = paths[shape_type] for path in path_list: + path_id = path.client_id if path.client_id != -1 else counter + counter += 1 dump_dict = OrderedDict([ + ("id", str(path_id)), ("label", path.label.name), ]) if path.group_id: