Skip to content

Commit

Permalink
Update poseDetector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Freedisch authored Feb 12, 2024
1 parent d076619 commit 1028ce4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions aimodel/trainedmodel/poseDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def __init__(self, mode=False, upBody=False, smooth=True, detectionCon=0.5, trac

self.mpPose = mp.solutions.pose
self.mpDraw = mp.solutions.drawing_utils
#self.pose = self.mpPose.Pose(self.mode, self.upBody, self.smooth, self.detectionCon, self.trackCon)
self.pose = self.mpPose.Pose(self.mode, 1, True, self.upBody, self.smooth, self.detectionCon, self.trackCon)

def findPose(self, img, draw=True):
Expand All @@ -24,11 +23,6 @@ def findPose(self, img, draw=True):
if draw:
self.mpDraw.draw_landmarks(img, results.pose_landmarks, self.mpPose.POSE_CONNECTIONS)
return img
# for id, lm in enumerate(results.pose_landmarks.landmark):
# h, w, c = img.shape
# cx, cy = int(lm.x * w), int(lm.y * h)
# cv2.circle(img, (cx, cy), 5, (255, 0, 0), cv2.FILLED)


def main():
cap = cv2.VideoCapture(0)
Expand All @@ -49,4 +43,4 @@ def main():


if __name__ == "__main__":
main()
main()

0 comments on commit 1028ce4

Please sign in to comment.