Update app.py
Browse files
app.py
CHANGED
@@ -390,9 +390,11 @@ def track(
|
|
390 |
for frame_colors in query_points_color:
|
391 |
colors.extend(frame_colors)
|
392 |
colors = np.array(colors)
|
|
|
|
|
393 |
|
394 |
vis = Visualizer(save_dir="./saved_videos", pad_value=120, linewidth=3)
|
395 |
-
painted_video = vis.visualize(
|
396 |
|
397 |
# painted_video = paint_point_track(video_preview,tracks,pred_occ,colors)
|
398 |
|
|
|
390 |
for frame_colors in query_points_color:
|
391 |
colors.extend(frame_colors)
|
392 |
colors = np.array(colors)
|
393 |
+
|
394 |
+
pred_tracks = (pred_tracks * torch.tensor([video_preview.shape[2], video_preview.shape[1]]).to(device) / torch.tensor([VIDEO_INPUT_RESO[1], VIDEO_INPUT_RESO[0]]).to(device))
|
395 |
|
396 |
vis = Visualizer(save_dir="./saved_videos", pad_value=120, linewidth=3)
|
397 |
+
painted_video = vis.visualize(torch.tensor(painted_video.permute(0, 3, 1, 2)[None]).to(pred_tracks.device), pred_tracks, pred_visibility, save_video=False)
|
398 |
|
399 |
# painted_video = paint_point_track(video_preview,tracks,pred_occ,colors)
|
400 |
|