From a0f17d034d5b3a103af04606c8f7a3093f28617a Mon Sep 17 00:00:00 2001 From: q Date: Wed, 20 Aug 2025 10:27:07 +0300 Subject: [PATCH] feature: trackerer wont overwrite existing key-points --- tsmark/__init__.py | 2 +- tsmark/video_annotator.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tsmark/__init__.py b/tsmark/__init__.py index d03eb8b..e33dfb0 100644 --- a/tsmark/__init__.py +++ b/tsmark/__init__.py @@ -2,7 +2,7 @@ import argparse from tsmark.video_annotator import Marker -VERSION = "0.7.7" +VERSION = "0.7.8" class SmartFormatter(argparse.HelpFormatter): diff --git a/tsmark/video_annotator.py b/tsmark/video_annotator.py index 170fe40..e0d6c90 100755 --- a/tsmark/video_annotator.py +++ b/tsmark/video_annotator.py @@ -1420,9 +1420,11 @@ class TrackerGUI: break ok, bbox = tracker.update(frame) - # ~ print(f"Tracking... ({i}/{max_frames})") if ok: # Tracking success + if self.marker.nr + i + 1 in self.marker.points[self.marker.point_index]: + point = self.marker.get_point(nr=self.marker.nr + i + 1) + bbox = tuple([point["x0"], point["y0"], point["w"], point["h"]]) tracked[i + 1] = [*bbox, 1] show_message = f"Tracking... ({i}/{max_frames})" else: