nikkar commited on
Commit
d5d6c2a
·
verified ·
1 Parent(s): 23c0323

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -350,7 +350,7 @@ def track(
350
  query_points_tensor = query_points_tensor[None].flip(-1).to(device, dtype) # xyt -> tyx
351
  query_points_tensor = query_points_tensor[:, :, [0, 2, 1]] # tyx -> txy
352
 
353
- video_input = torch.tensor(video_input).unsqueeze(0).to(device, dtype)
354
 
355
  model = torch.hub.load("facebookresearch/co-tracker", "cotracker3_online")
356
  model = model.to(device)
@@ -381,7 +381,7 @@ def track(
381
  #
382
  for ind in range(0, video_input.shape[1] - model.step, model.step):
383
  pred_tracks, pred_visibility = model(
384
- video_chunk=video_input[:, ind : ind + model.step * 2],
385
  grid_size=0,
386
  queries=queries,
387
  add_support_grid=add_support_grid
 
350
  query_points_tensor = query_points_tensor[None].flip(-1).to(device, dtype) # xyt -> tyx
351
  query_points_tensor = query_points_tensor[:, :, [0, 2, 1]] # tyx -> txy
352
 
353
+ video_input = torch.tensor(video_input).unsqueeze(0)
354
 
355
  model = torch.hub.load("facebookresearch/co-tracker", "cotracker3_online")
356
  model = model.to(device)
 
381
  #
382
  for ind in range(0, video_input.shape[1] - model.step, model.step):
383
  pred_tracks, pred_visibility = model(
384
+ video_chunk=video_input[:, ind : ind + model.step * 2].to(device, dtype),
385
  grid_size=0,
386
  queries=queries,
387
  add_support_grid=add_support_grid