Skip to content

Commit c4df6ee

Browse files
author
arch
committed
fixes for tracking lost
1 parent 6779200 commit c4df6ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def tracking(self) -> str:
760760
break
761761

762762
if woman_tracker_status == StaticVideoTracker.Status.TRACKING_LOST:
763-
if len(bboxes['Woman']) == 0 or max([x for x in bboxes['Woman'].keys()]) < tracking_lost_frames:
763+
if len(bboxes['Woman']) == 0 or frame_num - max([x for x in bboxes['Woman'].keys()]) >= tracking_lost_frames:
764764
status = 'Woman ' + woman_tracker_status
765765
bboxes = self.delete_last_tracking_predictions(bboxes, (self.params.skip_frames+1)*2)
766766
break
@@ -773,7 +773,7 @@ def tracking(self) -> str:
773773
break
774774

775775
if men_tracker_status == StaticVideoTracker.Status.TRACKING_LOST:
776-
if len(bboxes['Men']) == 0 or max([x for x in bboxes['Men'].keys()]) < tracking_lost_frames:
776+
if len(bboxes['Men']) == 0 or frame_num - max([x for x in bboxes['Men'].keys()]) >= tracking_lost_frames:
777777
status = 'Men ' + men_tracker_status
778778
bboxes = self.delete_last_tracking_predictions(bboxes, (self.params.skip_frames+1)*2)
779779
break

0 commit comments

Comments
 (0)