Skip to content

Instantly share code, notes, and snippets.

@aquadzn
Last active November 25, 2023 20:47
Show Gist options
  • Save aquadzn/32ac53aa6e485e7c3e09b1a0914f7422 to your computer and use it in GitHub Desktop.
Save aquadzn/32ac53aa6e485e7c3e09b1a0914f7422 to your computer and use it in GitHub Desktop.
DINO Video inference
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sachdevkartik
Copy link

[FIX] File not found '../output/attn-image-%03d.jpg'

Actually there is a typo in there, it should be:
!ffmpeg -framerate 60 -i ../out/attn-img-%03d.jpg ../output.mp4

Good evening I would like to know if you can help me with this error, I don't know how to call the "vision_transformer" module. I really appreciate it

Did you resolve this? If not, be sure to run all of the cells in order and change into the DINO directory beforehand with "%cd dino/" and it might be helpful to import it as "vits" (import vision_transformer as vits) as that is how it is called in the notebook.

Yes, thank you very much Felipe, as you said I had missed running the% cd dino / code. I was finally able to get to the end of the code but again I have been stuck since I got a new warning that does not let me continue. Please if you can help me with this.

@felipe-parodi
Copy link

Has anyone tried using the other models? I get several size mismatch errors

@Bennetash
Copy link

Has anyone tried using the other models? I get several size mismatch errors

I have not trained it with another network, but I will try and tell you.

@patriciajelee
Copy link

Can anyone help me out here? I've tried changing args.input_path to "../input/" and args.output_dir to "../output/" as suggested above but keep running into the following error:

predict_video(args)

IsADirectoryError Traceback (most recent call last)
in ()
----> 1 predict_video(args)

in predict_video(args)
1 def predict_video(args):
2 for frame in sorted(os.listdir(args.image_path)):
----> 3 with open(os.path.join(args.image_path, frame), 'rb') as f:
4 img = Image.open(f)
5 img = img.convert('RGB')

IsADirectoryError: [Errno 21] Is a directory: '../input/.ipynb_checkpoints'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment