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

Function coords_grid

demo_video.py:43–47  ·  view source on GitHub ↗
(batch, ht, wd)

Source from the content-addressed store, hash-verified

41 print('video saved')
42
43def coords_grid(batch, ht, wd):
44 coords = torch.meshgrid(torch.arange(ht), torch.arange(wd))
45 coords = torch.stack(coords[::-1], dim=0).float()
46
47 return coords[None].repeat(batch, 1, 1, 1)
48
49def image_flow_warp(image, flow, padding_mode='zeros'):
50 '''

Callers 2

image_flow_warpFunction · 0.70
blendFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected