fffiloni commited on
Commit
999f248
1 Parent(s): b47b54d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.convert('RGB').resize((flow21.shape[1],flow21.shape[0])))
92
  frame1_warped21 = warp_flow(frame1pil, flow21)
93
  # frame2pil = frame1pil
94
- frame2pil = np.array(frame2.convert('RGB').resize((flow21.shape[1],flow21.shape[0])))
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)