zmelumian commited on
Commit
e493629
1 Parent(s): 85a3cf8

Fixed multiple videos save

Browse files
Files changed (1) hide show
  1. inference.py +3 -1
inference.py CHANGED
@@ -332,7 +332,9 @@ def main():
332
  )
333
 
334
  for i in range(images.shape[0]):
335
- video_np = images.squeeze(0).permute(1, 2, 3, 0).cpu().float().numpy()
 
 
336
  video_np = (video_np * 255).astype(np.uint8)
337
  fps = args.frame_rate
338
  height, width = video_np.shape[1:3]
 
332
  )
333
 
334
  for i in range(images.shape[0]):
335
+ # Gathering from B, C, F, H, W to C, F, H, W and then permuting to F, H, W, C
336
+ video_np = images[i].permute(1, 2, 3, 0).cpu().float().numpy()
337
+ # Unnormalizing images to [0, 255] range
338
  video_np = (video_np * 255).astype(np.uint8)
339
  fps = args.frame_rate
340
  height, width = video_np.shape[1:3]