MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / visualize_flow

Function visualize_flow

visualize_flow.py:154–163  ·  view source on GitHub ↗
(root_dir, viz_root_dir, model, img_pairs, keep_size)

Source from the content-addressed store, hash-verified

152 return model
153
154def visualize_flow(root_dir, viz_root_dir, model, img_pairs, keep_size):
155 weights = None
156 for img_pair in img_pairs:
157 fn1, fn2 = img_pair
158 print(f"processing {fn1}, {fn2}...")
159
160 image1, image2, viz_fn = prepare_image(root_dir, viz_root_dir, fn1, fn2, keep_size)
161 flow = compute_flow(model, image1, image2, weights)
162 flow_img = flow_viz.flow_to_image(flow)
163 cv2.imwrite(viz_fn, flow_img[:, :, [2,1,0]])
164
165def process_sintel(sintel_dir):
166 img_pairs = []

Callers 1

visualize_flow.pyFile · 0.85

Calls 2

prepare_imageFunction · 0.85
compute_flowFunction · 0.85

Tested by

no test coverage detected