Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def write_flo(flow, filename):
|
|
66 |
|
67 |
def warp_flow(img, flow, mul=1.):
|
68 |
#img = np.array(img.convert('RGB'))
|
69 |
-
img = cv2.imread(img,mode='RGB')
|
70 |
#flow = np.load(flow)
|
71 |
h, w = flow.shape[:2]
|
72 |
flow = flow.copy()
|
@@ -194,7 +194,7 @@ def infer():
|
|
194 |
# display the PIL image
|
195 |
#img.show()
|
196 |
img.save('frame_input.jpg')
|
197 |
-
res = get_warp_res('frame_input.jpg', predicted_flow,
|
198 |
#print(res)
|
199 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|
200 |
####################################
|
|
|
66 |
|
67 |
def warp_flow(img, flow, mul=1.):
|
68 |
#img = np.array(img.convert('RGB'))
|
69 |
+
#img = cv2.imread(img,mode='RGB')
|
70 |
#flow = np.load(flow)
|
71 |
h, w = flow.shape[:2]
|
72 |
flow = flow.copy()
|
|
|
194 |
# display the PIL image
|
195 |
#img.show()
|
196 |
img.save('frame_input.jpg')
|
197 |
+
res = get_warp_res('frame_input.jpg', "predicted_flow.jpg", 'warped.png')
|
198 |
#print(res)
|
199 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|
200 |
####################################
|