25 lines
788 B
Python
25 lines
788 B
Python
from pathlib import Path
|
|
|
|
from dodgeballtracker.logic import (DetectedObjectBox,
|
|
DodgeballTracker,
|
|
get_court_perspective_transform)
|
|
import numpy as np
|
|
|
|
|
|
here = Path(__file__).parent
|
|
input_dir = here / '..' / 'data'
|
|
output_dir = here / '..' / 'outputs'
|
|
|
|
if __name__ == "__main__":
|
|
detected_box_objects = [
|
|
DetectedObjectBox.from_viridis(threshold) for threshold in np.arange(0.5, 1, 0.05)
|
|
]
|
|
input_video = input_dir / "micro.mp4"
|
|
output_video = output_dir / "output-lmbn_n_cuhk03_d.mp4"
|
|
|
|
transformation_matrix = get_court_perspective_transform()
|
|
|
|
dodgeball_tracker = DodgeballTracker(input_video, output_video, detected_box_objects, transformation_matrix)
|
|
|
|
dodgeball_tracker.main()
|