Update app.py
Browse files
app.py
CHANGED
|
@@ -88,10 +88,10 @@ def read_flo_file(filename):
|
|
| 88 |
def warp(frame1, frame2, flo_path, blend=0.5, weights_path=None):
|
| 89 |
#flo_path = flo_path.cpu().data.numpy()
|
| 90 |
flow21 = flo_path.cpu().data.numpy()
|
| 91 |
-
frame1pil = np.array(frame1.
|
| 92 |
frame1_warped21 = warp_flow(frame1pil, flow21)
|
| 93 |
# frame2pil = frame1pil
|
| 94 |
-
frame2pil = np.array(frame2.
|
| 95 |
|
| 96 |
if weights_path:
|
| 97 |
forward_weights = load_cc(weights_path)
|
|
|
|
| 88 |
def warp(frame1, frame2, flo_path, blend=0.5, weights_path=None):
|
| 89 |
#flo_path = flo_path.cpu().data.numpy()
|
| 90 |
flow21 = flo_path.cpu().data.numpy()
|
| 91 |
+
frame1pil = np.array(frame1.resize((flow21.shape[1],flow21.shape[0])))
|
| 92 |
frame1_warped21 = warp_flow(frame1pil, flow21)
|
| 93 |
# frame2pil = frame1pil
|
| 94 |
+
frame2pil = np.array(frame2.resize((flow21.shape[1],flow21.shape[0])))
|
| 95 |
|
| 96 |
if weights_path:
|
| 97 |
forward_weights = load_cc(weights_path)
|