Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,8 @@ def write_flo(flow, filename):
|
|
60 |
|
61 |
#warp using scipy
|
62 |
def warp_image(im, flow):
|
63 |
-
flow.cpu()
|
|
|
64 |
h, w = flow.shape[:2]
|
65 |
flow[:,:,0] += np.arange(w)
|
66 |
flow[:,:,1] += np.arange(h)[:,np.newaxis]
|
|
|
60 |
|
61 |
#warp using scipy
|
62 |
def warp_image(im, flow):
|
63 |
+
flow = flow.cpu().data.numpy()
|
64 |
+
flow = flow.astype(np.float32)
|
65 |
h, w = flow.shape[:2]
|
66 |
flow[:,:,0] += np.arange(w)
|
67 |
flow[:,:,1] += np.arange(h)[:,np.newaxis]
|