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

IndexError: list index out of range #9

Open
Sanskriti-1711 opened this issue Apr 10, 2023 · 1 comment
Open

IndexError: list index out of range #9

Sanskriti-1711 opened this issue Apr 10, 2023 · 1 comment

Comments

@Sanskriti-1711
Copy link

When I am trying to run this command:
python3 spot_deepfakes.py --media_type video --data_dir ../sample_videos/dfdc/fake/ --dataset dfdc --model TimmV2 TimmV2ST ViT ViTST --model_dir ../models/ --video_id 0 1 2 --annotate True --device 0 --output_dir output/

I am receiving the following error:
Traceback (most recent call last):
File "/home/sanskriti/df_spot/DeepFake-Spot/src/spot_deepfakes.py", line 121, in
main()
File "/home/sanskriti/df_spot/DeepFake-Spot/src/spot_deepfakes.py", line 99, in main
predictions = utils.extract_predict_annotate(output_dir, ensemble_models, video_glob, video_idxs, transformer, blazeface_dir, device, models_loaded)

File "/home/sanskriti/df_spot/DeepFake-Spot/src/utils/utils.py", line 343, in extract_predict_annotate
vid = cv2.VideoCapture(video_glob[ne])
~~~~~~~~~~^^^^
IndexError: list index out of range

It is similar to the other datasets as well.

@twoBitSoda
Copy link

I know this response is too late to help you, but I found that you need to include --annotate True at the end of the bash command to fix this error. Why, I have no idea. My command looks like this:
python3 spot_deepfakes.py --media_type video --data_dir ../sample_videos/dfdc/fake/ --dataset dfdc --model TimmV2 TimmV2ST ViT ViTST --model_dir ../models --video_id 0 --annotate True

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