Update app.py
Browse files
app.py
CHANGED
@@ -394,7 +394,7 @@ def track(
|
|
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(video_preview.permute(0, 3, 1, 2)[None]
|
398 |
|
399 |
# painted_video = paint_point_track(video_preview,tracks,pred_occ,colors)
|
400 |
|
|
|
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(video_preview).permute(0, 3, 1, 2)[None].to(pred_tracks.device), pred_tracks, pred_visibility, save_video=False)[0].permute(0, 2, 3, 1).cpu().numpy()
|
398 |
|
399 |
# painted_video = paint_point_track(video_preview,tracks,pred_occ,colors)
|
400 |
|