diff --git a/CHANGELOG.md b/CHANGELOG.md index 20d0851f..c6435f04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed annotation parser for tracks with a start frame less than the first segment frame - Fixed interpolation on the server near outside frames - Fixed dump for case when task name has a slash +- Fixed auto annotation fail for multijob tasks ### Security - diff --git a/cvat/apps/engine/annotation.py b/cvat/apps/engine/annotation.py index 68a62c50..c0fe6b6b 100644 --- a/cvat/apps/engine/annotation.py +++ b/cvat/apps/engine/annotation.py @@ -1179,10 +1179,12 @@ class TaskAnnotation: stop = db_job.segment.stop_frame jobs[jid] = { "start": start, "stop": stop } is_frame_inside = lambda x: (start <= int(x['frame']) <= stop) + # patch_job_data function changes 'data' argument by assign IDs for saved shapes, + # in case of overlapped jobs need to make deepcopy of data here to save all shapes properly splitted_data[jid] = { - "tags": list(filter(is_frame_inside, data['tags'])), - "shapes": list(filter(is_frame_inside, data['shapes'])), - "tracks": list(filter(lambda y: len(list(filter(is_frame_inside, y['shapes']))), data['tracks'])) + "tags": copy.deepcopy(list(filter(is_frame_inside, data['tags']))), + "shapes": copy.deepcopy(list(filter(is_frame_inside, data['shapes']))), + "tracks": copy.deepcopy(list(filter(lambda y: len(list(filter(is_frame_inside, y['shapes']))), data['tracks']))), } for jid, job_data in splitted_data.items():