fffiloni commited on
Commit
d66afa3
1 Parent(s): 4555a55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -228,10 +228,14 @@ def infer():
228
  # res = cv2.remap(img, flow, None, cv2.INTER_LINEAR)
229
  res = cv2.remap(frame1pil, numpy_array_flow, None, cv2.INTER_LANCZOS4)
230
  print(res)
 
231
  res = Image.fromarray(res)
232
  res.save('wraped.jpg')
233
- image4 = Image.blend(res,frame1pil,0.5)
 
 
234
  image4.save("output2.jpg")
 
235
  return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg', 'wraped.jpg', "output2.jpg"
236
  ####################################
237
  # Bonus: Creating GIFs of predicted flows
 
228
  # res = cv2.remap(img, flow, None, cv2.INTER_LINEAR)
229
  res = cv2.remap(frame1pil, numpy_array_flow, None, cv2.INTER_LANCZOS4)
230
  print(res)
231
+
232
  res = Image.fromarray(res)
233
  res.save('wraped.jpg')
234
+
235
+ blend2 = Image.open('frame_input.jpg')
236
+ image4 = Image.blend(res,blend2,0.5)
237
  image4.save("output2.jpg")
238
+
239
  return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg', 'wraped.jpg', "output2.jpg"
240
  ####################################
241
  # Bonus: Creating GIFs of predicted flows