AssafSinger94 / dino-tracker

Official Pytorch Implementation for “DINO-Tracker: Taming DINO for Self-Supervised Point Tracking in a Single Video”
MIT License
404 stars 40 forks source link

Visualisation Errors #32

Open Yingminj opened 2 months ago

Yingminj commented 2 months ago

Thank you for your work. When I run the python visualization/visualize_rainbow.py report an error frame 0 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 1 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 2 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 3 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 4 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 5 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 6 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 7 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 8 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 9 and canonical frame 51 have less than 4 valid trajectories for homography estimation. frame 10 and canonical frame 51 have less than 4 valid trajectories for homography estimation. Traceback (most recent call last): File "/home/ros/YING/dino-tracker/visualization/visualize_rainbow.py", line 160, in <module> run(args) File "/home/ros/anaconda3/envs/dino-tracker/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/home/ros/YING/dino-tracker/visualization/visualize_rainbow.py", line 113, in run bg_of_tracks = filter_bg_trajectories_for_homographies(bg_of_trajectories, canonical_frame=args.canonical_frame) File "/home/ros/YING/dino-tracker/visualization/visualize_rainbow.py", line 51, in filter_bg_trajectories_for_homographies of_idx_list = torch.stack(of_idx_list, dim=1) RuntimeError: stack expects each tensor to be equal size, but got [0] at entry 0 and [2] at entry 28

How can I solve this problem, is there a way to weed out the mismatched frames and visualise them?

tnarek commented 2 months ago

hi @Yingminj, I'd suggest changing the canonical frame to the one that has the most correspondences available w.r.t. the other frames, see the --canonical-frame argument in the script.