rdroste / unisal

Unified Image and Video Saliency Modeling (ECCV 2020)
https://arxiv.org/abs/2003.05477
Apache License 2.0
128 stars 36 forks source link

Frame files not being detected? #20

Open maksim-dh opened 1 month ago

maksim-dh commented 1 month ago

I keep encountering the following error on an Ubuntu VM:

torch device set to: cpu Train ID: pretrained_unisal /home/azureuser/miniconda3/envs/unisal/lib/python3.7/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.) return _VF.meshgrid(tensors, *kwargs) # type: ignore[attr-defined] Best weights loaded Traceback (most recent call last): File "run.py", line 97, in fire.Fire() File "/home/azureuser/miniconda3/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/azureuser/miniconda3/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/azureuser/miniconda3/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace component = fn(varargs, **kwargs) File "run.py", line 70, in predictions_from_folder folder_path, is_video, source=source, model_domain=model_domain) File "/home/azureuser/unisal/unisal/train.py", line 935, in generate_predictions_from_path images_path, source=source, frame_modulo=frame_modulo File "/home/azureuser/unisal/unisal/data.py", line 1123, in init img = cv2.imread(str(frame_files[0])) IndexError: list index out of range

I have all video frames downloaded as png files in a separated folder ~/videos/frames/

The command I am using to try and activate the pretrained model is this :~/unisal$ python run.py predictions_from_folder ~/videos/frames --is_video True --train_id pretrained_unisal

Would appreciate any possible assistance with this, thank you!

rdroste commented 1 month ago

Could you make sure that the environment variables are correctly set as described in this section? https://github.com/rdroste/unisal?tab=readme-ov-file#data

maksim-dh commented 1 month ago

Are these required even when using the pretrained model? Thank you.