MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / save_video

Function save_video

demo_video.py:35–41  ·  view source on GitHub ↗
(imgs, size, video_path, fps=30)

Source from the content-addressed store, hash-verified

33 return imgs, fps
34
35def save_video(imgs, size, video_path, fps=30):
36 fourcc = cv2.VideoWriter_fourcc(*'XVID')
37 out = cv2.VideoWriter(video_path, fourcc, fps, size)
38 for frame in imgs:
39 out.write(frame)
40 out.release()
41 print('video saved')
42
43def coords_grid(batch, ht, wd):
44 coords = torch.meshgrid(torch.arange(ht), torch.arange(wd))

Callers 1

demoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected