MCPcopy
hub / github.com/princeton-vl/RAFT / load_image

Function load_image

demo.py:20–23  ·  view source on GitHub ↗
(imfile)

Source from the content-addressed store, hash-verified

18DEVICE = 'cuda'
19
20def load_image(imfile):
21 img = np.array(Image.open(imfile)).astype(np.uint8)
22 img = torch.from_numpy(img).permute(2, 0, 1).float()
23 return img[None].to(DEVICE)
24
25
26def viz(img, flo):

Callers 1

demoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected