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

Opening local video triggers Killed #120

Open
tteresi7 opened this issue Oct 22, 2024 · 2 comments
Open

Opening local video triggers Killed #120

tteresi7 opened this issue Oct 22, 2024 · 2 comments

Comments

@tteresi7
Copy link

tteresi7 commented Oct 22, 2024

The following code triggers an exit with the message Killed.

import torch

from cotracker.utils.visualizer import Visualizer, read_video_from_path


video = read_video_from_path('path/to/local/video.mp4')
video = torch.from_numpy(video).permute(0, 3, 1, 2)[None].float()

The message is triggered after the torch call.

@nikitakaraevv
Copy link
Contributor

Hi @tteresi7, you need to provide a path to your video

@tteresi7
Copy link
Author

Hi @tteresi7, you need to provide a path to your video

I mean obviously. I was simply providing example code. The problem is the float call absolutely rips through memory. There's probably more memory efficient ways to handle the video in the call. This snippet was taken from the examples you provided. Basically right now, it opens the video, stores it in memory, then creates a torch copy of it and then rips through memory going to float. I got it to run using swap memory, but then when you go to write the video per the snippets in the repository, it creates yet another copy and rips through the remaining swap memory.

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