Skip to content

Commit

Permalink
Update prpy to 0.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
prouast committed Oct 22, 2024
1 parent 880dfb2 commit cc49fe1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The estimation results are returned as a `list`. It contains a `dict` for each d
<same structure for face 2 if present>
},
...
]
]
```

If the video is long enough and `estimate_running_vitals=True`, the results additionally contain running vitals:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"importlib_resources",
"numpy",
"onnxruntime",
"prpy[ffmpeg,numpy_min]==0.2.10",
"prpy[ffmpeg,numpy_min]==0.2.12",
"python-dotenv",
"pyyaml",
"requests",
Expand Down
7 changes: 4 additions & 3 deletions vitallens/methods/simple_rppg_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def pulse_filter(self,
pass
def __call__(
self,
frames: Union[np.ndarray, str],
frames: Union[np.ndarray, str], # TODO: Rename to `video`
faces: np.ndarray,
fps: float,
override_fps_target: float = None,
Expand All @@ -63,7 +63,8 @@ def __call__(
"""Estimate pulse signal from video frames using the subclass algorithm.
Args:
frames: The video frames. Shape (n_frames, h, w, c)
frames: The video to analyze. Either a np.ndarray of shape (n_frames, h, w, 3)
in unscaled uint8 RGB format, or a path to a video file.
faces: The face detection boxes as np.int64. Shape (n_frames, 4) in form (x0, y0, x1, y1)
fps: The rate at which video was sampled.
override_fps_target: Override the method's default inference fps (optional).
Expand All @@ -73,7 +74,7 @@ def __call__(
unit: A dictionary with the units of the estimated vital signs.
conf: A dictionary with the confidences of the estimated vital signs.
note: A dictionary with notes on the estimated vital signs.
live: Dummy live confidence estimation (set to always 1). Shape (1, n_frames)
live: Dummy live confidence estimation (set to always 1). Shape (n_frames,)
"""
# Compute temporal union of ROIs
u_roi = merge_faces(faces)
Expand Down
2 changes: 1 addition & 1 deletion vitallens/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def parse_video_inputs(
try:
fps_, n, w_, h_, _, _, r, i = probe_video(video)
if fps is None: fps = fps_
if roi is not None: roi = (int(roi[0]), int(roi[1]), int(roi[2]-roi[0]), int(roi[3]-roi[1]))
if roi is not None: roi = (int(roi[0]), int(roi[1]), int(roi[2]), int(roi[3]))
if isinstance(target_size, tuple): target_size = (target_size[1], target_size[0])
if abs(r) == 90: h = w_; w = h_
else: h = h_; w = w_
Expand Down

0 comments on commit cc49fe1

Please sign in to comment.