Mudassir-75 commited on
Commit
64cdd29
·
verified ·
1 Parent(s): 1675686

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -92,7 +92,7 @@ def process_video():
92
  # Extract 60 frames from the video
93
  success, frame = cap.read()
94
  frame_count = 0
95
- while success and frame_count < 60:
96
  frames.append(frame)
97
  success, frame = cap.read()
98
  frame_count += 1
@@ -115,7 +115,7 @@ def process_video():
115
  initial_right_wrist = None
116
 
117
  for frame_index, frame in enumerate(frames):
118
- input_tensor = tf.image.resize_with_pad(tf.convert_to_tensor(frame, dtype=tf.uint8), 256, 256)
119
  input_tensor = tf.cast(input_tensor, dtype=tf.int32) # Cast to int32 instead of float32
120
  input_tensor = tf.expand_dims(input_tensor, axis=0)
121
  keypoints = movenet_model.signatures['serving_default'](input_tensor)
 
92
  # Extract 60 frames from the video
93
  success, frame = cap.read()
94
  frame_count = 0
95
+ while success and frame_count < 20:
96
  frames.append(frame)
97
  success, frame = cap.read()
98
  frame_count += 1
 
115
  initial_right_wrist = None
116
 
117
  for frame_index, frame in enumerate(frames):
118
+ input_tensor = tf.image.resize_with_pad(tf.convert_to_tensor(frame, dtype=tf.uint8), 128, 128)
119
  input_tensor = tf.cast(input_tensor, dtype=tf.int32) # Cast to int32 instead of float32
120
  input_tensor = tf.expand_dims(input_tensor, axis=0)
121
  keypoints = movenet_model.signatures['serving_default'](input_tensor)