Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame files not being detected? #20

Open
maksim-dh opened this issue Jul 18, 2024 · 2 comments
Open

Frame files not being detected? #20

maksim-dh opened this issue Jul 18, 2024 · 2 comments

Comments

@maksim-dh
Copy link

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
Copy link
Owner

rdroste commented Jul 19, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants