Pratyush101 commited on
Commit
ccdec95
·
verified ·
1 Parent(s): b32d463

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -126,7 +126,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
126
  cv2.putText(image, 'Left', (10, 22),
127
  cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
128
 
129
- cv2.putText(image, str(correct),
130
  (10, 70), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
131
 
132
  # Stage data for left leg
@@ -134,25 +134,25 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
134
  cv2.putText(image, 'STAGE', (180, 22),
135
  cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
136
 
137
- cv2.putText(image, stage,
138
  (170, 70), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
139
 
140
- # Hip angle
141
 
142
 
143
- cv2.putText(image, 'HipL', (10, 150),
144
- cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
145
 
146
- cv2.putText(image, str(angleHipL),
147
- (0, 200), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
148
 
149
- # Knee angle
150
 
151
- cv2.putText(image, 'Knee', (180, 150),
152
- cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
153
 
154
- cv2.putText(image, str(angleKneeL),
155
- (170, 200), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
156
  mp_drawing.draw_landmarks(image, results.pose_landmarks, mp_pose.POSE_CONNECTIONS,mp_drawing.DrawingSpec(color=(255, 175, 0), thickness=2, circle_radius=2),mp_drawing.DrawingSpec(color=(0, 255, 200), thickness=2, circle_radius=2))
157
 
158
  result_queue.put(detections)
 
126
  cv2.putText(image, 'Left', (10, 22),
127
  cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
128
 
129
+ cv2.putText(image, str(int(angleHipL)),
130
  (10, 70), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
131
 
132
  # Stage data for left leg
 
134
  cv2.putText(image, 'STAGE', (180, 22),
135
  cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
136
 
137
+ cv2.putText(image, str(int(angleKneeL)),
138
  (170, 70), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
139
 
140
+ # # Hip angle
141
 
142
 
143
+ # cv2.putText(image, 'HipL', (10, 150),
144
+ # cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
145
 
146
+ # cv2.putText(image, str(int(angleHipL)),
147
+ # (0, 200), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
148
 
149
+ # # Knee angle
150
 
151
+ # cv2.putText(image, 'Knee', (180, 150),
152
+ # cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2, cv2.LINE_AA)
153
 
154
+ # cv2.putText(image, str(int(angleKneeL)),
155
+ # (170, 200), cv2.FONT_HERSHEY_SIMPLEX, 1.7, (255, 255, 255), 2, cv2.LINE_AA)
156
  mp_drawing.draw_landmarks(image, results.pose_landmarks, mp_pose.POSE_CONNECTIONS,mp_drawing.DrawingSpec(color=(255, 175, 0), thickness=2, circle_radius=2),mp_drawing.DrawingSpec(color=(0, 255, 200), thickness=2, circle_radius=2))
157
 
158
  result_queue.put(detections)