From b1be97755cf3ed8e82bc444e1f34faecaecbe98b Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <41117609+azhavoro@users.noreply.github.com> Date: Wed, 20 Mar 2019 18:03:20 +0300 Subject: [PATCH] fixed bug with upload annotation for task functionality (#354) --- cvat/apps/engine/annotation.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cvat/apps/engine/annotation.py b/cvat/apps/engine/annotation.py index acaf8896..c9935549 100644 --- a/cvat/apps/engine/annotation.py +++ b/cvat/apps/engine/annotation.py @@ -141,14 +141,14 @@ def save_task(tid, data): splitted_data[jid] = {} for action in ['create', 'update', 'delete']: splitted_data[jid][action] = { - "boxes": list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['boxes'])), - "polygons": list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['polygons'])), - "polylines": list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['polylines'])), - "points": list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['points'])), - "box_paths": list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['box_paths'])), - "polygon_paths": list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['polygon_paths'])), - "polyline_paths": list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['polyline_paths'])), - "points_paths": list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['points_paths'])), + "boxes": copy.deepcopy(list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['boxes']))), + "polygons": copy.deepcopy(list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['polygons']))), + "polylines": copy.deepcopy(list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['polylines']))), + "points": copy.deepcopy(list(filter(lambda x: start <= int(x['frame']) <= stop, data[action]['points']))), + "box_paths": copy.deepcopy(list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['box_paths']))), + "polygon_paths": copy.deepcopy(list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['polygon_paths']))), + "polyline_paths": copy.deepcopy(list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['polyline_paths']))), + "points_paths": copy.deepcopy(list(filter(lambda x: len(list(filter(lambda y: (start <= int(y['frame']) <= stop) and (not y['outside']), x['shapes']))), data[action]['points_paths']))), } for jid, _data in splitted_data.items():