Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def get_warp_res(fname_image, fname_flow, fname_output='warped.png'):
|
|
102 |
print(f"FNAME IMAGE: {fname_image}")
|
103 |
im2 = imread(fname_image)
|
104 |
print(f"FNAME IMAGE READED: {im2}")
|
105 |
-
flow =
|
106 |
im_warped, _ = warpImage(im2, flow[:, :, 0], flow[:, :, 1])
|
107 |
imwrite(fname_output, im_warped)
|
108 |
|
@@ -206,7 +206,7 @@ def infer():
|
|
206 |
# display the PIL image
|
207 |
#img.show()
|
208 |
img.save('frame_input.jpg')
|
209 |
-
res = get_warp_res("frame_input.jpg",
|
210 |
print(res)
|
211 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|
212 |
####################################
|
|
|
102 |
print(f"FNAME IMAGE: {fname_image}")
|
103 |
im2 = imread(fname_image)
|
104 |
print(f"FNAME IMAGE READED: {im2}")
|
105 |
+
flow = fname_flow
|
106 |
im_warped, _ = warpImage(im2, flow[:, :, 0], flow[:, :, 1])
|
107 |
imwrite(fname_output, im_warped)
|
108 |
|
|
|
206 |
# display the PIL image
|
207 |
#img.show()
|
208 |
img.save('frame_input.jpg')
|
209 |
+
res = get_warp_res("frame_input.jpg", predicted_flow, fname_output='warped.png')
|
210 |
print(res)
|
211 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|
212 |
####################################
|