You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing inference in a video, you need to use inference_state = predictor.init_state()
to initialize the state, which will load all frames of the video, and if the video is large, it will take up a lot of memory or even fail.
I don't know why it needs to load all frames, is there any way to use segmentation or other methods to do inference in a large video?
The text was updated successfully, but these errors were encountered:
I was also having also issues when using a large video. You can try using smaller video chunks and feed that to the model. Another option is to offload the video to the CPU. I understand that takes a bit longer but it is a good workaround if you are running out of GPU memory.
It's possible to avoid loading the frames into memory, but requires some (small) code changes. With some other changes (to avoid caching results per-frame), you can keep the VRAM use under 2GB for any video length. There's more info in issue #264.
When doing inference in a video, you need to use
inference_state = predictor.init_state()
to initialize the state, which will load all frames of the video, and if the video is large, it will take up a lot of memory or even fail.
I don't know why it needs to load all frames, is there any way to use segmentation or other methods to do inference in a large video?
The text was updated successfully, but these errors were encountered: