Commiting with problems in tracking.

This commit is contained in:
didier committed 2024-11-04 18:50:34 -05:00
1 parent 152b3b9da5
commit 2c798c8ca5
5 files changed
+105 -49

No files matched your search

+7 -6
View File
@@ -1,17 +1,17 @@
import time
from contextlib import closing
from pathlib import Path
from dodgeballtracker.helper import time_tracker
from dodgeballtracker.logic import (DetectedObjectBox,
DodgeballTracker,
from dodgeballtracker.logic import (DodgeballTracker,
get_court_perspective_transform)
import numpy as np
import logging
import click
from typing import ContextManager
from dodgeballtracker.video_writer import (MP4VVideoWriter, VideoWriter,
from dodgeballtracker.video_writer import (MP4VVideoWriter,
VideoWriter,
DetectedObjectBox,
MP4VVideoWriterWithFrame)
here = Path(__file__).parent
@@ -34,10 +34,11 @@ def get_output(input_: Path, proposed_output: Path | None) -> Path:
def get_video_writer(display_frame: bool,
video_input: Path,
video_output: Path) -> ContextManager[VideoWriter]:
thresholds = list(np.arange(0.5, 1, 0.05))
if display_frame:
return closing(
MP4VVideoWriterWithFrame.from_frame(video_input, video_output))
return closing(MP4VVideoWriter.from_frame(video_input, video_output))
MP4VVideoWriterWithFrame.from_frame(video_input, video_output, thresholds))
return closing(MP4VVideoWriter.from_frame(video_input, video_output, thresholds))
@cli.command()