hkchengrex / Tracking-Anything-with-DEVA

[ICCV 2023] Tracking Anything with Decoupled Video Segmentation
https://hkchengrex.com/Tracking-Anything-with-DEVA/
Other
1.27k stars 129 forks source link

How to Perform Inference on Multiple Videos? #99

Closed weilllllls closed 5 months ago

weilllllls commented 5 months ago

Hi, thanks for your great work!

I find that the inference code only supports processing one video at a time. I modified the code to process multiple videos, like processing an entire dataset. However, I found that while the results for the first video were good, some problems occurred when processing the second and subsequent videos. I tried adjusting some parameter settings and found that this phenomenon might be related to buffer/memory issues. How should I modify my code?

I use 'online' mode and 'text-prompted'. The 'semionline' mode has the same problem.

The result of the first video's first frame:

image

Then, process the second video's first frame:

image

If I perform inference on the second video directly (no video was processed before), the result of the first frame looks good:

image
hkchengrex commented 5 months ago

Thank you for your interest! You can simply recreate a new DEVAInferenceCore instance (and ResultSaver if you are using it) for each video. All the internal states should be cleared.