I am working on a exercise counter using Openpose. Right now I am in testing phase the Issue that I am encountering is i have this code snippet
if len(pose) > 0:
print ("Start Pushup")
if (lh_angle and ll_angle and rh_angle and rl_angle != 0 ):
if (lh_angle < 75 and ll_angle < 35 and rh_angle < 75 and rl_angle < 35 ):
print ('Pushup Detected')
a = "Pushup"
reps = reps + 1
if (reps == 2):
sets = sets + 1
reps = 0
else:
sets = sets
else:
print ('No Pushup')
a = "No Pushup"
reps = reps***
but the issue is since the person stays in pushup position the counter keeps on increasing. Is there any solution to this problem that the counter does not keep on increasing and increases only once