@@ -95,8 +95,7 @@ def get_one_flow(file_name, ori_img_h, ori_img_w):
9595 # [1,2,H,W]->[H,W,2]
9696 flow_data_one = np .transpose (np .squeeze (
9797 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
98- # FIXME: np.resize use repeat, may do harm,
99- # but for now don't know how to upsample coordinates.
98+ # np.resize use repeat, may try other ways.
10099 flow_data_one = np .resize (np .ascontiguousarray (
101100 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
102101 return flow_data_one
@@ -123,8 +122,7 @@ def get_one_flow_inverse(file_name, ori_img_h, ori_img_w):
123122 # [1,2,H,W]->[H,W,2]
124123 flow_data_one = np .transpose (np .squeeze (
125124 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
126- # FIXME: np.resize use repeat, may do harm,
127- # but for now don't know how to upsample coordinates.
125+ # np.resize use repeat, may try other ways.
128126 flow_data_one = np .resize (np .ascontiguousarray (
129127 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
130128 return flow_data_one
@@ -150,8 +148,7 @@ def get_one_flow_gauss_noise(file_name, ori_img_h, ori_img_w, flow_noise_std):
150148 # [1,2,H,W]->[H,W,2]
151149 flow_data_one = np .transpose (np .squeeze (
152150 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
153- # FIXME: np.resize use repeat, may do harm,
154- # but for now don't know how to upsample coordinates.
151+ # np.resize use repeat, may try other ways.
155152 flow_data_one = np .resize (np .ascontiguousarray (
156153 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
157154 return flow_data_one
@@ -177,8 +174,7 @@ def get_one_flow_constant_noise(file_name, ori_img_h, ori_img_w, constant_noise_
177174 # [1,2,H,W]->[H,W,2]
178175 flow_data_one = np .transpose (np .squeeze (
179176 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
180- # FIXME: np.resize use repeat, may do harm,
181- # but for now don't know how to upsample coordinates.
177+ # np.resize use repeat, may try other ways.
182178 flow_data_one = np .resize (np .ascontiguousarray (
183179 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
184180 return flow_data_one
@@ -207,8 +203,7 @@ def get_bdd_one_flow(file_name, ori_img_h, ori_img_w):
207203 # [1,2,H,W]->[H,W,2]
208204 flow_data_one = np .transpose (np .squeeze (
209205 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
210- # FIXME: np.resize use repeat, may do harm,
211- # but for now don't know how to upsample coordinates.
206+ # np.resize use repeat, may try other ways.
212207 flow_data_one = np .resize (np .ascontiguousarray (
213208 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
214209 return flow_data_one
@@ -250,8 +245,7 @@ def get_ytvis_2019_one_flow(file_name, ori_img_h, ori_img_w):
250245 # [1,2,H,W]->[H,W,2]
251246 flow_data_one = np .transpose (np .squeeze (
252247 flow_data_one , axis = 0 ), axes = (1 , 2 , 0 ))
253- # FIXME: np.resize use repeat, may do harm,
254- # but for now don't know how to upsample coordinates.
248+ # np.resize use repeat, may try other ways.
255249 flow_data_one = np .resize (np .ascontiguousarray (
256250 flow_data_one ), (ori_img_h , ori_img_w , 2 ))
257251 return flow_data_one
0 commit comments