diff --git a/cvat/apps/annotation/coco.py b/cvat/apps/annotation/coco.py index 94769e345ed..7317f097a37 100644 --- a/cvat/apps/annotation/coco.py +++ b/cvat/apps/annotation/coco.py @@ -290,7 +290,11 @@ def insert_annotation_data(image, category_map, segm_id, obj, result_annotation) # Create new image insert_image_data(img, result_annotation) - polygons = fix_segments_intersections(polygons, img.height, img.width, img.name) + if annotations.meta['task']['z_order'] == 'True': + polygons = fix_segments_intersections(polygons, img.height, img.width, img.name) + else: + for polygon in polygons: + polygon['points'] = [polygon['points']] # combine grouped polygons with the same label grouped_poligons = OrderedDict()