Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def calculate_angle(a, b, c):
|
|
45 |
counterL=0#Counter checks for number of curls
|
46 |
correct=0
|
47 |
incorrect=0
|
48 |
-
stage=
|
49 |
|
50 |
# Detection Queue
|
51 |
result_queue: "queue.Queue[List[Detection]]" = queue.Queue()
|
@@ -139,12 +139,10 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
139 |
# stage='up'
|
140 |
|
141 |
# stage 4
|
142 |
-
if (80 < angleKneeL < 110)
|
143 |
if (18 < angleHipL < 40): # Valid "down" position
|
144 |
correct+=1
|
145 |
stage='up'
|
146 |
-
else:
|
147 |
-
stage='mid'
|
148 |
|
149 |
|
150 |
|
|
|
45 |
counterL=0#Counter checks for number of curls
|
46 |
correct=0
|
47 |
incorrect=0
|
48 |
+
stage='mid'#it checks if we our hand is UP or DOWN
|
49 |
|
50 |
# Detection Queue
|
51 |
result_queue: "queue.Queue[List[Detection]]" = queue.Queue()
|
|
|
139 |
# stage='up'
|
140 |
|
141 |
# stage 4
|
142 |
+
if (80 < angleKneeL < 110)':
|
143 |
if (18 < angleHipL < 40): # Valid "down" position
|
144 |
correct+=1
|
145 |
stage='up'
|
|
|
|
|
146 |
|
147 |
|
148 |
|