From 3c6ddcf7a3aaa9dc6c5de95af86ff32a2b7fa0f8 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 22 Sep 2022 15:16:49 +0000 Subject: [PATCH] fix merge conflict of assignment --- easymocap/assignment/track.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easymocap/assignment/track.py b/easymocap/assignment/track.py index 14b605b..68672c2 100644 --- a/easymocap/assignment/track.py +++ b/easymocap/assignment/track.py @@ -90,12 +90,16 @@ class BaseTrack: # directly assign if id0 != -1 and id1 == -1: if nf1 in frames_of_id[id0].keys(): - log('Merge conflict') + log(f'Merge conflict1 nf0: {nf0} ni0: {ni0} id0: {id0} nf1: {nf1} ni1: {ni1} id1: {id1}') + continue results[nf1][ni1]['id'] = id0 # log('Merge person {}'.format(maxid)) frames_of_id[id0][nf1] = ni1 continue if id0 == -1 and id1 != -1: + if nf0 in frames_of_id[id1].keys(): + log(f'Merge conflict2 nf0: {nf0} ni0: {ni0} id0: {id0} nf1: {nf1} ni1: {ni1} id1: {id1}') + continue results[nf0][ni0]['id'] = id1 frames_of_id[id1][nf0] = ni0 continue