Update app.py
Browse files
app.py
CHANGED
@@ -211,16 +211,10 @@ def infer():
|
|
211 |
print(f"img1_batch dtype: {img1_batch.dtype}")
|
212 |
#res = get_warp_res(img1_batch, "predicted_flow.jpg", 'warped.png')
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
# print('flow stats', flow.max(), flow.min(), flow.mean())
|
219 |
-
# print(flow)
|
220 |
-
flow*1.
|
221 |
-
# print('flow stats mul', flow.max(), flow.min(), flow.mean())
|
222 |
-
# res = cv2.remap(img, flow, None, cv2.INTER_LINEAR)
|
223 |
-
res = cv2.remap(img1_batch, flow, None, cv2.INTER_LANCZOS4)
|
224 |
|
225 |
#print(res)
|
226 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|
|
|
211 |
print(f"img1_batch dtype: {img1_batch.dtype}")
|
212 |
#res = get_warp_res(img1_batch, "predicted_flow.jpg", 'warped.png')
|
213 |
|
214 |
+
numpy_array_flow = predicted_flow.numpy()
|
215 |
+
print(f"numpy_array_flow: {numpy_array_flow}")
|
216 |
+
print(f"numpy_array_flow shape: {numpy_array_flow.shape}")
|
217 |
+
print(f"numpy_array_flow dtype: {numpy_array_flow.dtype}")
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
#print(res)
|
220 |
return "done", "predicted_flow.jpg", ["flofile.flo"], 'frame_input.jpg'
|