add torch.hub support

This commit is contained in:
nikitakaraevv
2023-07-21 07:30:44 -07:00
parent d7d1e92742
commit 24054be360
5 changed files with 126 additions and 58 deletions

View File

@@ -55,6 +55,11 @@ if __name__ == "__main__":
segm_mask = torch.from_numpy(segm_mask)[None, None]
model = CoTrackerPredictor(checkpoint=args.checkpoint)
if torch.cuda.is_available():
model = model.cuda()
video = video.cuda()
else:
print("CUDA is not available!")
pred_tracks, pred_visibility = model(
video,