Update app.py
Browse files
app.py
CHANGED
@@ -42,15 +42,19 @@ def calculate_angle(a, b, c):
|
|
42 |
angle = 360 - angle
|
43 |
return angle
|
44 |
|
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()
|
52 |
|
53 |
def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
|
|
|
|
|
|
|
54 |
image = frame.to_ndarray(format="bgr24")
|
55 |
h, w = image.shape[:2]
|
56 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
|
|
42 |
angle = 360 - angle
|
43 |
return angle
|
44 |
|
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()
|
52 |
|
53 |
def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
54 |
+
counterL=0#Counter checks for number of curls
|
55 |
+
correct=0
|
56 |
+
incorrect=0
|
57 |
+
stage='mid'#it checks if we our hand is UP or DOWN
|
58 |
image = frame.to_ndarray(format="bgr24")
|
59 |
h, w = image.shape[:2]
|
60 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|