Update app.py
Browse files
app.py
CHANGED
@@ -98,10 +98,12 @@ def warpImage(im, vx, vy, cast_uint8=True):
|
|
98 |
|
99 |
|
100 |
def get_warp_res(fname_image, fname_flow, fname_output='warped.png'):
|
|
|
101 |
im2 = imread(fname_image)
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
105 |
|
106 |
def infer():
|
107 |
video_url = "https://download.pytorch.org/tutorial/pexelscom_pavel_danilyuk_basketball_hd.mp4"
|
@@ -109,10 +111,10 @@ def infer():
|
|
109 |
_ = urlretrieve(video_url, video_path)
|
110 |
|
111 |
frames, _, _ = read_video(str(video_path), output_format="TCHW")
|
112 |
-
|
113 |
img1_batch = torch.stack([frames[100]])
|
114 |
img2_batch = torch.stack([frames[101]])
|
115 |
-
|
116 |
weights = Raft_Large_Weights.DEFAULT
|
117 |
transforms = weights.transforms()
|
118 |
|
|
|
98 |
|
99 |
|
100 |
def get_warp_res(fname_image, fname_flow, fname_output='warped.png'):
|
101 |
+
print(f"FNAME IMAGE: {fname_image")
|
102 |
im2 = imread(fname_image)
|
103 |
+
print(f"FNAME IMAGE READED: {im2}")
|
104 |
+
#flow = readFlowFile(fname_flow)
|
105 |
+
#im_warped, _ = warpImage(im2, flow[:, :, 0], flow[:, :, 1])
|
106 |
+
#imwrite(fname_output, im_warped)
|
107 |
|
108 |
def infer():
|
109 |
video_url = "https://download.pytorch.org/tutorial/pexelscom_pavel_danilyuk_basketball_hd.mp4"
|
|
|
111 |
_ = urlretrieve(video_url, video_path)
|
112 |
|
113 |
frames, _, _ = read_video(str(video_path), output_format="TCHW")
|
114 |
+
print(f"FRAME BEFORE: {frames[100]}")
|
115 |
img1_batch = torch.stack([frames[100]])
|
116 |
img2_batch = torch.stack([frames[101]])
|
117 |
+
print(f"FRAME AFTER: {img1_batch}")
|
118 |
weights = Raft_Large_Weights.DEFAULT
|
119 |
transforms = weights.transforms()
|
120 |
|