Skip to content

Commit d1869e0

Browse files
author
John Harrington
committed
Adding progress notifier
1 parent 068c2d2 commit d1869e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

demo/demo.py

+4
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,15 @@ def get_deepHRnet_keypoints(video, output_dir=None, output_video=False, save_kpt
258258
vid_fps = vidcap.get(cv2.CAP_PROP_FPS)
259259
out = cv2.VideoWriter(save_path,fourcc, vid_fps, (int(vidcap.get(3)),int(vidcap.get(4))))
260260

261+
frame_num = 0
261262
while True:
262263
ret, image_bgr = vidcap.read()
263264
if ret:
264265
image = image_bgr[:, :, [2, 1, 0]]
265266

267+
frame_num += 1
268+
print(f"Processing frame {frame_num}")
269+
266270
input = []
267271
img = cv2.cvtColor(image_bgr, cv2.COLOR_BGR2RGB)
268272
img_tensor = torch.from_numpy(img/255.).permute(2,0,1).float().to(CTX)

0 commit comments

Comments
 (0)