Skip to content

Commit

Permalink
Fixed strike a pose when there is no confidence
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianboguszewski committed Nov 29, 2024
1 parent 7ec2d94 commit 57eab33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 93 deletions.
91 changes: 0 additions & 91 deletions demos/paint_your_dreams_demo/last_known_config.txt

This file was deleted.

5 changes: 3 additions & 2 deletions demos/strike_a_pose_demo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def load_and_compile_model(model_path: Path, device: str) -> YOLO:


def draw_poses(img: np.ndarray, detections: Results, point_score_threshold: float = 0.5, skeleton: Tuple[Tuple[int, int]] = default_skeleton):
poses = detections.keypoints.xy.numpy()
scores = detections.keypoints.conf.numpy()
keypoints = detections.keypoints
poses = keypoints.xy.numpy()
scores = keypoints.conf.numpy() if keypoints.conf is not None else np.ones_like(poses[..., 0])
if len(poses) == 0:
return img

Expand Down

0 comments on commit 57eab33

Please sign in to comment.