Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
feat: process results
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouwrice committed May 17, 2024
1 parent c2348af commit 5835dc5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drumpy/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ def main() -> None:
app = App(
source=Source.FILE,
running_mode=RunningMode.VIDEO, # type: ignore
model=LandmarkerModel.HEAVY,
model=LandmarkerModel.LITE,
delegate=BaseOptions.Delegate.GPU, # type: ignore
# landmark_type=LandmarkType.LANDMARKS,
file_path="../data/recordings/maurice_drum_60fps_trim_01.mp4",
landmark_type=LandmarkType.LANDMARKS,
file_path="../data/recordings/maurice_drum_fast.mov",
# log_file="test.csv",
disable_drum=True,
)
Expand Down
2 changes: 1 addition & 1 deletion drumpy/mediapipe_pose/mediapipe_pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def result_callback(
:param timestamp_ms: The timestamp of the frame
:return:
"""
# result = self.result_processor.process_result(result, timestamp_ms)
result = self.result_processor.process_result(result, timestamp_ms)
self.detection_result = result
self.latency = timestamp_ms - self.latest_timestamp
self.latest_timestamp = timestamp_ms
Expand Down
4 changes: 2 additions & 2 deletions drumpy/mediapipe_pose/process_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def __init__(self, landmark_type: LandmarkType) -> None:

self.memory: int = 2
self.peak: float = (
0.02 # Deviations at this value are considered completely plausible
0.015 # Deviations at this value are considered completely plausible
)
# The mollifier function will be 1 at this value
self.tightness: float = (
0.5 # How tight the mollifier function is around the peak
0.7 # How tight the mollifier function is around the peak
)
# Higher values will make the mollifier function tighter

Expand Down

0 comments on commit 5835dc5

Please sign in to comment.