Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
91a2d3c
1
Parent(s):
7896d24
docs: little update
Browse files
app.py
CHANGED
|
@@ -264,6 +264,7 @@ def on_example_click(
|
|
| 264 |
print("Build Canvas by Example!")
|
| 265 |
visual_canvas, initial_visual_canvas, inference_canvas, _, _ = build_canvas(input_image, resized_height, resized_width, top_left_height, top_left_width, bottom_right_height, bottom_right_width)
|
| 266 |
print("Init visual_canvas shape is", visual_canvas.shape)
|
|
|
|
| 267 |
|
| 268 |
|
| 269 |
# Sequentially load the Trajs of all instances on the canvas
|
|
@@ -324,7 +325,8 @@ def build_canvas(input_image_path, resized_height, resized_width, top_left_heigh
|
|
| 324 |
expand_width = resized_width + top_left_width + bottom_right_width
|
| 325 |
inference_canvas = np.uint8(np.zeros((expand_height, expand_width, 3))) # Whole Black Canvas, same as other inference
|
| 326 |
visual_canvas = np.full((expand_height, expand_width, 3), canvas_color, dtype=np.uint8)
|
| 327 |
-
print("Visual Canvas is", visual_canvas.shape)
|
|
|
|
| 328 |
|
| 329 |
|
| 330 |
# Sanity Check
|
|
@@ -615,6 +617,7 @@ def inference(inference_canvas, visual_canvas, text_prompt, traj_lists, main_ref
|
|
| 615 |
|
| 616 |
|
| 617 |
# Create the traj tensor
|
|
|
|
| 618 |
print("inference_canvas shape is", inference_canvas.shape)
|
| 619 |
traj_tensor, traj_imgs_np, _, img_with_traj = VideoDataset_Motion.prepare_traj_tensor(
|
| 620 |
full_pred_tracks, canvas_height, canvas_width,
|
|
|
|
| 264 |
print("Build Canvas by Example!")
|
| 265 |
visual_canvas, initial_visual_canvas, inference_canvas, _, _ = build_canvas(input_image, resized_height, resized_width, top_left_height, top_left_width, bottom_right_height, bottom_right_width)
|
| 266 |
print("Init visual_canvas shape is", visual_canvas.shape)
|
| 267 |
+
print("inference_canvas shape is", inference_canvas.shape)
|
| 268 |
|
| 269 |
|
| 270 |
# Sequentially load the Trajs of all instances on the canvas
|
|
|
|
| 325 |
expand_width = resized_width + top_left_width + bottom_right_width
|
| 326 |
inference_canvas = np.uint8(np.zeros((expand_height, expand_width, 3))) # Whole Black Canvas, same as other inference
|
| 327 |
visual_canvas = np.full((expand_height, expand_width, 3), canvas_color, dtype=np.uint8)
|
| 328 |
+
print("Init Visual Canvas shape is", visual_canvas.shape)
|
| 329 |
+
print("Init Inference Canvs shape is", inference_canvas.shape)
|
| 330 |
|
| 331 |
|
| 332 |
# Sanity Check
|
|
|
|
| 617 |
|
| 618 |
|
| 619 |
# Create the traj tensor
|
| 620 |
+
print("visual_canvas shape is", visual_canvas.shape)
|
| 621 |
print("inference_canvas shape is", inference_canvas.shape)
|
| 622 |
traj_tensor, traj_imgs_np, _, img_with_traj = VideoDataset_Motion.prepare_traj_tensor(
|
| 623 |
full_pred_tracks, canvas_height, canvas_width,
|