Spaces:
Runtime error
Runtime error
Future-Tense
commited on
Commit
·
b18bae5
1
Parent(s):
97ed606
Update app.py
Browse files
app.py
CHANGED
@@ -96,10 +96,10 @@ def vid_play(vid_cap,vid_out):
|
|
96 |
(x_shape, y_shape))
|
97 |
ret, frame = player.read() # Read the first frame.
|
98 |
while True: # Run until stream is out of frames
|
99 |
-
start_time = time() # We would like to measure the FPS.
|
100 |
results = score_frame(frame) # Score the Frame
|
101 |
frame = plot_boxes(results, frame) # Plot the boxes.
|
102 |
-
end_time = time()
|
103 |
fps = 1/np.round(end_time - start_time, 3) #Measure the FPS.
|
104 |
print(f"Frames Per Second : {fps}")
|
105 |
out.write(frame) # Write the frame onto the output.
|
|
|
96 |
(x_shape, y_shape))
|
97 |
ret, frame = player.read() # Read the first frame.
|
98 |
while True: # Run until stream is out of frames
|
99 |
+
start_time = time.time() # We would like to measure the FPS.
|
100 |
results = score_frame(frame) # Score the Frame
|
101 |
frame = plot_boxes(results, frame) # Plot the boxes.
|
102 |
+
end_time = time.time()
|
103 |
fps = 1/np.round(end_time - start_time, 3) #Measure the FPS.
|
104 |
print(f"Frames Per Second : {fps}")
|
105 |
out.write(frame) # Write the frame onto the output.
|