hkchengrex / XMem

[ECCV 2022] XMem: Long-Term Video Object Segmentation with an Atkinson-Shiffrin Memory Model
https://hkchengrex.com/XMem/
MIT License
1.76k stars 192 forks source link

raise NotImplementedError #43

Closed Davidyao99 closed 1 year ago

Davidyao99 commented 2 years ago

I was running the model and noticed a NotImplementedError being raised. I was wondering why is this error raised and how should I avoid it. I am guessing the model is trying to remove a tracked object from memory to free up space?

hkchengrex commented 2 years ago

Can you post more information? I am guessing that new objects are introduced after the first frame in a very long video. That is not implemented at the moment -- you can either have all the objects in the first frame and have full functionality or have new objects but disable the garbage collection in long-term memory (increasing --max_long_term_elements). You can also "pad" the new objects in the first frame.

Davidyao99 commented 2 years ago

I am actually trying to introduce new objects after the first frame. I am doing this by calling set_all_labels with the existing labels + new labels for new objects, and calling processor.step() on the masks with the new objects on later frames. Reading the code and seeing the results seem to suggest that this works. Thank you, I will try increasing the max_long_term_elements and see if it helps!!