AssafSinger94 / dino-tracker

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

FileNotFoundError: dino_best_buddies/ dino_best_buddies_filter.pt #2

Closed wuyiqii closed 2 months ago

wuyiqii commented 4 months ago

First of all, thank you for your wonderful work. I tried running python ./preprocessing/main_preprocessing.py \ --config ./config/preprocessing.yaml \ --data-path ,Is always unable to output the expected result correctly. Error message: FileNotFoundError: [Errno 2] No such file or directory: '/dino-tracker/dataset/pig/dino_best_buddies/ dino_best_buddies_filter.pt '. How can I solve this problem WeChatebf3d9b35481703c7cf7335a26284d66

tnarek commented 4 months ago

Hi @wuyiqii , thanks you your message! Can you please send us the full output of running main_preprocessing.py ? Since it comprises of running multiple sub-scripts, it is possible that one of them crashed, thus not creating the dino_best_buddies_filtered.pt file needed for the next subscript

wuyiqii commented 4 months ago

Thanks you your message! I run main_preprocessing.py again processed a 780kb video, and here are the output: Traceback (most recent call last): File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/extract_trajectories.py", line 282, in save_trajectories(args) File "/home/Wuyiqi/anaconda3/envs/dt/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/extract_trajectories.py", line 185, in save_trajectories masks, flows = get_flows_with_masks( File "/home/Wuyiqi/anaconda3/envs/dt/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/extract_trajectories.py", line 44, in get_flows_with_masks flows = torch. zeros((2, len(images) - 1, 2, h, w), device=device) RuntimeError: Trying to create tensor with negative dimension -1: [2, -1, 2, 476, 854] ----- Running python ./preprocessing/save_dino_embed_video.py --data-path /share/data02/wuyiqidata/dino-tracker/dataset/pig/ --config ./config/preprocessing.yaml Traceback (most recent call last): File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/save_dino_embed_video.py", line 35, in save_dino_embed_video(args) File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/save_dino_embed_video.py", line 20, in save_dino_embed_video video = load_video(video_folder=video_folder, resize=(h, w), num_frames=400).to(device) # T x 3 x H x W File "/share/data02/wuyiqidata/dino-tracker/data/data_utils.py", line 104, in load_video return torch.stack(video) RuntimeError: stack expects a non-empty TensorList ----- Running python ./preprocessing/save_dino_embed_video.py --data-path /share/data02/wuyiqidata/dino-tracker/dataset/pig/ --config ./config/preprocessing. yaml --for-mask Traceback (most recent call last): File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/save_dino_embed_video.py", line 35, in save_dino_embed_video(args) File "/share/data02/wuyiqidata/dino-tracker/./preprocessing/save_dino_embed_video.py", line 20, in save_dino_embed_video video = load_video(video_folder=video_folder, resize=(h, w), num_frames=400).to(device) # T x 3 x H x W File "/share/data02/wuyiqidata/dino-tracker/data/data_utils.py", line 104, in load_video return torch.stack(video) RuntimeError: stack expects a non-empty TensorList

image
tnarek commented 4 months ago

it seems the first error occurred when extracting the trajectories. I suspect either the path to the dataset is not correct, or the dataset folder does not contain any jpg or png files ?

Ivandanilovich commented 2 months ago

I got this error on windows. Problem is that line images = list(input_folder.glob("*.jpg")) + list(input_folder.glob("*.png")) is not find images. File extract_trajectories.py. Need to convert linux path format to windows like input_path = input_path.replace('\\', '/')

tnarek commented 2 months ago

thanks @Ivandanilovich , I'm closing this issue for now. If there'll be further questions please feel free to repoen it.